diff --git a/.gitignore b/.gitignore index 714c0a222..daa7830dd 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,8 @@ storybook-static CLAUDE.local.md -.claude \ No newline at end of file +.claude + +# hardhat generated files in workspace contract projects +contracts/*/artifacts +contracts/*/cache diff --git a/README.md b/README.md index e2534a312..69a730693 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,16 @@ Vortex is a gateway for cross-border payments. It is built on top of the Pendulu ## Repository Structure -This is a **Bun monorepo** containing multiple sub-projects organized into apps and packages: +This is a **Bun monorepo** containing multiple sub-projects organized into apps, packages, and contracts: ### Apps - **[apps/api](apps/api)** - Backend API service providing signature services, on/off-ramping flows, quote generation, and transaction state management - **[apps/frontend](apps/frontend)** - React-based web application built with Vite for the Vortex user interface - **[apps/rebalancer](apps/rebalancer)** - Service for automated liquidity rebalancing across chains +### Contracts + +- **[contracts/relayer](contracts/relayer)** - Hardhat project for relayer smart contracts and deployment scripts ### Packages @@ -69,6 +72,11 @@ bun dev:backend bun dev:rebalancer ``` +**Relayer contract local node:** +```bash +bun dev:contracts:relayer +``` + ### Building **Build all projects:** @@ -91,6 +99,15 @@ bun build:sdk bun build:shared ``` +**Relayer contract:** +```bash +# Compile contracts +bun compile:contracts:relayer + +# Run contract tests +bun test:contracts:relayer +``` + ## Sub-Project Specific Instructions ### Frontend (apps/frontend) diff --git a/apps/api/.env.example b/apps/api/.env.example index 7cd26ef98..738c8f098 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -64,3 +64,8 @@ DELTA_D_BASIS_POINTS=0.3 # RSA Keys for Webhook Signing # Only the private key is needed - public key is derived from it WEBHOOK_PRIVATE_KEY=your-webhook-private-key + +# AlfredPay +ALFREDPAY_BASE_URL=your-alfredpay-base-url +ALFREDPAY_API_KEY=your-alfredpay-api-key +ALFREDPAY_API_SECRET=your-alfredpay-api-secret diff --git a/apps/api/src/api/controllers/alfredpay.controller.ts b/apps/api/src/api/controllers/alfredpay.controller.ts new file mode 100644 index 000000000..6cc387042 --- /dev/null +++ b/apps/api/src/api/controllers/alfredpay.controller.ts @@ -0,0 +1,426 @@ +import { + AlfredPayCountry, + AlfredPayStatus, + AlfredpayApiService, + AlfredpayCreateCustomerRequest, + AlfredpayCreateCustomerResponse, + AlfredpayCustomerType, + AlfredpayGetKybRedirectLinkResponse, + AlfredpayGetKybStatusResponse, + AlfredpayGetKycRedirectLinkRequest, + AlfredpayGetKycRedirectLinkResponse, + AlfredpayGetKycStatusRequest, + AlfredpayGetKycStatusResponse, + AlfredpayKybStatus, + AlfredpayKycRedirectFinishedRequest, + AlfredpayKycRedirectOpenedRequest, + AlfredpayKycStatus, + AlfredpayStatusRequest, + AlfredpayStatusResponse +} from "@vortexfi/shared"; +import { Request, Response } from "express"; +import logger from "../../config/logger"; +import AlfredPayCustomer from "../../models/alfredPayCustomer.model"; +import { SupabaseAuthService } from "../services/auth/supabase.service"; + +export class AlfredpayController { + private static mapKycStatus(status: AlfredpayKycStatus): AlfredPayStatus | null { + switch (status) { + case AlfredpayKycStatus.IN_REVIEW: + return AlfredPayStatus.Verifying; + case AlfredpayKycStatus.FAILED: + return AlfredPayStatus.Failed; + case AlfredpayKycStatus.COMPLETED: + return AlfredPayStatus.Success; + case AlfredpayKycStatus.CREATED: + default: + return null; // Do nothing + // TODO how do we map their UPDATE_REQUIRED required? what does it mean in terms of flow, for our user? + } + } + + static async alfredpayStatus(req: Request, res: Response) { + try { + const { country } = req.query as unknown as AlfredpayStatusRequest; + const userId = req.userId!; + + const alfredPayCustomer = await AlfredPayCustomer.findOne({ + order: [["updatedAt", "DESC"]], + where: { country: country as AlfredPayCountry, userId } + }); + + if (!alfredPayCustomer) { + return res.status(404).json({ error: "Alfredpay customer not found" }); + } + + const alfredpayService = AlfredpayApiService.getInstance(); + + try { + const lastSubmission = await alfredpayService.getLastKycSubmission(alfredPayCustomer.alfredPayId); + + if (lastSubmission && lastSubmission.submissionId) { + const statusResponse = await alfredpayService.getKycStatus( + alfredPayCustomer.alfredPayId, + lastSubmission.submissionId + ); + + const newStatus = AlfredpayController.mapKycStatus(statusResponse.status); + const updateData: Partial = {}; + + if (newStatus && newStatus !== alfredPayCustomer.status) { + updateData.status = newStatus; + } + + if (newStatus === AlfredPayStatus.Failed && statusResponse.metadata?.failureReason) { + updateData.lastFailureReasons = [statusResponse.metadata.failureReason]; + } + + if (Object.keys(updateData).length > 0) { + await alfredPayCustomer.update(updateData); + } + } + } catch (error) { + logger.error("Error refreshing Alfredpay status:", error); + } + + const response: AlfredpayStatusResponse = { + country: alfredPayCustomer.country, + creationTime: alfredPayCustomer.createdAt.toISOString(), + status: alfredPayCustomer.status + }; + + res.json(response); + } catch (error) { + logger.error("Error finding Alfredpay customer:", error); + res.status(500).json({ error: "Internal server error" }); + } + } + + static async createIndividualCustomer(req: Request, res: Response) { + try { + const { country } = req.body as AlfredpayCreateCustomerRequest; + const userId = req.userId!; + + const user = await SupabaseAuthService.getUserProfile(userId); + if (!user || !user.email) { + return res.status(404).json({ error: "User not found or email missing" }); + } + + // Check if customer already exists in our DB + const existingDbCustomer = await AlfredPayCustomer.findOne({ + where: { country: country as AlfredPayCountry, userId } + }); + + if (existingDbCustomer) { + return res.status(400).json({ error: "Customer already exists" }); + } + + const alfredpayService = AlfredpayApiService.getInstance(); + + const newCustomer = await alfredpayService.createCustomer(user.email, AlfredpayCustomerType.INDIVIDUAL, country); + const customerId = newCustomer.customerId; + + await AlfredPayCustomer.create({ + alfredPayId: customerId, + country: country as AlfredPayCountry, + status: AlfredPayStatus.Consulted, + type: AlfredpayCustomerType.INDIVIDUAL, + userId + }); + + const response: AlfredpayCreateCustomerResponse = { + createdAt: new Date().toISOString() + }; + + res.json(response); + } catch (error) { + logger.error("Error creating Alfredpay customer:", error); + res.status(500).json({ error: "Internal server error" }); + } + } + + static async getKycRedirectLink(req: Request, res: Response) { + try { + const { country } = req.query as unknown as AlfredpayGetKycRedirectLinkRequest; + const userId = req.userId!; + + const alfredPayCustomer = await AlfredPayCustomer.findOne({ + where: { country: country as AlfredPayCountry, userId } + }); + + if (!alfredPayCustomer) { + return res.status(404).json({ error: "Alfredpay customer not found" }); + } + + if (alfredPayCustomer.status === AlfredPayStatus.Verifying || alfredPayCustomer.status === AlfredPayStatus.Success) { + return res.status(400).json({ error: "KYC is already verifying or completed" }); + } + + const alfredpayService = AlfredpayApiService.getInstance(); + + try { + const lastSubmission = await alfredpayService.getLastKycSubmission(alfredPayCustomer.alfredPayId); + if (lastSubmission && lastSubmission.submissionId) { + const statusRes = await alfredpayService.getKycStatus(alfredPayCustomer.alfredPayId, lastSubmission.submissionId); + if (statusRes.status === "COMPLETED" || statusRes.status === "IN_REVIEW") { + return res.status(400).json({ error: `KYC is in status ${statusRes.status}` }); + } + } + } catch (e) { + logger.info("No previous KYC submission found or error fetching it, proceeding."); + } + + const linkResponse = await alfredpayService.getKycRedirectLink(alfredPayCustomer.alfredPayId, country); + + res.json(linkResponse as AlfredpayGetKycRedirectLinkResponse); + } catch (error) { + logger.error("Error getting KYC redirect link:", error); + res.status(500).json({ error: "Internal server error" }); + } + } + + static async kycRedirectOpened(req: Request, res: Response) { + try { + const { country, type } = req.body as unknown as { country: string; type?: AlfredpayCustomerType }; + const userId = req.userId!; + const selectedType = type || AlfredpayCustomerType.INDIVIDUAL; + + const alfredPayCustomer = await AlfredPayCustomer.findOne({ + order: [["updatedAt", "DESC"]], + where: { country: country as AlfredPayCountry, type: selectedType, userId } + }); + + if (!alfredPayCustomer) { + return res.status(404).json({ error: "Alfredpay customer not found" }); + } + + await alfredPayCustomer.update({ status: AlfredPayStatus.LinkOpened }); + + res.json({ success: true }); + } catch (error) { + logger.error("Error marking KYC redirect opened:", error); + res.status(500).json({ error: "Internal server error" }); + } + } + + static async kycRedirectFinished(req: Request, res: Response) { + try { + const { country, type } = req.body as unknown as { country: string; type?: AlfredpayCustomerType }; + const userId = req.userId!; + const selectedType = type || AlfredpayCustomerType.INDIVIDUAL; + + const alfredPayCustomer = await AlfredPayCustomer.findOne({ + order: [["updatedAt", "DESC"]], + where: { country: country as AlfredPayCountry, type: selectedType, userId } + }); + + if (!alfredPayCustomer) { + return res.status(404).json({ error: "Alfredpay customer not found" }); + } + + await alfredPayCustomer.update({ status: AlfredPayStatus.UserCompleted }); + + res.json({ success: true }); + } catch (error) { + logger.error("Error marking KYC redirect finished:", error); + res.status(500).json({ error: "Internal server error" }); + } + } + + static async getKycStatus(req: Request, res: Response) { + try { + const { country, type } = req.query as unknown as { country: string; type?: AlfredpayCustomerType }; + const userId = req.userId!; + const selectedType = type || AlfredpayCustomerType.INDIVIDUAL; + + const alfredPayCustomer = await AlfredPayCustomer.findOne({ + order: [["updatedAt", "DESC"]], + where: { country: country as AlfredPayCountry, type: selectedType, userId } + }); + + if (!alfredPayCustomer) { + return res.status(404).json({ error: "Alfredpay customer not found" }); + } + + const alfredpayService = AlfredpayApiService.getInstance(); + const isBusiness = selectedType === AlfredpayCustomerType.BUSINESS; + + const lastSubmission = isBusiness + ? await alfredpayService.getLastKybSubmission(alfredPayCustomer.alfredPayId) + : await alfredpayService.getLastKycSubmission(alfredPayCustomer.alfredPayId); + + if (!lastSubmission || !lastSubmission.submissionId) { + return res.status(404).json({ error: "No KYC attempt found" }); + } + + const statusResponse = isBusiness + ? await alfredpayService.getKybStatus(alfredPayCustomer.alfredPayId, lastSubmission.submissionId) + : await alfredpayService.getKycStatus(alfredPayCustomer.alfredPayId, lastSubmission.submissionId); + + const newStatus = AlfredpayController.mapKycStatus(statusResponse.status); + console.log("newStatus", newStatus); + const updateData: Partial = {}; + + console.log("our status", alfredPayCustomer.status); + if (newStatus && newStatus !== alfredPayCustomer.status) { + updateData.status = newStatus; + } + + if (newStatus === AlfredPayStatus.Failed && statusResponse.metadata?.failureReason) { + updateData.lastFailureReasons = [statusResponse.metadata.failureReason]; + } + + if (Object.keys(updateData).length > 0) { + await alfredPayCustomer.update(updateData); + } + + const response: AlfredpayGetKycStatusResponse = { + alfred_pay_id: alfredPayCustomer.alfredPayId, + country: alfredPayCustomer.country, + lastFailure: updateData.lastFailureReasons?.[0] || alfredPayCustomer.lastFailureReasons?.[0], // Get the latest failure reason + status: (newStatus || alfredPayCustomer.status) as AlfredPayStatus, + updated_at: alfredPayCustomer.updatedAt.toISOString() + }; + + res.json(response); + } catch (error) { + logger.error("Error getting KYC status:", error); + res.status(500).json({ error: "Internal server error" }); + } + } + + static async retryKyc(req: Request, res: Response) { + try { + const { country, type } = req.body as { country: string; type?: AlfredpayCustomerType }; + const userId = req.userId!; + const selectedType = type || AlfredpayCustomerType.INDIVIDUAL; + + const alfredPayCustomer = await AlfredPayCustomer.findOne({ + order: [["updatedAt", "DESC"]], + where: { country: country as AlfredPayCountry, type: selectedType, userId } + }); + + if (!alfredPayCustomer) { + return res.status(404).json({ error: "Alfredpay customer not found" }); + } + + const alfredpayService = AlfredpayApiService.getInstance(); + const isBusiness = selectedType === AlfredpayCustomerType.BUSINESS; + + const lastSubmission = isBusiness + ? await alfredpayService.getLastKybSubmission(alfredPayCustomer.alfredPayId) + : await alfredpayService.getLastKycSubmission(alfredPayCustomer.alfredPayId); + + if (!lastSubmission || !lastSubmission.submissionId) { + return res.status(400).json({ error: "No KYC submission found to retry" }); + } + + const statusRes = isBusiness + ? await alfredpayService.getKybStatus(alfredPayCustomer.alfredPayId, lastSubmission.submissionId) + : await alfredpayService.getKycStatus(alfredPayCustomer.alfredPayId, lastSubmission.submissionId); + + if (statusRes.status !== AlfredpayKycStatus.FAILED) { + return res.status(400).json({ error: `Cannot retry KYC. Current status is ${statusRes.status}` }); + } + + if (isBusiness) { + await alfredpayService.retryKybSubmission(alfredPayCustomer.alfredPayId, lastSubmission.submissionId); + const linkResponse = await alfredpayService.getKybRedirectLink(alfredPayCustomer.alfredPayId); + await alfredPayCustomer.update({ status: AlfredPayStatus.Consulted }); + return res.json(linkResponse as AlfredpayGetKybRedirectLinkResponse); + } else { + await alfredpayService.retryKycSubmission(alfredPayCustomer.alfredPayId, lastSubmission.submissionId); + const linkResponse = await alfredpayService.getKycRedirectLink(alfredPayCustomer.alfredPayId, country); + await alfredPayCustomer.update({ status: AlfredPayStatus.Consulted }); + return res.json(linkResponse as AlfredpayGetKycRedirectLinkResponse); + } + } catch (error) { + logger.error("Error retrying KYC:", error); + res.status(500).json({ error: "Internal server error" }); + } + } + + static async createBusinessCustomer(req: Request, res: Response) { + try { + const { country } = req.body as { country: string }; + const userId = req.userId!; + + const user = await SupabaseAuthService.getUserProfile(userId); + if (!user || !user.email) { + return res.status(404).json({ error: "User not found or email missing" }); + } + + const type = AlfredpayCustomerType.BUSINESS; + + const existingDbCustomer = await AlfredPayCustomer.findOne({ + where: { country: country as AlfredPayCountry, type, userId } + }); + + if (existingDbCustomer) { + return res.status(400).json({ error: "Business customer already exists" }); + } + + const alfredpayService = AlfredpayApiService.getInstance(); + + const newCustomer = await alfredpayService.createCustomer(user.email, type, country); + const customerId = newCustomer.customerId; + + await AlfredPayCustomer.create({ + alfredPayId: customerId, + country: country as AlfredPayCountry, + status: AlfredPayStatus.Consulted, + type, + userId + }); + + const response: AlfredpayCreateCustomerResponse = { + createdAt: new Date().toISOString() + }; + + res.json(response); + } catch (error) { + logger.error("Error creating Alfredpay business customer:", error); + res.status(500).json({ error: "Internal server error" }); + } + } + + static async getKybRedirectLink(req: Request, res: Response) { + try { + const { country } = req.query as unknown as AlfredpayGetKycRedirectLinkRequest; + const userId = req.userId!; + + const alfredPayCustomer = await AlfredPayCustomer.findOne({ + where: { country: country as AlfredPayCountry, type: AlfredpayCustomerType.BUSINESS, userId } + }); + + if (!alfredPayCustomer) { + return res.status(404).json({ error: "Alfredpay business customer not found" }); + } + + if (alfredPayCustomer.status === AlfredPayStatus.Verifying || alfredPayCustomer.status === AlfredPayStatus.Success) { + return res.status(400).json({ error: "KYB is already verifying or completed" }); + } + + const alfredpayService = AlfredpayApiService.getInstance(); + + try { + const lastSubmission = await alfredpayService.getLastKybSubmission(alfredPayCustomer.alfredPayId); + if (lastSubmission && lastSubmission.submissionId) { + const statusRes = await alfredpayService.getKybStatus(alfredPayCustomer.alfredPayId, lastSubmission.submissionId); + if (statusRes.status === AlfredpayKybStatus.COMPLETED || statusRes.status === AlfredpayKybStatus.IN_REVIEW) { + return res.status(400).json({ error: `KYB is in status ${statusRes.status}` }); + } + } + } catch (e) { + logger.info("No previous KYB submission found or error fetching it, proceeding."); + } + + const linkResponse = await alfredpayService.getKybRedirectLink(alfredPayCustomer.alfredPayId); + + res.json(linkResponse as AlfredpayGetKybRedirectLinkResponse); + } catch (error) { + logger.error("Error getting KYB redirect link:", error); + res.status(500).json({ error: "Internal server error" }); + } + } +} diff --git a/apps/api/src/api/middlewares/alfredpay.middleware.ts b/apps/api/src/api/middlewares/alfredpay.middleware.ts new file mode 100644 index 000000000..f0b23110a --- /dev/null +++ b/apps/api/src/api/middlewares/alfredpay.middleware.ts @@ -0,0 +1,16 @@ +import { AlfredPayCountry } from "@vortexfi/shared"; +import { NextFunction, Request, Response } from "express"; + +export const validateResultCountry = (req: Request, res: Response, next: NextFunction) => { + const country = (req.query.country || req.body.country) as string; + + if (!country) { + return res.status(400).json({ error: "Country is required" }); + } + + if (!Object.values(AlfredPayCountry).includes(country as AlfredPayCountry)) { + return res.status(400).json({ error: `Invalid country: ${country}` }); + } + + next(); +}; diff --git a/apps/api/src/api/routes/v1/alfredpay.route.ts b/apps/api/src/api/routes/v1/alfredpay.route.ts new file mode 100644 index 000000000..3fd75cfe0 --- /dev/null +++ b/apps/api/src/api/routes/v1/alfredpay.route.ts @@ -0,0 +1,18 @@ +import { Router } from "express"; +import { AlfredpayController } from "../../controllers/alfredpay.controller"; +import { validateResultCountry } from "../../middlewares/alfredpay.middleware"; +import { requireAuth } from "../../middlewares/supabaseAuth"; + +const router = Router(); + +router.get("/alfredpayStatus", requireAuth, validateResultCountry, AlfredpayController.alfredpayStatus); +router.post("/createIndividualCustomer", requireAuth, validateResultCountry, AlfredpayController.createIndividualCustomer); +router.get("/getKycRedirectLink", requireAuth, validateResultCountry, AlfredpayController.getKycRedirectLink); +router.post("/kycRedirectOpened", requireAuth, validateResultCountry, AlfredpayController.kycRedirectOpened); +router.post("/kycRedirectFinished", requireAuth, validateResultCountry, AlfredpayController.kycRedirectFinished); +router.get("/getKycStatus", requireAuth, validateResultCountry, AlfredpayController.getKycStatus); +router.post("/retryKyc", requireAuth, validateResultCountry, AlfredpayController.retryKyc); +router.post("/createBusinessCustomer", requireAuth, validateResultCountry, AlfredpayController.createBusinessCustomer); +router.get("/getKybRedirectLink", requireAuth, validateResultCountry, AlfredpayController.getKybRedirectLink); + +export default router; diff --git a/apps/api/src/api/routes/v1/index.ts b/apps/api/src/api/routes/v1/index.ts index 576d8d8fd..8774114d1 100644 --- a/apps/api/src/api/routes/v1/index.ts +++ b/apps/api/src/api/routes/v1/index.ts @@ -3,6 +3,7 @@ import { sendStatusWithPk as sendMoonbeamStatusWithPk } from "../../controllers/ import { sendStatusWithPk as sendPendulumStatusWithPk } from "../../controllers/pendulum.controller"; import { sendStatusWithPk as sendStellarStatusWithPk } from "../../controllers/stellar.controller"; import partnerApiKeysRoutes from "./admin/partner-api-keys.route"; +import alfredpayRoutes from "./alfredpay.route"; import authRoutes from "./auth.route"; import brlaRoutes from "./brla.route"; import contactRoutes from "./contact.route"; @@ -163,6 +164,12 @@ router.use("/maintenance", maintenanceRoutes); */ router.use("/auth", authRoutes); +/** + * GET v1/alfredpay + * POST v1/alfredpay + */ +router.use("/alfredpay", alfredpayRoutes); + /** * GET v1/monerium */ diff --git a/apps/api/src/api/services/phases/handlers/alfredpay-offramp-transfer-handler.ts b/apps/api/src/api/services/phases/handlers/alfredpay-offramp-transfer-handler.ts new file mode 100644 index 000000000..c65cd490d --- /dev/null +++ b/apps/api/src/api/services/phases/handlers/alfredpay-offramp-transfer-handler.ts @@ -0,0 +1,132 @@ +import { + AlfredpayApiService, + AlfredpayOfframpStatus, + EvmClientManager, + EvmNetworks, + Networks, + RampPhase +} from "@vortexfi/shared"; +import logger from "../../../../config/logger"; +import QuoteTicket from "../../../../models/quoteTicket.model"; +import RampState from "../../../../models/rampState.model"; +import { BasePhaseHandler } from "../base-phase-handler"; +import { StateMetadata } from "../meta-state-types"; + +const ALFREDPAY_POLL_INTERVAL_MS = 5000; +const ALFREDPAY_OFFRAMP_TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes + +export class AlfredpayOfframpTransferHandler extends BasePhaseHandler { + public getPhaseName(): RampPhase { + return "alfredpayOfframpTransfer"; + } + + protected async executePhase(state: RampState): Promise { + const { alfredpayTransactionId, alfredpayOfframpTransferTxHash } = state.state as StateMetadata; + + if (!alfredpayTransactionId) { + throw new Error("AlfredpayOfframpTransferHandler: Missing alfredpayTransactionId in state."); + } + + const alfredpayApiService = AlfredpayApiService.getInstance(); + const evmClientManager = EvmClientManager.getInstance(); + + const alfredpayTx = await alfredpayApiService.getOfframpTransaction(alfredpayTransactionId); + if (!alfredpayTx) { + throw new Error(`AlfredpayOfframpTransferHandler: Transaction ${alfredpayTransactionId} not found in Alfredpay.`); + } + + const expirationDate = new Date(alfredpayTx.expiration); + if (expirationDate < new Date()) { + logger.error(`AlfredpayOfframpTransferHandler: Alfredpay transaction ${alfredpayTransactionId} has expired.`); + return this.transitionToNextPhase(state, "failed"); + } + + if (!alfredpayOfframpTransferTxHash) { + logger.info(`AlfredpayOfframpTransferHandler: Executing final transfer for Alfredpay offramp ${alfredpayTransactionId}`); + + const { txData: offrampTransfer } = this.getPresignedTransaction(state, "alfredpayOfframpTransfer"); + + const txHash = await evmClientManager.sendRawTransactionWithRetry( + Networks.Polygon as EvmNetworks, + offrampTransfer as `0x${string}` + ); + + await state.update({ + state: { + ...state.state, + alfredpayOfframpTransferTxHash: txHash + } + }); + + logger.info(`AlfredpayOfframpTransferHandler: Final transfer sent. Hash: ${txHash}`); + } else { + try { + const client = evmClientManager.getClient(Networks.Polygon as EvmNetworks); + const receipt = await client.getTransactionReceipt({ hash: alfredpayOfframpTransferTxHash as `0x${string}` }); + if (receipt.status !== "success") { + throw new Error( + `AlfredpayOfframpTransferHandler: Final transfer transaction ${alfredpayOfframpTransferTxHash} failed on chain.` + ); + } + } catch (error: any) { + if (error?.name !== "TransactionReceiptNotFoundError") { + throw error; + } + } + } + + try { + await this.pollAlfredpayOfframpStatus(alfredpayTransactionId, ALFREDPAY_POLL_INTERVAL_MS); + } catch (error: any) { + if (error?.kind === "failed") { + logger.error(`AlfredpayOfframpTransferHandler: Alfredpay offramp FAILED. Reason: ${error.failureReason ?? "unknown"}`); + return this.transitionToNextPhase(state, "failed"); + } + + throw this.createRecoverableError( + `AlfredpayOfframpTransferHandler: Error polling Alfredpay status: ${error instanceof Error ? error.message : String(error)}` + ); + } + + return this.transitionToNextPhase(state, "complete"); + } + + private async pollAlfredpayOfframpStatus(transactionId: string, intervalMs: number): Promise { + const alfredpayApiService = AlfredpayApiService.getInstance(); + const startTime = Date.now(); + + return new Promise((resolve, reject) => { + const poll = async () => { + if (Date.now() - startTime > ALFREDPAY_OFFRAMP_TIMEOUT_MS) { + reject(new Error(`AlfredpayOfframpTransferHandler: Polling timed out after ${ALFREDPAY_OFFRAMP_TIMEOUT_MS}ms`)); + return; + } + + try { + const response = await alfredpayApiService.getOfframpTransaction(transactionId); + const { status } = response; + + if (status === AlfredpayOfframpStatus.COMPLETED) { + resolve(); + return; + } + + if (status === AlfredpayOfframpStatus.FAILED) { + reject({ failureReason: "Alfredpay reported FAILED status", kind: "failed" as const }); + return; + } + + logger.debug(`AlfredpayOfframpTransferHandler: Alfredpay offramp ${transactionId} status: ${status}`); + } catch (error: any) { + logger.warn(`AlfredpayOfframpTransferHandler: Error polling Alfredpay status for ${transactionId}: ${error}`); + } + + setTimeout(poll, intervalMs); + }; + + poll(); + }); + } +} + +export default new AlfredpayOfframpTransferHandler(); diff --git a/apps/api/src/api/services/phases/handlers/alfredpay-onramp-mint-handler.ts b/apps/api/src/api/services/phases/handlers/alfredpay-onramp-mint-handler.ts new file mode 100644 index 000000000..d23b9810f --- /dev/null +++ b/apps/api/src/api/services/phases/handlers/alfredpay-onramp-mint-handler.ts @@ -0,0 +1,144 @@ +import { + AlfredpayApiService, + AlfredpayOnrampStatus, + BalanceCheckError, + BalanceCheckErrorType, + checkEvmBalancePeriodically, + ERC20_USDC_POLYGON, + ERC20_USDC_POLYGON_DECIMALS, + Networks, + RampPhase +} from "@vortexfi/shared"; +import logger from "../../../../config/logger"; +import QuoteTicket from "../../../../models/quoteTicket.model"; +import RampState from "../../../../models/rampState.model"; +import { BasePhaseHandler } from "../base-phase-handler"; +import { StateMetadata } from "../meta-state-types"; + +const ALFREDPAY_ONRAMP_MINT_TIMEOUT_MS = 5 * 60 * 1000; +const BALANCE_POLL_INTERVAL_MS = 5000; +const ALFREDPAY_POLL_INTERVAL_MS = 5000; + +export class AlfredpayOnrampMintHandler extends BasePhaseHandler { + public getPhaseName(): RampPhase { + return "alfredpayOnrampMint"; + } + + protected async executePhase(state: RampState): Promise { + const { evmEphemeralAddress, alfredpayTransactionId } = state.state as StateMetadata; + + if (!evmEphemeralAddress) { + throw new Error("AlfredpayOnrampMintHandler: Missing evmEphemeralAddress in state. This is a bug."); + } + + if (!alfredpayTransactionId) { + throw new Error("AlfredpayOnrampMintHandler: Missing alfredpayTransactionId in state. This is a bug."); + } + + const quote = await QuoteTicket.findByPk(state.quoteId); + if (!quote) { + throw new Error("AlfredpayOnrampMintHandler: Quote not found for the given state."); + } + + if (!quote.metadata.alfredpayMint?.outputAmountRaw) { + throw new Error("AlfredpayOnrampMintHandler: Missing 'alfredpayMint.outputAmountRaw' in quote metadata."); + } + + const expectedAmountRaw = quote.metadata.alfredpayMint.outputAmountRaw; + + logger.info( + `AlfredpayOnrampMintHandler: Waiting for ${expectedAmountRaw} USDC (raw, ${ERC20_USDC_POLYGON_DECIMALS} decimals) ` + + `on Polygon at ephemeral address ${evmEphemeralAddress}. Alfredpay transactionId: ${alfredpayTransactionId}` + ); + + const balanceCheckPromise = checkEvmBalancePeriodically( + ERC20_USDC_POLYGON, + evmEphemeralAddress, + expectedAmountRaw, + BALANCE_POLL_INTERVAL_MS, + ALFREDPAY_ONRAMP_MINT_TIMEOUT_MS, + Networks.Polygon + ); + + const alfredpayPollingPromise = this.pollAlfredpayOnrampStatus(alfredpayTransactionId, state, ALFREDPAY_POLL_INTERVAL_MS); + + // - balanceCheckPromise resolves when the USDC balance is met → proceed, or rejects if timeout → recoverable error. + // - alfredpayPollingPromise rejects if FAILED → transition to failed. Not recoverable + // (it does NOT resolve on ON_CHAIN_COMPLETED, because we trust the balance check) + try { + await Promise.race([balanceCheckPromise, alfredpayPollingPromise]); + } catch (error: any) { + if (error?.kind === "failed") { + logger.error(`AlfredpayOnrampMintHandler: Alfredpay onramp FAILED. Reason: ${error.failureReason ?? "unknown"}`); + return this.transitionToNextPhase(state, "failed"); + } + + if (error instanceof BalanceCheckError && error.type === BalanceCheckErrorType.Timeout) { + throw this.createRecoverableError( + `AlfredpayOnrampMintHandler: Balance check timed out after ${ALFREDPAY_ONRAMP_MINT_TIMEOUT_MS}ms` + ); + } + + // Safe to make generic recovery. + throw this.createRecoverableError( + `AlfredpayOnrampMintHandler: Failed to check balance or poll Alfredpay status: ${error instanceof Error ? error.message : String(error)}` + ); + } + + logger.info( + `AlfredpayOnrampMintHandler: USDC balance reached on Polygon ephemeral ${evmEphemeralAddress}. Proceeding to fundEphemeral.` + ); + + return this.transitionToNextPhase(state, "fundEphemeral"); + } + + private async pollAlfredpayOnrampStatus(transactionId: string, state: RampState, intervalMs: number): Promise { + const alfredpayApiService = AlfredpayApiService.getInstance(); + + return new Promise((_, reject) => { + const poll = async () => { + try { + const response = await alfredpayApiService.getOnrampTransaction(transactionId); + const { status, metadata } = response; + + if (status === AlfredpayOnrampStatus.FAILED) { + reject({ failureReason: metadata?.failureReason, kind: "failed" as const }); + return; + } + + if (status === AlfredpayOnrampStatus.ON_CHAIN_COMPLETED) { + // Save the txHash into ramp state, but do NOT resolve. + // We trust the balance check as ground truth for proceeding. + const txHash = metadata?.txHash; + if (txHash) { + const currentState = state.state as StateMetadata; + if (!currentState.alfredpayOnrampMintTxHash) { + await state.update({ + state: { + ...currentState, + alfredpayOnrampMintTxHash: txHash + } + }); + logger.info(`AlfredpayOnrampMintHandler: Saved alfredpayOnrampMintTxHash=${txHash} for ramp ${state.id}`); + } + } + return; + } + } catch (error: any) { + if (error?.kind === "failed") { + reject(error); + return; + } + + logger.warn(`AlfredpayOnrampMintHandler: Error polling Alfredpay status for ${transactionId}: ${error}`); + } + + setTimeout(poll, intervalMs); + }; + + poll(); + }); + } +} + +export default new AlfredpayOnrampMintHandler(); diff --git a/apps/api/src/api/services/phases/handlers/destination-transfer-handler.ts b/apps/api/src/api/services/phases/handlers/destination-transfer-handler.ts index bcdcb8726..f021ca861 100644 --- a/apps/api/src/api/services/phases/handlers/destination-transfer-handler.ts +++ b/apps/api/src/api/services/phases/handlers/destination-transfer-handler.ts @@ -28,10 +28,6 @@ export class DestinationTransferHandler extends BasePhaseHandler { protected async executePhase(state: RampState): Promise { const evmClientManager = EvmClientManager.getInstance(); - // Only handle onramp operations - if (state.type !== RampDirection.BUY) { - throw new Error("DestinationTransferHandler: Only supports onramp operations"); - } const quote = await QuoteTicket.findByPk(state.quoteId); if (!quote) { diff --git a/apps/api/src/api/services/phases/handlers/final-settlement-subsidy.ts b/apps/api/src/api/services/phases/handlers/final-settlement-subsidy.ts index 83f45bc7e..fea9b6b44 100644 --- a/apps/api/src/api/services/phases/handlers/final-settlement-subsidy.ts +++ b/apps/api/src/api/services/phases/handlers/final-settlement-subsidy.ts @@ -2,7 +2,9 @@ import { checkEvmBalancePeriodically, EvmClientManager, EvmNetworks, + EvmToken, EvmTokenDetails, + FiatToken, getNetworkId, getOnChainTokenDetails, getRoute, @@ -11,7 +13,8 @@ import { Networks, RampCurrency, RampDirection, - RampPhase + RampPhase, + TokenType } from "@vortexfi/shared"; import Big from "big.js"; import { encodeFunctionData, erc20Abi, TransactionReceipt } from "viem"; @@ -46,27 +49,55 @@ export class FinalSettlementSubsidyHandler extends BasePhaseHandler { return "finalSettlementSubsidy"; } + private getNextPhase(state: RampState, quote: QuoteTicket): RampPhase { + return state.type === RampDirection.SELL && quote.outputCurrency === FiatToken.USD + ? "alfredpayOfframpTransfer" + : "destinationTransfer"; + } + protected async executePhase(state: RampState): Promise { const evmClientManager = EvmClientManager.getInstance(); const fundingAccount = privateKeyToAccount(MOONBEAM_FUNDING_PRIVATE_KEY as `0x${string}`); - // Only handle onramp operations - if (state.type !== RampDirection.BUY) { - throw new Error("FinalSettlementSubsidyHandler: Only supports onramp operations"); - } - const quote = await QuoteTicket.findByPk(state.quoteId); if (!quote) { - throw new Error("Quote not found for the given state"); + throw new Error("Quote not found or invalid for the given state"); } - if (!isEvmToken(quote.outputCurrency)) { + const outTokenDetails = + state.type === RampDirection.BUY + ? (getOnChainTokenDetails(quote.network, quote.outputCurrency) as EvmTokenDetails) + : getOnChainTokenDetails(Networks.Polygon, EvmToken.USDC); + + if (!outTokenDetails || outTokenDetails.type === TokenType.AssetHub) { + // Should not happen. Destination onchain token or USDC must be defined. throw new Error("FinalSettlementSubsidyHandler: Output currency is not an EVM token"); } - const outTokenDetails = getOnChainTokenDetails(quote.network, quote.outputCurrency) as EvmTokenDetails; - const expectedAmountRaw = multiplyByPowerOfTen(quote.outputAmount, outTokenDetails.decimals); - const destinationNetwork = quote.network as EvmNetworks; + // 3 distinct cases so far: + let expectedAmountRaw: Big | undefined; + switch (state.type) { + case RampDirection.BUY: + if (quote.inputCurrency === FiatToken.USD) { + expectedAmountRaw = Big(quote.metadata.alfredpayMint!.outputAmountRaw); + break; + } + expectedAmountRaw = multiplyByPowerOfTen(quote.outputAmount, outTokenDetails.decimals); + break; + + case RampDirection.SELL: + if (quote.outputCurrency === FiatToken.USD) { + expectedAmountRaw = Big(quote.metadata.alfredpayOfframp!.inputAmountRaw); + break; + } + break; + } + + if (!expectedAmountRaw) { + throw new Error("FinalSettlementSubsidyHandler: Unable to determine expected amount for subsidy"); + } + + const destinationNetwork = state.type === RampDirection.BUY ? (quote.network as EvmNetworks) : Networks.Polygon; const publicClient = evmClientManager.getClient(destinationNetwork); const ephemeralAddress = state.state.evmEphemeralAddress as `0x${string}`; @@ -82,7 +113,7 @@ export class FinalSettlementSubsidyHandler extends BasePhaseHandler { logger.info( `FinalSettlementSubsidyHandler: Transaction ${state.state.finalSettlementSubsidyTxHash} already successful. Skipping.` ); - return this.transitionToNextPhase(state, "destinationTransfer"); + return this.transitionToNextPhase(state, this.getNextPhase(state, quote)); } } @@ -108,7 +139,7 @@ export class FinalSettlementSubsidyHandler extends BasePhaseHandler { logger.info( `FinalSettlementSubsidyHandler: Actual balance (${actualBalance.toString()}) meets expected amount. No subsidy needed.` ); - return this.transitionToNextPhase(state, "destinationTransfer"); + return this.transitionToNextPhase(state, this.getNextPhase(state, quote)); } logger.info(`FinalSettlementSubsidyHandler: Subsidizing ${subsidyAmountRaw.toString()} units to ${ephemeralAddress}`); @@ -126,7 +157,6 @@ export class FinalSettlementSubsidyHandler extends BasePhaseHandler { nativeToken.symbol as RampCurrency ); const oneUsdInNativeRaw = multiplyByPowerOfTen(oneUsdInNative, nativeToken.decimals).toFixed(0); - console.log("values; oneUsdInNativeRaw:", oneUsdInNativeRaw); const chainId = getNetworkId(destinationNetwork).toString(); const testRouteResult = await getRoute({ @@ -258,7 +288,7 @@ export class FinalSettlementSubsidyHandler extends BasePhaseHandler { } }); - return this.transitionToNextPhase(state, "destinationTransfer"); + return this.transitionToNextPhase(state, this.getNextPhase(state, quote)); } catch (error) { throw this.createRecoverableError( `FinalSettlementSubsidyHandler: Error during phase execution - ${(error as Error).message}` diff --git a/apps/api/src/api/services/phases/handlers/fund-ephemeral-handler.ts b/apps/api/src/api/services/phases/handlers/fund-ephemeral-handler.ts index 923388076..1be90d515 100644 --- a/apps/api/src/api/services/phases/handlers/fund-ephemeral-handler.ts +++ b/apps/api/src/api/services/phases/handlers/fund-ephemeral-handler.ts @@ -64,19 +64,32 @@ export class FundEphemeralPhaseHandler extends BasePhaseHandler { return "fundEphemeral"; } - protected getRequiresPendulumEphemeralAddress(state: RampState, inputCurrency?: string): boolean { - // Pendulum ephemeral address is required for all cases except when doing a Monerium to EVM onramp - if (isOnramp(state) && inputCurrency === FiatToken.EURC && state.to !== Networks.AssetHub) { + protected getRequiresPendulumEphemeralAddress(state: RampState, inputCurrency?: string, outputCurrency?: string): boolean { + // Pendulum ephemeral address is required for all cases except when doing a Monerium/Alfredpay to EVM onramp, + // or alfredpay offramp + if ( + isOnramp(state) && + (inputCurrency === FiatToken.EURC || inputCurrency === FiatToken.USD) && + state.to !== Networks.AssetHub + ) { + return false; + } + + if (!isOnramp(state) && outputCurrency === FiatToken.USD) { return false; } return true; } - protected getRequiresPolygonEphemeralAddress(state: RampState, inputCurrency?: string): boolean { - // Only required for Monerium onramps. - if (isOnramp(state) && inputCurrency === FiatToken.EURC) { + protected getRequiresPolygonEphemeralAddress(state: RampState, inputCurrency?: string, outputCurrency?: string): boolean { + // Only required for Monerium and Alfredpay onramps and offramps. + if (isOnramp(state) && (inputCurrency === FiatToken.EURC || inputCurrency === FiatToken.USD)) { return true; } + if (!isOnramp(state) && outputCurrency === FiatToken.USD) { + return true; + } + return false; } @@ -110,8 +123,16 @@ export class FundEphemeralPhaseHandler extends BasePhaseHandler { const moonbeamNode = await apiManager.getApi("moonbeam"); const { evmEphemeralAddress, substrateEphemeralAddress } = state.state as StateMetadata; - const requiresPendulumEphemeralAddress = this.getRequiresPendulumEphemeralAddress(state, quote.inputCurrency); - const requiresPolygonEphemeralAddress = this.getRequiresPolygonEphemeralAddress(state, quote.inputCurrency); + const requiresPendulumEphemeralAddress = this.getRequiresPendulumEphemeralAddress( + state, + quote.inputCurrency, + quote.outputCurrency + ); + const requiresPolygonEphemeralAddress = this.getRequiresPolygonEphemeralAddress( + state, + quote.inputCurrency, + quote.outputCurrency + ); const requiresMoonbeamEphemeralAddress = this.getRequiresMoonbeamEphemeralAddress(state, quote.inputCurrency); const requiresDestinationEvmFunding = this.getRequiresDestinationEvmFunding(state); @@ -178,7 +199,7 @@ export class FundEphemeralPhaseHandler extends BasePhaseHandler { await fundMoonbeamEphemeralAccount(evmEphemeralAddress); } - if (isOnramp(state) && !isPolygonFunded) { + if (!isPolygonFunded) { logger.info(`Funding polygon ephemeral account ${evmEphemeralAddress}`); await this.fundPolygonEphemeralAccount(state); } else if (requiresPolygonEphemeralAddress) { @@ -213,6 +234,10 @@ export class FundEphemeralPhaseHandler extends BasePhaseHandler { if (isOnramp(state) && quote.inputCurrency === FiatToken.BRL) { return "moonbeamToPendulumXcm"; } + // alfredpay onramp case + if (isOnramp(state) && quote.inputCurrency === FiatToken.USD) { + return "squidRouterSwap"; + } // monerium onramp case if (isOnramp(state) && quote.inputCurrency === FiatToken.EURC) { return "moneriumOnrampSelfTransfer"; @@ -221,6 +246,8 @@ export class FundEphemeralPhaseHandler extends BasePhaseHandler { // off ramp cases if (state.type === RampDirection.SELL && state.from === Networks.AssetHub) { return "distributeFees"; + } else if (state.type === RampDirection.SELL && quote.outputCurrency === FiatToken.USD) { + return "finalSettlementSubsidy"; } else { return "moonbeamToPendulum"; // Via contract.subsidizePreSwap } diff --git a/apps/api/src/api/services/phases/handlers/initial-phase-handler.ts b/apps/api/src/api/services/phases/handlers/initial-phase-handler.ts index 657d62885..a3c3c0507 100644 --- a/apps/api/src/api/services/phases/handlers/initial-phase-handler.ts +++ b/apps/api/src/api/services/phases/handlers/initial-phase-handler.ts @@ -38,6 +38,10 @@ export class InitialPhaseHandler extends BasePhaseHandler { return this.transitionToNextPhase(state, "brlaOnrampMint"); } else if (state.type === RampDirection.BUY && quote.inputCurrency === FiatToken.EURC) { return this.transitionToNextPhase(state, "moneriumOnrampMint"); + } else if (state.type === RampDirection.BUY && quote.inputCurrency === FiatToken.USD) { + return this.transitionToNextPhase(state, "alfredpayOnrampMint"); + } else if (state.type === RampDirection.SELL && quote.outputCurrency === FiatToken.USD) { + return this.transitionToNextPhase(state, "squidRouterPermitExecute"); } return this.transitionToNextPhase(state, "fundEphemeral"); diff --git a/apps/api/src/api/services/phases/handlers/moonbeam-to-pendulum-handler.ts b/apps/api/src/api/services/phases/handlers/moonbeam-to-pendulum-handler.ts index 0b1f97b6d..08222aa52 100644 --- a/apps/api/src/api/services/phases/handlers/moonbeam-to-pendulum-handler.ts +++ b/apps/api/src/api/services/phases/handlers/moonbeam-to-pendulum-handler.ts @@ -78,7 +78,7 @@ export class MoonbeamToPendulumPhaseHandler extends BasePhaseHandler { try { if (!(await didInputTokenArriveOnPendulum())) { await waitUntilTrue(isHashRegisteredInSplitReceiver); - console.log(`Hash ${squidRouterReceiverHash} is registered in receiver contract`); + logger.info(`Hash ${squidRouterReceiverHash} is registered in receiver contract`); } } catch (e) { logger.error(e); @@ -116,7 +116,7 @@ export class MoonbeamToPendulumPhaseHandler extends BasePhaseHandler { if (!receipt || receipt.status !== "success") { logger.error(`MoonbeamToPendulumPhaseHandler: Transaction ${obtainedHash} failed or was not found`); attempt++; - // Wait for 20 seconds to allow the network to settle the squidrouter transaction + // Wait for 20 seconds to allow the network to settle the squidRouter transaction await new Promise(resolve => setTimeout(resolve, 20000)); } } diff --git a/apps/api/src/api/services/phases/handlers/squid-router-pay-phase-handler.ts b/apps/api/src/api/services/phases/handlers/squid-router-pay-phase-handler.ts index 41aec032b..7341a4c4d 100644 --- a/apps/api/src/api/services/phases/handlers/squid-router-pay-phase-handler.ts +++ b/apps/api/src/api/services/phases/handlers/squid-router-pay-phase-handler.ts @@ -376,7 +376,8 @@ export class SquidRouterPayPhaseHandler extends BasePhaseHandler { private async getSquidrouterStatus(swapHash: string, state: RampState, quote: QuoteTicket): Promise { try { // Always Polygon for Monerium onramp, Moonbeam for BRL - const fromChain = quote.inputCurrency === FiatToken.EURC ? Networks.Polygon : Networks.Moonbeam; + const fromChain = + quote.inputCurrency === FiatToken.EURC || quote.inputCurrency === FiatToken.USD ? Networks.Polygon : Networks.Moonbeam; const fromChainId = getNetworkId(fromChain)?.toString(); const toChain = quote.to === Networks.AssetHub ? Networks.Moonbeam : quote.to; const toChainId = getNetworkId(toChain)?.toString(); diff --git a/apps/api/src/api/services/phases/handlers/squid-router-phase-handler.ts b/apps/api/src/api/services/phases/handlers/squid-router-phase-handler.ts index 4e7d79cdf..0d43c57c0 100644 --- a/apps/api/src/api/services/phases/handlers/squid-router-phase-handler.ts +++ b/apps/api/src/api/services/phases/handlers/squid-router-phase-handler.ts @@ -1,5 +1,6 @@ import { EvmClientManager, + EvmToken, FiatToken, getNetworkFromDestination, getNetworkId, @@ -42,11 +43,21 @@ export class SquidRouterPhaseHandler extends BasePhaseHandler { protected async executePhase(state: RampState): Promise { logger.info(`Executing squidRouter phase for ramp ${state.id}`); + const quote = await QuoteTicket.findByPk(state.quoteId); + if (!quote) { + throw new Error("Quote not found for the given state"); + } + if (state.type === RampDirection.SELL) { logger.info("SquidRouter phase is not supported for off-ramp"); return state; } + // handle special "singularity" case: Alfredpay onrapm USDC in Polygon. + if (quote.to === Networks.Polygon && quote.outputCurrency === EvmToken.USDC) { + return this.transitionToNextPhase(state, "destinationTransfer"); + } + try { // Get the presigned transactions for this phase const approveTransaction = this.getPresignedTransaction(state, "squidRouterApprove"); @@ -126,7 +137,7 @@ export class SquidRouterPhaseHandler extends BasePhaseHandler { throw new Error(`Quote not found for ramp ${state.id}`); } - if (quote.inputCurrency === FiatToken.EURC) { + if (quote.inputCurrency === FiatToken.EURC || quote.inputCurrency === FiatToken.USD) { return this.polygonClient; } else if (quote.inputCurrency === FiatToken.BRL) { return this.moonbeamClient; diff --git a/apps/api/src/api/services/phases/handlers/squidrouter-permit-execution-handler.ts b/apps/api/src/api/services/phases/handlers/squidrouter-permit-execution-handler.ts new file mode 100644 index 000000000..4c71cf573 --- /dev/null +++ b/apps/api/src/api/services/phases/handlers/squidrouter-permit-execution-handler.ts @@ -0,0 +1,170 @@ +import { + EvmClientManager, + getNetworkFromDestination, + isNetworkEVM, + isSignedTypedDataArray, + Networks, + RampPhase, + SignedTypedData +} from "@vortexfi/shared"; +import { recoverTypedDataAddress } from "viem"; +import { privateKeyToAccount } from "viem/accounts"; +import logger from "../../../../config/logger"; +import { MOONBEAM_EXECUTOR_PRIVATE_KEY } from "../../../../constants/constants"; +import { tokenRelayerAbi } from "../../../../contracts/TokenRelayer"; +import RampState from "../../../../models/rampState.model"; +import { PhaseError } from "../../../errors/phase-error"; +import { RELAYER_ADDRESS } from "../../transactions/offramp/routes/evm-to-alfredpay"; +import { BasePhaseHandler } from "../base-phase-handler"; +import { StateMetadata } from "../meta-state-types"; + +// Phase description: call the relayer contract's `execute` function with both the token permit and +// the signed squidrouter call. +export class SquidrouterPermitExecuteHandler extends BasePhaseHandler { + private evmClientManager: EvmClientManager; + + constructor() { + super(); + this.evmClientManager = EvmClientManager.getInstance(); + } + + public getPhaseName(): RampPhase { + return "squidRouterPermitExecute"; + } + + protected async executePhase(state: RampState): Promise { + logger.info(`Executing squidRouterPermitExecute phase for ramp ${state.id}`); + + const fromNetwork = getNetworkFromDestination(state.from); + + if (!fromNetwork || !isNetworkEVM(fromNetwork)) { + throw this.createUnrecoverableError(`Unsupported network for squidRouterPermitExecute phase: ${state.from}`); + } + + try { + const existingHash = state.state.squidRouterPermitExecutionHash || null; + + if (existingHash) { + logger.info(`Found existing squidRouter permit execution hash for ramp ${state.id}: ${existingHash}`); + + try { + const publicClient = this.evmClientManager.getClient(fromNetwork); + const receipt = await publicClient.waitForTransactionReceipt({ + hash: existingHash as `0x${string}` + }); + + if (receipt && receipt.status === "success") { + logger.info(`Existing squidRouter permit execution transaction was successful for ramp ${state.id}`); + return this.transitionToNextPhase(state, "fundEphemeral"); + } else { + logger.info( + `Existing squidRouter permit execution transaction was not successful (status: ${receipt?.status}), will retry` + ); + } + } catch (error) { + logger.info(`Could not verify existing transaction status: ${error}, will retry`); + } + } + + const permitExecuteTransaction = this.getPresignedTransaction(state, "squidRouterPermitExecute"); + if (!permitExecuteTransaction) { + throw this.createUnrecoverableError("Missing presigned transaction for squidRouterPermitExecute phase"); + } + + // For this special phase, txData is of type SignedTypedData[], where the first element is the permit typed data and the second element is the payload typed data + const signedTypedDataArray = permitExecuteTransaction.txData as SignedTypedData[]; + if (!isSignedTypedDataArray(signedTypedDataArray) || signedTypedDataArray.length !== 2) { + throw this.createUnrecoverableError("Invalid txData format: expected array of 2 SignedTypedData objects"); + } + + const [permitTypedData, payloadTypedData] = signedTypedDataArray; + + const permitSignature = permitTypedData.signature; + if (!permitSignature) { + throw this.createUnrecoverableError("Permit signature not found or invalid format"); + } + const permitSig = permitSignature as { v: number; r: `0x${string}`; s: `0x${string}` }; + const { v: permitV, r: permitR, s: permitS } = permitSig; + + const payloadSignature = payloadTypedData.signature; + if (!payloadSignature) { + throw this.createUnrecoverableError("Payload signature not found or invalid format"); + } + const payloadSig = payloadSignature as { v: number; r: `0x${string}`; s: `0x${string}` }; + const { v: payloadV, r: payloadR, s: payloadS } = payloadSig; + + const permitMessage = permitTypedData.message; + const token = permitTypedData.domain.verifyingContract as `0x${string}`; + const owner = permitMessage.owner as `0x${string}`; + const value = BigInt(permitMessage.value as string); + const deadline = BigInt(permitMessage.deadline as string); + + const payloadMessage = payloadTypedData.message; + const payloadData = payloadMessage.data as `0x${string}`; + const payloadNonce = BigInt(payloadMessage.nonce as string); + const payloadDeadline = BigInt(payloadMessage.deadline as string); + + const relayerAccount = privateKeyToAccount(MOONBEAM_EXECUTOR_PRIVATE_KEY as `0x${string}`); + const walletClient = this.evmClientManager.getWalletClient(fromNetwork, relayerAccount); + + const hash = await walletClient.writeContract({ + abi: tokenRelayerAbi, + address: RELAYER_ADDRESS as `0x${string}`, + args: [ + { + deadline: deadline, + owner: owner, + payloadData: payloadData, + payloadDeadline: payloadDeadline, + payloadNonce: payloadNonce, + payloadR: payloadR, + payloadS: payloadS, + payloadV: payloadV, + payloadValue: state.state.squidRouterPermitExecutionValue, + permitR: permitR, + permitS: permitS, + permitV: permitV, + token: token, + value: value + } + ], + functionName: "execute", + value: BigInt(state.state.squidRouterPermitExecutionValue!) + }); + + logger.info(`Relayer execute transaction sent with hash: ${hash}`); + + const updatedState = await state.update({ + state: { + ...state.state, + squidRouterPermitExecutionHash: hash + } + }); + + const publicClient = this.evmClientManager.getClient(fromNetwork); + const receipt = await publicClient.waitForTransactionReceipt({ + hash: hash as `0x${string}` + }); + + if (!receipt || receipt.status !== "success") { + throw this.createRecoverableError(`Relayer execute transaction failed: ${hash}`); + } + + logger.info(`Relayer execute transaction confirmed: ${hash}`); + + return this.transitionToNextPhase(updatedState, "fundEphemeral"); + } catch (error) { + logger.error(`Error in squidRouterPermitExecute phase for ramp ${state.id}:`, error); + + if (error instanceof PhaseError) { + throw error; + } + + // Default to recoverable error + const errorMessage = error instanceof Error ? error.message : "Unknown error"; + throw this.createRecoverableError(`SquidrouterPermitExecuteHandler: ${errorMessage}`); + } + } +} + +export default new SquidrouterPermitExecuteHandler(); diff --git a/apps/api/src/api/services/phases/meta-state-types.ts b/apps/api/src/api/services/phases/meta-state-types.ts index d9d79fb21..1b4b71879 100644 --- a/apps/api/src/api/services/phases/meta-state-types.ts +++ b/apps/api/src/api/services/phases/meta-state-types.ts @@ -1,4 +1,10 @@ -import { ExtrinsicOptions, IbanPaymentData, PermitSignature, StellarTokenDetails } from "@vortexfi/shared"; +import { + AlfredpayFiatPaymentInstructions, + ExtrinsicOptions, + IbanPaymentData, + PermitSignature, + StellarTokenDetails +} from "@vortexfi/shared"; export interface StateMetadata { nablaSoftMinimumOutputRaw: string; @@ -53,6 +59,15 @@ export interface StateMetadata { // Final transaction hash and explorer link (computed once when ramp is complete) finalTransactionHash?: string; finalTransactionExplorerLink?: string; + // Alfredpay + alfredpayUserId?: string; + alfredpayTransactionId?: string; + alfredpayOnrampMintTxHash?: string; + fiatPaymentInstructions?: AlfredpayFiatPaymentInstructions; + fiatAccountId?: string; destinationTransferTxHash?: string; finalSettlementSubsidyTxHash?: string; + alfredpayOfframpTransferTxHash?: string; + squidRouterPermitExecutionHash?: string; + squidRouterPermitExecutionValue?: string; } diff --git a/apps/api/src/api/services/phases/register-handlers.ts b/apps/api/src/api/services/phases/register-handlers.ts index 167927628..712f9890a 100644 --- a/apps/api/src/api/services/phases/register-handlers.ts +++ b/apps/api/src/api/services/phases/register-handlers.ts @@ -1,4 +1,6 @@ import logger from "../../../config/logger"; +import alfredpayOfframpTransferHandler from "./handlers/alfredpay-offramp-transfer-handler"; +import alfredpayOnrampMintHandler from "./handlers/alfredpay-onramp-mint-handler"; import brlaOnrampMintHandler from "./handlers/brla-onramp-mint-handler"; import brlaPayoutMoonbeamHandler from "./handlers/brla-payout-moonbeam-handler"; import destinationTransferHandler from "./handlers/destination-transfer-handler"; @@ -20,6 +22,7 @@ import pendulumToMoonbeamXcmHandler from "./handlers/pendulum-to-moonbeam-xcm-ha import spacewalkRedeemHandler from "./handlers/spacewalk-redeem-handler"; import squidRouterPayPhaseHandler from "./handlers/squid-router-pay-phase-handler"; import squidRouterPhaseHandler from "./handlers/squid-router-phase-handler"; +import squidRouterPermitExecutionHandler from "./handlers/squidrouter-permit-execution-handler"; import stellarPaymentHandler from "./handlers/stellar-payment-handler"; import subsidizePostSwapPhaseHandler from "./handlers/subsidize-post-swap-handler"; import subsidizePreSwapPhaseHandler from "./handlers/subsidize-pre-swap-handler"; @@ -43,6 +46,8 @@ export function registerPhaseHandlers(): void { phaseRegistry.registerHandler(moonbeamToPendulumPhaseHandler); phaseRegistry.registerHandler(brlaPayoutMoonbeamHandler); phaseRegistry.registerHandler(fundEphemeralHandler); + phaseRegistry.registerHandler(alfredpayOnrampMintHandler); + phaseRegistry.registerHandler(alfredpayOfframpTransferHandler); phaseRegistry.registerHandler(brlaOnrampMintHandler); phaseRegistry.registerHandler(pendulumToAssethubPhaseHandler); phaseRegistry.registerHandler(squidRouterPayPhaseHandler); @@ -56,6 +61,7 @@ export function registerPhaseHandlers(): void { phaseRegistry.registerHandler(hydrationSwapHandler); phaseRegistry.registerHandler(finalSettlementSubsidy); phaseRegistry.registerHandler(destinationTransferHandler); + phaseRegistry.registerHandler(squidRouterPermitExecutionHandler); logger.info("Phase handlers registered"); } diff --git a/apps/api/src/api/services/quote/core/helpers.ts b/apps/api/src/api/services/quote/core/helpers.ts index 0bb6d24fa..7f68d00d3 100644 --- a/apps/api/src/api/services/quote/core/helpers.ts +++ b/apps/api/src/api/services/quote/core/helpers.ts @@ -19,10 +19,19 @@ export const SUPPORTED_CHAINS: { Networks.Ethereum, Networks.Polygon ], - to: [EPaymentMethod.PIX as DestinationType, EPaymentMethod.SEPA as DestinationType, EPaymentMethod.CBU as DestinationType] + to: [ + EPaymentMethod.PIX as DestinationType, + EPaymentMethod.SEPA as DestinationType, + EPaymentMethod.CBU as DestinationType, + EPaymentMethod.ACH as DestinationType + ] }, [RampDirection.BUY]: { - from: [EPaymentMethod.PIX as DestinationType, EPaymentMethod.SEPA as DestinationType], + from: [ + EPaymentMethod.PIX as DestinationType, + EPaymentMethod.SEPA as DestinationType, + EPaymentMethod.ACH as DestinationType + ], to: [ Networks.AssetHub, Networks.Avalanche, diff --git a/apps/api/src/api/services/quote/core/types.ts b/apps/api/src/api/services/quote/core/types.ts index e57e35fbd..c7609e1b0 100644 --- a/apps/api/src/api/services/quote/core/types.ts +++ b/apps/api/src/api/services/quote/core/types.ts @@ -22,6 +22,7 @@ export enum StageKey { SquidRouter = "SquidRouter", Fee = "Fee", Discount = "Discount", + PartnerOperation = "PartnerOperation", Finalize = "Finalize" } @@ -149,6 +150,28 @@ export interface QuoteContext { currency: RampCurrency; }; + alfredpayMint?: { + inputAmountDecimal: Big; + inputAmountRaw: string; + outputAmountDecimal: Big; + outputAmountRaw: string; + fee: Big; + currency: RampCurrency; + quoteId: string; + expirationDate: Date; + }; + + alfredpayOfframp?: { + inputAmountDecimal: Big; + inputAmountRaw: string; + outputAmountDecimal: Big; + outputAmountRaw: string; + fee: Big; + currency: RampCurrency; + quoteId: string; + expirationDate: Date; + }; + aveniaMint?: { inputAmountDecimal: Big; inputAmountRaw: string; diff --git a/apps/api/src/api/services/quote/engines/fee/offramp-evm-to-alfredpay.ts b/apps/api/src/api/services/quote/engines/fee/offramp-evm-to-alfredpay.ts new file mode 100644 index 000000000..e0fd6401f --- /dev/null +++ b/apps/api/src/api/services/quote/engines/fee/offramp-evm-to-alfredpay.ts @@ -0,0 +1,22 @@ +import { EvmToken, FiatToken, RampCurrency, RampDirection } from "@vortexfi/shared"; +import { QuoteContext } from "../../core/types"; +import { BaseFeeEngine, FeeComputation, FeeConfig } from "./index"; + +export class OffRampEvmToAlfredpayFeeEngine extends BaseFeeEngine { + readonly config: FeeConfig = { + direction: RampDirection.SELL, + skipNote: "Skipped for off-ramp request" + }; + + protected validate(ctx: QuoteContext): void { + // No specific validation needed + } + + protected async compute(ctx: QuoteContext, anchorFee: string, feeCurrency: RampCurrency): Promise { + // TODO apply fees from quote. + return { + anchor: { amount: "0", currency: FiatToken.USD as RampCurrency }, + network: { amount: "0", currency: EvmToken.USDC as RampCurrency } + }; + } +} diff --git a/apps/api/src/api/services/quote/engines/fee/onramp-alfredpay-to-evm.ts b/apps/api/src/api/services/quote/engines/fee/onramp-alfredpay-to-evm.ts new file mode 100644 index 000000000..bf289ba25 --- /dev/null +++ b/apps/api/src/api/services/quote/engines/fee/onramp-alfredpay-to-evm.ts @@ -0,0 +1,28 @@ +import { EvmToken, FiatToken, RampCurrency, RampDirection } from "@vortexfi/shared"; +import { QuoteContext } from "../../core/types"; +import { BaseFeeEngine, FeeComputation, FeeConfig } from "./index"; + +export class OnRampAlfredpayToEvmFeeEngine extends BaseFeeEngine { + readonly config: FeeConfig = { + direction: RampDirection.BUY, + skipNote: "Skipped for off-ramp request" + }; + + protected validate(ctx: QuoteContext): void { + if (!ctx.alfredpayMint) { + throw new Error("OnRampAlfredpayToEvmFeeEngine requires alfredpayMint in context"); + } + } + + protected async compute(ctx: QuoteContext, anchorFee: string, feeCurrency: RampCurrency): Promise { + // biome-ignore lint/style/noNonNullAssertion: Context is validated in `validate` + const alfredpayFee = ctx.alfredpayMint!.fee.toString(); + // biome-ignore lint/style/noNonNullAssertion: Context is validated in `validate` + const alfredpayFeeCurrency = ctx.alfredpayMint!.currency as RampCurrency; + + return { + anchor: { amount: alfredpayFee, currency: alfredpayFeeCurrency }, + network: { amount: "0", currency: EvmToken.USDC as RampCurrency } + }; + } +} diff --git a/apps/api/src/api/services/quote/engines/finalize/offramp.ts b/apps/api/src/api/services/quote/engines/finalize/offramp.ts index f0aa4c78f..c7f93577e 100644 --- a/apps/api/src/api/services/quote/engines/finalize/offramp.ts +++ b/apps/api/src/api/services/quote/engines/finalize/offramp.ts @@ -23,11 +23,15 @@ export class OffRampFinalizeEngine extends BaseFinalizeEngine { } const offrampAmountBeforeAnchorFees = - ctx.request.to === "pix" ? ctx.pendulumToMoonbeamXcm?.outputAmountDecimal : ctx.pendulumToStellar?.outputAmountDecimal; + ctx.request.to === "pix" + ? ctx.pendulumToMoonbeamXcm?.outputAmountDecimal + : ctx.alfredpayOfframp + ? ctx.alfredpayOfframp.inputAmountDecimal + : ctx.pendulumToStellar?.outputAmountDecimal; if (!offrampAmountBeforeAnchorFees) { throw new APIError({ - message: "OffRampFinalizeEngine requires pendulumToMoonbeamXcm or pendulumToStellar output", + message: "OffRampFinalizeEngine requires pendulumToMoonbeamXcm, alfredpayOfframp or pendulumToStellar output", status: httpStatus.INTERNAL_SERVER_ERROR }); } diff --git a/apps/api/src/api/services/quote/engines/finalize/onramp.ts b/apps/api/src/api/services/quote/engines/finalize/onramp.ts index 74d3d6dfa..418d04881 100644 --- a/apps/api/src/api/services/quote/engines/finalize/onramp.ts +++ b/apps/api/src/api/services/quote/engines/finalize/onramp.ts @@ -46,6 +46,15 @@ export class OnRampFinalizeEngine extends BaseFinalizeEngine { }); } finalOutputAmountDecimal = new Big(output); + } else if (request.inputCurrency === FiatToken.USD) { + const output = ctx.alfredpayMint?.outputAmountDecimal; + if (!output) { + throw new APIError({ + message: "OnRampFinalizeEngine requires alfredpayMint output for EVM", + status: httpStatus.INTERNAL_SERVER_ERROR + }); + } + finalOutputAmountDecimal = new Big(output); } else { const output = ctx.moonbeamToEvm?.outputAmountDecimal; if (!output) { diff --git a/apps/api/src/api/services/quote/engines/initialize/offramp-from-evm-alfredpay.ts b/apps/api/src/api/services/quote/engines/initialize/offramp-from-evm-alfredpay.ts new file mode 100644 index 000000000..e9e3db70c --- /dev/null +++ b/apps/api/src/api/services/quote/engines/initialize/offramp-from-evm-alfredpay.ts @@ -0,0 +1,43 @@ +import { EvmToken, Networks, OnChainToken, RampDirection } from "@vortexfi/shared"; +import Big from "big.js"; +import { EvmBridgeQuoteRequest, getEvmBridgeQuote } from "../../core/squidrouter"; +import { QuoteContext } from "../../core/types"; +import { assignPreNablaContext, BaseInitializeEngine } from "./index"; + +export class AlfredpayOffRampFromEvmInitializeEngine extends BaseInitializeEngine { + readonly config = { + direction: RampDirection.SELL, + skipNote: + "AlfredpayOffRampFromEvmInitializeEngine: Skipped because rampType is BUY, this engine handles SELL operations only" + }; + + protected async executeInternal(ctx: QuoteContext): Promise { + const req = ctx.request; + + const quoteRequest: EvmBridgeQuoteRequest = { + amountDecimal: req.inputAmount, + fromNetwork: req.from as Networks, + inputCurrency: req.inputCurrency as OnChainToken, + outputCurrency: EvmToken.USDC, + rampType: req.rampType, + toNetwork: Networks.Polygon + }; + + const bridgeQuote = await getEvmBridgeQuote(quoteRequest); + + ctx.evmToEvm = { + ...quoteRequest, + fromToken: bridgeQuote.fromToken, + inputAmountDecimal: Big(quoteRequest.amountDecimal), + inputAmountRaw: bridgeQuote.inputAmountRaw, + networkFeeUSD: bridgeQuote.networkFeeUSD, + outputAmountDecimal: bridgeQuote.outputAmountDecimal, + outputAmountRaw: bridgeQuote.outputAmountRaw, + toToken: bridgeQuote.toToken + }; + + ctx.addNote?.( + `Initialized: input=${req.inputAmount} ${req.inputCurrency}, raw=${ctx.evmToPendulum?.inputAmountRaw}, output=${ctx.evmToPendulum?.outputAmountDecimal.toString()} ${ctx.evmToPendulum?.toToken}, raw=${ctx.evmToPendulum?.outputAmountRaw}` + ); + } +} diff --git a/apps/api/src/api/services/quote/engines/initialize/onramp-alfredpay.ts b/apps/api/src/api/services/quote/engines/initialize/onramp-alfredpay.ts new file mode 100644 index 000000000..516c706e7 --- /dev/null +++ b/apps/api/src/api/services/quote/engines/initialize/onramp-alfredpay.ts @@ -0,0 +1,69 @@ +import { + AlfredpayApiService, + AlfredpayChain, + AlfredpayFiatCurrency, + AlfredpayOnChainCurrency, + AlfredpayPaymentMethodType, + CreateAlfredpayOnrampQuoteRequest, + CreateAlfredpayOnrampRequest, + ERC20_USDC_POLYGON_DECIMALS, + multiplyByPowerOfTen, + Networks, + RampDirection +} from "@vortexfi/shared"; +import Big from "big.js"; +import { QuoteContext } from "../../core/types"; +import { BaseInitializeEngine } from "./index"; + +export class OnRampInitializeAlfredpayEngine extends BaseInitializeEngine { + readonly config = { + direction: RampDirection.BUY, + skipNote: "OnRampInitializeAlfredpayEngine: Skipped because rampType is SELL, this engine handles BUY operations only" + }; + + protected async executeInternal(ctx: QuoteContext): Promise { + const req = ctx.request; + + const usdTokenDecimals = ERC20_USDC_POLYGON_DECIMALS; + const inputAmountDecimal = new Big(req.inputAmount); + + const alfredpayService = AlfredpayApiService.getInstance(); + + const quoteRequest: CreateAlfredpayOnrampQuoteRequest = { + chain: AlfredpayChain.MATIC, + fromAmount: inputAmountDecimal.toString(), + fromCurrency: req.inputCurrency as unknown as AlfredpayFiatCurrency, + metadata: { + businessId: "vortex", + customerId: req.userId || "unknown" + }, // Mints hardcoded to Polygon. + paymentMethodType: AlfredpayPaymentMethodType.BANK, + toCurrency: AlfredpayOnChainCurrency.USDC // Mints hardcoded to USDC, on Polygon. + }; + + const quote = await alfredpayService.createOnrampQuote(quoteRequest); + + const fromAmount = new Big(quote.fromAmount); + const toAmount = new Big(quote.toAmount); + + const alfredpayFee = AlfredpayApiService.sumFeesByCurrency( + quote.fees, + req.inputCurrency as unknown as AlfredpayFiatCurrency + ); + + ctx.alfredpayMint = { + currency: ctx.request.inputCurrency, + expirationDate: new Date(quote.expiration), + fee: alfredpayFee, + inputAmountDecimal: fromAmount, + inputAmountRaw: multiplyByPowerOfTen(fromAmount, usdTokenDecimals).toFixed(0, 0), + outputAmountDecimal: toAmount, + outputAmountRaw: multiplyByPowerOfTen(toAmount, usdTokenDecimals).toFixed(0, 0), + quoteId: quote.quoteId + }; + + ctx.addNote?.( + `Initialized: ${inputAmountDecimal.toString()} ${req.inputCurrency} -> ${toAmount.toString()} ${req.outputCurrency}` + ); + } +} diff --git a/apps/api/src/api/services/quote/engines/partners/offramp-alfredpay.ts b/apps/api/src/api/services/quote/engines/partners/offramp-alfredpay.ts new file mode 100644 index 000000000..0e8d1d0ed --- /dev/null +++ b/apps/api/src/api/services/quote/engines/partners/offramp-alfredpay.ts @@ -0,0 +1,68 @@ +import { + AlfredpayApiService, + AlfredpayChain, + AlfredpayFiatCurrency, + AlfredpayOnChainCurrency, + AlfredpayPaymentMethodType, + CreateAlfredpayOfframpQuoteRequest, + ERC20_USDC_POLYGON_DECIMALS, + multiplyByPowerOfTen, + RampDirection +} from "@vortexfi/shared"; +import Big from "big.js"; +import { QuoteContext } from "../../core/types"; +import { BaseInitializeEngine } from "./../initialize/index"; + +export class OfframpTransactionAlfredpayEngine extends BaseInitializeEngine { + readonly config = { + direction: RampDirection.SELL, + skipNote: "OfframpTransactionAlfredpayEngine: Skipped because rampType is BUY, this engine handles SELL operations only" + }; + + protected async executeInternal(ctx: QuoteContext): Promise { + const req = ctx.request; + + if (!ctx.evmToEvm) { + throw new Error("OfframpTransactionAlfredpayEngine: No evmToEvm quote"); + } + + const usdTokenDecimals = ERC20_USDC_POLYGON_DECIMALS; + const inputAmountDecimal = new Big(ctx.evmToEvm.outputAmountDecimal); + + const alfredpayService = AlfredpayApiService.getInstance(); + + const quoteRequest: CreateAlfredpayOfframpQuoteRequest = { + chain: AlfredpayChain.MATIC, + fromAmount: inputAmountDecimal.toString(), + fromCurrency: AlfredpayOnChainCurrency.USDC, // Offramp deposit is USDC + metadata: { + businessId: "vortex", + customerId: req.userId || "unknown" + }, + paymentMethodType: AlfredpayPaymentMethodType.BANK, + toCurrency: req.outputCurrency as unknown as AlfredpayFiatCurrency + }; + + const quote = await alfredpayService.createOfframpQuote(quoteRequest); + + const fromAmount = new Big(ctx.evmToEvm.outputAmountDecimal); + const toAmount = new Big(quote.toAmount); + + const alfredpayFee = Big(0); + + ctx.alfredpayOfframp = { + currency: ctx.request.outputCurrency, + expirationDate: new Date(quote.expiration), + fee: alfredpayFee, + inputAmountDecimal: fromAmount, + inputAmountRaw: multiplyByPowerOfTen(fromAmount, usdTokenDecimals).toFixed(0, 0), + outputAmountDecimal: toAmount, + outputAmountRaw: multiplyByPowerOfTen(toAmount, 2).toFixed(0, 0), // Assuming 2 decimals for fiat + quoteId: quote.quoteId + }; + + ctx.addNote?.( + `Initialized: ${inputAmountDecimal.toString()} ${req.inputCurrency} -> ${toAmount.toString()} ${req.outputCurrency}` + ); + } +} diff --git a/apps/api/src/api/services/quote/engines/squidrouter/index.ts b/apps/api/src/api/services/quote/engines/squidrouter/index.ts index 6ea7b90b0..1fa398fff 100644 --- a/apps/api/src/api/services/quote/engines/squidrouter/index.ts +++ b/apps/api/src/api/services/quote/engines/squidrouter/index.ts @@ -22,6 +22,7 @@ export interface SquidRouterData { inputAmountDecimal: Big; inputAmountRaw: string; outputDecimals: number; + skipRouteCalculation?: boolean; } export abstract class BaseSquidRouterEngine implements Stage { @@ -42,6 +43,10 @@ export abstract class BaseSquidRouterEngine implements Stage { const computation = this.compute(ctx); + if (computation.data.skipRouteCalculation) { + return; + } + const bridgeRequest = this.buildBridgeRequest(computation.data, request); const bridgeResult = await this.calculateBridge(bridgeRequest); diff --git a/apps/api/src/api/services/quote/engines/squidrouter/onramp-polygon-to-evm-alfredpay.ts b/apps/api/src/api/services/quote/engines/squidrouter/onramp-polygon-to-evm-alfredpay.ts new file mode 100644 index 000000000..b26f342ef --- /dev/null +++ b/apps/api/src/api/services/quote/engines/squidrouter/onramp-polygon-to-evm-alfredpay.ts @@ -0,0 +1,73 @@ +import { + ERC20_USDC_POLYGON, + ERC20_USDC_POLYGON_DECIMALS, + EvmToken, + getNetworkFromDestination, + Networks, + OnChainToken, + RampDirection +} from "@vortexfi/shared"; +import httpStatus from "http-status"; +import { APIError } from "../../../../errors/api-error"; +import { getTokenDetailsForEvmDestination } from "../../core/squidrouter"; +import { QuoteContext } from "../../core/types"; +import { BaseSquidRouterEngine, SquidRouterComputation, SquidRouterConfig, SquidRouterData } from "./index"; + +export class OnRampSquidRouterUsdToEvmEngine extends BaseSquidRouterEngine { + readonly config: SquidRouterConfig = { + direction: RampDirection.BUY, + skipNote: "OnRampSquidRouterUsdToEvmEngine: Skipped because rampType is SELL, this engine handles BUY operations only" + }; + + protected validate(ctx: QuoteContext): void { + if (ctx.request.to === "assethub") { + throw new Error( + "OnRampSquidRouterUsdToEvmEngine: Skipped because destination is assethub, this engine handles EVM destinations only" + ); + } + + if (!ctx.alfredpayMint?.outputAmountDecimal) { + throw new Error( + "OnRampSquidRouterUsdToEvmEngine: Missing alfredpayMint.amountOut in context - ensure initialize stage ran successfully" + ); + } + } + + protected compute(ctx: QuoteContext): SquidRouterComputation { + if (ctx.to === Networks.Polygon && ctx.request.outputCurrency === EvmToken.USDC) { + return { + data: { + skipRouteCalculation: true + } as SquidRouterData, + type: "evm-to-evm" + }; + } + + const req = ctx.request; + const toNetwork = getNetworkFromDestination(req.to); + if (!toNetwork) { + throw new APIError({ + message: `Invalid network for destination: ${req.to} `, + status: httpStatus.BAD_REQUEST + }); + } + + const toToken = getTokenDetailsForEvmDestination(req.outputCurrency as OnChainToken, req.to).erc20AddressSourceChain; + // biome-ignore lint/style/noNonNullAssertion: Context is validated in validate + const alfredpayMint = ctx.alfredpayMint!; + + return { + data: { + amountRaw: alfredpayMint.outputAmountRaw, + fromNetwork: Networks.Polygon, + fromToken: ERC20_USDC_POLYGON, + inputAmountDecimal: alfredpayMint.outputAmountDecimal, + inputAmountRaw: alfredpayMint.outputAmountRaw, + outputDecimals: ERC20_USDC_POLYGON_DECIMALS, + toNetwork, + toToken + }, + type: "evm-to-evm" + }; + } +} diff --git a/apps/api/src/api/services/quote/routes/route-resolver.ts b/apps/api/src/api/services/quote/routes/route-resolver.ts index 02b2558c7..9012fc271 100644 --- a/apps/api/src/api/services/quote/routes/route-resolver.ts +++ b/apps/api/src/api/services/quote/routes/route-resolver.ts @@ -4,8 +4,10 @@ import { AssetHubToken, FiatToken, Networks, RampDirection } from "@vortexfi/shared"; import type { QuoteContext } from "../core/types"; import { IRouteStrategy } from "../core/types"; +import { OfframpEvmToAlfredpayStrategy } from "./strategies/offramp-evm-to-alfredpay.strategy"; import { OfframpToPixStrategy } from "./strategies/offramp-to-pix.strategy"; import { OfframpToStellarStrategy } from "./strategies/offramp-to-stellar.strategy"; +import { OnrampAlfredpayToEvmStrategy } from "./strategies/onramp-alfredpay-to-evm.strategy"; import { OnrampAveniaToAssethubStrategy } from "./strategies/onramp-avenia-to-assethub.strategy"; import { OnrampAveniaToEvmStrategy } from "./strategies/onramp-avenia-to-evm.strategy"; import { OnrampMoneriumToAssethubStrategy } from "./strategies/onramp-monerium-to-assethub.strategy"; @@ -24,6 +26,8 @@ export class RouteResolver { } else { if (ctx.request.inputCurrency === FiatToken.EURC) { return new OnrampMoneriumToEvmStrategy(); + } else if (ctx.request.inputCurrency === FiatToken.USD) { + return new OnrampAlfredpayToEvmStrategy(); } else { return new OnrampAveniaToEvmStrategy(); } @@ -44,6 +48,8 @@ export class RouteResolver { switch (ctx.to) { case "pix": return new OfframpToPixStrategy(); + case "ach": + return new OfframpEvmToAlfredpayStrategy(); case "sepa": case "cbu": default: diff --git a/apps/api/src/api/services/quote/routes/strategies/offramp-evm-to-alfredpay.strategy.ts b/apps/api/src/api/services/quote/routes/strategies/offramp-evm-to-alfredpay.strategy.ts new file mode 100644 index 000000000..503e339a8 --- /dev/null +++ b/apps/api/src/api/services/quote/routes/strategies/offramp-evm-to-alfredpay.strategy.ts @@ -0,0 +1,23 @@ +import { EnginesRegistry, IRouteStrategy, QuoteContext, StageKey } from "../../core/types"; +import { OffRampEvmToAlfredpayFeeEngine } from "../../engines/fee/offramp-evm-to-alfredpay"; +import { OffRampFinalizeEngine } from "../../engines/finalize/offramp"; + +import { AlfredpayOffRampFromEvmInitializeEngine } from "../../engines/initialize/offramp-from-evm-alfredpay"; +import { OfframpTransactionAlfredpayEngine } from "../../engines/partners/offramp-alfredpay"; + +export class OfframpEvmToAlfredpayStrategy implements IRouteStrategy { + readonly name = "OfframpEvmToAlfredpay"; + + getStages(_ctx: QuoteContext): StageKey[] { + return [StageKey.Initialize, StageKey.Fee, StageKey.PartnerOperation, StageKey.Finalize]; + } + + getEngines(_ctx: QuoteContext): EnginesRegistry { + return { + [StageKey.Initialize]: new AlfredpayOffRampFromEvmInitializeEngine(), + [StageKey.Fee]: new OffRampEvmToAlfredpayFeeEngine(), + [StageKey.PartnerOperation]: new OfframpTransactionAlfredpayEngine(), + [StageKey.Finalize]: new OffRampFinalizeEngine() + }; + } +} diff --git a/apps/api/src/api/services/quote/routes/strategies/onramp-alfredpay-to-evm.strategy.ts b/apps/api/src/api/services/quote/routes/strategies/onramp-alfredpay-to-evm.strategy.ts new file mode 100644 index 000000000..c88da5bad --- /dev/null +++ b/apps/api/src/api/services/quote/routes/strategies/onramp-alfredpay-to-evm.strategy.ts @@ -0,0 +1,22 @@ +import { EnginesRegistry, IRouteStrategy, QuoteContext, StageKey } from "../../core/types"; +import { OnRampAlfredpayToEvmFeeEngine } from "../../engines/fee/onramp-alfredpay-to-evm"; +import { OnRampFinalizeEngine } from "../../engines/finalize/onramp"; +import { OnRampInitializeAlfredpayEngine } from "../../engines/initialize/onramp-alfredpay"; +import { OnRampSquidRouterUsdToEvmEngine } from "../../engines/squidrouter/onramp-polygon-to-evm-alfredpay"; + +export class OnrampAlfredpayToEvmStrategy implements IRouteStrategy { + readonly name = "OnrampAlfredpayToEvm"; + + getStages(_ctx: QuoteContext): StageKey[] { + return [StageKey.Initialize, StageKey.Fee, StageKey.SquidRouter, StageKey.Finalize]; + } + + getEngines(_ctx: QuoteContext): EnginesRegistry { + return { + [StageKey.Initialize]: new OnRampInitializeAlfredpayEngine(), + [StageKey.Fee]: new OnRampAlfredpayToEvmFeeEngine(), + [StageKey.SquidRouter]: new OnRampSquidRouterUsdToEvmEngine(), // Uses same engine as monerium's. (Polygon ephemeral -> destination) + [StageKey.Finalize]: new OnRampFinalizeEngine() + }; + } +} diff --git a/apps/api/src/api/services/ramp/ramp.service.ts b/apps/api/src/api/services/ramp/ramp.service.ts index 31ab66e93..acf3a0bd4 100644 --- a/apps/api/src/api/services/ramp/ramp.service.ts +++ b/apps/api/src/api/services/ramp/ramp.service.ts @@ -1,8 +1,16 @@ import { AccountMeta, + AlfredpayApiService, + AlfredpayChain, + AlfredpayFiatCurrency, + AlfredpayFiatPaymentInstructions, + AlfredpayOnChainCurrency, + AlfredpayPaymentMethodType, AveniaPaymentMethod, BrlaApiService, BrlaCurrency, + CreateAlfredpayOfframpRequest, + CreateAlfredpayOnrampRequest, EphemeralAccountType, EvmNetworks, FiatToken, @@ -29,7 +37,7 @@ import { } from "@vortexfi/shared"; import Big from "big.js"; import httpStatus from "http-status"; -import { Op } from "sequelize"; +import { Op, Transaction } from "sequelize"; import logger from "../../../config/logger"; import { SANDBOX_ENABLED, SEQUENCE_TIME_WINDOW_IN_SECONDS } from "../../../constants/constants"; import Partner from "../../../models/partner.model"; @@ -38,6 +46,7 @@ import RampState from "../../../models/rampState.model"; import TaxId from "../../../models/taxId.model"; import { APIError } from "../../errors/api-error"; import { ActivePartner, handleQuoteConsumptionForDiscountState } from "../../services/quote/engines/discount/helpers"; +import { SupabaseAuthService } from "../auth/supabase.service"; import { createEpcQrCodeData, getIbanForAddress, getMoneriumUserProfile } from "../monerium"; import { StateMetadata } from "../phases/meta-state-types"; import phaseProcessor from "../phases/phase-processor"; @@ -118,7 +127,8 @@ export class RampService extends BaseRampService { quote, normalizedSigningAccounts, additionalData, - signingAccounts + signingAccounts, + request.userId // will be undefined if not logged in. registerRamp is optional. ); await this.consumeQuote(quote.id, transaction); @@ -261,8 +271,19 @@ export class RampService extends BaseRampService { { transaction } ); + let achPaymentData: AlfredpayFiatPaymentInstructions | undefined = undefined; + if (quote.inputCurrency === FiatToken.USD) { + achPaymentData = await this.processAlfredpayOnrampStart(rampState, quote, transaction); + } + + if (quote.outputCurrency === FiatToken.USD) { + // TODO mocking. Currently failing in sandbox. + //await this.processAlfredpayOfframpStart(rampState, quote, transaction); + } + // Create response const response: UpdateRampResponse = { + achPaymentData, createdAt: rampState.createdAt.toISOString(), currentPhase: rampState.currentPhase, depositQrCode: rampState.state.depositQrCode, @@ -332,15 +353,7 @@ export class RampService extends BaseRampService { }; await validatePresignedTxs(rampState.type, rampState.presignedTxs, ephemerals); - // Find ephemeral transactions in unsigned transactions - const ephemeralTransactions = rampState.unsignedTxs.filter( - tx => - tx.signer === rampState.state.substrateEphemeralAddress || - tx.signer === rampState.state.evmEphemeralAddress || - tx.signer === rampState.state.stellarEphemeralAccountId - ); - // Ensure all unsigned transactions have a corresponding presigned transaction - if (!areAllTxsIncluded(ephemeralTransactions, rampState.presignedTxs)) { + if (!this.validateAllPresignedTransactionsSigned(rampState)) { throw new APIError({ message: "Not all unsigned transactions have a corresponding presigned transaction.", status: httpStatus.BAD_REQUEST @@ -360,7 +373,6 @@ export class RampService extends BaseRampService { }); } - console.log("Triggering TRANSACTION_CREATED webhook for ramp state:", rampState.id); webhookDeliveryService .triggerTransactionCreated( rampState.quoteId, @@ -810,13 +822,15 @@ export class RampService extends BaseRampService { private async prepareOfframpNonBrlTransactions( quote: QuoteTicket, normalizedSigningAccounts: AccountMeta[], - additionalData: RegisterRampRequest["additionalData"] + additionalData: RegisterRampRequest["additionalData"], + userId?: string ): Promise<{ unsignedTxs: UnsignedTx[]; stateMeta: Partial }> { const { unsignedTxs, stateMeta } = await prepareOfframpTransactions({ quote, signingAccounts: normalizedSigningAccounts, stellarPaymentData: additionalData?.paymentData, - userAddress: additionalData?.walletAddress + userAddress: additionalData?.walletAddress, + userId }); return { stateMeta, unsignedTxs }; @@ -862,6 +876,32 @@ export class RampService extends BaseRampService { return { aveniaTicketId, depositQrCode: brCode, stateMeta: stateMeta as Partial, unsignedTxs }; } + private async prepareAlfredpayOnrampTransactions( + quote: QuoteTicket, + normalizedSigningAccounts: AccountMeta[], + additionalData: RegisterRampRequest["additionalData"], + userId?: string + ): Promise<{ + unsignedTxs: UnsignedTx[]; + stateMeta: Partial; + }> { + if (!additionalData || !additionalData.destinationAddress) { + throw new APIError({ + message: "Parameter destinationAddress is required for Alfredpay onramp", + status: httpStatus.BAD_REQUEST + }); + } + + const { unsignedTxs, stateMeta } = await prepareOnrampTransactions({ + destinationAddress: additionalData.destinationAddress, + quote, + signingAccounts: normalizedSigningAccounts, + userId: userId! + }); + + return { stateMeta: stateMeta as Partial, unsignedTxs }; + } + private async prepareMoneriumOnrampTransactions( quote: QuoteTicket, normalizedSigningAccounts: AccountMeta[], @@ -957,7 +997,8 @@ export class RampService extends BaseRampService { quote: QuoteTicket, normalizedSigningAccounts: AccountMeta[], additionalData: RegisterRampRequest["additionalData"], - signingAccounts: AccountMeta[] + signingAccounts: AccountMeta[], + userId?: string ): Promise<{ unsignedTxs: UnsignedTx[]; stateMeta: Partial; @@ -972,20 +1013,33 @@ export class RampService extends BaseRampService { // otherwise, it is automatically assumed to be a Monerium offramp. // FIXME change to a better check once Mykobo support is dropped, or a better way to check if the transaction is a Monerium offramp arises. } else if (!additionalData?.moneriumAuthToken) { - return this.prepareOfframpNonBrlTransactions(quote, normalizedSigningAccounts, additionalData); + return this.prepareOfframpNonBrlTransactions(quote, normalizedSigningAccounts, additionalData, userId); } else { return this.prepareMoneriumOfframpTransactions(quote, normalizedSigningAccounts, additionalData); } } else { if (quote.inputCurrency === FiatToken.EURC) { return this.prepareMoneriumOnrampTransactions(quote, normalizedSigningAccounts, additionalData); + } else if (quote.inputCurrency === FiatToken.USD) { + return this.prepareAlfredpayOnrampTransactions(quote, normalizedSigningAccounts, additionalData, userId); } return this.prepareAveniaOnrampTransactions(quote, normalizedSigningAccounts, additionalData, signingAccounts); } } + private validateAllPresignedTransactionsSigned(rampState: RampState): boolean { + const ephemeralTransactions = rampState.unsignedTxs.filter( + tx => + tx.signer === rampState.state.substrateEphemeralAddress || + tx.signer === rampState.state.evmEphemeralAddress || + tx.signer === rampState.state.stellarEphemeralAccountId + ); + + return areAllTxsIncluded(ephemeralTransactions, rampState.presignedTxs || []); + } + private validateRampStateData(rampState: RampState, quote: QuoteTicket): void { - if (rampState.type === RampDirection.SELL) { + if (rampState.type === RampDirection.SELL && quote.outputCurrency !== FiatToken.USD) { if (rampState.from === Networks.AssetHub && !rampState.state.assethubToPendulumHash) { throw new APIError({ message: `Missing required additional data 'assethubToPendulumHash' for ${rampState.type} ramp. Cannot proceed.`, @@ -1055,6 +1109,145 @@ export class RampService extends BaseRampService { await this.notifyStatusChangeIfNeeded(rampState, oldPhase, newPhase); } } + + private async processAlfredpayOnrampStart( + rampState: RampState, + quote: QuoteTicket, + transaction: Transaction + ): Promise { + if (!this.validateAllPresignedTransactionsSigned(rampState)) { + return; + } + + if (rampState.state.alfredpayTransactionId) { + return; + } + + const alfredpayService = AlfredpayApiService.getInstance(); + const alfredpayQuoteId = quote.metadata.alfredpayMint?.quoteId; + + if (!alfredpayQuoteId) { + throw new APIError({ + message: "Missing Alfredpay quote ID in metadata", + status: httpStatus.BAD_REQUEST + }); + } + + if (!rampState.userId) { + throw new APIError({ + message: "Missing user ID in ramp state", + status: httpStatus.BAD_REQUEST + }); + } + + if (!rampState.state.destinationAddress) { + throw new APIError({ + message: "Destination address not found in ramp state", + status: httpStatus.BAD_REQUEST + }); + } + + if (!rampState.state.alfredpayUserId) { + throw new APIError({ + message: "Missing Alfredpay user ID in ramp state", + status: httpStatus.BAD_REQUEST + }); + } + + const orderRequest: CreateAlfredpayOnrampRequest = { + amount: quote.inputAmount, + chain: AlfredpayChain.MATIC, + customerId: rampState.state.alfredpayUserId, + depositAddress: rampState.state.evmEphemeralAddress, + fromCurrency: AlfredpayFiatCurrency.USD, + paymentMethodType: AlfredpayPaymentMethodType.BANK, + quoteId: alfredpayQuoteId, + toCurrency: AlfredpayOnChainCurrency.USDC + }; + + const order = await alfredpayService.createOnramp(orderRequest); + + await rampState.update( + { + state: { + ...rampState.state, + alfredpayTransactionId: order.transaction.transactionId, + fiatPaymentInstructions: order.fiatPaymentInstructions + } + }, + { transaction } + ); + + return order.fiatPaymentInstructions; + } + + private async processAlfredpayOfframpStart( + rampState: RampState, + quote: QuoteTicket, + transaction: Transaction + ): Promise { + if (!this.validateAllPresignedTransactionsSigned(rampState)) { + return; + } + + if (rampState.state.alfredpayTransactionId) { + return; + } + + const alfredpayService = AlfredpayApiService.getInstance(); + const alfredpayQuoteId = quote.metadata.alfredpayOfframp?.quoteId; + + if (!alfredpayQuoteId) { + throw new APIError({ + message: "Missing Alfredpay quote ID in metadata", + status: httpStatus.BAD_REQUEST + }); + } + + if (!rampState.state.alfredpayUserId) { + throw new APIError({ + message: "Missing Alfredpay user ID in ramp state", + status: httpStatus.BAD_REQUEST + }); + } + + if (!rampState.state.fiatAccountId) { + throw new APIError({ + message: "Missing fiatAccountId in ramp state", + status: httpStatus.BAD_REQUEST + }); + } + + if (!rampState.state.walletAddress) { + throw new APIError({ + message: "Wallet address not found in ramp state", + status: httpStatus.BAD_REQUEST + }); + } + + const orderRequest: CreateAlfredpayOfframpRequest = { + amount: quote.inputAmount, + chain: AlfredpayChain.MATIC, + customerId: rampState.state.alfredpayUserId, + fiatAccountId: rampState.state.fiatAccountId, + fromCurrency: AlfredpayOnChainCurrency.USDC, + originAddress: rampState.state.walletAddress, + quoteId: alfredpayQuoteId, + toCurrency: quote.outputCurrency as unknown as AlfredpayFiatCurrency + }; + + const order = await alfredpayService.createOfframp(orderRequest); + + await rampState.update( + { + state: { + ...rampState.state, + alfredpayTransactionId: order.transactionId + } + }, + { transaction } + ); + } } export default new RampService(); diff --git a/apps/api/src/api/services/sep10/sep10.service.ts b/apps/api/src/api/services/sep10/sep10.service.ts index 7f4a32f2f..360b9352c 100644 --- a/apps/api/src/api/services/sep10/sep10.service.ts +++ b/apps/api/src/api/services/sep10/sep10.service.ts @@ -1,4 +1,4 @@ -import { FiatToken } from "@vortexfi/shared"; +import { FiatToken, TOKEN_CONFIG } from "@vortexfi/shared"; import { Keypair, Networks, Transaction, TransactionBuilder } from "stellar-sdk"; import { CLIENT_DOMAIN_SECRET, SANDBOX_ENABLED, SEP10_MASTER_SECRET } from "../../../constants/constants"; import { fetchTomlValues } from "../../helpers/anchors"; @@ -29,8 +29,15 @@ export const signSep10Challenge = async ( const masterStellarKeypair = Keypair.fromSecret(SEP10_MASTER_SECRET); const clientDomainStellarKeypair = Keypair.fromSecret(CLIENT_DOMAIN_SECRET); - // TODO improve this mapping. Use at least the TOKEN_CONFIG key, not just the "EURC" string. - const outToken = fiatToken === FiatToken.EURC ? "EURC" : fiatToken; + // Map FiatToken enum values to TOKEN_CONFIG keys + const tokenMapping: Record = { + [FiatToken.EURC]: "EURC", + [FiatToken.ARS]: "ARS", + [FiatToken.BRL]: "BRL", + [FiatToken.USD]: "USDC" // USD maps to USDC for consistency, though not used for SEP10 + }; + + const outToken = tokenMapping[fiatToken]; const outTokenConfig = getOutToken(outToken); const { signingKey: anchorSigningKey } = (await fetchTomlValues(outTokenConfig.tomlFileUrl)) as TomlValues; diff --git a/apps/api/src/api/services/transactions/offramp/common/types.ts b/apps/api/src/api/services/transactions/offramp/common/types.ts index 77d96f26e..c97f216b3 100644 --- a/apps/api/src/api/services/transactions/offramp/common/types.ts +++ b/apps/api/src/api/services/transactions/offramp/common/types.ts @@ -11,6 +11,7 @@ export interface OfframpTransactionParams { receiverTaxId?: string; brlaEvmAddress?: string; moneriumAuthToken?: string; + userId?: string; } export interface OfframpTransactionsWithMeta { diff --git a/apps/api/src/api/services/transactions/offramp/common/validation.ts b/apps/api/src/api/services/transactions/offramp/common/validation.ts index b9a424b7e..67a1b8af9 100644 --- a/apps/api/src/api/services/transactions/offramp/common/validation.ts +++ b/apps/api/src/api/services/transactions/offramp/common/validation.ts @@ -6,7 +6,7 @@ import { getOnChainTokenDetails, isFiatToken, isOnChainToken, - isStellarOutputTokenDetails, + isStellarTokenDetails, PaymentData, StellarTokenDetails } from "@vortexfi/shared"; @@ -112,7 +112,7 @@ export function validateStellarOfframp( stellarTokenDetails: StellarTokenDetails; stellarPaymentData: PaymentData; } { - if (!isStellarOutputTokenDetails(outputTokenDetails)) { + if (!isStellarTokenDetails(outputTokenDetails)) { throw new Error("Output currency must be Stellar token for offramp, got output token details type"); } @@ -122,7 +122,7 @@ export function validateStellarOfframp( return { stellarPaymentData, - stellarTokenDetails: outputTokenDetails + stellarTokenDetails: outputTokenDetails as StellarTokenDetails }; } diff --git a/apps/api/src/api/services/transactions/offramp/index.ts b/apps/api/src/api/services/transactions/offramp/index.ts index 206e50e79..4793d7b6f 100644 --- a/apps/api/src/api/services/transactions/offramp/index.ts +++ b/apps/api/src/api/services/transactions/offramp/index.ts @@ -8,6 +8,7 @@ import { import { OfframpTransactionParams, OfframpTransactionsWithMeta } from "./common/types"; import { prepareAssethubToBRLOfframpTransactions } from "./routes/assethub-to-brl"; import { prepareAssethubToStellarOfframpTransactions } from "./routes/assethub-to-stellar"; +import { prepareEvmToAlfredpayOfframpTransactions } from "./routes/evm-to-alfredpay"; import { prepareEvmToBRLOfframpTransactions } from "./routes/evm-to-brl"; import { prepareEvmToMoneriumEvmOfframpTransactions } from "./routes/evm-to-monerium-evm"; import { prepareEvmToStellarOfframpTransactions } from "./routes/evm-to-stellar"; @@ -31,6 +32,9 @@ export async function prepareOfframpTransactions(params: OfframpTransactionParam } else if (quote.outputCurrency === FiatToken.EURC && params.moneriumAuthToken) { // Monerium EVM offramp return prepareEvmToMoneriumEvmOfframpTransactions(params); + } else if (quote.outputCurrency === FiatToken.USD) { + // Alfredpay offramp + return prepareEvmToAlfredpayOfframpTransactions(params); } else { // Stellar offramp const inputTokenDetails = getOnChainTokenDetails(fromNetwork, quote.inputCurrency as OnChainToken); diff --git a/apps/api/src/api/services/transactions/offramp/routes/assethub-to-brl.ts b/apps/api/src/api/services/transactions/offramp/routes/assethub-to-brl.ts index 06b4a0194..e7fe75aac 100644 --- a/apps/api/src/api/services/transactions/offramp/routes/assethub-to-brl.ts +++ b/apps/api/src/api/services/transactions/offramp/routes/assethub-to-brl.ts @@ -1,4 +1,4 @@ -import { encodeSubmittableExtrinsic, getPendulumDetails, Networks, UnsignedTx } from "@vortexfi/shared"; +import { encodeSubmittableExtrinsic, getPendulumDetails, MoonbeamTokenDetails, Networks, UnsignedTx } from "@vortexfi/shared"; import Big from "big.js"; import { multiplyByPowerOfTen } from "../../../pendulum/helpers"; import { StateMetadata } from "../../../phases/meta-state-types"; @@ -112,7 +112,7 @@ export async function prepareAssethubToBRLOfframpTransactions({ account: substrateAccount, brlaEvmAddress: validatedBrlaEvmAddress, outputAmountRaw: offrampAmountBeforeAnchorFeesRaw, - outputTokenPendulumDetails: outputTokenDetails.pendulumRepresentative, + outputTokenPendulumDetails: (outputTokenDetails as unknown as MoonbeamTokenDetails).pendulumRepresentative, pixDestination: validatedPixDestination, receiverTaxId: validatedReceiverTaxId, taxId: validatedTaxId diff --git a/apps/api/src/api/services/transactions/offramp/routes/assethub-to-stellar.ts b/apps/api/src/api/services/transactions/offramp/routes/assethub-to-stellar.ts index 9b6538321..357cac1e0 100644 --- a/apps/api/src/api/services/transactions/offramp/routes/assethub-to-stellar.ts +++ b/apps/api/src/api/services/transactions/offramp/routes/assethub-to-stellar.ts @@ -151,7 +151,7 @@ export async function prepareAssethubToStellarOfframpTransactions({ { ephemeralAddress: stellarEphemeralEntry.address, outputAmountUnits: offrampAmountBeforeAnchorFeesUnits, - outputTokenDetails, + outputTokenDetails: outputTokenDetails as any, stellarPaymentData }, unsignedTxs diff --git a/apps/api/src/api/services/transactions/offramp/routes/evm-to-alfredpay.ts b/apps/api/src/api/services/transactions/offramp/routes/evm-to-alfredpay.ts new file mode 100644 index 000000000..23cc936e7 --- /dev/null +++ b/apps/api/src/api/services/transactions/offramp/routes/evm-to-alfredpay.ts @@ -0,0 +1,306 @@ +import { + AlfredPayStatus, + createOfframpSquidrouterTransactionsToEvm, + ERC20_USDC_POLYGON, + EvmClientManager, + EvmNetworks, + EvmTokenDetails, + EvmTransactionData, + getNetworkFromDestination, + getNetworkId, + getOnChainTokenDetails, + isEvmToken, + isNetworkEVM, + Networks, + SignedTypedData, + SQUDROUTER_MAIN_CONTRACT_POLYGON, + TypedDataDomain, + UnsignedTx +} from "@vortexfi/shared"; +import Big from "big.js"; +import { encodeAbiParameters, keccak256, PublicClient, pad, parseAbiParameters, toHex } from "viem"; +import AlfredPayCustomer from "../../../../../models/alfredPayCustomer.model"; +import { StateMetadata } from "../../../phases/meta-state-types"; +import { encodeEvmTransactionData } from "../../index"; +import { addOnrampDestinationChainTransactions } from "../../onramp/common/transactions"; +import { OfframpTransactionParams, OfframpTransactionsWithMeta } from "../common/types"; + +export const RELAYER_ADDRESS = "0xC9ECD03c89349B3EAe4613c7091c6c3029413785" as const; + +/** + * Resolves the EIP-712 domain for a token's permit signature. + * Some tokens (like USDT in polygon) use salt-based domain separation instead of chainId. + */ +async function resolvePermitDomain( + publicClient: PublicClient, + tokenAddress: `0x${string}`, + chainId: number, + tokenName: string +): Promise { + let version = "1"; + try { + version = (await publicClient.readContract({ + abi: [{ inputs: [], name: "version", outputs: [{ type: "string" }], type: "function" }], + address: tokenAddress, + functionName: "version" + })) as string; + } catch { + // If version() fails, we stick with "1" + } + + const standardHash = keccak256( + encodeAbiParameters(parseAbiParameters("bytes32, bytes32, bytes32, uint256, address"), [ + keccak256(toHex("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)")), + keccak256(toHex(tokenName)), + keccak256(toHex(version)), + BigInt(chainId), + tokenAddress + ]) + ); + + let onChainSeparator: `0x${string}` | undefined; + try { + onChainSeparator = (await publicClient.readContract({ + abi: [{ inputs: [], name: "DOMAIN_SEPARATOR", outputs: [{ type: "bytes32" }], type: "function" }], + address: tokenAddress, + functionName: "DOMAIN_SEPARATOR" + })) as `0x${string}`; + } catch { + // If we can't read it, fall back to using standard domain separator eventually + } + + if (onChainSeparator !== undefined) { + if (onChainSeparator !== standardHash) { + // On-chain separator exists but doesn't match standard - compute salt hash for comparison + const salt = pad(toHex(chainId), { size: 32 }); + const saltHash = keccak256( + encodeAbiParameters(parseAbiParameters("bytes32, bytes32, bytes32, address, bytes32"), [ + keccak256(toHex("EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)")), + keccak256(toHex(tokenName)), + keccak256(toHex(version)), + tokenAddress, + salt + ]) + ); + + if (onChainSeparator === saltHash) { + return { name: tokenName, salt, verifyingContract: tokenAddress, version }; + } + + // Neither matches - this is an error + throw new Error( + `Token ${tokenName} has unexpected DOMAIN_SEPARATOR. Expected standard: ${standardHash} or salt: ${saltHash}, got: ${onChainSeparator}` + ); + } + // use standard domain + return { chainId, name: tokenName, verifyingContract: tokenAddress, version }; + } + + // No on-chain separator available - default to standard + return { chainId, name: tokenName, verifyingContract: tokenAddress, version }; +} + +const erc20Abi = [ + { + inputs: [{ name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", type: "uint256" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [{ name: "owner", type: "address" }], + name: "nonces", + outputs: [{ name: "", type: "uint256" }], + stateMutability: "view", + type: "function" + }, + { inputs: [], name: "name", outputs: [{ name: "", type: "string" }], stateMutability: "view", type: "function" } +]; + +/** + * Prepares all transactions for an EVM to Alfredpay (USD) offramp. + * This route handles: EVM → Polygon (USDC) → Alfredpay (Fiat) + */ +export async function prepareEvmToAlfredpayOfframpTransactions({ + quote, + signingAccounts, + userAddress, + userId +}: OfframpTransactionParams): Promise { + const unsignedTxs: UnsignedTx[] = []; + let stateMeta: Partial = {}; + + const evmClientManager = EvmClientManager.getInstance(); + + const fromNetwork = getNetworkFromDestination(quote.from); + if (!fromNetwork) { + throw new Error(`Invalid network for destination ${quote.from}`); + } + + const evmEphemeralEntry = signingAccounts.find(account => account.type === "EVM"); + if (!evmEphemeralEntry) { + throw new Error("EVM ephemeral account not found"); + } + + const inputTokenDetails = getOnChainTokenDetails(fromNetwork, quote.inputCurrency); + if (!inputTokenDetails || !isEvmToken(quote.inputCurrency)) { + throw new Error(`Input token details not found for ${quote.inputCurrency} on network ${fromNetwork}`); + } + + if (!userAddress) { + throw new Error("User address must be provided for offramping."); + } + + if (!quote.metadata.alfredpayOfframp?.inputAmountRaw) { + throw new Error("Missing alfredpayOfframp.inputAmountRaw in quote metadata"); + } + + if (!isNetworkEVM(fromNetwork)) { + throw new Error(`Unsupported source network ${fromNetwork} for EVM to Alfredpay type offramp`); + } + + const customer = await AlfredPayCustomer.findOne({ + where: { userId } + }); + + if (!customer) { + throw new Error(`Alfredpay customer not found for userId ${userId}`); + } + + if (customer.status !== AlfredPayStatus.Success) { + throw new Error(`Alfredpay customer status is ${customer.status}, expected Success. Proceed first with KYC.`); + } + + const inputAmountRaw = new Big(quote.inputAmount).mul(new Big(10).pow(inputTokenDetails.decimals)).toFixed(0, 0); + + const bridgeResult = await createOfframpSquidrouterTransactionsToEvm({ + destinationAddress: evmEphemeralEntry.address, + fromAddress: userAddress, + fromNetwork, + fromToken: (inputTokenDetails as EvmTokenDetails).erc20AddressSourceChain, + rawAmount: inputAmountRaw, + toNetwork: Networks.Polygon, + toToken: ERC20_USDC_POLYGON + }); + + const permitDeadline = BigInt(Math.floor(Date.now() / 1000) + 24 * 60 * 60); // 24 hours from "now" + + const publicClient = evmClientManager.getClient(fromNetwork); + + const userNonce = (await publicClient.readContract({ + abi: erc20Abi, + address: (inputTokenDetails as EvmTokenDetails).erc20AddressSourceChain, + args: [userAddress], + functionName: "nonces" + })) as bigint; + + const tokenName = (await publicClient.readContract({ + abi: erc20Abi, + address: (inputTokenDetails as EvmTokenDetails).erc20AddressSourceChain, + functionName: "name" + })) as string; + + const chainId = getNetworkId(fromNetwork)!; + const resolvedDomain = await resolvePermitDomain( + publicClient, + (inputTokenDetails as EvmTokenDetails).erc20AddressSourceChain, + chainId, + tokenName + ); + + const permitTypedData: SignedTypedData = { + domain: resolvedDomain, + message: { + deadline: permitDeadline.toString(), + nonce: userNonce.toString(), + owner: userAddress, + spender: RELAYER_ADDRESS, + value: inputAmountRaw.toString() + }, + primaryType: "Permit", + types: { + Permit: [ + { name: "owner", type: "address" }, + { name: "spender", type: "address" }, + { name: "value", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "deadline", type: "uint256" } + ] + } + }; + + // Create payload typed data for the relayer + const payloadNonce = BigInt(Math.floor(Date.now() / 1000)); // Use timestamp as nonce + const payloadDeadline = BigInt(Math.floor(Date.now() / 1000) + 3600); + + const payloadTypedData: SignedTypedData = { + domain: { + chainId: getNetworkId(fromNetwork)!, + name: "TokenRelayer", + verifyingContract: RELAYER_ADDRESS, + version: "1" + }, + message: { + data: bridgeResult.swapData.data, + deadline: payloadDeadline.toString(), + destination: bridgeResult.swapData.to, + ethValue: bridgeResult.swapData.value, + nonce: payloadNonce.toString(), + owner: userAddress, + token: (inputTokenDetails as EvmTokenDetails).erc20AddressSourceChain, + value: inputAmountRaw.toString() + }, + primaryType: "Payload", + types: { + Payload: [ + { name: "destination", type: "address" }, + { name: "owner", type: "address" }, + { name: "token", type: "address" }, + { name: "value", type: "uint256" }, + { name: "data", type: "bytes" }, + { name: "ethValue", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "deadline", type: "uint256" } + ] + } + }; + + // Bundle both signatures into a single transaction + const typedDataArray: SignedTypedData[] = [permitTypedData, payloadTypedData]; + + unsignedTxs.push({ + meta: {}, + network: fromNetwork, + nonce: 0, + phase: "squidRouterPermitExecute", + signer: userAddress, + txData: typedDataArray + }); + + stateMeta = { + ...stateMeta, + alfredpayUserId: customer.alfredPayId, + evmEphemeralAddress: evmEphemeralEntry.address, + squidRouterPermitExecutionValue: bridgeResult.swapData.value, + walletAddress: userAddress + }; + + const finalTransferTxData = await addOnrampDestinationChainTransactions({ + amountRaw: quote.metadata.alfredpayOfframp.inputAmountRaw, + destinationNetwork: Networks.Polygon as EvmNetworks, + toAddress: "0x7Ba99e99Bc669B3508AFf9CC0A898E869459F877", // TODO placeholder + toToken: ERC20_USDC_POLYGON + }); + + unsignedTxs.push({ + meta: {}, + network: Networks.Polygon, + nonce: 0, + phase: "alfredpayOfframpTransfer", + signer: evmEphemeralEntry.address, + txData: finalTransferTxData + }); + + return { stateMeta, unsignedTxs }; +} diff --git a/apps/api/src/api/services/transactions/offramp/routes/evm-to-brl.ts b/apps/api/src/api/services/transactions/offramp/routes/evm-to-brl.ts index 32ab0ba7f..d0c3ea056 100644 --- a/apps/api/src/api/services/transactions/offramp/routes/evm-to-brl.ts +++ b/apps/api/src/api/services/transactions/offramp/routes/evm-to-brl.ts @@ -1,4 +1,11 @@ -import { encodeSubmittableExtrinsic, getPendulumDetails, isEvmTokenDetails, Networks, UnsignedTx } from "@vortexfi/shared"; +import { + encodeSubmittableExtrinsic, + getPendulumDetails, + isEvmTokenDetails, + MoonbeamTokenDetails, + Networks, + UnsignedTx +} from "@vortexfi/shared"; import Big from "big.js"; import { multiplyByPowerOfTen } from "../../../pendulum/helpers"; import { StateMetadata } from "../../../phases/meta-state-types"; @@ -123,7 +130,7 @@ export async function prepareEvmToBRLOfframpTransactions({ account: substrateAccount, brlaEvmAddress: validatedBrlaEvmAddress, outputAmountRaw: offrampAmountBeforeAnchorFeesRaw, - outputTokenPendulumDetails: outputTokenDetails.pendulumRepresentative, + outputTokenPendulumDetails: (outputTokenDetails as unknown as MoonbeamTokenDetails).pendulumRepresentative, pixDestination: validatedPixDestination, receiverTaxId: validatedReceiverTaxId, taxId: validatedTaxId diff --git a/apps/api/src/api/services/transactions/offramp/routes/evm-to-stellar.ts b/apps/api/src/api/services/transactions/offramp/routes/evm-to-stellar.ts index 36eba3834..e2da5a424 100644 --- a/apps/api/src/api/services/transactions/offramp/routes/evm-to-stellar.ts +++ b/apps/api/src/api/services/transactions/offramp/routes/evm-to-stellar.ts @@ -1,11 +1,4 @@ -import { - encodeSubmittableExtrinsic, - getPendulumDetails, - isEvmTokenDetails, - isStellarOutputTokenDetails, - Networks, - UnsignedTx -} from "@vortexfi/shared"; +import { encodeSubmittableExtrinsic, getPendulumDetails, isEvmTokenDetails, Networks, UnsignedTx } from "@vortexfi/shared"; import Big from "big.js"; import { multiplyByPowerOfTen } from "../../../pendulum/helpers"; import { StateMetadata } from "../../../phases/meta-state-types"; @@ -152,10 +145,6 @@ export async function prepareEvmToStellarOfframpTransactions({ ...stellarResult.stateMeta }; - if (!isStellarOutputTokenDetails(outputTokenDetails)) { - throw new Error(`Output currency must be Stellar token for offramp, got ${quote.outputCurrency}`); - } - if (!stellarPaymentData) { throw new Error("Stellar payment data must be provided for offramp"); } @@ -164,7 +153,7 @@ export async function prepareEvmToStellarOfframpTransactions({ { ephemeralAddress: stellarEphemeralEntry.address, outputAmountUnits: offrampAmountBeforeAnchorFeesUnits, - outputTokenDetails, + outputTokenDetails: stellarTokenDetails, stellarPaymentData }, unsignedTxs diff --git a/apps/api/src/api/services/transactions/onramp/common/transactions.ts b/apps/api/src/api/services/transactions/onramp/common/transactions.ts index 262562e73..f16a381e0 100644 --- a/apps/api/src/api/services/transactions/onramp/common/transactions.ts +++ b/apps/api/src/api/services/transactions/onramp/common/transactions.ts @@ -203,13 +203,13 @@ export async function addOnrampDestinationChainTransactions(params: { functionName: "transfer" }); - const { maxFeePerGas } = await publicClient.estimateFeesPerGas(); + const { maxFeePerGas, maxPriorityFeePerGas } = await publicClient.estimateFeesPerGas(); const txData: EvmTransactionData = { data: transferCallData as `0x${string}`, gas: "100000", maxFeePerGas: String(maxFeePerGas), - maxPriorityFeePerGas: String(maxFeePerGas), + maxPriorityFeePerGas: String(maxPriorityFeePerGas * 3n), to: toToken, value: "0" }; @@ -239,13 +239,13 @@ export async function addDestinationChainApprovalTransaction(params: { functionName: "approve" }); - const { maxFeePerGas } = await publicClient.estimateFeesPerGas(); + const { maxFeePerGas, maxPriorityFeePerGas } = await publicClient.estimateFeesPerGas(); const txData: EvmTransactionData = { data: approveCallData as `0x${string}`, gas: "100000", maxFeePerGas: String(maxFeePerGas), - maxPriorityFeePerGas: String(maxFeePerGas), + maxPriorityFeePerGas: String(maxPriorityFeePerGas), to: tokenAddress, value: "0" }; diff --git a/apps/api/src/api/services/transactions/onramp/common/types.ts b/apps/api/src/api/services/transactions/onramp/common/types.ts index 152f4d3e6..7bb618d7e 100644 --- a/apps/api/src/api/services/transactions/onramp/common/types.ts +++ b/apps/api/src/api/services/transactions/onramp/common/types.ts @@ -9,6 +9,8 @@ export interface OnrampTransactionParams { export type AveniaOnrampTransactionParams = OnrampTransactionParams & { taxId: string }; +export type AlfredpayOnrampTransactionParams = OnrampTransactionParams & { userId: string }; + export type MoneriumOnrampTransactionParams = OnrampTransactionParams & { moneriumWalletAddress: string }; export interface OnrampTransactionsWithMeta { diff --git a/apps/api/src/api/services/transactions/onramp/index.ts b/apps/api/src/api/services/transactions/onramp/index.ts index 435220750..4227e3184 100644 --- a/apps/api/src/api/services/transactions/onramp/index.ts +++ b/apps/api/src/api/services/transactions/onramp/index.ts @@ -1,12 +1,23 @@ import { FiatToken, Networks } from "@vortexfi/shared"; -import { AveniaOnrampTransactionParams, MoneriumOnrampTransactionParams, OnrampTransactionsWithMeta } from "./common/types"; +import { + AlfredpayOnrampTransactionParams, + AveniaOnrampTransactionParams, + MoneriumOnrampTransactionParams, + OnrampTransactionParams, + OnrampTransactionsWithMeta +} from "./common/types"; +import { prepareAlfredpayToEvmOnrampTransactions } from "./routes/alfredpay-to-evm"; import { prepareAveniaToAssethubOnrampTransactions } from "./routes/avenia-to-assethub"; import { prepareAveniaToEvmOnrampTransactions } from "./routes/avenia-to-evm"; import { prepareMoneriumToAssethubOnrampTransactions } from "./routes/monerium-to-assethub"; import { prepareMoneriumToEvmOnrampTransactions } from "./routes/monerium-to-evm"; export async function prepareOnrampTransactions( - params: AveniaOnrampTransactionParams | MoneriumOnrampTransactionParams + params: + | AveniaOnrampTransactionParams + | MoneriumOnrampTransactionParams + | AlfredpayOnrampTransactionParams + | OnrampTransactionParams ): Promise { const { quote } = params; @@ -33,6 +44,16 @@ export async function prepareOnrampTransactions( } else { return prepareMoneriumToEvmOnrampTransactions(params); } + } else if (quote.inputCurrency === FiatToken.USD) { + if (!("userId" in params)) { + throw new Error("Alfredpay onramps requires logged in user"); + } + + if (quote.to !== Networks.AssetHub) { + return prepareAlfredpayToEvmOnrampTransactions(params); + } else { + throw new Error(`Unsupported destination network for Alfredpay onramp: ${quote.to}`); + } } else { throw new Error(`Unsupported input currency: ${quote.inputCurrency}`); } diff --git a/apps/api/src/api/services/transactions/onramp/routes/alfredpay-to-evm.ts b/apps/api/src/api/services/transactions/onramp/routes/alfredpay-to-evm.ts new file mode 100644 index 000000000..3eac4077d --- /dev/null +++ b/apps/api/src/api/services/transactions/onramp/routes/alfredpay-to-evm.ts @@ -0,0 +1,219 @@ +import { + AlfredPayStatus, + createOnrampSquidrouterTransactionsFromPolygonToEvm, + createOnrampSquidrouterTransactionsOnDestinationChain, + ERC20_USDC_POLYGON, + EvmNetworks, + EvmToken, + EvmTokenDetails, + EvmTransactionData, + evmTokenConfig, + getNetworkFromDestination, + getOnChainTokenDetails, + getOnChainTokenDetailsOrDefault, + isEvmToken, + isOnChainToken, + Networks, + UnsignedTx +} from "@vortexfi/shared"; +import { privateKeyToAccount } from "viem/accounts"; +import { MOONBEAM_FUNDING_PRIVATE_KEY } from "../../../../../constants/constants"; +import AlfredPayCustomer from "../../../../../models/alfredPayCustomer.model"; +import { StateMetadata } from "../../../phases/meta-state-types"; +import { encodeEvmTransactionData } from "../../index"; +import { addDestinationChainApprovalTransaction, addOnrampDestinationChainTransactions } from "../common/transactions"; +import { AlfredpayOnrampTransactionParams, OnrampTransactionsWithMeta } from "../common/types"; + +/** + * Prepares all transactions for Alfredpay (USD) onramp to EVM chain. + * This route handles: USD → Polygon (USDC/USDT) → EVM (final transfer) + */ +export async function prepareAlfredpayToEvmOnrampTransactions({ + quote, + signingAccounts, + destinationAddress, + userId +}: AlfredpayOnrampTransactionParams): Promise { + let stateMeta: Partial = {}; + const unsignedTxs: UnsignedTx[] = []; + + const evmEphemeralEntry = signingAccounts.find(ephemeral => ephemeral.type === "EVM"); + if (!evmEphemeralEntry) { + throw new Error("EVM ephemeral entry not found"); + } + + if (!quote.metadata.alfredpayMint?.outputAmountRaw) { + throw new Error("Missing alfredpay raw mint amount in quote metadata"); + } + + const toNetwork = getNetworkFromDestination(quote.to); + if (!toNetwork || toNetwork === Networks.AssetHub) { + throw new Error(`Invalid network for destination ${quote.to}`); + } + + if (!isOnChainToken(quote.outputCurrency)) { + throw new Error(`Output currency cannot be fiat token ${quote.outputCurrency} for onramp.`); + } + + const outputTokenDetails = getOnChainTokenDetails(toNetwork, quote.outputCurrency); + if (!outputTokenDetails || !isEvmToken(quote.outputCurrency)) { + throw new Error(`Output token details not found for ${quote.outputCurrency} on network ${toNetwork}`); + } + + const customer = await AlfredPayCustomer.findOne({ + where: { userId } + }); + + if (!customer) { + throw new Error(`Alfredpay customer not found for userId ${userId}`); + } + + if (customer.status !== AlfredPayStatus.Success) { + throw new Error(`Alfredpay customer status is ${customer.status}, expected Success. Proceed first with KYC.`); + } + + // Setup state metadata + stateMeta = { + alfredpayUserId: customer.alfredPayId, + destinationAddress, + evmEphemeralAddress: evmEphemeralEntry.address + }; + + let polygonAccountNonce = 0; // Starts fresh + + // Special case, onramping USDC on Polygon. We need to skip the SquidRouter step and go directly to the destination transfer. + if ((outputTokenDetails as EvmTokenDetails).erc20AddressSourceChain === ERC20_USDC_POLYGON) { + const finalTransferTxData = await addOnrampDestinationChainTransactions({ + amountRaw: quote.metadata.alfredpayMint.outputAmountRaw, + destinationNetwork: toNetwork as EvmNetworks, + toAddress: destinationAddress, + toToken: (outputTokenDetails as EvmTokenDetails).erc20AddressSourceChain + }); + unsignedTxs.push({ + meta: {}, + network: toNetwork, + nonce: polygonAccountNonce, + phase: "destinationTransfer", + signer: evmEphemeralEntry.address, + txData: encodeEvmTransactionData(finalTransferTxData) as EvmTransactionData + }); + + stateMeta = { + ...stateMeta + }; + + return { stateMeta, unsignedTxs }; + } + + const { approveData, swapData, squidRouterQuoteId, squidRouterReceiverId, squidRouterReceiverHash } = + await createOnrampSquidrouterTransactionsFromPolygonToEvm({ + destinationAddress: evmEphemeralEntry.address, + fromAddress: evmEphemeralEntry.address, + fromToken: ERC20_USDC_POLYGON, + rawAmount: quote.metadata.alfredpayMint.outputAmountRaw, + toNetwork, + toToken: (outputTokenDetails as EvmTokenDetails).erc20AddressSourceChain + }); + + unsignedTxs.push({ + meta: {}, + network: Networks.Polygon, // Hardcoded to mint on Polygon + nonce: polygonAccountNonce++, + phase: "squidRouterApprove", + signer: evmEphemeralEntry.address, + txData: encodeEvmTransactionData(approveData) as EvmTransactionData + }); + + unsignedTxs.push({ + meta: {}, + network: Networks.Polygon, + nonce: polygonAccountNonce++, + phase: "squidRouterSwap", + signer: evmEphemeralEntry.address, + txData: encodeEvmTransactionData(swapData) as EvmTransactionData + }); + + const finalTransferTxData = await addOnrampDestinationChainTransactions({ + amountRaw: quote.metadata.alfredpayMint.outputAmountRaw, + destinationNetwork: toNetwork as EvmNetworks, + toAddress: destinationAddress, + toToken: (outputTokenDetails as EvmTokenDetails).erc20AddressSourceChain + }); + + let destinationNonce = toNetwork === Networks.Polygon ? polygonAccountNonce++ : 0; // If the destination is Polygon, we need to use the same nonce sequence. Otherwise, we start fresh on the new chain. + + unsignedTxs.push({ + meta: {}, + network: toNetwork, + nonce: destinationNonce++, + phase: "destinationTransfer", + signer: evmEphemeralEntry.address, + txData: encodeEvmTransactionData(finalTransferTxData) as EvmTransactionData + }); + + // Fallback swap depends on the EVM chain. For Ethereum, the bridged token is USDC. For the rest, it is axlUSDC. + const destinationAxlUsdcDetails = getOnChainTokenDetailsOrDefault(toNetwork as Networks, EvmToken.AXLUSDC) as EvmTokenDetails; + const bridgedTokenForFallback = + toNetwork === Networks.Ethereum + ? evmTokenConfig.ethereum.USDC!.erc20AddressSourceChain + : destinationAxlUsdcDetails.erc20AddressSourceChain; + + const { approveData: destApproveData, swapData: destSwapData } = await createOnrampSquidrouterTransactionsOnDestinationChain({ + destinationAddress: evmEphemeralEntry.address, + fromAddress: evmEphemeralEntry.address, + fromToken: bridgedTokenForFallback, + network: toNetwork as EvmNetworks, + rawAmount: quote.metadata.alfredpayMint.outputAmountRaw, + toToken: (outputTokenDetails as EvmTokenDetails).erc20AddressSourceChain + }); + + unsignedTxs.push({ + meta: {}, + network: toNetwork, + nonce: destinationNonce, + phase: "backupSquidRouterApprove", + signer: evmEphemeralEntry.address, + txData: encodeEvmTransactionData(destApproveData) as EvmTransactionData + }); + destinationNonce++; + + unsignedTxs.push({ + meta: {}, + network: toNetwork, + nonce: destinationNonce, + phase: "backupSquidRouterSwap", + signer: evmEphemeralEntry.address, + txData: encodeEvmTransactionData(destSwapData) as EvmTransactionData + }); + destinationNonce++; + + const maxUint256 = 2n ** 256n - 1n; + const fundingAccount = privateKeyToAccount(MOONBEAM_FUNDING_PRIVATE_KEY as `0x${string}`); + + const backupApproveTransaction = await addDestinationChainApprovalTransaction({ + amountRaw: maxUint256.toString(), + destinationNetwork: toNetwork as EvmNetworks, + spenderAddress: fundingAccount.address, + tokenAddress: bridgedTokenForFallback + }); + + // We set this to 0 on purpose because we don't want to risk that the required nonce is never reached + const backupApproveNonce = 0; + unsignedTxs.push({ + meta: {}, + network: toNetwork, + nonce: backupApproveNonce, + phase: "backupApprove", + signer: evmEphemeralEntry.address, + txData: backupApproveTransaction + }); + + stateMeta = { + ...stateMeta, + squidRouterQuoteId, + squidRouterReceiverHash, + squidRouterReceiverId + }; + + return { stateMeta, unsignedTxs }; +} diff --git a/apps/api/src/api/services/transactions/validation.ts b/apps/api/src/api/services/transactions/validation.ts index f2ef3fd54..b79cfe6b3 100644 --- a/apps/api/src/api/services/transactions/validation.ts +++ b/apps/api/src/api/services/transactions/validation.ts @@ -6,6 +6,8 @@ import { EphemeralAccountType, FiatToken, getNetworkId, + isSignedTypedData, + isSignedTypedDataArray, PresignedTx, RampDirection, RampPhase, @@ -101,6 +103,11 @@ export async function validatePresignedTxs( function validateEvmTransaction(tx: PresignedTx, expectedSigner: string) { const { txData, signer } = tx; + // do not validate typed data + if (isSignedTypedData(txData) || isSignedTypedDataArray(txData)) { + return; + } + if (!expectedSigner) { throw new APIError({ message: "Expected signer for EVM transaction is not provided", @@ -226,8 +233,6 @@ async function validateStellarTransaction(tx: PresignedTx, expectedSigner: strin }); } - console.log("Parsed Stellar transaction source:", transaction.source); - if (phase === "stellarCreateAccount") { if (transaction.operations.length !== 3) { throw new APIError({ diff --git a/apps/api/src/contracts/TokenRelayer.ts b/apps/api/src/contracts/TokenRelayer.ts new file mode 100644 index 000000000..412d844a0 --- /dev/null +++ b/apps/api/src/contracts/TokenRelayer.ts @@ -0,0 +1,30 @@ +export const tokenRelayerAbi = [ + { + inputs: [ + { + components: [ + { name: "token", type: "address" }, + { name: "owner", type: "address" }, + { name: "value", type: "uint256" }, + { name: "deadline", type: "uint256" }, + { name: "permitV", type: "uint8" }, + { name: "permitR", type: "bytes32" }, + { name: "permitS", type: "bytes32" }, + { name: "payloadData", type: "bytes" }, + { name: "payloadValue", type: "uint256" }, + { name: "payloadNonce", type: "uint256" }, + { name: "payloadDeadline", type: "uint256" }, + { name: "payloadV", type: "uint8" }, + { name: "payloadR", type: "bytes32" }, + { name: "payloadS", type: "bytes32" } + ], + name: "params", + type: "tuple" + } + ], + name: "execute", + outputs: [{ name: "", type: "bool" }], + stateMutability: "payable", + type: "function" + } +]; diff --git a/apps/api/src/database/migrations/023-create-alfredpay-customers-table.ts b/apps/api/src/database/migrations/023-create-alfredpay-customers-table.ts new file mode 100644 index 000000000..22e734a10 --- /dev/null +++ b/apps/api/src/database/migrations/023-create-alfredpay-customers-table.ts @@ -0,0 +1,90 @@ +import { DataTypes, QueryInterface } from "sequelize"; + +export async function up(queryInterface: QueryInterface): Promise { + await queryInterface.createTable("alfredpay_customers", { + alfred_pay_id: { + allowNull: false, + type: DataTypes.STRING, + unique: true + }, + country: { + allowNull: false, + type: DataTypes.ENUM("MX", "AR", "BR", "CO", "DO", "US", "CN", "HK", "CL", "PE", "BO") + }, + created_at: { + allowNull: false, + defaultValue: DataTypes.NOW, + type: DataTypes.DATE + }, + id: { + allowNull: false, + defaultValue: DataTypes.UUIDV4, + primaryKey: true, + type: DataTypes.UUID + }, + last_failure_reasons: { + allowNull: true, + defaultValue: [], + type: DataTypes.ARRAY(DataTypes.STRING) + }, + status: { + allowNull: false, + defaultValue: "CONSULTED", + type: DataTypes.ENUM("CONSULTED", "LINK_OPENED", "USER_COMPLETED", "VERIFYING", "FAILED", "SUCCESS") + }, + status_external: { + allowNull: true, + type: DataTypes.STRING + }, + type: { + allowNull: false, + defaultValue: "INDIVIDUAL", + type: DataTypes.ENUM("INDIVIDUAL", "BUSINESS") + }, + updated_at: { + allowNull: false, + defaultValue: DataTypes.NOW, + type: DataTypes.DATE + }, + user_id: { + allowNull: false, + type: DataTypes.UUID + } + }); + + // Add foreign key constraint for user_id + await queryInterface.addConstraint("alfredpay_customers", { + fields: ["user_id"], + name: "fk_alfredpay_customers_user_id", + onDelete: "CASCADE", + onUpdate: "CASCADE", + references: { + field: "id", + table: "profiles" + }, + type: "foreign key" + }); + + // Indexes + await queryInterface.addIndex("alfredpay_customers", ["user_id"], { + name: "idx_alfredpay_customers_user_id" + }); + + await queryInterface.addIndex("alfredpay_customers", ["alfred_pay_id"], { + name: "idx_alfredpay_customers_alfred_pay_id", + unique: true + }); +} + +export async function down(queryInterface: QueryInterface): Promise { + // Remove FK + await queryInterface.removeConstraint("alfredpay_customers", "fk_alfredpay_customers_user_id"); + + // Drop table + await queryInterface.dropTable("alfredpay_customers"); + + // Drop enums + await queryInterface.sequelize.query('DROP TYPE IF EXISTS "enum_alfredpay_customers_country";').catch(() => {}); + await queryInterface.sequelize.query('DROP TYPE IF EXISTS "enum_alfredpay_customers_status";').catch(() => {}); + await queryInterface.sequelize.query('DROP TYPE IF EXISTS "enum_alfredpay_customers_type";').catch(() => {}); +} diff --git a/apps/api/src/models/alfredPayCustomer.model.ts b/apps/api/src/models/alfredPayCustomer.model.ts new file mode 100644 index 000000000..349cca1e3 --- /dev/null +++ b/apps/api/src/models/alfredPayCustomer.model.ts @@ -0,0 +1,127 @@ +import { AlfredPayCountry, AlfredPayStatus, AlfredPayType } from "@vortexfi/shared"; +import { DataTypes, Model, Optional } from "sequelize"; +import sequelize from "../config/database"; + +export interface AlfredPayCustomerAttributes { + id: string; // Internal PK + userId: string; // Foreign key to User (profiles.id) + alfredPayId: string; // Alfredpay's user ID + country: AlfredPayCountry; + status: AlfredPayStatus; + statusExternal: string | null; + lastFailureReasons: string[] | null; + type: AlfredPayType; + createdAt: Date; + updatedAt: Date; +} + +type AlfredPayCustomerCreationAttributes = Optional< + AlfredPayCustomerAttributes, + "id" | "createdAt" | "updatedAt" | "statusExternal" | "lastFailureReasons" +>; + +class AlfredPayCustomer + extends Model + implements AlfredPayCustomerAttributes +{ + declare id: string; + declare userId: string; + declare alfredPayId: string; + declare country: AlfredPayCountry; + declare status: AlfredPayStatus; + declare statusExternal: string | null; + declare lastFailureReasons: string[] | null; + declare type: AlfredPayType; + declare createdAt: Date; + declare updatedAt: Date; +} + +AlfredPayCustomer.init( + { + alfredPayId: { + allowNull: false, + comment: "Alfredpay's user ID", + field: "alfred_pay_id", + type: DataTypes.STRING, + unique: true + }, + country: { + allowNull: false, + type: DataTypes.ENUM(...Object.values(AlfredPayCountry)) + }, + createdAt: { + allowNull: false, + defaultValue: DataTypes.NOW, + field: "created_at", + type: DataTypes.DATE + }, + id: { + allowNull: false, + defaultValue: DataTypes.UUIDV4, + primaryKey: true, + type: DataTypes.UUID + }, + lastFailureReasons: { + allowNull: true, + defaultValue: [], + field: "last_failure_reasons", + type: DataTypes.ARRAY(DataTypes.STRING) + }, + status: { + allowNull: false, + defaultValue: AlfredPayStatus.Consulted, + type: DataTypes.ENUM(...Object.values(AlfredPayStatus)) + }, + statusExternal: { + allowNull: true, + comment: "Alfredpay's direct status", + field: "status_external", + type: DataTypes.STRING + }, + type: { + allowNull: false, + defaultValue: AlfredPayType.INDIVIDUAL, + type: DataTypes.ENUM(...Object.values(AlfredPayType)) + }, + updatedAt: { + allowNull: false, + defaultValue: DataTypes.NOW, + field: "updated_at", + type: DataTypes.DATE + }, + userId: { + allowNull: false, + field: "user_id", + onDelete: "CASCADE", + onUpdate: "CASCADE", + references: { + key: "id", + model: "profiles" + }, + type: DataTypes.UUID + } + }, + { + indexes: [ + { + fields: ["user_id"], + name: "idx_alfredpay_customers_user_id" + }, + { + fields: ["alfred_pay_id"], + name: "idx_alfredpay_customers_alfred_pay_id", + unique: true + }, + { + fields: ["email"], + name: "idx_alfredpay_customers_email" + } + ], + modelName: "AlfredPayCustomer", + sequelize, // Following convention + tableName: "alfredpay_customers", + timestamps: true + } +); + +export default AlfredPayCustomer; diff --git a/apps/api/src/models/index.ts b/apps/api/src/models/index.ts index 797670417..6cbc45d87 100644 --- a/apps/api/src/models/index.ts +++ b/apps/api/src/models/index.ts @@ -1,4 +1,5 @@ import sequelize from "../config/database"; +import AlfredPayCustomer from "./alfredPayCustomer.model"; import Anchor from "./anchor.model"; import ApiKey from "./apiKey.model"; import KycLevel2 from "./kycLevel2.model"; @@ -32,8 +33,12 @@ KycLevel2.belongsTo(User, { as: "user", foreignKey: "userId" }); User.hasMany(TaxId, { as: "taxIds", foreignKey: "userId" }); TaxId.belongsTo(User, { as: "user", foreignKey: "userId" }); +User.hasMany(AlfredPayCustomer, { as: "alfredPayCustomers", foreignKey: "userId" }); +AlfredPayCustomer.belongsTo(User, { as: "user", foreignKey: "userId" }); + // Initialize models const models = { + AlfredPayCustomer, Anchor, ApiKey, KycLevel2, diff --git a/apps/frontend/src/components/Alfredpay/AlfredpayKycFlow.tsx b/apps/frontend/src/components/Alfredpay/AlfredpayKycFlow.tsx new file mode 100644 index 000000000..077ee0488 --- /dev/null +++ b/apps/frontend/src/components/Alfredpay/AlfredpayKycFlow.tsx @@ -0,0 +1,169 @@ +import { Trans, useTranslation } from "react-i18next"; +import { useAlfredpayKycActor, useAlfredpayKycSelector } from "../../contexts/rampState"; +import { cn } from "../../helpers/cn"; +import { Spinner } from "../Spinner"; + +export const AlfredpayKycFlow = () => { + const { t } = useTranslation(); + const actor = useAlfredpayKycActor(); + const state = useAlfredpayKycSelector(); + + const openLink = () => { + actor?.send({ type: "OPEN_LINK" }); + }; + + const completedFilling = () => { + actor?.send({ type: "COMPLETED_FILLING" }); + }; + + const toggleBusiness = () => { + actor?.send({ type: "TOGGLE_BUSINESS" }); + }; + + const userAccept = () => { + actor?.send({ type: "USER_ACCEPT" }); + }; + + if (!actor || !state) return null; + + const { stateValue, context } = state; + const kycOrKyb = context.business ? "KYB" : "KYC"; + + if ( + stateValue === "CheckingStatus" || + stateValue === "CreatingCustomer" || + stateValue === "GettingKycLink" || + stateValue === "Retrying" + ) { + return ( +
+ +

{t("components.alfredpayKycFlow.loading")}

+
+ ); + } + + if (stateValue === "PollingStatus") { + return ( +
+ +

{t("components.alfredpayKycFlow.verifyingStatus", { kycOrKyb })}

+

{t("components.alfredpayKycFlow.verifyingStatusDescription")}

+
+ ); + } + + if (stateValue === "LinkReady") { + return ( +
+

{t("components.alfredpayKycFlow.completeProcess", { kycOrKyb })}

+ +
+ ); + } + + if (stateValue === "OpeningLink") { + return ( +
+ +

{t("components.alfredpayKycFlow.openingLink")}

+
+ ); + } + + if (stateValue === "FillingKyc" || stateValue === "FinishingFilling") { + const isSubmitting = stateValue === "FinishingFilling"; + + return ( +
+

{t("components.alfredpayKycFlow.completeInNewWindow", { kycOrKyb })}

+ +
+ ); + } + + if (stateValue === "Done") { + return ( +
+

{t("components.alfredpayKycFlow.completed", { kycOrKyb })}

+

{t("components.alfredpayKycFlow.accountVerified")}

+ {/* Will not be rendered as the sub-state machine will stop and go to main kyc one */} +
+ ); + } + + if (stateValue === "FailureKyc") { + return ( +
+

{t("components.alfredpayKycFlow.failed", { kycOrKyb })}

+

{context.error?.message || "An unknown error occurred."}

+
+ + +
+
+ ); + } + + if (stateValue === "Failure") { + return ( +
+

{t("components.alfredpayKycFlow.systemError")}

+

{context.error?.message || "An unknown error occurred."}

+
+ + +
+
+ ); + } + + if (stateValue === "CostumerDefinition") { + return ( +
+

{t("components.alfredpayKycFlow.continueWithPartner", { kycOrKyb })}

+ +

+ {context.business ? ( + + }} + i18nKey="components.alfredpayKycFlow.registerAsIndividual" + /> + ) : ( + + }} + i18nKey="components.alfredpayKycFlow.registerAsBusiness" + /> + )} +

+
+ ); + } + + return null; +}; diff --git a/apps/frontend/src/components/Avenia/AveniaKYBFlow/AveniaKYBVerificationStatus.tsx b/apps/frontend/src/components/Avenia/AveniaKYBFlow/AveniaKYBVerificationStatus.tsx index eaee8f9ce..b3142c346 100644 --- a/apps/frontend/src/components/Avenia/AveniaKYBFlow/AveniaKYBVerificationStatus.tsx +++ b/apps/frontend/src/components/Avenia/AveniaKYBFlow/AveniaKYBVerificationStatus.tsx @@ -12,7 +12,6 @@ export const AveniaKYBVerificationStatus: React.FC = () => { if (!aveniaState || !aveniaKycActor) return null; - console.log(aveniaState.context.kycStatus); return ( <>
diff --git a/apps/frontend/src/components/RampSubmitButton/RampSubmitButton.tsx b/apps/frontend/src/components/RampSubmitButton/RampSubmitButton.tsx index 52ddecb60..ab9904ee4 100644 --- a/apps/frontend/src/components/RampSubmitButton/RampSubmitButton.tsx +++ b/apps/frontend/src/components/RampSubmitButton/RampSubmitButton.tsx @@ -48,7 +48,7 @@ const useButtonContent = ({ toToken, submitButtonDisabled }: UseButtonContentPro return useMemo(() => { const isOnramp = quote?.rampType === RampDirection.BUY; const isOfframp = quote?.rampType === RampDirection.SELL; - const isDepositQrCodeReady = Boolean(rampState?.ramp?.depositQrCode); + const isDepositQrCodeReady = Boolean(rampState?.ramp?.depositQrCode) || Boolean(rampState?.ramp?.achPaymentData); if ( walletLocked && @@ -108,8 +108,6 @@ const useButtonContent = ({ toToken, submitButtonDisabled }: UseButtonContentPro // }; // } - console.log("submitButtonDisabled", submitButtonDisabled); - if (submitButtonDisabled) { return { icon: , @@ -240,7 +238,8 @@ export const RampSubmitButton = ({ className, hasValidationErrors }: { className } if (machineState === "UpdateRamp") { - const isDepositQrCodeReady = Boolean(isOnramp && rampState?.ramp?.depositQrCode); + const isDepositQrCodeReady = + Boolean(isOnramp && rampState?.ramp?.depositQrCode) || Boolean(rampState?.ramp?.achPaymentData); if (isOnramp && !isDepositQrCodeReady) return true; } diff --git a/apps/frontend/src/components/Spinner/index.tsx b/apps/frontend/src/components/Spinner/index.tsx index 19945f5b9..a388c7a04 100644 --- a/apps/frontend/src/components/Spinner/index.tsx +++ b/apps/frontend/src/components/Spinner/index.tsx @@ -3,7 +3,15 @@ import { cn } from "../../helpers/cn"; export type SpinnerSize = "sm" | "md" | "lg"; export type SpinnerTheme = "light" | "dark"; -export function Spinner({ size = "sm", theme = "light" }: { size?: SpinnerSize; theme?: SpinnerTheme }) { +export function Spinner({ + size = "sm", + theme = "light", + className +}: { + size?: SpinnerSize; + theme?: SpinnerTheme; + className?: string; +}) { const sizeClasses = { lg: "w-10 h-10", md: "w-8 h-8", @@ -17,7 +25,12 @@ export function Spinner({ size = "sm", theme = "light" }: { size?: SpinnerSize; return (
); } diff --git a/apps/frontend/src/components/TokenSelection/TokenSelectionList/helpers.tsx b/apps/frontend/src/components/TokenSelection/TokenSelectionList/helpers.tsx index cc1703dbd..8d3ec5700 100644 --- a/apps/frontend/src/components/TokenSelection/TokenSelectionList/helpers.tsx +++ b/apps/frontend/src/components/TokenSelection/TokenSelectionList/helpers.tsx @@ -4,6 +4,7 @@ import { EvmNetworks, FiatToken, FiatTokenDetails, + freeTokenConfig, getEnumKeyByStringValue, getNetworkDisplayName, isEvmTokenDetails, @@ -139,11 +140,12 @@ export function invalidateOnChainTokensCache(): void { function getFiatTokens(filterEurcOnly = false): ExtendedTokenDefinition[] { const moonbeamEntries = Object.entries(moonbeamTokenConfig); + const freeFiatCurrencyEntries = Object.entries(freeTokenConfig); const stellarEntries = filterEurcOnly ? Object.entries(stellarTokenConfig).filter(([key]) => key === FiatToken.EURC) : Object.entries(stellarTokenConfig); - return [...moonbeamEntries, ...stellarEntries].map(([key, value]) => ({ + return [...moonbeamEntries, ...freeFiatCurrencyEntries, ...stellarEntries].map(([key, value]) => ({ assetIcon: value.fiat.assetIcon, assetSymbol: value.fiat.symbol, details: value as FiatTokenDetails, diff --git a/apps/frontend/src/components/widget-steps/SummaryStep/TransactionTokensDisplay.tsx b/apps/frontend/src/components/widget-steps/SummaryStep/TransactionTokensDisplay.tsx index e1c3c2552..5ce26e513 100644 --- a/apps/frontend/src/components/widget-steps/SummaryStep/TransactionTokensDisplay.tsx +++ b/apps/frontend/src/components/widget-steps/SummaryStep/TransactionTokensDisplay.tsx @@ -6,6 +6,7 @@ import { getAddressForFormat, getAnyFiatTokenDetails, getOnChainTokenDetailsOrDefault, + isMoonbeamTokenDetails, isStellarOutputTokenDetails, OnChainTokenDetails, RampDirection @@ -25,6 +26,7 @@ import { AssetDisplay } from "./AssetDisplay"; import { BRLOnrampDetails } from "./BRLOnrampDetails"; import { EUROnrampDetails } from "./EUROnrampDetails"; import { FeeDetails } from "./FeeDetails"; +import { USOnrampDetails } from "./USOnrampDetails"; const QUOTE_EXPIRY_TIME = 10; @@ -107,7 +109,13 @@ export const TransactionTokensDisplay: FC = ({ ex if (fromToken.assetSymbol === "EURC") { return "https://monerium.com"; } - return isStellarOutputTokenDetails(fiatToken) ? fiatToken.anchorHomepageUrl : fiatToken.partnerUrl; + if (isStellarOutputTokenDetails(fiatToken)) { + return fiatToken.anchorHomepageUrl; + } + if (isMoonbeamTokenDetails(fiatToken)) { + return fiatToken.partnerUrl; + } + return ""; }; const destinationAddress = isOnramp @@ -155,6 +163,7 @@ export const TransactionTokensDisplay: FC = ({ ex /> {rampDirection === RampDirection.BUY && executionInput.fiatToken === FiatToken.BRL && } {rampDirection === RampDirection.BUY && executionInput.fiatToken === FiatToken.EURC && } + {rampDirection === RampDirection.BUY && executionInput.fiatToken === FiatToken.USD && } {quoteLocked && targetTimestamp !== null && !isQuoteExpired && (
{t("components.SummaryPage.BRLOnrampDetails.timerLabel")} {formattedTime} diff --git a/apps/frontend/src/components/widget-steps/SummaryStep/USOnrampDetails.tsx b/apps/frontend/src/components/widget-steps/SummaryStep/USOnrampDetails.tsx new file mode 100644 index 000000000..356130aa9 --- /dev/null +++ b/apps/frontend/src/components/widget-steps/SummaryStep/USOnrampDetails.tsx @@ -0,0 +1,44 @@ +import { useSelector } from "@xstate/react"; +import { QRCodeSVG } from "qrcode.react"; +import { FC } from "react"; +import { Trans, useTranslation } from "react-i18next"; +import { useRampActor } from "../../../contexts/rampState"; +import { CopyButton } from "../../CopyButton"; + +export const USOnrampDetails: FC = () => { + const { t } = useTranslation(); + const rampActor = useRampActor(); + const { isQuoteExpired } = useSelector(rampActor, state => ({ + isQuoteExpired: state.context.isQuoteExpired + })); + const { rampState } = useSelector(rampActor, state => ({ + rampState: state.context.rampState + })); + const achPaymentData = rampState?.ramp?.achPaymentData; + if (!achPaymentData) return null; + if (isQuoteExpired) return null; + + return ( + <> +
+

{t("components.SummaryPage.USOnrampDetails.title")}

+

{t("components.SummaryPage.USOnrampDetails.qrCode")}

+
+

+ + Once done, please click on "I have made the payment" + +

+
+
+
+

{String(achPaymentData.paymentDescription)}

+

{String(achPaymentData.accountNumber)}

+

{String(achPaymentData.routingNumber)}

+

{String(achPaymentData.accountHolderName)}

+
+
+

{t("components.SummaryPage.USOnrampDetails.copyCode")}

+ + ); +}; diff --git a/apps/frontend/src/config/tokenAvailability.ts b/apps/frontend/src/config/tokenAvailability.ts index 7e7c8f0c4..6fd982c25 100644 --- a/apps/frontend/src/config/tokenAvailability.ts +++ b/apps/frontend/src/config/tokenAvailability.ts @@ -19,6 +19,10 @@ export const fiatTokenAvailability: Record = [FiatToken.BRL]: { disabledReasonTranslationKey: "pages.swap.error.BRL_tokenUnavailable", enabled: true + }, + [FiatToken.USD]: { + disabledReasonTranslationKey: "pages.swap.error.USD_tokenUnavailable", + enabled: true } }; diff --git a/apps/frontend/src/contexts/events.tsx b/apps/frontend/src/contexts/events.tsx index 75216dbda..58903ee82 100644 --- a/apps/frontend/src/contexts/events.tsx +++ b/apps/frontend/src/contexts/events.tsx @@ -199,8 +199,6 @@ const useEvents = () => { } } - console.log("Push data layer", event); - window.dataLayer.push(event); }, []); diff --git a/apps/frontend/src/contexts/rampState.tsx b/apps/frontend/src/contexts/rampState.tsx index 52bdcb08d..9c3f210a0 100644 --- a/apps/frontend/src/contexts/rampState.tsx +++ b/apps/frontend/src/contexts/rampState.tsx @@ -1,13 +1,16 @@ import { createActorContext, useSelector } from "@xstate/react"; import React, { PropsWithChildren, useEffect } from "react"; -import { AveniaKycContext, MoneriumKycContext, StellarKycContext } from "../machines/kyc.states"; +import { AlfredpayKycContext, AveniaKycContext, MoneriumKycContext, StellarKycContext } from "../machines/kyc.states"; import { rampMachine } from "../machines/ramp.machine"; import { + AlfredpayKycActorRef, + AlfredpayKycSnapshot, AveniaKycActorRef, AveniaKycSnapshot, MoneriumKycActorRef, MoneriumKycSnapshot, RampMachineSnapshot, + SelectedAlfredpayData, SelectedAveniaData, SelectedMoneriumData, SelectedStellarData, @@ -19,7 +22,6 @@ const RAMP_STATE_STORAGE_KEY = "rampState"; const restoredStateJSON = localStorage.getItem(RAMP_STATE_STORAGE_KEY); let restoredState = restoredStateJSON ? JSON.parse(restoredStateJSON) : undefined; -console.log("restored state: ", restoredState); // invalidate restored state if the machine is with error status. restoredState = restoredState?.status === "error" ? undefined : restoredState; @@ -187,3 +189,38 @@ export function useAveniaKycSelector(): SelectedAveniaData | undefined { } ); } + +export function useAlfredpayKycActor(): AlfredpayKycActorRef | undefined { + const rampActor = useRampActor(); + + return useSelector(rampActor, (snapshot: RampMachineSnapshot) => (snapshot.children as any).alfredpayKyc) as + | AlfredpayKycActorRef + | undefined; +} + +export function useAlfredpayKycSelector(): SelectedAlfredpayData | undefined { + const rampActor = useRampActor(); + + const alfredpayActor = useSelector(rampActor, (snapshot: RampMachineSnapshot) => (snapshot.children as any).alfredpayKyc) as + | AlfredpayKycActorRef + | undefined; + + return useSelector( + alfredpayActor, + (snapshot: AlfredpayKycSnapshot | undefined) => { + if (!snapshot) { + return undefined; + } + return { + context: snapshot.context as AlfredpayKycContext, + stateValue: snapshot.value + }; + }, + (prev, next) => { + if (!prev || !next) { + return prev === next; + } + return prev.stateValue === next.stateValue && prev.context === next.context; + } + ); +} diff --git a/apps/frontend/src/helpers/crypto.ts b/apps/frontend/src/helpers/crypto.ts index 4f8c86571..f0d42e3ff 100644 --- a/apps/frontend/src/helpers/crypto.ts +++ b/apps/frontend/src/helpers/crypto.ts @@ -18,7 +18,6 @@ export async function signERC2612Permit( const deadline = BigInt(Math.floor(Date.now() / 1000) + 7 * 24 * 3600); // 1 week from now if (originalChainId && originalChainId !== chainId) { - console.log(`Switching to chain ${chainId} from chain ${originalChainId} for permit signing`); try { await switchChain(wagmiConfig, { chainId }); } catch (error) { @@ -68,7 +67,6 @@ export async function signERC2612Permit( spender, value: value.toFixed(0, 0) }; - console.log("DEBUG: Signing ERC2612 Permit with message:", message); const signature = await signTypedData(wagmiConfig, { account: owner, @@ -87,7 +85,6 @@ export async function signERC2612Permit( throw new Error("Failed to sign ERC2612 permit: " + error); } finally { if (originalChainId && originalChainId !== chainId) { - console.log(`Switching back to original chain ${originalChainId} after permit signing`); try { await switchChain(wagmiConfig, { chainId: originalChainId }); } catch (switchError) { diff --git a/apps/frontend/src/hooks/brla/useKYCForm/index.tsx b/apps/frontend/src/hooks/brla/useKYCForm/index.tsx index ca90fa158..fc8886194 100644 --- a/apps/frontend/src/hooks/brla/useKYCForm/index.tsx +++ b/apps/frontend/src/hooks/brla/useKYCForm/index.tsx @@ -107,8 +107,6 @@ export const useKYCForm = ({ cpfApiError, initialData }: UseKYCFormProps) => { const kycFormSchema = createKycFormSchema(t); - console.log("useKYCForm: Received initialData:", initialData); - const defaultValues = { ...getEnumInitialValues(ExtendedAveniaFieldOptions), ...initialData, @@ -116,8 +114,6 @@ export const useKYCForm = ({ cpfApiError, initialData }: UseKYCFormProps) => { [ExtendedAveniaFieldOptions.PIX_ID]: initialData?.pixId || pixIdFromStore || "" }; - console.log("useKYCForm: Calculated defaultValues:", defaultValues); - const kycForm = useForm({ defaultValues: defaultValues, mode: "onBlur", diff --git a/apps/frontend/src/hooks/useOnchainTokenBalances.ts b/apps/frontend/src/hooks/useOnchainTokenBalances.ts index 82ac0895f..31ee9b014 100644 --- a/apps/frontend/src/hooks/useOnchainTokenBalances.ts +++ b/apps/frontend/src/hooks/useOnchainTokenBalances.ts @@ -245,7 +245,6 @@ export const useEvmBalances = (tokens: EvmTokenDetails[]): EvmTokenDetailsWithBa } else { try { balances = await fetchAlchemyTokenBalances(address, network); - console.log(`[${network}] Balances:`, Object.fromEntries(balances)); globalBalanceCache.set(cacheKey, balances); } catch (error) { diff --git a/apps/frontend/src/hooks/useRampUrlParams.ts b/apps/frontend/src/hooks/useRampUrlParams.ts index 1a5efb7e5..86edd196a 100644 --- a/apps/frontend/src/hooks/useRampUrlParams.ts +++ b/apps/frontend/src/hooks/useRampUrlParams.ts @@ -109,7 +109,8 @@ const mapFiatToDestination = (fiatToken: FiatToken): DestinationType => { const destinationMap: Record = { ARS: EPaymentMethod.CBU, BRL: EPaymentMethod.PIX, - EUR: EPaymentMethod.SEPA + EUR: EPaymentMethod.SEPA, + USD: EPaymentMethod.ACH }; return destinationMap[fiatToken] || EPaymentMethod.SEPA; diff --git a/apps/frontend/src/hooks/useSignChallenge.ts b/apps/frontend/src/hooks/useSignChallenge.ts index 5d2dcc03a..cb220d316 100644 --- a/apps/frontend/src/hooks/useSignChallenge.ts +++ b/apps/frontend/src/hooks/useSignChallenge.ts @@ -32,7 +32,6 @@ export function useSiweSignature(stellarKycActor: ActorRefFrom { if (!stellarKycActor) return; if (!address) { - console.log("Address must be defined. This is a bug."); stellarKycActor.send({ type: "AUTH_INVALID" }); return; } diff --git a/apps/frontend/src/machines/actors/register.actor.ts b/apps/frontend/src/machines/actors/register.actor.ts index 6dcf4ae5b..61e5a1809 100644 --- a/apps/frontend/src/machines/actors/register.actor.ts +++ b/apps/frontend/src/machines/actors/register.actor.ts @@ -86,6 +86,12 @@ export const registerRampActor = async ({ input }: { input: RampContext }): Prom taxId: executionInput.taxId, walletAddress: connectedWalletAddress }; + } else if (executionInput.quote.rampType === RampDirection.BUY && executionInput.fiatToken === FiatToken.USD) { + additionalData = { + destinationAddress: executionInput.sourceOrDestinationAddress, + sessionId: input.externalSessionId, + walletAddress: connectedWalletAddress + }; } else { additionalData = { // moneriumAuthToken is only relevant after enabling Monerium offramps. diff --git a/apps/frontend/src/machines/actors/sign.actor.ts b/apps/frontend/src/machines/actors/sign.actor.ts index 769e751d0..62d4c0947 100644 --- a/apps/frontend/src/machines/actors/sign.actor.ts +++ b/apps/frontend/src/machines/actors/sign.actor.ts @@ -5,14 +5,21 @@ import { getAddressForFormat, getOnChainTokenDetails, isEvmTransactionData, + isSignedTypedData, + isSignedTypedDataArray, Networks, PermitSignature, + PresignedTx, RampDirection } from "@vortexfi/shared"; import { signERC2612Permit } from "../../helpers/crypto"; import { RampService } from "../../services/api"; import { MoneriumService } from "../../services/api/monerium.service"; -import { signAndSubmitEvmTransaction, signAndSubmitSubstrateTransaction } from "../../services/transactions/userSigning"; +import { + signAndSubmitEvmTransaction, + signAndSubmitSubstrateTransaction, + signMultipleTypedData +} from "../../services/transactions/userSigning"; import { RampContext, RampMachineActor, RampState } from "../types"; export enum SignRampErrorType { @@ -79,6 +86,7 @@ export const signTransactionsActor = async ({ txData: {} as any // Placeholder, actual txData is not needed for signing the permit }); } + if (!userTxs || userTxs.length === 0) { console.log("No user transactions found requiring signature."); return rampState; @@ -107,9 +115,23 @@ export const signTransactionsActor = async ({ executionInput?.onChainToken && getOnChainTokenDetails(executionInput.network, executionInput.onChainToken)?.isNative ); + const signedTxs: PresignedTx[] = rampState.signedTransactions; + try { for (const tx of sortedTxs) { - if (tx.phase === "squidRouterApprove") { + if (isSignedTypedData(tx.txData) || isSignedTypedDataArray(tx.txData)) { + input.parent.send({ phase: "started", type: "SIGNING_UPDATE" }); + if (isSignedTypedData(tx.txData)) { + const signedArray = await signMultipleTypedData([tx.txData]); + tx.txData = signedArray[0]; + } else { + tx.txData = await signMultipleTypedData(tx.txData); + } + + signedTxs.push(tx); + + input.parent.send({ phase: "signed", type: "SIGNING_UPDATE" }); + } else if (tx.phase === "squidRouterApprove") { if (isNativeTokenTransfer) { input.parent.send({ phase: "login", type: "SIGNING_UPDATE" }); continue; @@ -166,7 +188,7 @@ export const signTransactionsActor = async ({ if (!rampState.ramp) { throw new Error("Ramp state is missing, cannot update ramp with user signatures."); } - const updatedRampProcess = await RampService.updateRamp(rampState.ramp.id, [], additionalData); + const updatedRampProcess = await RampService.updateRamp(rampState.ramp.id, signedTxs, additionalData); return { ...rampState, diff --git a/apps/frontend/src/machines/actors/validateKyc.actor.ts b/apps/frontend/src/machines/actors/validateKyc.actor.ts index a9f2d48a8..5a1fd021e 100644 --- a/apps/frontend/src/machines/actors/validateKyc.actor.ts +++ b/apps/frontend/src/machines/actors/validateKyc.actor.ts @@ -24,7 +24,11 @@ export const validateKycActor = async ({ input }: { input: RampContext }): Promi throw new Error("quoteId is missing from ramp context"); } - if (executionInput.fiatToken === FiatToken.EURC || executionInput.fiatToken === FiatToken.ARS) { + if ( + executionInput.fiatToken === FiatToken.EURC || + executionInput.fiatToken === FiatToken.ARS || + executionInput.fiatToken === FiatToken.USD + ) { return { kycNeeded: true }; } diff --git a/apps/frontend/src/machines/alfredpayKyc.machine.ts b/apps/frontend/src/machines/alfredpayKyc.machine.ts new file mode 100644 index 000000000..2d918c046 --- /dev/null +++ b/apps/frontend/src/machines/alfredpayKyc.machine.ts @@ -0,0 +1,374 @@ +import { + AlfredPayStatus, + AlfredpayCreateCustomerResponse, + AlfredpayCustomerType, + AlfredpayGetKycRedirectLinkResponse, + AlfredpayGetKycStatusResponse, + AlfredpayStatusResponse +} from "@vortexfi/shared"; +import { assign, fromPromise, raise, setup } from "xstate"; +import { AlfredpayService } from "../services/api/alfredpay.service"; +import { AlfredpayKycContext } from "./kyc.states"; + +const POLLING_TIMEOUT_MS = 20 * 60 * 1000; // 20 minutes + +export enum AlfredpayKycMachineErrorType { + UserRejected = "USER_REJECTED", + UnknownError = "UNKNOWN_ERROR" +} + +export class AlfredpayKycMachineError extends Error { + type: AlfredpayKycMachineErrorType; + constructor(message: string, type: AlfredpayKycMachineErrorType) { + super(message); + this.type = type; + } +} + +export const alfredpayKycMachine = setup({ + actors: { + checkStatus: fromPromise(async ({ input }: { input: AlfredpayKycContext }) => { + const country = input.country || "US"; + + const status = await AlfredpayService.getAlfredpayStatus(country); + return status; + }), + + createCustomer: fromPromise(async ({ input }: { input: AlfredpayKycContext }) => { + const country = input.country || "US"; + if (input.business) { + return AlfredpayService.createBusinessCustomer(country); + } + return AlfredpayService.createIndividualCustomer(country); + }), + + getKycLink: fromPromise(async ({ input }: { input: AlfredpayKycContext }) => { + const country = input.country || "US"; + if (input.business) { + return AlfredpayService.getKybRedirectLink(country); + } + return AlfredpayService.getKycRedirectLink(country); + }), + notifyFinished: fromPromise(async ({ input }: { input: AlfredpayKycContext }) => { + const country = input.country || "US"; + return AlfredpayService.notifyKycRedirectFinished( + country, + input.business ? AlfredpayCustomerType.BUSINESS : AlfredpayCustomerType.INDIVIDUAL + ); + }), + notifyOpened: fromPromise(async ({ input }: { input: AlfredpayKycContext }) => { + const country = input.country || "US"; + return AlfredpayService.notifyKycRedirectOpened( + country, + input.business ? AlfredpayCustomerType.BUSINESS : AlfredpayCustomerType.INDIVIDUAL + ); + }), + pollStatus: fromPromise(async ({ input }: { input: AlfredpayKycContext }) => { + const country = input.country || "US"; + // Submission ID check removed as backend handles it + + const startTime = Date.now(); + while (true) { + if (Date.now() - startTime > POLLING_TIMEOUT_MS) { + throw new Error("Polling timeout"); + } + try { + const response = await AlfredpayService.getKycStatus( + country, + input.business ? AlfredpayCustomerType.BUSINESS : AlfredpayCustomerType.INDIVIDUAL + ); + if (response.status === AlfredPayStatus.Success || response.status === AlfredPayStatus.Failed) { + return response; + } + } catch (e) { + // Ignore and retry + } + await new Promise(resolve => setTimeout(resolve, 5000)); + } + }), + retryKyc: fromPromise(async ({ input }: { input: AlfredpayKycContext }) => { + const country = input.country || "US"; + return AlfredpayService.retryKyc( + country, + input.business ? AlfredpayCustomerType.BUSINESS : AlfredpayCustomerType.INDIVIDUAL + ); + }), + waitForValidation: fromPromise(async ({ input }: { input: AlfredpayKycContext }) => { + const country = input.country || "US"; + // Submission ID check removed as backend handles it + + const startTime = Date.now(); + while (true) { + if (Date.now() - startTime > POLLING_TIMEOUT_MS) { + throw new Error("Polling timeout"); + } + try { + const status = await AlfredpayService.getKycStatus( + country, + input.business ? AlfredpayCustomerType.BUSINESS : AlfredpayCustomerType.INDIVIDUAL + ); + if ( + status.status === AlfredPayStatus.Verifying || + status.status === AlfredPayStatus.Success || + status.status === AlfredPayStatus.Failed + ) { + return status; + } + } catch (e) { + // Ignore errors during polling and keep trying + } + await new Promise(resolve => setTimeout(resolve, 5000)); + } + }) + }, + types: { + context: {} as AlfredpayKycContext, + events: {} as + | { type: "OPEN_LINK" } + | { type: "COMPLETED_FILLING" } + | { type: "RETRY" } + | { type: "CONFIRM_SUCCESS" } + | { type: "CHECK_STATUS" } + | { type: "TOGGLE_BUSINESS" } + | { type: "USER_ACCEPT" } + | { type: "RETRY_PROCESS" } + | { type: "CANCEL_PROCESS" } + | { type: "USER_RETRY" } + | { type: "USER_CANCEL" }, + input: {} as AlfredpayKycContext, + output: {} as { error?: AlfredpayKycMachineError; kycResponse?: any } + } +}).createMachine({ + context: ({ input }) => ({ ...input, country: input.country || "US" }), + id: "alfredpayKyc", + initial: "CheckingStatus", + output: ({ context }) => ({ + error: context.error + }), + states: { + CheckingStatus: { + invoke: { + id: "checkStatus", + input: ({ context }) => context, + onDone: [ + { + guard: ({ event }) => event.output.status === AlfredPayStatus.Success, + target: "Done" + }, + { + guard: ({ event }) => event.output.status === AlfredPayStatus.Verifying, + target: "PollingStatus" + }, + { + actions: assign({ + error: ({ event, context }) => + new AlfredpayKycMachineError( + `${context.business ? "KYB" : "KYC"} Failed`, + AlfredpayKycMachineErrorType.UnknownError + ) + }), + guard: ({ event }) => event.output.status === AlfredPayStatus.Failed, + target: "FailureKyc" + }, + { + // Default state for normal flow. + target: "GettingKycLink" + } + ], + onError: [ + { + guard: ({ event }) => + (event.error as Error).message.includes("404") || (event.error as Error).message.includes("Not Found"), + target: "CostumerDefinition" + }, + { + actions: assign({ + error: ({ event }) => + new AlfredpayKycMachineError((event.error as Error).message, AlfredpayKycMachineErrorType.UnknownError) + }), + target: "Failure" + } + ], + src: "checkStatus" + } + }, + CostumerDefinition: { + on: { + TOGGLE_BUSINESS: { + actions: assign({ + business: ({ context }) => !context.business + }) + }, + USER_ACCEPT: { + target: "CreatingCustomer" + } + } + }, + CreatingCustomer: { + invoke: { + id: "createCustomer", + input: ({ context }) => context, + onDone: { + target: "GettingKycLink" + }, + onError: { + actions: assign({ + error: ({ context }) => + new AlfredpayKycMachineError( + `Failed to create ${context.business ? "business " : ""}customer`, + AlfredpayKycMachineErrorType.UnknownError + ) + }), + target: "Failure" + }, + src: "createCustomer" + } + }, + Done: { + type: "final" + }, + Failure: { + on: { + CANCEL_PROCESS: { + target: "Done" + }, + RETRY_PROCESS: { + target: "CheckingStatus" + } + } + }, + FailureKyc: { + on: { + USER_CANCEL: { + target: "Done" + }, + USER_RETRY: { + target: "Retrying" + } + } + }, + FillingKyc: { + invoke: { + id: "waitForValidation", + input: ({ context }) => context, + onDone: { + target: "PollingStatus" + }, + src: "waitForValidation" + }, + on: { + COMPLETED_FILLING: { + target: "FinishingFilling" + } + } + }, + FinishingFilling: { + invoke: { + id: "notifyFinished", + input: ({ context }) => context, + onDone: { + target: "PollingStatus" + }, + onError: { + target: "PollingStatus" + }, + src: "notifyFinished" + } + }, + GettingKycLink: { + invoke: { + id: "getKycLink", + input: ({ context }) => context, + onDone: { + actions: assign({ + submissionId: ({ event }) => event.output.submissionId, + verificationUrl: ({ event }) => event.output.verification_url + }), + target: "LinkReady" + }, + onError: { + actions: assign({ + error: ({ context }) => + new AlfredpayKycMachineError( + `Failed to get ${context.business ? "KYB" : "KYC"} link`, + AlfredpayKycMachineErrorType.UnknownError + ) + }), + target: "Failure" + }, + src: "getKycLink" + } + }, + LinkReady: { + on: { + OPEN_LINK: { + actions: ({ context }) => { + if (context.verificationUrl) { + window.open(context.verificationUrl, "_blank"); + } + }, + target: "OpeningLink" + } + } + }, + OpeningLink: { + invoke: { + id: "notifyOpened", + input: ({ context }) => context, + onDone: { + target: "FillingKyc" + }, + onError: { + target: "FillingKyc" + }, + src: "notifyOpened" + } + }, + PollingStatus: { + invoke: { + id: "pollStatus", + input: ({ context }) => context, + onDone: [ + { + guard: ({ event }) => event.output.status === AlfredPayStatus.Success, + target: "Done" + }, + { + actions: assign({ + error: ({ event, context }) => + event.output.lastFailure + ? new AlfredpayKycMachineError(event.output.lastFailure, AlfredpayKycMachineErrorType.UnknownError) + : new AlfredpayKycMachineError( + `${context.business ? "KYB" : "KYC"} Failed`, + AlfredpayKycMachineErrorType.UnknownError + ) + }), + guard: ({ event }) => event.output.status === AlfredPayStatus.Failed, + target: "FailureKyc" + } + ], + src: "pollStatus" + } + }, + Retrying: { + invoke: { + id: "retryKyc", + input: ({ context }) => context, + onDone: { + target: "GettingKycLink" + }, + onError: { + actions: assign({ + error: ({ context }) => + new AlfredpayKycMachineError( + `Failed to retry ${context.business ? "KYB" : "KYC"}`, + AlfredpayKycMachineErrorType.UnknownError + ) + }), + target: "Failure" + }, + src: "retryKyc" + } + } + } +}); diff --git a/apps/frontend/src/machines/brlaKyc.machine.ts b/apps/frontend/src/machines/brlaKyc.machine.ts index fd6507d9d..56239b40d 100644 --- a/apps/frontend/src/machines/brlaKyc.machine.ts +++ b/apps/frontend/src/machines/brlaKyc.machine.ts @@ -115,7 +115,6 @@ export const aveniaKycMachine = setup({ }; }, kycFormData: ({ event }) => { - console.log("kycFormData", event.formData); return event.formData; }, taxId: ({ event }) => event.formData.taxId @@ -140,7 +139,6 @@ export const aveniaKycMachine = setup({ }; }, kycFormData: ({ event, context }) => { - console.log("kycFormData", event.formData); return { ...context.kycFormData, ...event.formData diff --git a/apps/frontend/src/machines/kyc.states.ts b/apps/frontend/src/machines/kyc.states.ts index d4011171a..e0ab63b17 100644 --- a/apps/frontend/src/machines/kyc.states.ts +++ b/apps/frontend/src/machines/kyc.states.ts @@ -2,11 +2,20 @@ import { FiatToken, KycFailureReason, RampDirection } from "@vortexfi/shared"; import { assign, DoneActorEvent, sendTo } from "xstate"; import { KYCFormData } from "../hooks/brla/useKYCForm"; import { KycStatus } from "../services/signingService"; +import { AlfredpayKycMachineError } from "./alfredpayKyc.machine"; import { AveniaKycMachineError, UploadIds } from "./brlaKyc.machine"; import { MoneriumKycMachineError, MoneriumKycMachineErrorType } from "./moneriumKyc.machine"; import { RampContext, SelectedAveniaData } from "./types"; // Extended context types for child KYC machines +export interface AlfredpayKycContext extends RampContext { + verificationUrl?: string; + submissionId?: string; + country?: string; + error?: AlfredpayKycMachineError; + business?: boolean; +} + export interface AveniaKycContext extends RampContext { taxId: string; subAccountId?: string; @@ -51,7 +60,7 @@ export interface StellarKycContext extends RampContext { // The output of these state-machine actors will always be assigned to the RampContext's `kycResponse` property. export const kycStateNode = { entry: ({ context }: { context: RampContext }) => - console.log("Entering KYC state node. RampContext kycFormData:", context.kycFormData), + console.log("DEBUG: Entering KYC state node. RampContext kycFormData:", context.kycFormData), initial: "Deciding", on: { GO_BACK: { @@ -80,6 +89,42 @@ export const kycStateNode = { } }, states: { + Alfredpay: { + invoke: { + id: "alfredpayKyc", + input: ({ context }: { context: RampContext }): AlfredpayKycContext => { + console.log("Invoking Alfredpay KYC actor with RampContext input:", context); + return { + ...context + }; + }, + onDone: [ + { + actions: assign({ + initializeFailedMessage: ({ event }: { event: any }) => + (event.output.error as AlfredpayKycMachineError)?.message || "An unknown error occurred" + }), + guard: ({ event }: { event: any }) => !!event.output.error, + target: "#ramp.KycFailure" + }, + { + actions: assign(({ context }: { context: RampContext }) => { + return { + ...context + }; + }), + target: "VerificationComplete" + } + ], + onError: { + actions: assign({ + initializeFailedMessage: "Alfredpay KYC verification failed. Please retry." + }), + target: "#ramp.KycFailure" + }, + src: "alfredpayKyc" + } + }, Avenia: { invoke: { id: "aveniaKyc", @@ -118,6 +163,10 @@ export const kycStateNode = { }, Deciding: { always: [ + { + guard: ({ context }: { context: RampContext }) => context.executionInput?.fiatToken === FiatToken.USD, + target: "Alfredpay" + }, { guard: ({ context }: { context: RampContext }) => context.executionInput?.fiatToken === FiatToken.BRL, target: "Avenia" diff --git a/apps/frontend/src/machines/ramp.machine.ts b/apps/frontend/src/machines/ramp.machine.ts index c35649c0f..1833ab59d 100644 --- a/apps/frontend/src/machines/ramp.machine.ts +++ b/apps/frontend/src/machines/ramp.machine.ts @@ -4,6 +4,7 @@ import { assign, emit, fromCallback, fromPromise, setup } from "xstate"; import { ToastMessage } from "../helpers/notifications"; import { KYCFormData } from "../hooks/brla/useKYCForm"; import { QuoteService } from "../services/api"; +import { AuthAPI } from "../services/api/auth.api"; import { AuthService } from "../services/auth"; import { RampExecutionInput, RampSigningPhase } from "../types/phases"; import { checkEmailActor, requestOTPActor, verifyOTPActor } from "./actors/auth.actor"; @@ -11,6 +12,7 @@ import { registerRampActor } from "./actors/register.actor"; import { SignRampError, SignRampErrorType, signTransactionsActor } from "./actors/sign.actor"; import { startRampActor } from "./actors/start.actor"; import { validateKycActor } from "./actors/validateKyc.actor"; +import { alfredpayKycMachine } from "./alfredpayKyc.machine"; import { aveniaKycMachine } from "./brlaKyc.machine"; import { kycStateNode } from "./kyc.states"; import { moneriumKycMachine } from "./moneriumKyc.machine"; @@ -21,28 +23,6 @@ const QUOTE_EXPIRY_THRESHOLD_SECONDS = 120; // 2 minutes export const SUCCESS_CALLBACK_DELAY_MS = 5000; // 5 seconds -// Restore session from localStorage if available -const getInitialAuthState = () => { - if (typeof window === "undefined") { - return { isAuthenticated: false, userEmail: undefined, userId: undefined }; - } - - const tokens = AuthService.getTokens(); - - if (tokens) { - const authState = { - isAuthenticated: true, - userEmail: tokens.userEmail, - userId: tokens.userId - }; - return authState; - } - - return { isAuthenticated: false, userEmail: undefined, userId: undefined }; -}; - -const authState = getInitialAuthState(); - const initialRampContext: RampContext = { apiKey: undefined, authToken: undefined, @@ -55,7 +35,7 @@ const initialRampContext: RampContext = { externalSessionId: undefined, getMessageSignature: undefined, initializeFailedMessage: undefined, - isAuthenticated: authState.isAuthenticated, + isAuthenticated: false, isQuoteExpired: false, isSep24Redo: false, partnerId: undefined, @@ -69,9 +49,8 @@ const initialRampContext: RampContext = { rampSigningPhase: undefined, rampState: undefined, substrateWalletAccount: undefined, - // Auth fields - restore from localStorage if available - userEmail: authState.userEmail, - userId: authState.userId, + userEmail: undefined, + userId: undefined, walletLocked: undefined }; @@ -190,7 +169,46 @@ export const rampMachine = setup({ } }, actors: { + alfredpayKyc: alfredpayKycMachine, aveniaKyc: aveniaKycMachine, + checkAndRefreshToken: fromPromise(async () => { + const tokens = AuthService.getTokens(); + if (!tokens) { + return { success: false, tokens: null }; + } + + try { + const verifyResult = await AuthAPI.verifyToken(tokens.accessToken); + if (verifyResult.valid && verifyResult.userId) { + console.log("valid token"); + return { + success: true, + tokens: { + accessToken: tokens.accessToken, + refreshToken: tokens.refreshToken, + userEmail: tokens.userEmail, + userId: verifyResult.userId + } + }; + } + } catch (error) {} + + let refreshedTokens = undefined; + try { + refreshedTokens = await AuthService.refreshAccessToken(); + } catch (error) { + // If refreshing the token fails for any reason, we treat it as if there are no valid tokens and require the user to authenticate again. + AuthService.clearTokens(); + return { success: false, tokens: null }; + } + + if (refreshedTokens) { + return { success: true, tokens: refreshedTokens }; + } + + AuthService.clearTokens(); + return { success: false, tokens: null }; + }), checkEmail: fromPromise(checkEmailActor), loadQuote: fromPromise(async ({ input }: { input: { quoteId: string } }) => { if (!input.quoteId) { @@ -226,7 +244,6 @@ export const rampMachine = setup({ urlCleaner: fromPromise( () => new Promise(resolve => { - console.log("Clearing URL parameters"); const cleanUrl = window.location.pathname; window.history.replaceState({}, "", cleanUrl); resolve(); @@ -332,29 +349,52 @@ export const rampMachine = setup({ }, states: { CheckAuth: { - always: [ - { - actions: assign({ - postAuthTarget: undefined - }), - guard: ({ context }) => context.isAuthenticated && context.postAuthTarget === "RegisterRamp", - target: "RegisterRamp" - }, - { - actions: assign({ - postAuthTarget: undefined - }), - guard: ({ context }) => context.isAuthenticated && context.postAuthTarget === "QuoteReady", - target: "QuoteReady" - }, - { - guard: ({ context }) => context.isAuthenticated, - target: "QuoteReady" - }, - { + invoke: { + onDone: [ + { + actions: [ + assign({ + isAuthenticated: true, + userEmail: ({ event }) => event.output.tokens?.userEmail, + userId: ({ event }) => event.output.tokens?.userId + }) + ], + guard: ({ event, context }) => event.output.success === true && context.postAuthTarget === "RegisterRamp", + target: "RegisterRamp" + }, + { + actions: [ + assign({ + isAuthenticated: true, + userEmail: ({ event }) => event.output.tokens?.userEmail, + userId: ({ event }) => event.output.tokens?.userId + }) + ], + guard: ({ event, context }) => event.output.success === true && context.postAuthTarget === "QuoteReady", + target: "QuoteReady" + }, + { + actions: [ + assign({ + isAuthenticated: false, + userEmail: undefined, + userId: undefined + }) + ], + target: "EnterEmail" + } + ], + onError: { + // On error, treat as not authenticated + actions: [ + assign({ + isAuthenticated: false + }) + ], target: "EnterEmail" - } - ], + }, + src: "checkAndRefreshToken" + }, on: { GO_BACK: [ { @@ -588,6 +628,7 @@ export const rampMachine = setup({ } }, KycFailure: { + // TODO alfredpay failure ends up here. We should handle a retry on it's own kyc state machine. Get the link again ! always: { target: "Resetting" } @@ -605,15 +646,7 @@ export const rampMachine = setup({ postAuthTarget: () => "QuoteReady", quote: ({ event }) => event.output.quote }), - guard: ({ context }) => !context.isAuthenticated && context.enteredViaForm === true, target: "CheckAuth" - }, - { - actions: assign({ - isQuoteExpired: ({ event }) => event.output.isExpired, - quote: ({ event }) => event.output.quote - }), - target: "QuoteReady" } ], onError: { diff --git a/apps/frontend/src/machines/types.ts b/apps/frontend/src/machines/types.ts index 64a474082..f7fbfd388 100644 --- a/apps/frontend/src/machines/types.ts +++ b/apps/frontend/src/machines/types.ts @@ -4,8 +4,9 @@ import { ActorRef, ActorRefFrom, SnapshotFrom } from "xstate"; import { ToastMessage } from "../helpers/notifications"; import { KYCFormData } from "../hooks/brla/useKYCForm"; import { RampExecutionInput, RampSigningPhase, RampState } from "../types/phases"; +import { alfredpayKycMachine } from "./alfredpayKyc.machine"; import { aveniaKycMachine } from "./brlaKyc.machine"; -import { AveniaKycContext, MoneriumKycContext, StellarKycContext } from "./kyc.states"; +import { AlfredpayKycContext, AveniaKycContext, MoneriumKycContext, StellarKycContext } from "./kyc.states"; import { moneriumKycMachine } from "./moneriumKyc.machine"; import { stellarKycMachine } from "./stellarKyc.machine"; @@ -41,6 +42,8 @@ export interface RampContext { userEmail?: string; userId?: string; isAuthenticated: boolean; + isAuthLoading?: boolean; + alfredpayCustomer?: any; postAuthTarget?: "QuoteReady" | "RegisterRamp"; } @@ -91,6 +94,9 @@ export type MoneriumKycSnapshot = SnapshotFrom; export type AveniaKycActorRef = ActorRefFrom; export type AveniaKycSnapshot = SnapshotFrom; +export type AlfredpayKycActorRef = ActorRefFrom; +export type AlfredpayKycSnapshot = SnapshotFrom; + export type SelectedStellarData = { stateValue: StellarKycSnapshot["value"]; context: StellarKycContext; @@ -105,3 +111,8 @@ export type SelectedAveniaData = { stateValue: AveniaKycSnapshot["value"]; context: AveniaKycContext; }; + +export type SelectedAlfredpayData = { + stateValue: AlfredpayKycSnapshot["value"]; + context: AlfredpayKycContext; +}; diff --git a/apps/frontend/src/pages/progress/index.tsx b/apps/frontend/src/pages/progress/index.tsx index e22c0150b..f4ab62975 100644 --- a/apps/frontend/src/pages/progress/index.tsx +++ b/apps/frontend/src/pages/progress/index.tsx @@ -15,6 +15,8 @@ import { RampState } from "../../types/phases"; import { getMessageForPhase } from "./phaseMessages"; const PHASE_DURATIONS: Record = { + alfredpayOfframpTransfer: 30, + alfredpayOnrampMint: 5 * 60, assethubToPendulum: 24, backupApprove: 0, backupSquidRouterApprove: 0, @@ -42,6 +44,7 @@ const PHASE_DURATIONS: Record = { spacewalkRedeem: 130, squidRouterApprove: 10, squidRouterPay: 60, + squidRouterPermitExecute: 30, squidRouterSwap: 10, stellarCreateAccount: 0, stellarPayment: 6, diff --git a/apps/frontend/src/pages/progress/phaseMessages.ts b/apps/frontend/src/pages/progress/phaseMessages.ts index fc629795b..d389e9b21 100644 --- a/apps/frontend/src/pages/progress/phaseMessages.ts +++ b/apps/frontend/src/pages/progress/phaseMessages.ts @@ -50,18 +50,20 @@ export function getMessageForPhase(ramp: RampState | undefined, t: TFunction<"tr const getDestinationTransferMessage = () => t("pages.progress.destinationTransfer", { assetSymbol: outputAssetSymbol }); const messages: Record = { + alfredpayOfframpTransfer: getTransferringMessage(), + alfredpayOnrampMint: t("pages.progress.alfredpayOnrampMint"), // Not relevant for progress page assethubToPendulum: t("pages.progress.assethubToPendulum", { assetSymbol: inputAssetSymbol - }), + }), // Not relevant for progress page backupApprove: "", // Not relevant for progress page - backupSquidRouterApprove: "", // Not relevant for progress page - backupSquidRouterSwap: "", // Not relevant for progress page - brlaOnrampMint: t("pages.progress.brlaOnrampMint"), + backupSquidRouterApprove: "", + backupSquidRouterSwap: "", + brlaOnrampMint: t("pages.progress.brlaOnrampMint"), // Not relevant for progress page brlaPayoutOnMoonbeam: getTransferringMessage(), - complete: "", // Not relevant for progress page - destinationTransfer: getDestinationTransferMessage(), + complete: "", + destinationTransfer: getDestinationTransferMessage(), // Not relevant for progress page distributeFees: getSwappingMessage(), - failed: "", // Not relevant for progress page + failed: "", finalSettlementSubsidy: getDestinationTransferMessage(), fundEphemeral: t("pages.progress.fundEphemeral"), hydrationSwap: t("pages.progress.hydrationSwap", { @@ -92,14 +94,15 @@ export function getMessageForPhase(ramp: RampState | undefined, t: TFunction<"tr }), squidRouterApprove: getSquidrouterSwapMessage(), squidRouterPay: getSquidrouterSwapMessage(), + squidRouterPermitExecute: getSquidrouterSwapMessage(), squidRouterSwap: getSquidrouterSwapMessage(), stellarCreateAccount: t("pages.progress.createStellarAccount"), stellarPayment: t("pages.progress.stellarPayment", { assetSymbol: outputAssetSymbol }), - subsidizePostSwap: getSwappingMessage(), + subsidizePostSwap: getSwappingMessage(), // Not relevant for progress page subsidizePreSwap: getSwappingMessage(), - timedOut: "" // Not relevant for progress page + timedOut: "" }; return messages[currentPhase]; diff --git a/apps/frontend/src/pages/success/index.tsx b/apps/frontend/src/pages/success/index.tsx index 94290127f..e7fafcb0b 100644 --- a/apps/frontend/src/pages/success/index.tsx +++ b/apps/frontend/src/pages/success/index.tsx @@ -32,7 +32,8 @@ export const SuccessPage = () => { const ARRIVAL_TEXT_BY_TOKEN: Record = { [FiatToken.EURC]: t("pages.success.arrivalText.sell.EURC"), [FiatToken.ARS]: t("pages.success.arrivalText.sell.ARS"), - [FiatToken.BRL]: t("pages.success.arrivalText.sell.BRL") + [FiatToken.BRL]: t("pages.success.arrivalText.sell.BRL"), + [FiatToken.USD]: t("pages.success.arrivalText.sell.USD") }; const arrivalTextBuy = t("pages.success.arrivalText.buy"); diff --git a/apps/frontend/src/pages/widget/index.tsx b/apps/frontend/src/pages/widget/index.tsx index 0745275f1..d573cd91c 100644 --- a/apps/frontend/src/pages/widget/index.tsx +++ b/apps/frontend/src/pages/widget/index.tsx @@ -1,6 +1,7 @@ import { isValidCnpj } from "@vortexfi/shared"; import { useSelector } from "@xstate/react"; import { motion } from "motion/react"; +import { AlfredpayKycFlow } from "../../components/Alfredpay/AlfredpayKycFlow"; import { AveniaKYBFlow } from "../../components/Avenia/AveniaKYBFlow"; import { AveniaKYBForm } from "../../components/Avenia/AveniaKYBForm"; import { AveniaKYCForm } from "../../components/Avenia/AveniaKYCForm"; @@ -14,7 +15,14 @@ import { InitialQuoteFailedStep } from "../../components/widget-steps/InitialQuo import { MoneriumRedirectStep } from "../../components/widget-steps/MoneriumRedirectStep"; import { RampFollowUpRedirectStep } from "../../components/widget-steps/RampFollowUpRedirectStep"; import { SummaryStep } from "../../components/widget-steps/SummaryStep"; -import { useAveniaKycActor, useAveniaKycSelector, useMoneriumKycActor, useRampActor } from "../../contexts/rampState"; +import { + useAlfredpayKycActor, + useAlfredpayKycSelector, + useAveniaKycActor, + useAveniaKycSelector, + useMoneriumKycActor, + useRampActor +} from "../../contexts/rampState"; import { cn } from "../../helpers/cn"; import { useAuthTokens } from "../../hooks/useAuthTokens"; @@ -43,6 +51,7 @@ const WidgetContent = () => { const aveniaKycActor = useAveniaKycActor(); const moneriumKycActor = useMoneriumKycActor(); const aveniaState = useAveniaKycSelector(); + const alfredpayKycActor = useAlfredpayKycActor(); // Enable session persistence and auto-refresh useAuthTokens(rampActor); @@ -110,6 +119,10 @@ const WidgetContent = () => { return isCnpj ? : ; } + if (alfredpayKycActor) { + return ; + } + if (isInitialQuoteFailed) { return ; } diff --git a/apps/frontend/src/services/api/alfredpay.service.ts b/apps/frontend/src/services/api/alfredpay.service.ts new file mode 100644 index 000000000..a4a434366 --- /dev/null +++ b/apps/frontend/src/services/api/alfredpay.service.ts @@ -0,0 +1,95 @@ +import { + AlfredpayCreateCustomerRequest, + AlfredpayCreateCustomerResponse, + AlfredpayCustomerType, + AlfredpayGetKybRedirectLinkResponse, + AlfredpayGetKycRedirectLinkResponse, + AlfredpayGetKycStatusResponse, + AlfredpayStatusResponse +} from "@vortexfi/shared"; +import { apiClient } from "./api-client"; + +export const AlfredpayService = { + async createBusinessCustomer(country: string): Promise { + const response = await apiClient.post("/alfredpay/createBusinessCustomer", { + country + }); + return response.data; + }, + /** + * Create a new Alfredpay individual customer. + */ + async createIndividualCustomer(country: string): Promise { + const request: AlfredpayCreateCustomerRequest = { + country + }; + const response = await apiClient.post("/alfredpay/createIndividualCustomer", request); + return response.data; + }, + /** + * Check Alfredpay status for a user in a specific country. + */ + async getAlfredpayStatus(country: string): Promise { + const response = await apiClient.get("/alfredpay/alfredpayStatus", { + params: { country } + }); + return response.data; + }, + + async getKybRedirectLink(country: string): Promise { + const response = await apiClient.get("/alfredpay/getKybRedirectLink", { + params: { country } + }); + return response.data; + }, + + /** + * Get the KYC redirect link for a user. + */ + async getKycRedirectLink(country: string): Promise { + const response = await apiClient.get("/alfredpay/getKycRedirectLink", { + params: { country } + }); + return response.data; + }, + + /** + * Get the status of a specific KYC submission. + */ + async getKycStatus(country: string, type?: AlfredpayCustomerType): Promise { + const response = await apiClient.get("/alfredpay/getKycStatus", { + params: { country, type } + }); + return response.data; + }, + + /** + * Notify that the KYC redirect process is finished. + */ + async notifyKycRedirectFinished(country: string, type?: AlfredpayCustomerType): Promise<{ success: boolean }> { + const response = await apiClient.post<{ success: boolean }>("/alfredpay/kycRedirectFinished", { + country, + type + }); + return response.data; + }, + + /** + * Notify that the KYC redirect link has been opened. + */ + async notifyKycRedirectOpened(country: string, type?: AlfredpayCustomerType): Promise<{ success: boolean }> { + const response = await apiClient.post<{ success: boolean }>("/alfredpay/kycRedirectOpened", { + country, + type + }); + return response.data; + }, + + async retryKyc(country: string, type?: AlfredpayCustomerType): Promise { + const response = await apiClient.post("/alfredpay/retryKyc", { + country, + type + }); + return response.data; + } +}; diff --git a/apps/frontend/src/services/api/auth.api.ts b/apps/frontend/src/services/api/auth.api.ts index ecb511de8..dddee6b1e 100644 --- a/apps/frontend/src/services/api/auth.api.ts +++ b/apps/frontend/src/services/api/auth.api.ts @@ -56,17 +56,27 @@ export class AuthAPI { * Refresh token */ static async refreshToken(refreshToken: string): Promise { - const response = await apiClient.post<{ success: boolean; access_token: string; refresh_token: string; user_id: string }>( - "/auth/refresh", - { - refresh_token: refreshToken - } - ); + const response = await apiClient.post<{ success: boolean; access_token: string; refresh_token: string }>("/auth/refresh", { + refresh_token: refreshToken + }); return { accessToken: response.data.access_token, refreshToken: response.data.refresh_token, success: response.data.success, - userId: response.data.user_id + userId: "" // Refresh doesn't return user_id, but interface requires it + }; + } + + /** + * Verify access token + */ + static async verifyToken(accessToken: string): Promise<{ valid: boolean; userId?: string }> { + const response = await apiClient.post<{ valid: boolean; user_id?: string }>("/auth/verify", { + access_token: accessToken + }); + return { + userId: response.data.user_id, + valid: response.data.valid }; } } diff --git a/apps/frontend/src/services/transactions/userSigning.ts b/apps/frontend/src/services/transactions/userSigning.ts index d708ebfc8..1cb6009bc 100644 --- a/apps/frontend/src/services/transactions/userSigning.ts +++ b/apps/frontend/src/services/transactions/userSigning.ts @@ -1,13 +1,53 @@ import { ApiPromise } from "@polkadot/api"; import { ISubmittableResult, Signer } from "@polkadot/types/types"; import { WalletAccount } from "@talismn/connect-wallets"; -import { decodeSubmittableExtrinsic, getNetworkId, isEvmTransactionData, UnsignedTx } from "@vortexfi/shared"; -import { Config, getAccount, sendTransaction, switchChain } from "@wagmi/core"; +import { + decodeSubmittableExtrinsic, + getNetworkId, + isEvmTransactionData, + isSignedTypedData, + isSignedTypedDataArray, + Signature, + SignedTypedData, + UnsignedTx +} from "@vortexfi/shared"; +import { Config, getAccount, sendTransaction, signTypedData, switchChain } from "@wagmi/core"; import { config } from "../../config"; import { waitForTransactionConfirmation } from "../../helpers/safe-wallet/waitForTransactionConfirmation"; import { wagmiConfig } from "../../wagmiConfig"; import { PolkadotNodeName, polkadotApiService } from "../api/polkadot.service"; +/** + * Signs multiple typed data objects and returns signature objects + */ +export async function signMultipleTypedData(typedDataArray: SignedTypedData[]): Promise { + const signedTypedDataArray: SignedTypedData[] = []; + + for (const typedData of typedDataArray) { + const rawSignature = await signTypedData(wagmiConfig, { + domain: typedData.domain, + message: typedData.message, + primaryType: typedData.primaryType, + types: typedData.types + }); + + const v = parseInt(rawSignature.slice(130, 132), 16); + const r = `0x${rawSignature.slice(2, 66)}` as `0x${string}`; + const s = `0x${rawSignature.slice(66, 130)}` as `0x${string}`; + + const deadline = typedData.message.deadline + ? Number(typedData.message.deadline) + : Math.floor(Date.now() / 1000) + 24 * 60 * 60; // Default deadline to 24 hours + + signedTypedDataArray.push({ + ...typedData, + signature: { deadline, r, s, v } + }); + } + + return signedTypedDataArray; +} + // Sign the transaction with the user's connected wallet. // If the transaction network differs from the currently connected network, // this function will temporarily switch to the target network. @@ -91,7 +131,7 @@ export async function signAndSubmitEvmTransaction(unsignedTx: UnsignedTx): Promi export async function signAndSubmitSubstrateTransaction(unsignedTx: UnsignedTx, walletAccount: WalletAccount): Promise { const { txData } = unsignedTx; - if (isEvmTransactionData(txData)) { + if (isEvmTransactionData(txData) || isSignedTypedData(txData) || isSignedTypedDataArray(txData)) { throw new Error("Invalid Substrate transaction data format for signing transaction"); } diff --git a/apps/frontend/src/stores/quote/useQuoteFormStore.ts b/apps/frontend/src/stores/quote/useQuoteFormStore.ts index 607a8774f..a4347a52a 100644 --- a/apps/frontend/src/stores/quote/useQuoteFormStore.ts +++ b/apps/frontend/src/stores/quote/useQuoteFormStore.ts @@ -24,7 +24,8 @@ export const DEFAULT_ARS_AMOUNT = "20"; export const defaultFiatTokenAmounts: Record = { [FiatToken.EURC]: DEFAULT_EURC_AMOUNT, [FiatToken.ARS]: DEFAULT_ARS_AMOUNT, - [FiatToken.BRL]: DEFAULT_BRL_AMOUNT + [FiatToken.BRL]: DEFAULT_BRL_AMOUNT, + [FiatToken.USD]: "100" }; const defaultFiatToken = getLanguageFromPath() === Language.Portuguese_Brazil ? DEFAULT_PT_BR_TOKEN : DEFAULT_FIAT_TOKEN; diff --git a/apps/frontend/src/stores/quote/useQuoteStore.ts b/apps/frontend/src/stores/quote/useQuoteStore.ts index 69dd703b1..fa1afcacc 100644 --- a/apps/frontend/src/stores/quote/useQuoteStore.ts +++ b/apps/frontend/src/stores/quote/useQuoteStore.ts @@ -57,7 +57,8 @@ const mapFiatToDestination = (fiatToken: FiatToken): DestinationType => { const destinationMap: Record = { ARS: EPaymentMethod.CBU, BRL: EPaymentMethod.PIX, - EUR: EPaymentMethod.SEPA + EUR: EPaymentMethod.SEPA, + USD: EPaymentMethod.ACH }; return destinationMap[fiatToken] || EPaymentMethod.SEPA; diff --git a/apps/frontend/src/translations/en.json b/apps/frontend/src/translations/en.json index bd5967b98..7f0dc496c 100644 --- a/apps/frontend/src/translations/en.json +++ b/apps/frontend/src/translations/en.json @@ -11,6 +11,28 @@ }, "title": "Special offer until 27 May" }, + "alfredpayKycFlow": { + "accountVerified": "Your account has been verified. You can now proceed.", + "cancel": "Cancel", + "completed": "{{kycOrKyb}} Completed!", + "completeInNewWindow": "Please complete the {{kycOrKyb}} process in the new window. Once you are done, click the button below.", + "completeProcess": "To continue, please complete the {{kycOrKyb}} process with our partner AlfredPay.", + "continue": "Continue", + "continueWithPartner": "Please continue with our partner for the {{kycOrKyb}} verification.", + "failed": "{{kycOrKyb}} Failed", + "finishedVerification": "I have finished the {{kycOrKyb}} verification", + "loading": "Loading...", + "openingLink": "Opening Link...", + "openLink": "Open {{kycOrKyb}} Link", + "registerAsBusiness": "If registering as a business please click <1>here", + "registerAsIndividual": "Click <1>here to register as individual", + "retry": "Retry", + "retryProcess": "Retry Process", + "systemError": "System Error", + "verifyingCompletion": "Verifying completion...", + "verifyingStatus": "Verifying {{kycOrKyb}} Status...", + "verifyingStatusDescription": "This may take a few moments. Please do not close this window." + }, "authEmailStep": { "buttons": { "continue": "Continue", @@ -453,6 +475,13 @@ "quoteExpired": "Quote expired. Go back and try again.", "source": "Source Account", "tryAgain": "Try again", + "USOnrampDetails": { + "copyCode": "or copy the ACH code below and paste it in your bank app", + "qrCode": "Select ACH in your bank's app and scan the QR code below.", + "qrCodeDescription": "Once done, please click on \"I have made the payment\"", + "timerLabel": "Quote expires in:", + "title": "Pay with ACH" + }, "verifyWallet": "Verify Wallet" }, "searchInput": { @@ -980,7 +1009,8 @@ "ARS": "Your funds will arrive in your bank account in a few minutes.", "BRL": "Your funds were sent via PIX and are now in your bank account.", "default": "Your funds will arrive in your bank account soon.", - "EURC": "Funds will be received via Standard SEPA within 1–2 business days." + "EURC": "Funds will be received via Standard SEPA within 1–2 business days.", + "USD": "Your funds will arrive in your bank account in a few minutes." } }, "returnHome": "Return Home", diff --git a/apps/frontend/src/translations/pt.json b/apps/frontend/src/translations/pt.json index 25cbff18a..995bd7d8d 100644 --- a/apps/frontend/src/translations/pt.json +++ b/apps/frontend/src/translations/pt.json @@ -11,6 +11,28 @@ }, "title": "Oferta especial até 27 Maio" }, + "alfredpayKycFlow": { + "accountVerified": "Sua conta foi verificada. Você pode prosseguir agora.", + "cancel": "Cancelar", + "completed": "{{kycOrKyb}} Concluído!", + "completeInNewWindow": "Por favor, complete o processo {{kycOrKyb}} na nova janela. Quando terminar, clique no botão abaixo.", + "completeProcess": "Para continuar, complete o processo {{kycOrKyb}} com nosso parceiro AlfredPay.", + "continue": "Continuar", + "continueWithPartner": "Por favor, continue com nosso parceiro para a verificação {{kycOrKyb}}.", + "failed": "{{kycOrKyb}} Falhou", + "finishedVerification": "Terminei a verificação {{kycOrKyb}}", + "loading": "Carregando...", + "openingLink": "Abrindo Link...", + "openLink": "Abrir Link {{kycOrKyb}}", + "registerAsBusiness": "Se estiver se registrando como empresa, clique <1>aqui", + "registerAsIndividual": "Clique <1>aqui para se registrar como indivíduo", + "retry": "Tentar Novamente", + "retryProcess": "Tentar Processo Novamente", + "systemError": "Erro do Sistema", + "verifyingCompletion": "Verificando conclusão...", + "verifyingStatus": "Verificando Status {{kycOrKyb}}...", + "verifyingStatusDescription": "Isso pode levar alguns momentos. Por favor, não feche esta janela." + }, "authEmailStep": { "buttons": { "continue": "Continuar", @@ -453,6 +475,13 @@ "quoteExpired": "Cotação expirada. Feche o diálogo e tente novamente.", "source": "Conta de origem", "tryAgain": "Tentar novamente", + "USOnrampDetails": { + "copyCode": "ou copie o código ACH abaixo e cole no app do seu banco", + "qrCode": "Selecione ACH no app do seu banco e escaneie o QR code abaixo.", + "qrCodeDescription": "Uma vez concluído, clique em \"Eu fiz o pagamento\"", + "timerLabel": "Cotação expira em:", + "title": "Pagar com ACH" + }, "verifyWallet": "Verificar carteira" }, "searchInput": { @@ -974,7 +1003,8 @@ "ARS": "Em breve os fundos estarão disponíveis em sua conta bancária.", "BRL": "Em breve os fundos estarão disponíveis em sua conta bancária..", "default": "Em breve os fundos estarão disponíveis em sua conta bancária.", - "EURC": "Você receberá os fundos em até 1 minuto (SEPA Instantâneo) ou em até 2 dias (SEPA Padrão), dependendo do seu banco." + "EURC": "Você receberá os fundos em até 1 minuto (SEPA Instantâneo) ou em até 2 dias (SEPA Padrão), dependendo do seu banco.", + "USD": "Em breve os fundos estarão disponíveis em sua conta bancária." } }, "returnHome": "Voltar para a página inicial.", diff --git a/apps/rebalancer/src/rebalance/brla-to-axlusdc/index.ts b/apps/rebalancer/src/rebalance/brla-to-axlusdc/index.ts index 7ab5c4a65..f43bcc961 100644 --- a/apps/rebalancer/src/rebalance/brla-to-axlusdc/index.ts +++ b/apps/rebalancer/src/rebalance/brla-to-axlusdc/index.ts @@ -1,6 +1,6 @@ import { multiplyByPowerOfTen, SlackNotifier } from "@vortexfi/shared"; import Big from "big.js"; -import { brlaFiatTokenDetails, usdcTokenDetails } from "../../constants.ts"; +import { brlaMoonbeamTokenDetails, usdcTokenDetails } from "../../constants.ts"; import { phaseOrder, RebalancePhase, StateManager } from "../../services/stateManager.ts"; import { getMoonbeamEvmClients, getPendulumAccount } from "../../utils/config.ts"; import { @@ -69,7 +69,7 @@ export async function rebalanceBrlaToUsdcAxl(amountAxlUsdc: string, forceRestart if (currentOrder <= 3) { if (!state.brlaAmount) throw new Error("State corrupted: brlaAmount missing for step 3"); - await sendBrlaToMoonbeam(state.brlaAmount, brlaFiatTokenDetails.pendulumRepresentative); + await sendBrlaToMoonbeam(state.brlaAmount, brlaMoonbeamTokenDetails.pendulumRepresentative); console.log(`Sent ${state.brlaAmount} BRLA to Moonbeam`); state.currentPhase = RebalancePhase.PollForSufficientBalance; diff --git a/apps/rebalancer/src/rebalance/brla-to-axlusdc/steps.ts b/apps/rebalancer/src/rebalance/brla-to-axlusdc/steps.ts index a9ee8b363..64672bf1a 100644 --- a/apps/rebalancer/src/rebalance/brla-to-axlusdc/steps.ts +++ b/apps/rebalancer/src/rebalance/brla-to-axlusdc/steps.ts @@ -96,7 +96,7 @@ export async function swapAxlusdcToBrla(amount: string): Promise { api, fromAmountString: amount, inputTokenPendulumDetails: usdcTokenDetails, - outputTokenPendulumDetails: brlaFiatTokenDetails.pendulumRepresentative + outputTokenPendulumDetails: brlaMoonbeamTokenDetails.pendulumRepresentative }); if (!expectedAmountOut.preciseQuotedAmountOut) { @@ -117,7 +117,7 @@ export async function swapAxlusdcToBrla(amount: string): Promise { amountRaw, { address: callerAddress, type: EphemeralAccountType.Substrate }, usdcTokenDetails, - brlaFiatTokenDetails.pendulumRepresentative, + brlaMoonbeamTokenDetails.pendulumRepresentative, minOutputRaw ); diff --git a/bun.lock b/bun.lock index b21883d30..cec25e6b6 100644 --- a/bun.lock +++ b/bun.lock @@ -239,6 +239,23 @@ "typescript": "catalog:", }, }, + "contracts/relayer": { + "name": "@vortexfi/contracts-relayer", + "version": "1.0.0", + "dependencies": { + "dotenv": "^16.4.7", + "viem": "catalog:", + }, + "devDependencies": { + "@nomicfoundation/hardhat-ignition": "^0.15.9", + "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "@openzeppelin/contracts": "^5.2.0", + "@types/node": "catalog:", + "hardhat": "^2.22.17", + "ts-node": "^10.9.2", + "typescript": "catalog:", + }, + }, "packages/sdk": { "name": "@vortexfi/sdk", "version": "0.5.1", @@ -732,13 +749,73 @@ "@ethereumjs/common": ["@ethereumjs/common@3.2.0", "", { "dependencies": { "@ethereumjs/util": "^8.1.0", "crc-32": "^1.2.0" } }, "sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA=="], - "@ethereumjs/rlp": ["@ethereumjs/rlp@4.0.1", "", { "bin": { "rlp": "bin/rlp" } }, "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw=="], + "@ethereumjs/rlp": ["@ethereumjs/rlp@5.0.2", "", { "bin": { "rlp": "bin/rlp.cjs" } }, "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA=="], "@ethereumjs/tx": ["@ethereumjs/tx@4.2.0", "", { "dependencies": { "@ethereumjs/common": "^3.2.0", "@ethereumjs/rlp": "^4.0.1", "@ethereumjs/util": "^8.1.0", "ethereum-cryptography": "^2.0.0" } }, "sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw=="], - "@ethereumjs/util": ["@ethereumjs/util@8.1.0", "", { "dependencies": { "@ethereumjs/rlp": "^4.0.1", "ethereum-cryptography": "^2.0.0", "micro-ftch": "^0.3.1" } }, "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA=="], + "@ethereumjs/util": ["@ethereumjs/util@9.1.0", "", { "dependencies": { "@ethereumjs/rlp": "^5.0.2", "ethereum-cryptography": "^2.2.1" } }, "sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog=="], + + "@ethersproject/abi": ["@ethersproject/abi@5.8.0", "", { "dependencies": { "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/hash": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q=="], + + "@ethersproject/abstract-provider": ["@ethersproject/abstract-provider@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/networks": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "@ethersproject/web": "^5.8.0" } }, "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg=="], + + "@ethersproject/abstract-signer": ["@ethersproject/abstract-signer@5.8.0", "", { "dependencies": { "@ethersproject/abstract-provider": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0" } }, "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA=="], + + "@ethersproject/address": ["@ethersproject/address@5.6.1", "", { "dependencies": { "@ethersproject/bignumber": "^5.6.2", "@ethersproject/bytes": "^5.6.1", "@ethersproject/keccak256": "^5.6.1", "@ethersproject/logger": "^5.6.0", "@ethersproject/rlp": "^5.6.1" } }, "sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q=="], + + "@ethersproject/base64": ["@ethersproject/base64@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0" } }, "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ=="], + + "@ethersproject/basex": ["@ethersproject/basex@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/properties": "^5.8.0" } }, "sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q=="], + + "@ethersproject/bignumber": ["@ethersproject/bignumber@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "bn.js": "^5.2.1" } }, "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA=="], + + "@ethersproject/bytes": ["@ethersproject/bytes@5.8.0", "", { "dependencies": { "@ethersproject/logger": "^5.8.0" } }, "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A=="], + + "@ethersproject/constants": ["@ethersproject/constants@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0" } }, "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg=="], + + "@ethersproject/contracts": ["@ethersproject/contracts@5.8.0", "", { "dependencies": { "@ethersproject/abi": "^5.8.0", "@ethersproject/abstract-provider": "^5.8.0", "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/transactions": "^5.8.0" } }, "sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ=="], + + "@ethersproject/hash": ["@ethersproject/hash@5.8.0", "", { "dependencies": { "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/base64": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA=="], + + "@ethersproject/hdnode": ["@ethersproject/hdnode@5.8.0", "", { "dependencies": { "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/basex": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/pbkdf2": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/sha2": "^5.8.0", "@ethersproject/signing-key": "^5.8.0", "@ethersproject/strings": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "@ethersproject/wordlists": "^5.8.0" } }, "sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA=="], + + "@ethersproject/json-wallets": ["@ethersproject/json-wallets@5.8.0", "", { "dependencies": { "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/hdnode": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/pbkdf2": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/random": "^5.8.0", "@ethersproject/strings": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "aes-js": "3.0.0", "scrypt-js": "3.0.1" } }, "sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w=="], + + "@ethersproject/keccak256": ["@ethersproject/keccak256@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "js-sha3": "0.8.0" } }, "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng=="], + + "@ethersproject/logger": ["@ethersproject/logger@5.8.0", "", {}, "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA=="], + + "@ethersproject/networks": ["@ethersproject/networks@5.8.0", "", { "dependencies": { "@ethersproject/logger": "^5.8.0" } }, "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg=="], + + "@ethersproject/pbkdf2": ["@ethersproject/pbkdf2@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/sha2": "^5.8.0" } }, "sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg=="], + + "@ethersproject/properties": ["@ethersproject/properties@5.8.0", "", { "dependencies": { "@ethersproject/logger": "^5.8.0" } }, "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw=="], + + "@ethersproject/providers": ["@ethersproject/providers@5.8.0", "", { "dependencies": { "@ethersproject/abstract-provider": "^5.8.0", "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/base64": "^5.8.0", "@ethersproject/basex": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/hash": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/networks": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/random": "^5.8.0", "@ethersproject/rlp": "^5.8.0", "@ethersproject/sha2": "^5.8.0", "@ethersproject/strings": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "@ethersproject/web": "^5.8.0", "bech32": "1.1.4", "ws": "8.18.0" } }, "sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw=="], + + "@ethersproject/random": ["@ethersproject/random@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0" } }, "sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A=="], + + "@ethersproject/rlp": ["@ethersproject/rlp@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0" } }, "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q=="], - "@fastify/busboy": ["@fastify/busboy@3.2.0", "", {}, "sha512-m9FVDXU3GT2ITSe0UaMA5rU3QkfC/UXtCU8y0gSN/GugTqtVldOBWIB5V6V3sbmenVZUIpU6f+mPEO2+m5iTaA=="], + "@ethersproject/sha2": ["@ethersproject/sha2@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "hash.js": "1.1.7" } }, "sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A=="], + + "@ethersproject/signing-key": ["@ethersproject/signing-key@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "bn.js": "^5.2.1", "elliptic": "6.6.1", "hash.js": "1.1.7" } }, "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w=="], + + "@ethersproject/solidity": ["@ethersproject/solidity@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/sha2": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA=="], + + "@ethersproject/strings": ["@ethersproject/strings@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/logger": "^5.8.0" } }, "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg=="], + + "@ethersproject/transactions": ["@ethersproject/transactions@5.8.0", "", { "dependencies": { "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/rlp": "^5.8.0", "@ethersproject/signing-key": "^5.8.0" } }, "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg=="], + + "@ethersproject/units": ["@ethersproject/units@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/logger": "^5.8.0" } }, "sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ=="], + + "@ethersproject/wallet": ["@ethersproject/wallet@5.8.0", "", { "dependencies": { "@ethersproject/abstract-provider": "^5.8.0", "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/hash": "^5.8.0", "@ethersproject/hdnode": "^5.8.0", "@ethersproject/json-wallets": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/random": "^5.8.0", "@ethersproject/signing-key": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "@ethersproject/wordlists": "^5.8.0" } }, "sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA=="], + + "@ethersproject/web": ["@ethersproject/web@5.8.0", "", { "dependencies": { "@ethersproject/base64": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw=="], + + "@ethersproject/wordlists": ["@ethersproject/wordlists@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/hash": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg=="], + + "@fastify/busboy": ["@fastify/busboy@2.1.1", "", {}, "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA=="], "@fontsource/roboto": ["@fontsource/roboto@5.2.9", "", {}, "sha512-ZTkyHiPk74B/aj8BZWbsxD5Yu+Lq+nR64eV4wirlrac2qXR7jYk2h6JlLYuOuoruTkGQWNw2fMuKNavw7/rg0w=="], @@ -864,7 +941,7 @@ "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="], - "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="], "@lit-labs/ssr-dom-shim": ["@lit-labs/ssr-dom-shim@1.5.1", "", {}, "sha512-Aou5UdlSpr5whQe8AA/bZG0jMj96CoJIWbGfZ91qieWu5AWUMKw8VR/pAkQkJYvBNhmCcWnZlyyk5oze8JIqYA=="], @@ -968,12 +1045,64 @@ "@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], + "@noble/secp256k1": ["@noble/secp256k1@1.7.1", "", {}, "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw=="], + "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="], "@nodelib/fs.stat": ["@nodelib/fs.stat@2.0.5", "", {}, "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="], "@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="], + "@nomicfoundation/edr": ["@nomicfoundation/edr@0.12.0-next.23", "", { "dependencies": { "@nomicfoundation/edr-darwin-arm64": "0.12.0-next.23", "@nomicfoundation/edr-darwin-x64": "0.12.0-next.23", "@nomicfoundation/edr-linux-arm64-gnu": "0.12.0-next.23", "@nomicfoundation/edr-linux-arm64-musl": "0.12.0-next.23", "@nomicfoundation/edr-linux-x64-gnu": "0.12.0-next.23", "@nomicfoundation/edr-linux-x64-musl": "0.12.0-next.23", "@nomicfoundation/edr-win32-x64-msvc": "0.12.0-next.23" } }, "sha512-F2/6HZh8Q9RsgkOIkRrckldbhPjIZY7d4mT9LYuW68miwGQ5l7CkAgcz9fRRiurA0+YJhtsbx/EyrD9DmX9BOw=="], + + "@nomicfoundation/edr-darwin-arm64": ["@nomicfoundation/edr-darwin-arm64@0.12.0-next.23", "", {}, "sha512-Amh7mRoDzZyJJ4efqoePqdoZOzharmSOttZuJDlVE5yy07BoE8hL6ZRpa5fNYn0LCqn/KoWs8OHANWxhKDGhvQ=="], + + "@nomicfoundation/edr-darwin-x64": ["@nomicfoundation/edr-darwin-x64@0.12.0-next.23", "", {}, "sha512-9wn489FIQm7m0UCD+HhktjWx6vskZzeZD9oDc2k9ZvbBzdXwPp5tiDqUBJ+eQpByAzCDfteAJwRn2lQCE0U+Iw=="], + + "@nomicfoundation/edr-linux-arm64-gnu": ["@nomicfoundation/edr-linux-arm64-gnu@0.12.0-next.23", "", {}, "sha512-nlk5EejSzEUfEngv0Jkhqq3/wINIfF2ED9wAofc22w/V1DV99ASh9l3/e/MIHOQFecIZ9MDqt0Em9/oDyB1Uew=="], + + "@nomicfoundation/edr-linux-arm64-musl": ["@nomicfoundation/edr-linux-arm64-musl@0.12.0-next.23", "", {}, "sha512-SJuPBp3Rc6vM92UtVTUxZQ/QlLhLfwTftt2XUiYohmGKB3RjGzpgduEFMCA0LEnucUckU6UHrJNFHiDm77C4PQ=="], + + "@nomicfoundation/edr-linux-x64-gnu": ["@nomicfoundation/edr-linux-x64-gnu@0.12.0-next.23", "", {}, "sha512-NU+Qs3u7Qt6t3bJFdmmjd5CsvgI2bPPzO31KifM2Ez96/jsXYho5debtTQnimlb5NAqiHTSlxjh/F8ROcptmeQ=="], + + "@nomicfoundation/edr-linux-x64-musl": ["@nomicfoundation/edr-linux-x64-musl@0.12.0-next.23", "", {}, "sha512-F78fZA2h6/ssiCSZOovlgIu0dUeI7ItKPsDDF3UUlIibef052GCXmliMinC90jVPbrjUADMd1BUwjfI0Z8OllQ=="], + + "@nomicfoundation/edr-win32-x64-msvc": ["@nomicfoundation/edr-win32-x64-msvc@0.12.0-next.23", "", {}, "sha512-IfJZQJn7d/YyqhmguBIGoCKjE9dKjbu6V6iNEPApfwf5JyyjHYyyfkLU4rf7hygj57bfH4sl1jtQ6r8HnT62lw=="], + + "@nomicfoundation/hardhat-chai-matchers": ["@nomicfoundation/hardhat-chai-matchers@2.1.2", "", { "dependencies": { "@types/chai-as-promised": "^7.1.3", "chai-as-promised": "^7.1.1", "deep-eql": "^4.0.1", "ordinal": "^1.0.3" }, "peerDependencies": { "@nomicfoundation/hardhat-ethers": "^3.1.0", "chai": "^4.2.0", "ethers": "^6.14.0", "hardhat": "^2.26.0" } }, "sha512-NlUlde/ycXw2bLzA2gWjjbxQaD9xIRbAF30nsoEprAWzH8dXEI1ILZUKZMyux9n9iygEXTzN0SDVjE6zWDZi9g=="], + + "@nomicfoundation/hardhat-ethers": ["@nomicfoundation/hardhat-ethers@3.1.3", "", { "dependencies": { "debug": "^4.1.1", "lodash.isequal": "^4.5.0" }, "peerDependencies": { "ethers": "^6.14.0", "hardhat": "^2.28.0" } }, "sha512-208JcDeVIl+7Wu3MhFUUtiA8TJ7r2Rn3Wr+lSx9PfsDTKkbsAsWPY6N6wQ4mtzDv0/pB9nIbJhkjoHe1EsgNsA=="], + + "@nomicfoundation/hardhat-ignition": ["@nomicfoundation/hardhat-ignition@0.15.16", "", { "dependencies": { "@nomicfoundation/ignition-core": "^0.15.15", "@nomicfoundation/ignition-ui": "^0.15.13", "chalk": "^4.0.0", "debug": "^4.3.2", "fs-extra": "^10.0.0", "json5": "^2.2.3", "prompts": "^2.4.2" }, "peerDependencies": { "@nomicfoundation/hardhat-verify": "^2.1.0", "hardhat": "^2.26.0" } }, "sha512-T0JTnuib7QcpsWkHCPLT7Z6F483EjTdcdjb1e00jqS9zTGCPqinPB66LLtR/duDLdvgoiCVS6K8WxTQkA/xR1Q=="], + + "@nomicfoundation/hardhat-ignition-ethers": ["@nomicfoundation/hardhat-ignition-ethers@0.15.17", "", { "peerDependencies": { "@nomicfoundation/hardhat-ethers": "^3.1.0", "@nomicfoundation/hardhat-ignition": "^0.15.16", "@nomicfoundation/ignition-core": "^0.15.15", "ethers": "^6.14.0", "hardhat": "^2.26.0" } }, "sha512-io6Wrp1dUsJ94xEI3pw6qkPfhc9TFA+e6/+o16yQ8pvBTFMjgK5x8wIHKrrIHr9L3bkuTMtmDjyN4doqO2IqFQ=="], + + "@nomicfoundation/hardhat-network-helpers": ["@nomicfoundation/hardhat-network-helpers@1.1.2", "", { "dependencies": { "ethereumjs-util": "^7.1.4" }, "peerDependencies": { "hardhat": "^2.26.0" } }, "sha512-p7HaUVDbLj7ikFivQVNhnfMHUBgiHYMwQWvGn9AriieuopGOELIrwj2KjyM2a6z70zai5YKO264Vwz+3UFJZPQ=="], + + "@nomicfoundation/hardhat-toolbox": ["@nomicfoundation/hardhat-toolbox@5.0.0", "", { "peerDependencies": { "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-ethers": "^3.0.0", "@nomicfoundation/hardhat-ignition-ethers": "^0.15.0", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-verify": "^2.0.0", "@typechain/ethers-v6": "^0.5.0", "@typechain/hardhat": "^9.0.0", "@types/chai": "^4.2.0", "@types/mocha": ">=9.1.0", "@types/node": ">=18.0.0", "chai": "^4.2.0", "ethers": "^6.4.0", "hardhat": "^2.11.0", "hardhat-gas-reporter": "^1.0.8", "solidity-coverage": "^0.8.1", "ts-node": ">=8.0.0", "typechain": "^8.3.0", "typescript": ">=4.5.0" } }, "sha512-FnUtUC5PsakCbwiVNsqlXVIWG5JIb5CEZoSXbJUsEBun22Bivx2jhF1/q9iQbzuaGpJKFQyOhemPB2+XlEE6pQ=="], + + "@nomicfoundation/hardhat-verify": ["@nomicfoundation/hardhat-verify@2.1.3", "", { "dependencies": { "@ethersproject/abi": "^5.1.2", "@ethersproject/address": "^5.0.2", "cbor": "^8.1.0", "debug": "^4.1.1", "lodash.clonedeep": "^4.5.0", "picocolors": "^1.1.0", "semver": "^6.3.0", "table": "^6.8.0", "undici": "^5.14.0" }, "peerDependencies": { "hardhat": "^2.26.0" } }, "sha512-danbGjPp2WBhLkJdQy9/ARM3WQIK+7vwzE0urNem1qZJjh9f54Kf5f1xuQv8DvqewUAkuPxVt/7q4Grz5WjqSg=="], + + "@nomicfoundation/ignition-core": ["@nomicfoundation/ignition-core@0.15.15", "", { "dependencies": { "@ethersproject/address": "5.6.1", "@nomicfoundation/solidity-analyzer": "^0.1.1", "cbor": "^9.0.0", "debug": "^4.3.2", "ethers": "^6.14.0", "fs-extra": "^10.0.0", "immer": "10.0.2", "lodash": "4.17.21", "ndjson": "2.0.0" } }, "sha512-JdKFxYknTfOYtFXMN6iFJ1vALJPednuB+9p9OwGIRdoI6HYSh4ZBzyRURgyXtHFyaJ/SF9lBpsYV9/1zEpcYwg=="], + + "@nomicfoundation/ignition-ui": ["@nomicfoundation/ignition-ui@0.15.13", "", {}, "sha512-HbTszdN1iDHCkUS9hLeooqnLEW2U45FaqFwFEYT8nIno2prFZhG+n68JEERjmfFCB5u0WgbuJwk3CgLoqtSL7Q=="], + + "@nomicfoundation/solidity-analyzer": ["@nomicfoundation/solidity-analyzer@0.1.2", "", { "optionalDependencies": { "@nomicfoundation/solidity-analyzer-darwin-arm64": "0.1.2", "@nomicfoundation/solidity-analyzer-darwin-x64": "0.1.2", "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "0.1.2", "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "0.1.2", "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "0.1.2", "@nomicfoundation/solidity-analyzer-linux-x64-musl": "0.1.2", "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "0.1.2" } }, "sha512-q4n32/FNKIhQ3zQGGw5CvPF6GTvDCpYwIf7bEY/dZTZbgfDsHyjJwURxUJf3VQuuJj+fDIFl4+KkBVbw4Ef6jA=="], + + "@nomicfoundation/solidity-analyzer-darwin-arm64": ["@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.2", "", {}, "sha512-JaqcWPDZENCvm++lFFGjrDd8mxtf+CtLd2MiXvMNTBD33dContTZ9TWETwNFwg7JTJT5Q9HEecH7FA+HTSsIUw=="], + + "@nomicfoundation/solidity-analyzer-darwin-x64": ["@nomicfoundation/solidity-analyzer-darwin-x64@0.1.2", "", {}, "sha512-fZNmVztrSXC03e9RONBT+CiksSeYcxI1wlzqyr0L7hsQlK1fzV+f04g2JtQ1c/Fe74ZwdV6aQBdd6Uwl1052sw=="], + + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": ["@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.2", "", {}, "sha512-3d54oc+9ZVBuB6nbp8wHylk4xh0N0Gc+bk+/uJae+rUgbOBwQSfuGIbAZt1wBXs5REkSmynEGcqx6DutoK0tPA=="], + + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": ["@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.2", "", {}, "sha512-iDJfR2qf55vgsg7BtJa7iPiFAsYf2d0Tv/0B+vhtnI16+wfQeTbP7teookbGvAo0eJo7aLLm0xfS/GTkvHIucA=="], + + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": ["@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.2", "", {}, "sha512-9dlHMAt5/2cpWyuJ9fQNOUXFB/vgSFORg1jpjX1Mh9hJ/MfZXlDdHQ+DpFCs32Zk5pxRBb07yGvSHk9/fezL+g=="], + + "@nomicfoundation/solidity-analyzer-linux-x64-musl": ["@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.2", "", {}, "sha512-GzzVeeJob3lfrSlDKQw2bRJ8rBf6mEYaWY+gW0JnTDHINA0s2gPR4km5RLIj1xeZZOYz4zRw+AEeYgLRqB2NXg=="], + + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": ["@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.2", "", {}, "sha512-Fdjli4DCcFHb4Zgsz0uEJXZ2K7VEO+w5KVv7HmT7WO10iODdU9csC2az4jrhEsRtiR9Gfd74FlG0NYlw1BMdyA=="], + "@one-ini/wasm": ["@one-ini/wasm@0.1.1", "", {}, "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw=="], "@open-web3/api-mobx": ["@open-web3/api-mobx@1.1.4", "", { "dependencies": { "mobx": "^5.15.7", "mobx-utils": "^5.6.2" }, "peerDependencies": { "@polkadot/api": ">6.3.1" } }, "sha512-MheCFMiGp08i5ukMB8Dai6sNYEpX6UkuCobGIOZzON4K/Yj4mp9jUjzxZ24SCTtGLRwhI3qtUv3AyL06neObnw=="], @@ -984,6 +1113,8 @@ "@open-web3/orml-types": ["@open-web3/orml-types@1.1.4", "", { "dependencies": { "@open-web3/orml-type-definitions": "1.1.4" }, "peerDependencies": { "@polkadot/api": ">6.3.1" } }, "sha512-/JZocbeppn2hl9h2IAzjyqLW9c8hoWfAym45KpVUyp/Ho/Ykjw2n9Rn+s6yLVoga/oYfnP5gKwt5x4PMq24BUg=="], + "@openzeppelin/contracts": ["@openzeppelin/contracts@5.6.1", "", {}, "sha512-Ly6SlsVJ3mj+b18W3R8gNufB7dTICT105fJhodGAGgyC2oqnBAhqSiNDJ8V8DLY05cCz81GLI0CU5vNYA1EC/w=="], + "@oxc-resolver/binding-android-arm-eabi": ["@oxc-resolver/binding-android-arm-eabi@11.16.3", "", { "os": "android", "cpu": "arm" }, "sha512-CVyWHu6ACDqDcJxR4nmGiG8vDF4TISJHqRNzac5z/gPQycs/QrP/1pDsJBy0MD7jSw8nVq2E5WqeHQKabBG/Jg=="], "@oxc-resolver/binding-android-arm64": ["@oxc-resolver/binding-android-arm64@11.16.3", "", { "os": "android", "cpu": "arm64" }, "sha512-tTIoB7plLeh2o6Ay7NnV5CJb6QUXdxI7Shnsp2ECrLSV81k+oVE3WXYrQSh4ltWL75i0OgU5Bj3bsuyg5SMepw=="], @@ -1270,8 +1401,20 @@ "@sentry/core": ["@sentry/core@8.55.0", "", {}, "sha512-6g7jpbefjHYs821Z+EBJ8r4Z7LT5h80YSWRJaylGS4nW5W5Z2KXzpdnyFarv37O7QjauzVC2E+PABmpkw5/JGA=="], + "@sentry/hub": ["@sentry/hub@5.30.0", "", { "dependencies": { "@sentry/types": "5.30.0", "@sentry/utils": "5.30.0", "tslib": "^1.9.3" } }, "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ=="], + + "@sentry/minimal": ["@sentry/minimal@5.30.0", "", { "dependencies": { "@sentry/hub": "5.30.0", "@sentry/types": "5.30.0", "tslib": "^1.9.3" } }, "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw=="], + + "@sentry/node": ["@sentry/node@5.30.0", "", { "dependencies": { "@sentry/core": "5.30.0", "@sentry/hub": "5.30.0", "@sentry/tracing": "5.30.0", "@sentry/types": "5.30.0", "@sentry/utils": "5.30.0", "cookie": "^0.4.1", "https-proxy-agent": "^5.0.0", "lru_map": "^0.3.3", "tslib": "^1.9.3" } }, "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg=="], + "@sentry/react": ["@sentry/react@8.55.0", "", { "dependencies": { "@sentry/browser": "8.55.0", "@sentry/core": "8.55.0", "hoist-non-react-statics": "^3.3.2" }, "peerDependencies": { "react": "^16.14.0 || 17.x || 18.x || 19.x" } }, "sha512-/qNBvFLpvSa/Rmia0jpKfJdy16d4YZaAnH/TuKLAtm0BWlsPQzbXCU4h8C5Hsst0Do0zG613MEtEmWpWrVOqWA=="], + "@sentry/tracing": ["@sentry/tracing@5.30.0", "", { "dependencies": { "@sentry/hub": "5.30.0", "@sentry/minimal": "5.30.0", "@sentry/types": "5.30.0", "@sentry/utils": "5.30.0", "tslib": "^1.9.3" } }, "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw=="], + + "@sentry/types": ["@sentry/types@5.30.0", "", {}, "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw=="], + + "@sentry/utils": ["@sentry/utils@5.30.0", "", { "dependencies": { "@sentry/types": "5.30.0", "tslib": "^1.9.3" } }, "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww=="], + "@sentry/vite-plugin": ["@sentry/vite-plugin@2.23.1", "", { "dependencies": { "@sentry/bundler-plugin-core": "2.23.1", "unplugin": "1.0.1" } }, "sha512-avtjtIQ019sZW3FklpmNNsQOnYZjCHpnVxgDGElfZb+AaR4AvtHNlxXLJp+iqEfSK+Xok8MJarJqIgCaWcF40Q=="], "@sideway/address": ["@sideway/address@4.1.5", "", { "dependencies": { "@hapi/hoek": "^9.0.0" } }, "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q=="], @@ -1460,6 +1603,8 @@ "@solana/web3.js": ["@solana/web3.js@1.98.4", "", { "dependencies": { "@babel/runtime": "^7.25.0", "@noble/curves": "^1.4.2", "@noble/hashes": "^1.4.0", "@solana/buffer-layout": "^4.0.1", "@solana/codecs-numbers": "^2.1.0", "agentkeepalive": "^4.5.0", "bn.js": "^5.2.1", "borsh": "^0.7.0", "bs58": "^4.0.1", "buffer": "6.0.3", "fast-stable-stringify": "^1.0.0", "jayson": "^4.1.1", "node-fetch": "^2.7.0", "rpc-websockets": "^9.0.2", "superstruct": "^2.0.2" } }, "sha512-vv9lfnvjUsRiq//+j5pBdXig0IQdtzA0BRZ3bXEP4KaIyF1CcaydWqgyzQgfZMNIsWNWmG+AUHwPy4AHOD6gpw=="], + "@solidity-parser/parser": ["@solidity-parser/parser@0.20.2", "", {}, "sha512-rbu0bzwNvMcwAjH86hiEAcOeRI2EeK8zCkHDrFykh/Al8mvJeFmjy3UrE7GYQjNwOgbGUUtCn5/k8CB8zIu7QA=="], + "@spruceid/siwe-parser": ["@spruceid/siwe-parser@2.1.2", "", { "dependencies": { "@noble/hashes": "^1.1.2", "apg-js": "^4.3.0", "uri-js": "^4.4.1", "valid-url": "^1.0.9" } }, "sha512-d/r3S1LwJyMaRAKQ0awmo9whfXeE88Qt00vRj91q5uv5ATtWIQEGJ67Yr5eSZw5zp1/fZCXZYuEckt8lSkereQ=="], "@stablelib/binary": ["@stablelib/binary@1.0.1", "", { "dependencies": { "@stablelib/int": "^1.0.1" } }, "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q=="], @@ -1668,6 +1813,10 @@ "@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="], + "@typechain/ethers-v6": ["@typechain/ethers-v6@0.5.1", "", { "dependencies": { "lodash": "^4.17.15", "ts-essentials": "^7.0.1" }, "peerDependencies": { "ethers": "6.x", "typechain": "^8.3.2", "typescript": ">=4.7.0" } }, "sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA=="], + + "@typechain/hardhat": ["@typechain/hardhat@9.1.0", "", { "dependencies": { "fs-extra": "^9.1.0" }, "peerDependencies": { "@typechain/ethers-v6": "^0.5.1", "ethers": "^6.1.0", "hardhat": "^2.9.9", "typechain": "^8.3.2" } }, "sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA=="], + "@types/argparse": ["@types/argparse@1.0.38", "", {}, "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA=="], "@types/aria-query": ["@types/aria-query@5.0.4", "", {}, "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw=="], @@ -1692,8 +1841,12 @@ "@types/chai": ["@types/chai@5.2.3", "", { "dependencies": { "@types/deep-eql": "*", "assertion-error": "^2.0.1" } }, "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA=="], + "@types/chai-as-promised": ["@types/chai-as-promised@7.1.8", "", { "dependencies": { "@types/chai": "*" } }, "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw=="], + "@types/compression": ["@types/compression@1.8.1", "", { "dependencies": { "@types/express": "*", "@types/node": "*" } }, "sha512-kCFuWS0ebDbmxs0AXYn6e2r2nrGAb5KwQhknjSPSPgJcGd8+HVSILlUyFhGqML2gk39HcG7D1ydW9/qpYkN00Q=="], + "@types/concat-stream": ["@types/concat-stream@1.6.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA=="], + "@types/connect": ["@types/connect@3.4.38", "", { "dependencies": { "@types/node": "*" } }, "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug=="], "@types/cookie-parser": ["@types/cookie-parser@1.4.10", "", { "peerDependencies": { "@types/express": "*" } }, "sha512-B4xqkqfZ8Wek+rCOeRxsjMS9OgvzebEzzLYw7NHYuvzb7IdxOkI0ZHGgeEBX4PUM7QGVvNSK60T3OvWj3YfBRg=="], @@ -1716,6 +1869,10 @@ "@types/express-serve-static-core": ["@types/express-serve-static-core@5.1.1", "", { "dependencies": { "@types/node": "*", "@types/qs": "*", "@types/range-parser": "*", "@types/send": "*" } }, "sha512-v4zIMr/cX7/d2BpAEX3KNKL/JrT1s43s96lLvvdTmza1oEvDudCqK9aF/djc/SWgy8Yh0h30TZx5VpzqFCxk5A=="], + "@types/form-data": ["@types/form-data@0.0.33", "", { "dependencies": { "@types/node": "*" } }, "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw=="], + + "@types/glob": ["@types/glob@7.2.0", "", { "dependencies": { "@types/minimatch": "*", "@types/node": "*" } }, "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA=="], + "@types/http-cache-semantics": ["@types/http-cache-semantics@4.0.4", "", {}, "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA=="], "@types/http-errors": ["@types/http-errors@2.0.5", "", {}, "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg=="], @@ -1732,6 +1889,10 @@ "@types/method-override": ["@types/method-override@3.0.0", "", { "peerDependencies": { "@types/express": "*" } }, "sha512-7XFHR6j7JljprBpzzRZatakUXm1kEGAM3PL/GSsGRHtDvOAKYCdmnXX/5YSl1eQrpJymGs9tRekSWEGaG+Ntjw=="], + "@types/minimatch": ["@types/minimatch@6.0.0", "", { "dependencies": { "minimatch": "*" } }, "sha512-zmPitbQ8+6zNutpwgcQuLcsEpn/Cj54Kbn7L5pX0Os5kdWplB7xPgEh/g+SWOB/qmows2gpuCaPyduq8ZZRnxA=="], + + "@types/mocha": ["@types/mocha@10.0.10", "", {}, "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q=="], + "@types/morgan": ["@types/morgan@1.9.10", "", { "dependencies": { "@types/node": "*" } }, "sha512-sS4A1zheMvsADRVfT0lYbJ4S9lmsey8Zo2F7cnbYjWHP67Q0AwMYuuzLlkIM2N8gAbb9cubhIVFwcIN2XyYCkA=="], "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], @@ -1740,8 +1901,12 @@ "@types/node-forge": ["@types/node-forge@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw=="], + "@types/pbkdf2": ["@types/pbkdf2@3.1.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew=="], + "@types/phoenix": ["@types/phoenix@1.6.7", "", {}, "sha512-oN9ive//QSBkf19rfDv45M7eZPi0eEXylht2OLEXicu5b4KoQ1OzXIw+xDSGWxSxe1JmepRR/ZH283vsu518/Q=="], + "@types/prettier": ["@types/prettier@2.7.3", "", {}, "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA=="], + "@types/qs": ["@types/qs@6.14.0", "", {}, "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ=="], "@types/range-parser": ["@types/range-parser@1.2.7", "", {}, "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ=="], @@ -1752,6 +1917,8 @@ "@types/resolve": ["@types/resolve@1.20.6", "", {}, "sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ=="], + "@types/secp256k1": ["@types/secp256k1@4.0.7", "", { "dependencies": { "@types/node": "*" } }, "sha512-Rcvjl6vARGAKRO6jHeKMatGrvOMGrR/AR11N1x2LqintPCyDZ7NBhrh238Z2VZc7aM7KIwnFpFQ7fnfK4H/9Qw=="], + "@types/semver": ["@types/semver@7.7.1", "", {}, "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA=="], "@types/send": ["@types/send@1.2.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ=="], @@ -1814,6 +1981,8 @@ "@vitest/utils": ["@vitest/utils@3.2.4", "", { "dependencies": { "@vitest/pretty-format": "3.2.4", "loupe": "^3.1.4", "tinyrainbow": "^2.0.0" } }, "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA=="], + "@vortexfi/contracts-relayer": ["@vortexfi/contracts-relayer@workspace:contracts/relayer"], + "@vortexfi/sdk": ["@vortexfi/sdk@workspace:packages/sdk"], "@vortexfi/shared": ["@vortexfi/shared@workspace:packages/shared"], @@ -1906,7 +2075,7 @@ "@xstate/react": ["@xstate/react@6.0.0", "", { "dependencies": { "use-isomorphic-layout-effect": "^1.1.2", "use-sync-external-store": "^1.2.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "xstate": "^5.20.0" }, "optionalPeers": ["xstate"] }, "sha512-xXlLpFJxqLhhmecAXclBECgk+B4zYSrDTl8hTfPZBogkn82OHKbm9zJxox3Z/YXoOhAQhKFTRLMYGdlbhc6T9A=="], - "abbrev": ["abbrev@1.1.1", "", {}, "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="], + "abbrev": ["abbrev@1.0.9", "", {}, "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q=="], "abitype": ["abitype@1.2.3", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3.22.0 || ^4.0.0" }, "optionalPeers": ["typescript", "zod"] }, "sha512-Ofer5QUnuUdTFsBRwARMoWKOH1ND5ehwYhJ3OJ/BQO+StkwQjHw0XyVh4vDttzHB7QOFhPHa/o413PJ82gU/Tg=="], @@ -1918,6 +2087,8 @@ "acorn-walk": ["acorn-walk@8.3.4", "", { "dependencies": { "acorn": "^8.11.0" } }, "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g=="], + "adm-zip": ["adm-zip@0.4.16", "", {}, "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg=="], + "aes-js": ["aes-js@4.0.0-beta.5", "", {}, "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q=="], "agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="], @@ -1932,6 +2103,12 @@ "ajv-formats": ["ajv-formats@3.0.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="], + "amdefine": ["amdefine@1.0.1", "", {}, "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg=="], + + "ansi-align": ["ansi-align@3.0.1", "", { "dependencies": { "string-width": "^4.1.0" } }, "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w=="], + + "ansi-colors": ["ansi-colors@4.1.3", "", {}, "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw=="], + "ansi-escapes": ["ansi-escapes@4.3.2", "", { "dependencies": { "type-fest": "^0.21.3" } }, "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ=="], "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], @@ -1940,6 +2117,8 @@ "ansis": ["ansis@4.2.0", "", {}, "sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig=="], + "antlr4ts": ["antlr4ts@0.5.0-alpha.4", "", {}, "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ=="], + "any-promise": ["any-promise@1.3.0", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="], "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], @@ -1958,12 +2137,16 @@ "aria-query": ["aria-query@5.3.2", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="], + "array-back": ["array-back@3.1.0", "", {}, "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q=="], + "array-buffer-byte-length": ["array-buffer-byte-length@1.0.2", "", { "dependencies": { "call-bound": "^1.0.3", "is-array-buffer": "^3.0.5" } }, "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw=="], "array-includes": ["array-includes@3.1.9", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.4", "define-properties": "^1.2.1", "es-abstract": "^1.24.0", "es-object-atoms": "^1.1.1", "get-intrinsic": "^1.3.0", "is-string": "^1.1.1", "math-intrinsics": "^1.1.0" } }, "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ=="], "array-union": ["array-union@2.1.0", "", {}, "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="], + "array-uniq": ["array-uniq@1.0.3", "", {}, "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q=="], + "array.prototype.findlast": ["array.prototype.findlast@1.2.5", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.2", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "es-shim-unscopables": "^1.0.2" } }, "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ=="], "array.prototype.flat": ["array.prototype.flat@1.3.3", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-shim-unscopables": "^1.0.2" } }, "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg=="], @@ -2048,6 +2231,8 @@ "bcrypt": ["bcrypt@5.1.1", "", { "dependencies": { "@mapbox/node-pre-gyp": "^1.0.11", "node-addon-api": "^5.0.0" } }, "sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww=="], + "bech32": ["bech32@1.1.4", "", {}, "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="], + "better-opn": ["better-opn@3.0.2", "", { "dependencies": { "open": "^8.0.4" } }, "sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ=="], "big.js": ["big.js@7.0.1", "", {}, "sha512-iFgV784tD8kq4ccF1xtNMZnXeZzVuXWWM+ERFzKQjv+A5G9HC8CY3DuV45vgzFFcW+u2tIvmF95+AzWgs6BjCg=="], @@ -2074,6 +2259,8 @@ "bowser": ["bowser@2.13.1", "", {}, "sha512-OHawaAbjwx6rqICCKgSG0SAnT05bzd7ppyKLVUITZpANBaaMFBAsaNkto3LoQ31tyFP5kNujE8Cdx85G9VzOkw=="], + "boxen": ["boxen@5.1.2", "", { "dependencies": { "ansi-align": "^3.0.0", "camelcase": "^6.2.0", "chalk": "^4.1.0", "cli-boxes": "^2.2.1", "string-width": "^4.2.2", "type-fest": "^0.20.2", "widest-line": "^3.1.0", "wrap-ansi": "^7.0.0" } }, "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ=="], + "brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="], "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], @@ -2082,6 +2269,8 @@ "browser-resolve": ["browser-resolve@2.0.0", "", { "dependencies": { "resolve": "^1.17.0" } }, "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ=="], + "browser-stdout": ["browser-stdout@1.3.1", "", {}, "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw=="], + "browserify-aes": ["browserify-aes@1.2.0", "", { "dependencies": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.3", "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA=="], "browserify-cipher": ["browserify-cipher@1.0.1", "", { "dependencies": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", "evp_bytestokey": "^1.0.0" } }, "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w=="], @@ -2098,6 +2287,8 @@ "bs58": ["bs58@6.0.0", "", { "dependencies": { "base-x": "^5.0.0" } }, "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw=="], + "bs58check": ["bs58check@2.1.2", "", { "dependencies": { "bs58": "^4.0.0", "create-hash": "^1.1.0", "safe-buffer": "^5.1.2" } }, "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA=="], + "bser": ["bser@2.1.1", "", { "dependencies": { "node-int64": "^0.4.0" } }, "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ=="], "bson": ["bson@4.7.2", "", { "dependencies": { "buffer": "^5.6.0" } }, "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ=="], @@ -2138,16 +2329,22 @@ "camel-case": ["camel-case@4.1.2", "", { "dependencies": { "pascal-case": "^3.1.2", "tslib": "^2.0.3" } }, "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw=="], - "camelcase": ["camelcase@5.3.1", "", {}, "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="], + "camelcase": ["camelcase@6.3.0", "", {}, "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA=="], "caniuse-lite": ["caniuse-lite@1.0.30001764", "", {}, "sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g=="], "capital-case": ["capital-case@1.0.4", "", { "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", "upper-case-first": "^2.0.2" } }, "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A=="], + "caseless": ["caseless@0.12.0", "", {}, "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw=="], + + "cbor": ["cbor@9.0.2", "", { "dependencies": { "nofilter": "^3.1.0" } }, "sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ=="], + "cbw-sdk": ["@coinbase/wallet-sdk@3.9.3", "", { "dependencies": { "bn.js": "^5.2.1", "buffer": "^6.0.3", "clsx": "^1.2.1", "eth-block-tracker": "^7.1.0", "eth-json-rpc-filters": "^6.0.0", "eventemitter3": "^5.0.1", "keccak": "^3.0.3", "preact": "^10.16.0", "sha.js": "^2.4.11" } }, "sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw=="], "chai": ["chai@5.3.3", "", { "dependencies": { "assertion-error": "^2.0.1", "check-error": "^2.1.1", "deep-eql": "^5.0.1", "loupe": "^3.1.0", "pathval": "^2.0.0" } }, "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw=="], + "chai-as-promised": ["chai-as-promised@7.1.2", "", { "dependencies": { "check-error": "^1.0.2" }, "peerDependencies": { "chai": ">= 2.1.2 < 6" } }, "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw=="], + "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], "change-case": ["change-case@4.1.2", "", { "dependencies": { "camel-case": "^4.1.2", "capital-case": "^1.0.4", "constant-case": "^3.0.4", "dot-case": "^3.0.4", "header-case": "^2.0.4", "no-case": "^3.0.4", "param-case": "^3.0.4", "pascal-case": "^3.1.2", "path-case": "^3.0.4", "sentence-case": "^3.0.4", "snake-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A=="], @@ -2164,16 +2361,22 @@ "chownr": ["chownr@2.0.0", "", {}, "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="], + "ci-info": ["ci-info@2.0.0", "", {}, "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="], + "cipher-base": ["cipher-base@1.0.7", "", { "dependencies": { "inherits": "^2.0.4", "safe-buffer": "^5.2.1", "to-buffer": "^1.2.2" } }, "sha512-Mz9QMT5fJe7bKI7MH31UilT5cEK5EHHRCccw/YRFsRY47AuNgaV6HY3rscp0/I4Q+tTW/5zoqpSeRRI54TkDWA=="], "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], "clean-stack": ["clean-stack@2.2.0", "", {}, "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A=="], + "cli-boxes": ["cli-boxes@2.2.1", "", {}, "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw=="], + "cli-cursor": ["cli-cursor@3.1.0", "", { "dependencies": { "restore-cursor": "^3.1.0" } }, "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw=="], "cli-spinners": ["cli-spinners@2.9.2", "", {}, "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg=="], + "cli-table3": ["cli-table3@0.5.1", "", { "dependencies": { "object-assign": "^4.1.0", "string-width": "^2.1.1" }, "optionalDependencies": { "colors": "^1.1.2" } }, "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw=="], + "cli-truncate": ["cli-truncate@5.1.1", "", { "dependencies": { "slice-ansi": "^7.1.0", "string-width": "^8.0.0" } }, "sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A=="], "cli-width": ["cli-width@3.0.0", "", {}, "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw=="], @@ -2196,8 +2399,16 @@ "colorette": ["colorette@2.0.20", "", {}, "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w=="], + "colors": ["colors@1.4.0", "", {}, "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA=="], + "combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="], + "command-exists": ["command-exists@1.2.9", "", {}, "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w=="], + + "command-line-args": ["command-line-args@5.2.1", "", { "dependencies": { "array-back": "^3.1.0", "find-replace": "^3.0.0", "lodash.camelcase": "^4.3.0", "typical": "^4.0.0" } }, "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg=="], + + "command-line-usage": ["command-line-usage@6.1.3", "", { "dependencies": { "array-back": "^4.0.2", "chalk": "^2.4.2", "table-layout": "^1.0.2", "typical": "^5.2.0" } }, "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw=="], + "commander": ["commander@14.0.2", "", {}, "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ=="], "common-tags": ["common-tags@1.8.2", "", {}, "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA=="], @@ -2208,6 +2419,8 @@ "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], + "concat-stream": ["concat-stream@1.6.2", "", { "dependencies": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" } }, "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw=="], + "concurrently": ["concurrently@9.2.1", "", { "dependencies": { "chalk": "4.1.2", "rxjs": "7.8.2", "shell-quote": "1.8.3", "supports-color": "8.1.1", "tree-kill": "1.2.2", "yargs": "17.7.2" }, "bin": { "conc": "dist/bin/concurrently.js", "concurrently": "dist/bin/concurrently.js" } }, "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng=="], "confbox": ["confbox@0.1.8", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="], @@ -2294,17 +2507,21 @@ "dayjs": ["dayjs@1.11.13", "", {}, "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="], + "death": ["death@1.1.0", "", {}, "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w=="], + "debounce": ["debounce@1.2.1", "", {}, "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug=="], "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], - "decamelize": ["decamelize@1.2.0", "", {}, "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA=="], + "decamelize": ["decamelize@4.0.0", "", {}, "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ=="], "decode-uri-component": ["decode-uri-component@0.2.2", "", {}, "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ=="], "decompress-response": ["decompress-response@6.0.0", "", { "dependencies": { "mimic-response": "^3.1.0" } }, "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ=="], - "deep-eql": ["deep-eql@5.0.2", "", {}, "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q=="], + "deep-eql": ["deep-eql@4.1.4", "", { "dependencies": { "type-detect": "^4.0.0" } }, "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg=="], + + "deep-extend": ["deep-extend@0.6.0", "", {}, "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="], "deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="], @@ -2350,6 +2567,8 @@ "diffie-hellman": ["diffie-hellman@5.0.3", "", { "dependencies": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", "randombytes": "^2.0.0" } }, "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg=="], + "difflib": ["difflib@0.2.4", "", { "dependencies": { "heap": ">= 0.2.0" } }, "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w=="], + "dijkstrajs": ["dijkstrajs@1.0.3", "", {}, "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="], "dir-glob": ["dir-glob@3.0.1", "", { "dependencies": { "path-type": "^4.0.0" } }, "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA=="], @@ -2404,6 +2623,10 @@ "enhanced-resolve": ["enhanced-resolve@5.18.4", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" } }, "sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q=="], + "enquirer": ["enquirer@2.4.1", "", { "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" } }, "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ=="], + + "env-paths": ["env-paths@2.2.1", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="], + "environment": ["environment@1.1.0", "", {}, "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q=="], "error-ex": ["error-ex@1.3.4", "", { "dependencies": { "is-arrayish": "^0.2.1" } }, "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ=="], @@ -2450,6 +2673,8 @@ "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], + "escodegen": ["escodegen@1.8.1", "", { "dependencies": { "esprima": "^2.7.1", "estraverse": "^1.9.1", "esutils": "^2.0.2", "optionator": "^0.8.1" }, "optionalDependencies": { "source-map": "~0.2.0" }, "bin": { "esgenerate": "./bin/esgenerate.js", "escodegen": "./bin/escodegen.js" } }, "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A=="], + "eslint": ["eslint@8.57.1", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", "@eslint/js": "8.57.1", "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.2", "eslint-visitor-keys": "^3.4.3", "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3", "strip-ansi": "^6.0.1", "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" } }, "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA=="], "eslint-plugin-react": ["eslint-plugin-react@7.37.5", "", { "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", "array.prototype.flatmap": "^1.3.3", "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", "es-iterator-helpers": "^1.2.1", "estraverse": "^5.3.0", "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", "object.entries": "^1.1.9", "object.fromentries": "^2.0.8", "object.values": "^1.2.1", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.5", "semver": "^6.3.1", "string.prototype.matchall": "^4.0.12", "string.prototype.repeat": "^1.0.0" }, "peerDependencies": { "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" } }, "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA=="], @@ -2482,16 +2707,24 @@ "eth-block-tracker": ["eth-block-tracker@7.1.0", "", { "dependencies": { "@metamask/eth-json-rpc-provider": "^1.0.0", "@metamask/safe-event-emitter": "^3.0.0", "@metamask/utils": "^5.0.1", "json-rpc-random-id": "^1.0.1", "pify": "^3.0.0" } }, "sha512-8YdplnuE1IK4xfqpf4iU7oBxnOYAc35934o083G8ao+8WM8QQtt/mVlAY6yIAdY1eMeLqg4Z//PZjJGmWGPMRg=="], + "eth-gas-reporter": ["eth-gas-reporter@0.2.27", "", { "dependencies": { "@solidity-parser/parser": "^0.14.0", "axios": "^1.5.1", "cli-table3": "^0.5.0", "colors": "1.4.0", "ethereum-cryptography": "^1.0.3", "ethers": "^5.7.2", "fs-readdir-recursive": "^1.1.0", "lodash": "^4.17.14", "markdown-table": "^1.1.3", "mocha": "^10.2.0", "req-cwd": "^2.0.0", "sha1": "^1.1.1", "sync-request": "^6.0.0" }, "peerDependencies": { "@codechecks/client": "^0.1.0" }, "optionalPeers": ["@codechecks/client"] }, "sha512-femhvoAM7wL0GcI8ozTdxfuBtBFJ9qsyIAsmKVjlWAHUbdnnXHt+lKzz/kmldM5lA9jLuNHGwuIxorNpLbR1Zw=="], + "eth-json-rpc-filters": ["eth-json-rpc-filters@6.0.1", "", { "dependencies": { "@metamask/safe-event-emitter": "^3.0.0", "async-mutex": "^0.2.6", "eth-query": "^2.1.2", "json-rpc-engine": "^6.1.0", "pify": "^5.0.0" } }, "sha512-ITJTvqoCw6OVMLs7pI8f4gG92n/St6x80ACtHodeS+IXmO0w+t1T5OOzfSt7KLSMLRkVUoexV7tztLgDxg+iig=="], "eth-query": ["eth-query@2.1.2", "", { "dependencies": { "json-rpc-random-id": "^1.0.0", "xtend": "^4.0.1" } }, "sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA=="], "eth-rpc-errors": ["eth-rpc-errors@4.0.3", "", { "dependencies": { "fast-safe-stringify": "^2.0.6" } }, "sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg=="], - "ethereum-cryptography": ["ethereum-cryptography@2.2.1", "", { "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", "@scure/bip32": "1.4.0", "@scure/bip39": "1.3.0" } }, "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg=="], + "ethereum-bloom-filters": ["ethereum-bloom-filters@1.2.0", "", { "dependencies": { "@noble/hashes": "^1.4.0" } }, "sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA=="], + + "ethereum-cryptography": ["ethereum-cryptography@1.2.0", "", { "dependencies": { "@noble/hashes": "1.2.0", "@noble/secp256k1": "1.7.1", "@scure/bip32": "1.1.5", "@scure/bip39": "1.1.1" } }, "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw=="], + + "ethereumjs-util": ["ethereumjs-util@7.1.5", "", { "dependencies": { "@types/bn.js": "^5.1.0", "bn.js": "^5.1.2", "create-hash": "^1.1.2", "ethereum-cryptography": "^0.1.3", "rlp": "^2.2.4" } }, "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg=="], "ethers": ["ethers@6.16.0", "", { "dependencies": { "@adraffy/ens-normalize": "1.10.1", "@noble/curves": "1.2.0", "@noble/hashes": "1.3.2", "@types/node": "22.7.5", "aes-js": "4.0.0-beta.5", "tslib": "2.7.0", "ws": "8.17.1" } }, "sha512-U1wulmetNymijEhpSEQ7Ct/P/Jw9/e7R1j5XIbPRydgV2DjLVMsULDlNksq3RQnFgKoLlZf88ijYtWEXcPa07A=="], + "ethjs-unit": ["ethjs-unit@0.1.6", "", { "dependencies": { "bn.js": "4.11.6", "number-to-bn": "1.7.0" } }, "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw=="], + "event-emitter": ["event-emitter@0.3.5", "", { "dependencies": { "d": "1", "es5-ext": "~0.10.14" } }, "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA=="], "eventemitter2": ["eventemitter2@6.4.9", "", {}, "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg=="], @@ -2582,12 +2815,16 @@ "finalhandler": ["finalhandler@2.1.1", "", { "dependencies": { "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "on-finished": "^2.4.1", "parseurl": "^1.3.3", "statuses": "^2.0.1" } }, "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA=="], - "find-up": ["find-up@7.0.0", "", { "dependencies": { "locate-path": "^7.2.0", "path-exists": "^5.0.0", "unicorn-magic": "^0.1.0" } }, "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g=="], + "find-replace": ["find-replace@3.0.0", "", { "dependencies": { "array-back": "^3.0.1" } }, "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ=="], + + "find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], "find-versions": ["find-versions@5.1.0", "", { "dependencies": { "semver-regex": "^4.0.5" } }, "sha512-+iwzCJ7C5v5KgcBuueqVoNiHVoQpwiUK5XFLjf0affFTep+Wcw93tPvmb8tqujDNmzhBDPddnWV/qgWSXgq+Hg=="], "fix-dts-default-cjs-exports": ["fix-dts-default-cjs-exports@1.0.1", "", { "dependencies": { "magic-string": "^0.30.17", "mlly": "^1.7.4", "rollup": "^4.34.8" } }, "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg=="], + "flat": ["flat@5.0.2", "", { "bin": { "flat": "cli.js" } }, "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ=="], + "flat-cache": ["flat-cache@3.2.0", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", "rimraf": "^3.0.2" } }, "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw=="], "flatted": ["flatted@3.3.3", "", {}, "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg=="], @@ -2608,14 +2845,18 @@ "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], + "fp-ts": ["fp-ts@1.19.3", "", {}, "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg=="], + "framer-motion": ["framer-motion@12.26.2", "", { "dependencies": { "motion-dom": "^12.26.2", "motion-utils": "^12.24.10", "tslib": "^2.4.0" }, "peerDependencies": { "@emotion/is-prop-valid": "*", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@emotion/is-prop-valid", "react", "react-dom"] }, "sha512-lflOQEdjquUi9sCg5Y1LrsZDlsjrHw7m0T9Yedvnk7Bnhqfkc89/Uha10J3CFhkL+TCZVCRw9eUGyM/lyYhXQA=="], "fresh": ["fresh@2.0.0", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="], - "fs-extra": ["fs-extra@9.1.0", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="], + "fs-extra": ["fs-extra@10.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ=="], "fs-minipass": ["fs-minipass@2.1.0", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg=="], + "fs-readdir-recursive": ["fs-readdir-recursive@1.1.0", "", {}, "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA=="], + "fs.realpath": ["fs.realpath@1.0.0", "", {}, "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="], "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], @@ -2640,8 +2881,12 @@ "get-east-asian-width": ["get-east-asian-width@1.4.0", "", {}, "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q=="], + "get-func-name": ["get-func-name@2.0.2", "", {}, "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ=="], + "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="], + "get-port": ["get-port@3.2.0", "", {}, "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg=="], + "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], "get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="], @@ -2650,15 +2895,21 @@ "get-tsconfig": ["get-tsconfig@4.13.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ=="], - "glob": ["glob@10.5.0", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg=="], + "ghost-testrpc": ["ghost-testrpc@0.0.2", "", { "dependencies": { "chalk": "^2.4.2", "node-emoji": "^1.10.0" }, "bin": { "testrpc-sc": "./index.js" } }, "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ=="], + + "glob": ["glob@7.1.7", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ=="], "glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="], + "global-modules": ["global-modules@2.0.0", "", { "dependencies": { "global-prefix": "^3.0.0" } }, "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A=="], + + "global-prefix": ["global-prefix@3.0.0", "", { "dependencies": { "ini": "^1.3.5", "kind-of": "^6.0.2", "which": "^1.3.1" } }, "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg=="], + "globals": ["globals@13.24.0", "", { "dependencies": { "type-fest": "^0.20.2" } }, "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ=="], "globalthis": ["globalthis@1.0.4", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="], - "globby": ["globby@11.1.0", "", { "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.2.9", "ignore": "^5.2.0", "merge2": "^1.4.1", "slash": "^3.0.0" } }, "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g=="], + "globby": ["globby@10.0.2", "", { "dependencies": { "@types/glob": "^7.1.1", "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.0.3", "glob": "^7.1.3", "ignore": "^5.1.1", "merge2": "^1.2.3", "slash": "^3.0.0" } }, "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg=="], "goober": ["goober@2.1.18", "", { "peerDependencies": { "csstype": "^3.0.10" } }, "sha512-2vFqsaDVIT9Gz7N6kAL++pLpp41l3PfDuusHcjnGLfR6+huZkl6ziX+zgVC3ZxpqWhzH6pyDdGrCeDhMIvwaxw=="], @@ -2690,6 +2941,12 @@ "h3": ["h3@1.15.5", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.5", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.4", "radix3": "^1.1.2", "ufo": "^1.6.3", "uncrypto": "^0.1.3" } }, "sha512-xEyq3rSl+dhGX2Lm0+eFQIAzlDN6Fs0EcC4f7BNUmzaRX/PTzeuM+Tr2lHB8FoXggsQIeXLj8EDVgs5ywxyxmg=="], + "handlebars": ["handlebars@4.7.8", "", { "dependencies": { "minimist": "^1.2.5", "neo-async": "^2.6.2", "source-map": "^0.6.1", "wordwrap": "^1.0.0" }, "optionalDependencies": { "uglify-js": "^3.1.4" }, "bin": { "handlebars": "bin/handlebars" } }, "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ=="], + + "hardhat": ["hardhat@2.28.6", "", { "dependencies": { "@ethereumjs/util": "^9.1.0", "@ethersproject/abi": "^5.1.2", "@nomicfoundation/edr": "0.12.0-next.23", "@nomicfoundation/solidity-analyzer": "^0.1.0", "@sentry/node": "^5.18.1", "adm-zip": "^0.4.16", "aggregate-error": "^3.0.0", "ansi-escapes": "^4.3.0", "boxen": "^5.1.2", "chokidar": "^4.0.0", "ci-info": "^2.0.0", "debug": "^4.1.1", "enquirer": "^2.3.0", "env-paths": "^2.2.0", "ethereum-cryptography": "^1.0.3", "find-up": "^5.0.0", "fp-ts": "1.19.3", "fs-extra": "^7.0.1", "immutable": "^4.0.0-rc.12", "io-ts": "1.10.4", "json-stream-stringify": "^3.1.4", "keccak": "^3.0.2", "lodash": "^4.17.11", "micro-eth-signer": "^0.14.0", "mnemonist": "^0.38.0", "mocha": "^10.0.0", "p-map": "^4.0.0", "picocolors": "^1.1.0", "raw-body": "^2.4.1", "resolve": "1.17.0", "semver": "^6.3.0", "solc": "0.8.26", "source-map-support": "^0.5.13", "stacktrace-parser": "^0.1.10", "tinyglobby": "^0.2.6", "tsort": "0.0.1", "undici": "^5.14.0", "uuid": "^8.3.2", "ws": "^7.4.6" }, "peerDependencies": { "ts-node": "*", "typescript": "*" }, "optionalPeers": ["ts-node", "typescript"], "bin": { "hardhat": "internal/cli/bootstrap.js" } }, "sha512-zQze7qe+8ltwHvhX5NQ8sN1N37WWZGw8L63y+2XcPxGwAjc/SMF829z3NS6o1krX0sryhAsVBK/xrwUqlsot4Q=="], + + "hardhat-gas-reporter": ["hardhat-gas-reporter@1.0.10", "", { "dependencies": { "array-uniq": "1.0.3", "eth-gas-reporter": "^0.2.25", "sha1": "^1.1.1" }, "peerDependencies": { "hardhat": "^2.0.2" } }, "sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA=="], + "has-bigints": ["has-bigints@1.1.0", "", {}, "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg=="], "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], @@ -2710,8 +2967,12 @@ "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + "he": ["he@1.2.0", "", { "bin": { "he": "bin/he" } }, "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="], + "header-case": ["header-case@2.0.4", "", { "dependencies": { "capital-case": "^1.0.4", "tslib": "^2.0.3" } }, "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q=="], + "heap": ["heap@0.2.7", "", {}, "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg=="], + "helmet": ["helmet@4.6.0", "", {}, "sha512-HVqALKZlR95ROkrnesdhbbZJFi/rIVSoNq6f3jA/9u6MIbTsPh3xZwihjeI5+DO/2sOV6HMHooXcEOuwskHpTg=="], "hey-listen": ["hey-listen@1.0.8", "", {}, "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q=="], @@ -2724,12 +2985,16 @@ "html-parse-stringify": ["html-parse-stringify@3.0.1", "", { "dependencies": { "void-elements": "3.1.0" } }, "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg=="], + "http-basic": ["http-basic@8.1.3", "", { "dependencies": { "caseless": "^0.12.0", "concat-stream": "^1.6.2", "http-response-object": "^3.0.1", "parse-cache-control": "^1.0.1" } }, "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw=="], + "http-cache-semantics": ["http-cache-semantics@4.2.0", "", {}, "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="], "http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], "http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="], + "http-response-object": ["http-response-object@3.0.2", "", { "dependencies": { "@types/node": "^10.0.3" } }, "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA=="], + "http-status": ["http-status@1.8.1", "", {}, "sha512-YQF7j8Qf/Rlby0IbRPiWfNZt6aeUv3K0Pi0x3crbMZN+7F8dPn5k4b3n897vpM1Vk8Mg2fhOYc9fktKEQWMy/Q=="], "http2-wrapper": ["http2-wrapper@2.2.1", "", { "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.2.0" } }, "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ=="], @@ -2758,7 +3023,9 @@ "ignore-by-default": ["ignore-by-default@1.0.1", "", {}, "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA=="], - "immutable": ["immutable@3.7.6", "", {}, "sha512-AizQPcaofEtO11RZhPPHBOJRdo/20MKQF9mBLnVkBoyHi1/zXK8fzVdnEpSV9gxqtnh6Qomfp3F0xT5qP/vThw=="], + "immer": ["immer@10.0.2", "", {}, "sha512-Rx3CqeqQ19sxUtYV9CU911Vhy8/721wRFnJv3REVGWUmoAcIwzifTsdmJte/MV+0/XpM35LZdQMBGkRIoLPwQA=="], + + "immutable": ["immutable@4.3.8", "", {}, "sha512-d/Ld9aLbKpNwyl0KiM2CT1WYvkitQ1TSvmRtkcV8FKStiDoA7Slzgjmb/1G2yhKM1p0XeNOieaTbFZmU1d3Xuw=="], "import-fresh": ["import-fresh@3.3.1", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ=="], @@ -2786,8 +3053,12 @@ "internal-slot": ["internal-slot@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.2", "side-channel": "^1.1.0" } }, "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw=="], + "interpret": ["interpret@1.4.0", "", {}, "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA=="], + "invariant": ["invariant@2.2.4", "", { "dependencies": { "loose-envify": "^1.0.0" } }, "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA=="], + "io-ts": ["io-ts@1.10.4", "", { "dependencies": { "fp-ts": "^1.0.0" } }, "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g=="], + "ip-address": ["ip-address@10.1.0", "", {}, "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q=="], "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], @@ -2832,6 +3103,8 @@ "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + "is-hex-prefixed": ["is-hex-prefixed@1.0.0", "", {}, "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA=="], + "is-interactive": ["is-interactive@1.0.0", "", {}, "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w=="], "is-lower-case": ["is-lower-case@2.0.2", "", { "dependencies": { "tslib": "^2.0.3" } }, "sha512-bVcMJy4X5Og6VZfdOZstSexlEy20Sr0k/p/b2IlQJlfdKAQuMpiv5w2Ccxb8sKdRUNAG1PnHVHjFSdRDVS6NlQ=="], @@ -2848,7 +3121,7 @@ "is-path-inside": ["is-path-inside@3.0.3", "", {}, "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ=="], - "is-plain-obj": ["is-plain-obj@1.1.0", "", {}, "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg=="], + "is-plain-obj": ["is-plain-obj@2.1.0", "", {}, "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA=="], "is-promise": ["is-promise@4.0.0", "", {}, "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="], @@ -2918,6 +3191,8 @@ "js-cookie": ["js-cookie@3.0.5", "", {}, "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw=="], + "js-sha3": ["js-sha3@0.8.0", "", {}, "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q=="], + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], "js-yaml": ["js-yaml@4.1.1", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="], @@ -2938,6 +3213,8 @@ "json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="], + "json-stream-stringify": ["json-stream-stringify@3.1.6", "", {}, "sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog=="], + "json-stringify-safe": ["json-stringify-safe@5.0.1", "", {}, "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="], "json-to-pretty-yaml": ["json-to-pretty-yaml@1.2.2", "", { "dependencies": { "remedial": "^1.0.7", "remove-trailing-spaces": "^1.0.6" } }, "sha512-rvm6hunfCcqegwYaG5T4yKJWxc9FXFgBVrcTZ4XfSVRwa5HA/Xs+vB/Eo9treYYHCeNM0nrSUr82V/M31Urc7A=="], @@ -2946,6 +3223,8 @@ "jsonfile": ["jsonfile@6.2.0", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg=="], + "jsonschema": ["jsonschema@1.5.0", "", {}, "sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw=="], + "jsx-ast-utils": ["jsx-ast-utils@3.3.5", "", { "dependencies": { "array-includes": "^3.1.6", "array.prototype.flat": "^1.3.1", "object.assign": "^4.1.4", "object.values": "^1.1.6" } }, "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ=="], "jwa": ["jwa@2.0.1", "", { "dependencies": { "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg=="], @@ -2960,6 +3239,8 @@ "kind-of": ["kind-of@6.0.3", "", {}, "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="], + "kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="], + "kuler": ["kuler@2.0.0", "", {}, "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A=="], "levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="], @@ -3004,18 +3285,24 @@ "load-tsconfig": ["load-tsconfig@0.2.5", "", {}, "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg=="], - "locate-path": ["locate-path@7.2.0", "", { "dependencies": { "p-locate": "^6.0.0" } }, "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA=="], + "locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], "lodash": ["lodash@4.17.21", "", {}, "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="], + "lodash.camelcase": ["lodash.camelcase@4.3.0", "", {}, "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="], + "lodash.clonedeep": ["lodash.clonedeep@4.5.0", "", {}, "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ=="], "lodash.debounce": ["lodash.debounce@4.0.8", "", {}, "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="], + "lodash.isequal": ["lodash.isequal@4.5.0", "", {}, "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="], + "lodash.merge": ["lodash.merge@4.6.2", "", {}, "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="], "lodash.sortby": ["lodash.sortby@4.7.0", "", {}, "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA=="], + "lodash.truncate": ["lodash.truncate@4.4.2", "", {}, "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw=="], + "log-symbols": ["log-symbols@4.1.0", "", { "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" } }, "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg=="], "log-update": ["log-update@6.1.0", "", { "dependencies": { "ansi-escapes": "^7.0.0", "cli-cursor": "^5.0.0", "slice-ansi": "^7.1.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w=="], @@ -3040,6 +3327,8 @@ "lru-queue": ["lru-queue@0.1.0", "", { "dependencies": { "es5-ext": "~0.10.2" } }, "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ=="], + "lru_map": ["lru_map@0.3.3", "", {}, "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ=="], + "lucide-react": ["lucide-react@0.562.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-82hOAu7y0dbVuFfmO4bYF1XEwYk/mEbM5E+b1jgci/udUBEE/R7LF5Ip0CCEmXe8AybRM8L+04eP+LGZeDvkiw=="], "luxon": ["luxon@3.7.2", "", {}, "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew=="], @@ -3054,6 +3343,8 @@ "map-cache": ["map-cache@0.2.2", "", {}, "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg=="], + "markdown-table": ["markdown-table@1.1.3", "", {}, "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q=="], + "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], "md5": ["md5@2.3.0", "", { "dependencies": { "charenc": "0.0.2", "crypt": "0.0.2", "is-buffer": "~1.1.6" } }, "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g=="], @@ -3066,6 +3357,8 @@ "memory-pager": ["memory-pager@1.5.0", "", {}, "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg=="], + "memorystream": ["memorystream@0.3.1", "", {}, "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw=="], + "merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="], "merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="], @@ -3078,8 +3371,12 @@ "methods": ["methods@1.1.2", "", {}, "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w=="], + "micro-eth-signer": ["micro-eth-signer@0.14.0", "", { "dependencies": { "@noble/curves": "~1.8.1", "@noble/hashes": "~1.7.1", "micro-packed": "~0.7.2" } }, "sha512-5PLLzHiVYPWClEvZIXXFu5yutzpadb73rnQCpUqIHu3No3coFuWQNfE5tkBQJ7djuLYl6aRLaS0MgWJYGoqiBw=="], + "micro-ftch": ["micro-ftch@0.3.1", "", {}, "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg=="], + "micro-packed": ["micro-packed@0.7.3", "", { "dependencies": { "@scure/base": "~1.2.5" } }, "sha512-2Milxs+WNC00TRlem41oRswvw31146GiSaoCT7s3Xi2gMUglW5QBeqlQaZeHr5tJx9nm3i57LNXPqxOOaWtTYg=="], + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], "miller-rabin": ["miller-rabin@4.0.1", "", { "dependencies": { "bn.js": "^4.0.0", "brorand": "^1.0.1" }, "bin": { "miller-rabin": "bin/miller-rabin" } }, "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA=="], @@ -3114,10 +3411,14 @@ "mlly": ["mlly@1.8.0", "", { "dependencies": { "acorn": "^8.15.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.1" } }, "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g=="], + "mnemonist": ["mnemonist@0.38.5", "", { "dependencies": { "obliterator": "^2.0.0" } }, "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg=="], + "mobx": ["mobx@5.15.7", "", {}, "sha512-wyM3FghTkhmC+hQjyPGGFdpehrcX1KOXsDuERhfK2YbJemkUhEB+6wzEN639T21onxlfYBmriA1PFnvxTUhcKw=="], "mobx-utils": ["mobx-utils@5.6.2", "", { "peerDependencies": { "mobx": "^4.13.1 || ^5.13.1" } }, "sha512-a/WlXyGkp6F12b01sTarENpxbmlRgPHFyR1Xv2bsSjQBm5dcOtd16ONb40/vOqck8L99NHpI+C9MXQ+SZ8f+yw=="], + "mocha": ["mocha@10.8.2", "", { "dependencies": { "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", "chokidar": "^3.5.3", "debug": "^4.3.5", "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", "glob": "^8.1.0", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", "minimatch": "^5.1.6", "ms": "^2.1.3", "serialize-javascript": "^6.0.2", "strip-json-comments": "^3.1.1", "supports-color": "^8.1.1", "workerpool": "^6.5.1", "yargs": "^16.2.0", "yargs-parser": "^20.2.9", "yargs-unparser": "^2.0.0" }, "bin": { "mocha": "bin/mocha.js", "_mocha": "bin/_mocha" } }, "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg=="], + "mock-socket": ["mock-socket@9.3.1", "", {}, "sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw=="], "moment": ["moment@2.30.1", "", {}, "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="], @@ -3152,8 +3453,12 @@ "natural-compare-lite": ["natural-compare-lite@1.4.0", "", {}, "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g=="], + "ndjson": ["ndjson@2.0.0", "", { "dependencies": { "json-stringify-safe": "^5.0.1", "minimist": "^1.2.5", "readable-stream": "^3.6.0", "split2": "^3.0.0", "through2": "^4.0.0" }, "bin": { "ndjson": "cli.js" } }, "sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ=="], + "negotiator": ["negotiator@0.6.4", "", {}, "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w=="], + "neo-async": ["neo-async@2.6.2", "", {}, "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="], + "next-tick": ["next-tick@1.1.0", "", {}, "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="], "no-case": ["no-case@3.0.4", "", { "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg=="], @@ -3166,6 +3471,8 @@ "node-domexception": ["node-domexception@1.0.0", "", {}, "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="], + "node-emoji": ["node-emoji@1.11.0", "", { "dependencies": { "lodash": "^4.17.21" } }, "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A=="], + "node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], "node-fetch-native": ["node-fetch-native@1.6.7", "", {}, "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q=="], @@ -3184,6 +3491,8 @@ "nodemon": ["nodemon@2.0.22", "", { "dependencies": { "chokidar": "^3.5.2", "debug": "^3.2.7", "ignore-by-default": "^1.0.1", "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", "semver": "^5.7.1", "simple-update-notifier": "^1.0.7", "supports-color": "^5.5.0", "touch": "^3.1.0", "undefsafe": "^2.0.5" }, "bin": { "nodemon": "bin/nodemon.js" } }, "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ=="], + "nofilter": ["nofilter@3.1.0", "", {}, "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g=="], + "nopt": ["nopt@5.0.0", "", { "dependencies": { "abbrev": "1" }, "bin": { "nopt": "bin/nopt.js" } }, "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ=="], "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], @@ -3196,6 +3505,8 @@ "nullthrows": ["nullthrows@1.1.1", "", {}, "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw=="], + "number-to-bn": ["number-to-bn@1.7.0", "", { "dependencies": { "bn.js": "4.11.6", "strip-hex-prefix": "1.0.0" } }, "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig=="], + "numora": ["numora@3.0.2", "", {}, "sha512-L1EQPudBSbX1G1v4vWtbdTaZrhJhexwffslc8TtcKXaN0ZNzo/+oPPyRNtVx3HWlDmRccTxlAiE+A4K5BGsuCQ=="], "numora-react": ["numora-react@3.0.3", "", {}, "sha512-42wqglFsDZNsYUwy09yBS5Kd1U0ZmBiKFpJDmdzAPnXZd4MmZfRA7NyTMO7uTrpQYCTkc5URJ/l56K1f5ISJWg=="], @@ -3218,6 +3529,8 @@ "object.values": ["object.values@1.2.1", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" } }, "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA=="], + "obliterator": ["obliterator@2.0.5", "", {}, "sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw=="], + "ofetch": ["ofetch@1.5.1", "", { "dependencies": { "destr": "^2.0.5", "node-fetch-native": "^1.6.7", "ufo": "^1.6.1" } }, "sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA=="], "on-exit-leak-free": ["on-exit-leak-free@2.1.2", "", {}, "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA=="], @@ -3242,8 +3555,12 @@ "ora": ["ora@5.4.1", "", { "dependencies": { "bl": "^4.1.0", "chalk": "^4.1.0", "cli-cursor": "^3.1.0", "cli-spinners": "^2.5.0", "is-interactive": "^1.0.0", "is-unicode-supported": "^0.1.0", "log-symbols": "^4.1.0", "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1" } }, "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ=="], + "ordinal": ["ordinal@1.0.3", "", {}, "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ=="], + "os-browserify": ["os-browserify@0.3.0", "", {}, "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A=="], + "os-tmpdir": ["os-tmpdir@1.0.2", "", {}, "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g=="], + "own-keys": ["own-keys@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.2.6", "object-keys": "^1.1.1", "safe-push-apply": "^1.0.0" } }, "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg=="], "ox": ["ox@0.11.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.2.3", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-1bWYGk/xZel3xro3l8WGg6eq4YEKlaqvyMtVhfMFpbJzK2F6rj4EDRtqDCWVEJMkzcmEi9uW2QxsqELokOlarw=="], @@ -3254,7 +3571,7 @@ "p-limit": ["p-limit@6.2.0", "", { "dependencies": { "yocto-queue": "^1.1.1" } }, "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA=="], - "p-locate": ["p-locate@6.0.0", "", { "dependencies": { "p-limit": "^4.0.0" } }, "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw=="], + "p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], "p-map": ["p-map@4.0.0", "", { "dependencies": { "aggregate-error": "^3.0.0" } }, "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ=="], @@ -3270,6 +3587,8 @@ "parse-asn1": ["parse-asn1@5.1.9", "", { "dependencies": { "asn1.js": "^4.10.1", "browserify-aes": "^1.2.0", "evp_bytestokey": "^1.0.3", "pbkdf2": "^3.1.5", "safe-buffer": "^5.2.1" } }, "sha512-fIYNuZ/HastSb80baGOuPRo1O9cf4baWw5WsAp7dBuUzeTD/BoaG8sVTdlPFksBE2lF21dN+A1AnrpIjSWqHHg=="], + "parse-cache-control": ["parse-cache-control@1.0.1", "", {}, "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg=="], + "parse-filepath": ["parse-filepath@1.0.2", "", { "dependencies": { "is-absolute": "^1.0.0", "map-cache": "^0.2.0", "path-root": "^0.1.1" } }, "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q=="], "parse-json": ["parse-json@5.2.0", "", { "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } }, "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg=="], @@ -3282,7 +3601,7 @@ "path-case": ["path-case@3.0.4", "", { "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg=="], - "path-exists": ["path-exists@5.0.0", "", {}, "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ=="], + "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], "path-is-absolute": ["path-is-absolute@1.0.1", "", {}, "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="], @@ -3332,7 +3651,7 @@ "pidtree": ["pidtree@0.6.0", "", { "bin": { "pidtree": "bin/pidtree.js" } }, "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g=="], - "pify": ["pify@3.0.0", "", {}, "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg=="], + "pify": ["pify@4.0.1", "", {}, "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="], "pino": ["pino@10.0.0", "", { "dependencies": { "atomic-sleep": "^1.0.0", "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^2.0.0", "pino-std-serializers": "^7.0.0", "process-warning": "^5.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", "slow-redact": "^0.3.0", "sonic-boom": "^4.0.1", "thread-stream": "^3.0.0" }, "bin": { "pino": "bin.js" } }, "sha512-eI9pKwWEix40kfvSzqEP6ldqOoBIN7dwD/o91TY5z8vQI12sAffpR/pOqAD1IVVwIVHDpHjkq0joBPdJD0rafA=="], @@ -3384,7 +3703,9 @@ "progress": ["progress@2.0.3", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="], - "promise": ["promise@7.3.1", "", { "dependencies": { "asap": "~2.0.3" } }, "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg=="], + "promise": ["promise@8.3.0", "", { "dependencies": { "asap": "~2.0.6" } }, "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg=="], + + "prompts": ["prompts@2.4.2", "", { "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" } }, "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q=="], "prop-types": ["prop-types@15.8.1", "", { "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg=="], @@ -3464,8 +3785,14 @@ "recast": ["recast@0.23.11", "", { "dependencies": { "ast-types": "^0.16.1", "esprima": "~4.0.0", "source-map": "~0.6.1", "tiny-invariant": "^1.3.3", "tslib": "^2.0.1" } }, "sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA=="], + "rechoir": ["rechoir@0.6.2", "", { "dependencies": { "resolve": "^1.1.6" } }, "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw=="], + + "recursive-readdir": ["recursive-readdir@2.2.3", "", { "dependencies": { "minimatch": "^3.0.5" } }, "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA=="], + "redent": ["redent@3.0.0", "", { "dependencies": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" } }, "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg=="], + "reduce-flatten": ["reduce-flatten@2.0.0", "", {}, "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w=="], + "reflect.getprototypeof": ["reflect.getprototypeof@1.0.10", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.9", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "get-intrinsic": "^1.2.7", "get-proto": "^1.0.1", "which-builtin-type": "^1.2.1" } }, "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw=="], "regenerate": ["regenerate@1.4.2", "", {}, "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A=="], @@ -3488,6 +3815,10 @@ "remove-trailing-spaces": ["remove-trailing-spaces@1.0.9", "", {}, "sha512-xzG7w5IRijvIkHIjDk65URsJJ7k4J95wmcArY5PRcmjldIOl7oTvG8+X2Ag690R7SfwiOcHrWZKVc1Pp5WIOzA=="], + "req-cwd": ["req-cwd@2.0.0", "", { "dependencies": { "req-from": "^2.0.0" } }, "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ=="], + + "req-from": ["req-from@2.0.0", "", { "dependencies": { "resolve-from": "^3.0.0" } }, "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA=="], + "require-addon": ["require-addon@1.2.0", "", { "dependencies": { "bare-addon-resolve": "^1.3.0" } }, "sha512-VNPDZlYgIYQwWp9jMTzljx+k0ZtatKlcvOhktZ/anNPI3dQ9NXk7cq2U4iJ1wd9IrytRnYhyEocFWbkdPb+MYA=="], "require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="], @@ -3496,7 +3827,7 @@ "require-main-filename": ["require-main-filename@2.0.0", "", {}, "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="], - "resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], + "resolve": ["resolve@1.17.0", "", { "dependencies": { "path-parse": "^1.0.6" } }, "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w=="], "resolve-alpn": ["resolve-alpn@1.2.1", "", {}, "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g=="], @@ -3518,6 +3849,8 @@ "ripemd160": ["ripemd160@2.0.3", "", { "dependencies": { "hash-base": "^3.1.2", "inherits": "^2.0.4" } }, "sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA=="], + "rlp": ["rlp@2.2.7", "", { "dependencies": { "bn.js": "^5.2.0" }, "bin": { "rlp": "bin/rlp" } }, "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ=="], + "rollup": ["rollup@4.55.1", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.55.1", "@rollup/rollup-android-arm64": "4.55.1", "@rollup/rollup-darwin-arm64": "4.55.1", "@rollup/rollup-darwin-x64": "4.55.1", "@rollup/rollup-freebsd-arm64": "4.55.1", "@rollup/rollup-freebsd-x64": "4.55.1", "@rollup/rollup-linux-arm-gnueabihf": "4.55.1", "@rollup/rollup-linux-arm-musleabihf": "4.55.1", "@rollup/rollup-linux-arm64-gnu": "4.55.1", "@rollup/rollup-linux-arm64-musl": "4.55.1", "@rollup/rollup-linux-loong64-gnu": "4.55.1", "@rollup/rollup-linux-loong64-musl": "4.55.1", "@rollup/rollup-linux-ppc64-gnu": "4.55.1", "@rollup/rollup-linux-ppc64-musl": "4.55.1", "@rollup/rollup-linux-riscv64-gnu": "4.55.1", "@rollup/rollup-linux-riscv64-musl": "4.55.1", "@rollup/rollup-linux-s390x-gnu": "4.55.1", "@rollup/rollup-linux-x64-gnu": "4.55.1", "@rollup/rollup-linux-x64-musl": "4.55.1", "@rollup/rollup-openbsd-x64": "4.55.1", "@rollup/rollup-openharmony-arm64": "4.55.1", "@rollup/rollup-win32-arm64-msvc": "4.55.1", "@rollup/rollup-win32-ia32-msvc": "4.55.1", "@rollup/rollup-win32-x64-gnu": "4.55.1", "@rollup/rollup-win32-x64-msvc": "4.55.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A=="], "router": ["router@2.2.0", "", { "dependencies": { "debug": "^4.4.0", "depd": "^2.0.0", "is-promise": "^4.0.0", "parseurl": "^1.3.3", "path-to-regexp": "^8.0.0" } }, "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ=="], @@ -3542,15 +3875,21 @@ "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], + "sc-istanbul": ["sc-istanbul@0.4.6", "", { "dependencies": { "abbrev": "1.0.x", "async": "1.x", "escodegen": "1.8.x", "esprima": "2.7.x", "glob": "^5.0.15", "handlebars": "^4.0.1", "js-yaml": "3.x", "mkdirp": "0.5.x", "nopt": "3.x", "once": "1.x", "resolve": "1.1.x", "supports-color": "^3.1.0", "which": "^1.1.1", "wordwrap": "^1.0.0" }, "bin": { "istanbul": "lib/cli.js" } }, "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g=="], + "scale-ts": ["scale-ts@1.6.1", "", {}, "sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g=="], "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + "scrypt-js": ["scrypt-js@3.0.1", "", {}, "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA=="], + "scuid": ["scuid@1.1.0", "", {}, "sha512-MuCAyrGZcTLfQoH2XoBlQ8C6bzwN88XT/0slOGz0pn8+gIP85BOAfYa44ZXQUTOwRwPU0QvgU+V+OSajl/59Xg=="], + "secp256k1": ["secp256k1@4.0.4", "", { "dependencies": { "elliptic": "^6.5.7", "node-addon-api": "^5.0.0", "node-gyp-build": "^4.2.0" } }, "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw=="], + "seek-bzip": ["seek-bzip@2.0.0", "", { "dependencies": { "commander": "^6.0.0" }, "bin": { "seek-bunzip": "bin/seek-bunzip", "seek-table": "bin/seek-bzip-table" } }, "sha512-SMguiTnYrhpLdk3PwfzHeotrcwi8bNV4iemL9tx9poR/yeaMYwB9VzR1w7b57DuWpuqR8n6oZboi0hj3AxZxQg=="], - "semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], "semver-regex": ["semver-regex@4.0.5", "", {}, "sha512-hunMQrEy1T6Jr2uEVjrAIqjwWcQTgOAcIM52C8MY1EZSD3DDNft04XzvYKPqjED65bNVVko0YI38nYeEHCX3yw=="], @@ -3566,6 +3905,8 @@ "sequelize-pool": ["sequelize-pool@7.1.0", "", {}, "sha512-G9c0qlIWQSK29pR/5U2JF5dDQeqqHRragoyahj/Nx4KOOQ3CPPfzxnfqFPCSB7x5UgjOgnZ61nSxz+fjDpRlJg=="], + "serialize-javascript": ["serialize-javascript@6.0.2", "", { "dependencies": { "randombytes": "^2.1.0" } }, "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g=="], + "seroval": ["seroval@1.4.2", "", {}, "sha512-N3HEHRCZYn3cQbsC4B5ldj9j+tHdf4JZoYPlcI4rRYu0Xy4qN8MQf1Z08EibzB0WpgRG5BGK08FTrmM66eSzKQ=="], "seroval-plugins": ["seroval-plugins@1.4.2", "", { "peerDependencies": { "seroval": "^1.0" } }, "sha512-X7p4MEDTi+60o2sXZ4bnDBhgsUYDSkQEvzYZuJyFqWg9jcoPsHts5nrg5O956py2wyt28lUrBxk0M0/wU8URpA=="], @@ -3586,12 +3927,16 @@ "sha.js": ["sha.js@2.4.12", "", { "dependencies": { "inherits": "^2.0.4", "safe-buffer": "^5.2.1", "to-buffer": "^1.2.0" }, "bin": { "sha.js": "bin.js" } }, "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w=="], + "sha1": ["sha1@1.1.1", "", { "dependencies": { "charenc": ">= 0.0.1", "crypt": ">= 0.0.1" } }, "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA=="], + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], "shell-quote": ["shell-quote@1.8.3", "", {}, "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw=="], + "shelljs": ["shelljs@0.8.5", "", { "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", "rechoir": "^0.6.2" }, "bin": { "shjs": "bin/shjs" } }, "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow=="], + "side-channel": ["side-channel@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3", "side-channel-list": "^1.0.0", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw=="], "side-channel-list": ["side-channel-list@1.0.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3" } }, "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA=="], @@ -3608,6 +3953,8 @@ "simple-update-notifier": ["simple-update-notifier@1.1.0", "", { "dependencies": { "semver": "~7.0.0" } }, "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg=="], + "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="], + "siwe": ["siwe@2.3.2", "", { "dependencies": { "@spruceid/siwe-parser": "^2.1.2", "@stablelib/random": "^1.0.1", "uri-js": "^4.4.1", "valid-url": "^1.0.9" }, "peerDependencies": { "ethers": "^5.6.8 || ^6.0.8" } }, "sha512-aSf+6+Latyttbj5nMu6GF3doMfv2UYj83hhwZgUF20ky6fTS83uVhkQABdIVnEuS8y1bBdk7p6ltb9SmlhTTlA=="], "slash": ["slash@3.0.0", "", {}, "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="], @@ -3630,6 +3977,10 @@ "sodium-native": ["sodium-native@4.3.3", "", { "dependencies": { "require-addon": "^1.1.0" } }, "sha512-OnxSlN3uyY8D0EsLHpmm2HOFmKddQVvEMmsakCrXUzSd8kjjbzL413t4ZNF3n0UxSwNgwTyUvkmZHTfuCeiYSw=="], + "solc": ["solc@0.8.26", "", { "dependencies": { "command-exists": "^1.2.8", "commander": "^8.1.0", "follow-redirects": "^1.12.1", "js-sha3": "0.8.0", "memorystream": "^0.3.1", "semver": "^5.5.0", "tmp": "0.0.33" }, "bin": { "solcjs": "solc.js" } }, "sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g=="], + + "solidity-coverage": ["solidity-coverage@0.8.17", "", { "dependencies": { "@ethersproject/abi": "^5.0.9", "@solidity-parser/parser": "^0.20.1", "chalk": "^2.4.2", "death": "^1.1.0", "difflib": "^0.2.4", "fs-extra": "^8.1.0", "ghost-testrpc": "^0.0.2", "global-modules": "^2.0.0", "globby": "^10.0.1", "jsonschema": "^1.2.4", "lodash": "^4.17.21", "mocha": "^10.2.0", "node-emoji": "^1.10.0", "pify": "^4.0.1", "recursive-readdir": "^2.2.2", "sc-istanbul": "^0.4.5", "semver": "^7.3.4", "shelljs": "^0.8.3", "web3-utils": "^1.3.6" }, "peerDependencies": { "hardhat": "^2.11.0" }, "bin": { "solidity-coverage": "plugins/bin.js" } }, "sha512-5P8vnB6qVX9tt1MfuONtCTEaEGO/O4WuEidPHIAJjx4sktHHKhO3rFvnE0q8L30nWJPTrcqGQMT7jpE29B2qow=="], + "sonic-boom": ["sonic-boom@4.2.0", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww=="], "sort-keys": ["sort-keys@1.1.2", "", { "dependencies": { "is-plain-obj": "^1.0.0" } }, "sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg=="], @@ -3656,6 +4007,8 @@ "stackback": ["stackback@0.0.2", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="], + "stacktrace-parser": ["stacktrace-parser@0.1.11", "", { "dependencies": { "type-fest": "^0.7.1" } }, "sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg=="], + "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], "std-env": ["std-env@3.10.0", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="], @@ -3684,6 +4037,8 @@ "string-env-interpolation": ["string-env-interpolation@1.0.1", "", {}, "sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg=="], + "string-format": ["string-format@2.0.0", "", {}, "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA=="], + "string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], "string-width-cjs": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], @@ -3710,6 +4065,8 @@ "strip-final-newline": ["strip-final-newline@2.0.0", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="], + "strip-hex-prefix": ["strip-hex-prefix@1.0.0", "", { "dependencies": { "is-hex-prefixed": "1.0.0" } }, "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A=="], + "strip-indent": ["strip-indent@4.1.1", "", {}, "sha512-SlyRoSkdh1dYP0PzclLE7r0M9sgbFKKMFXpFRUMNuKhQSbC6VQIGzq3E0qsfvGJaUFJPGv6Ws1NZ/haTAjfbMA=="], "strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], @@ -3732,6 +4089,14 @@ "sync-fetch": ["sync-fetch@0.6.0", "", { "dependencies": { "node-fetch": "^3.3.2", "timeout-signal": "^2.0.0", "whatwg-mimetype": "^4.0.0" } }, "sha512-IELLEvzHuCfc1uTsshPK58ViSdNqXxlml1U+fmwJIKLYKOr/rAtBrorE2RYm5IHaMpDNlmC0fr1LAvdXvyheEQ=="], + "sync-request": ["sync-request@6.1.0", "", { "dependencies": { "http-response-object": "^3.0.1", "sync-rpc": "^1.2.1", "then-request": "^6.0.0" } }, "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw=="], + + "sync-rpc": ["sync-rpc@1.3.6", "", { "dependencies": { "get-port": "^3.1.0" } }, "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw=="], + + "table": ["table@6.9.0", "", { "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", "string-width": "^4.2.3", "strip-ansi": "^6.0.1" } }, "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A=="], + + "table-layout": ["table-layout@1.0.2", "", { "dependencies": { "array-back": "^4.0.1", "deep-extend": "~0.6.0", "typical": "^5.2.0", "wordwrapjs": "^4.0.0" } }, "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A=="], + "tailwind-merge": ["tailwind-merge@3.4.0", "", {}, "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g=="], "tailwindcss": ["tailwindcss@4.1.18", "", {}, "sha512-4+Z+0yiYyEtUVCScyfHCxOYP06L5Ne+JiHhY2IjR2KWMIWhJOYZKLSGZaP5HkZ8+bY0cxfzwDE5uOmzFXyIwxw=="], @@ -3750,6 +4115,8 @@ "text-table": ["text-table@0.2.0", "", {}, "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw=="], + "then-request": ["then-request@6.0.2", "", { "dependencies": { "@types/concat-stream": "^1.6.0", "@types/form-data": "0.0.33", "@types/node": "^8.0.0", "@types/qs": "^6.2.31", "caseless": "~0.12.0", "concat-stream": "^1.6.0", "form-data": "^2.2.0", "http-basic": "^8.1.1", "http-response-object": "^3.0.1", "promise": "^8.0.0", "qs": "^6.4.0" } }, "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA=="], + "thenify": ["thenify@3.3.1", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="], "thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="], @@ -3758,6 +4125,8 @@ "through": ["through@2.3.8", "", {}, "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="], + "through2": ["through2@4.0.2", "", { "dependencies": { "readable-stream": "3" } }, "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw=="], + "timeout-signal": ["timeout-signal@2.0.0", "", {}, "sha512-YBGpG4bWsHoPvofT6y/5iqulfXIiIErl5B0LdtHT1mGXDFTAhhRrbUpTvBgYbovr+3cKblya2WAOcpoy90XguA=="], "timers-browserify": ["timers-browserify@2.0.12", "", { "dependencies": { "setimmediate": "^1.0.4" } }, "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ=="], @@ -3784,6 +4153,8 @@ "title-case": ["title-case@3.0.3", "", { "dependencies": { "tslib": "^2.0.3" } }, "sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA=="], + "tmp": ["tmp@0.0.33", "", { "dependencies": { "os-tmpdir": "~1.0.2" } }, "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw=="], + "to-buffer": ["to-buffer@1.2.2", "", { "dependencies": { "isarray": "^2.0.5", "safe-buffer": "^5.2.1", "typed-array-buffer": "^1.0.3" } }, "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw=="], "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], @@ -3808,8 +4179,12 @@ "ts-api-utils": ["ts-api-utils@2.4.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA=="], + "ts-command-line-args": ["ts-command-line-args@2.5.1", "", { "dependencies": { "chalk": "^4.1.0", "command-line-args": "^5.1.1", "command-line-usage": "^6.1.0", "string-format": "^2.0.0" }, "bin": { "write-markdown": "dist/write-markdown.js" } }, "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw=="], + "ts-dedent": ["ts-dedent@2.2.0", "", {}, "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ=="], + "ts-essentials": ["ts-essentials@7.0.3", "", { "peerDependencies": { "typescript": ">=3.7.0" } }, "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ=="], + "ts-interface-checker": ["ts-interface-checker@0.1.13", "", {}, "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="], "ts-log": ["ts-log@2.2.7", "", {}, "sha512-320x5Ggei84AxzlXp91QkIGSw5wgaLT6GeAH0KsqDmRZdVWW2OiSeVvElVoatk3f7nicwXlElXsoFkARiGE2yg=="], @@ -3820,6 +4195,8 @@ "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + "tsort": ["tsort@0.0.1", "", {}, "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw=="], + "tsup": ["tsup@8.5.1", "", { "dependencies": { "bundle-require": "^5.1.0", "cac": "^6.7.14", "chokidar": "^4.0.3", "consola": "^3.4.0", "debug": "^4.4.0", "esbuild": "^0.27.0", "fix-dts-default-cjs-exports": "^1.0.0", "joycon": "^3.1.1", "picocolors": "^1.1.1", "postcss-load-config": "^6.0.1", "resolve-from": "^5.0.0", "rollup": "^4.34.8", "source-map": "^0.7.6", "sucrase": "^3.35.0", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.11", "tree-kill": "^1.2.2" }, "peerDependencies": { "@microsoft/api-extractor": "^7.36.0", "@swc/core": "^1", "postcss": "^8.4.12", "typescript": ">=4.5.0" }, "optionalPeers": ["@microsoft/api-extractor", "@swc/core", "postcss", "typescript"], "bin": { "tsup": "dist/cli-default.js", "tsup-node": "dist/cli-node.js" } }, "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing=="], "tsutils": ["tsutils@3.21.0", "", { "dependencies": { "tslib": "^1.8.1" }, "peerDependencies": { "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA=="], @@ -3836,10 +4213,14 @@ "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="], + "type-detect": ["type-detect@4.1.0", "", {}, "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw=="], + "type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="], "type-is": ["type-is@1.6.18", "", { "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" } }, "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g=="], + "typechain": ["typechain@8.3.2", "", { "dependencies": { "@types/prettier": "^2.1.1", "debug": "^4.3.1", "fs-extra": "^7.0.0", "glob": "7.1.7", "js-sha3": "^0.8.0", "lodash": "^4.17.15", "mkdirp": "^1.0.4", "prettier": "^2.3.1", "ts-command-line-args": "^2.2.0", "ts-essentials": "^7.0.1" }, "peerDependencies": { "typescript": ">=4.3.0" }, "bin": { "typechain": "dist/cli/cli.js" } }, "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q=="], + "typed-array-buffer": ["typed-array-buffer@1.0.3", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-typed-array": "^1.1.14" } }, "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw=="], "typed-array-byte-length": ["typed-array-byte-length@1.0.3", "", { "dependencies": { "call-bind": "^1.0.8", "for-each": "^0.3.3", "gopd": "^1.2.0", "has-proto": "^1.2.0", "is-typed-array": "^1.1.14" } }, "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg=="], @@ -3848,12 +4229,18 @@ "typed-array-length": ["typed-array-length@1.0.7", "", { "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "is-typed-array": "^1.1.13", "possible-typed-array-names": "^1.0.0", "reflect.getprototypeof": "^1.0.6" } }, "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg=="], + "typedarray": ["typedarray@0.0.6", "", {}, "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="], + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "typical": ["typical@4.0.0", "", {}, "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw=="], + "ua-parser-js": ["ua-parser-js@1.0.41", "", { "bin": { "ua-parser-js": "script/cli.js" } }, "sha512-LbBDqdIC5s8iROCUjMbW1f5dJQTEFB1+KO9ogbvlb3nm9n4YHa5p4KTvFPWvh2Hs8gZMBuiB1/8+pdfe/tDPug=="], "ufo": ["ufo@1.6.3", "", {}, "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q=="], + "uglify-js": ["uglify-js@3.19.3", "", { "bin": { "uglifyjs": "bin/uglifyjs" } }, "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ=="], + "uint8array-extras": ["uint8array-extras@1.5.0", "", {}, "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A=="], "uint8arrays": ["uint8arrays@3.1.1", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg=="], @@ -3872,6 +4259,8 @@ "underscore": ["underscore@1.13.7", "", {}, "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g=="], + "undici": ["undici@5.29.0", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg=="], + "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="], "unicode-canonical-property-names-ecmascript": ["unicode-canonical-property-names-ecmascript@2.0.1", "", {}, "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg=="], @@ -3914,6 +4303,8 @@ "utf-8-validate": ["utf-8-validate@5.0.10", "", { "dependencies": { "node-gyp-build": "^4.3.0" } }, "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ=="], + "utf8": ["utf8@3.0.0", "", {}, "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ=="], + "util": ["util@0.12.5", "", { "dependencies": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", "is-generator-function": "^1.0.7", "is-typed-array": "^1.1.3", "which-typed-array": "^1.1.2" } }, "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA=="], "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], @@ -4022,6 +4413,8 @@ "wide-align": ["wide-align@1.1.5", "", { "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } }, "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg=="], + "widest-line": ["widest-line@3.1.0", "", { "dependencies": { "string-width": "^4.0.0" } }, "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg=="], + "winston": ["winston@3.18.3", "", { "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.8", "async": "^3.2.3", "is-stream": "^2.0.0", "logform": "^2.7.0", "one-time": "^1.0.0", "readable-stream": "^3.4.0", "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", "winston-transport": "^4.9.0" } }, "sha512-NoBZauFNNWENgsnC9YpgyYwOVrl2m58PpQ8lNHjV3kosGs7KJ7Npk9pCUE+WJlawVSe8mykWDKWFSVfs3QO9ww=="], "winston-transport": ["winston-transport@4.9.0", "", { "dependencies": { "logform": "^2.7.0", "readable-stream": "^3.6.2", "triple-beam": "^1.3.0" } }, "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A=="], @@ -4030,13 +4423,19 @@ "word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="], + "wordwrap": ["wordwrap@1.0.0", "", {}, "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q=="], + + "wordwrapjs": ["wordwrapjs@4.0.1", "", { "dependencies": { "reduce-flatten": "^2.0.0", "typical": "^5.2.0" } }, "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA=="], + + "workerpool": ["workerpool@6.5.1", "", {}, "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA=="], + "wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="], "wrap-ansi-cjs": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], - "ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], "xmlhttprequest-ssl": ["xmlhttprequest-ssl@2.1.2", "", {}, "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ=="], @@ -4056,6 +4455,8 @@ "yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="], + "yargs-unparser": ["yargs-unparser@2.0.0", "", { "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" } }, "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA=="], + "yauzl": ["yauzl@3.2.0", "", { "dependencies": { "buffer-crc32": "~0.2.3", "pend": "~1.2.0" } }, "sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w=="], "yn": ["yn@3.1.1", "", {}, "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q=="], @@ -4068,19 +4469,15 @@ "zustand": ["zustand@5.0.10", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-U1AiltS1O9hSy3rul+Ub82ut2fqIAefiSuwECWt6jlMVUGejvf+5omLcRBSzqbRagSM3hQZbtzdeRc6QVScXTg=="], + "@ardatan/relay-compiler/immutable": ["immutable@3.7.6", "", {}, "sha512-AizQPcaofEtO11RZhPPHBOJRdo/20MKQF9mBLnVkBoyHi1/zXK8fzVdnEpSV9gxqtnh6Qomfp3F0xT5qP/vThw=="], + "@aws-crypto/sha256-browser/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="], "@aws-crypto/util/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="], - "@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - - "@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - - "@babel/helper-create-class-features-plugin/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + "@babel/generator/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], - "@babel/helper-create-regexp-features-plugin/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - - "@babel/preset-env/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + "@babel/helper-define-polyfill-provider/resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], "@base-org/account/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], @@ -4108,12 +4505,38 @@ "@coinbase/wallet-sdk/zustand": ["zustand@5.0.3", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg=="], - "@cspotcode/source-map-support/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="], - "@eslint/eslintrc/ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="], "@eslint/eslintrc/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + "@ethereumjs/common/@ethereumjs/util": ["@ethereumjs/util@8.1.0", "", { "dependencies": { "@ethereumjs/rlp": "^4.0.1", "ethereum-cryptography": "^2.0.0", "micro-ftch": "^0.3.1" } }, "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA=="], + + "@ethereumjs/tx/@ethereumjs/rlp": ["@ethereumjs/rlp@4.0.1", "", { "bin": { "rlp": "bin/rlp" } }, "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw=="], + + "@ethereumjs/tx/@ethereumjs/util": ["@ethereumjs/util@8.1.0", "", { "dependencies": { "@ethereumjs/rlp": "^4.0.1", "ethereum-cryptography": "^2.0.0", "micro-ftch": "^0.3.1" } }, "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA=="], + + "@ethereumjs/tx/ethereum-cryptography": ["ethereum-cryptography@2.2.1", "", { "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", "@scure/bip32": "1.4.0", "@scure/bip39": "1.3.0" } }, "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg=="], + + "@ethereumjs/util/ethereum-cryptography": ["ethereum-cryptography@2.2.1", "", { "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", "@scure/bip32": "1.4.0", "@scure/bip39": "1.3.0" } }, "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg=="], + + "@ethersproject/abi/@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + + "@ethersproject/contracts/@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + + "@ethersproject/hash/@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + + "@ethersproject/json-wallets/@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + + "@ethersproject/json-wallets/aes-js": ["aes-js@3.0.0", "", {}, "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw=="], + + "@ethersproject/providers/@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + + "@ethersproject/providers/ws": ["ws@8.18.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="], + + "@ethersproject/transactions/@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + + "@ethersproject/wallet/@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + "@graphql-codegen/add/tslib": ["tslib@2.6.3", "", {}, "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ=="], "@graphql-codegen/cli/listr2": ["listr2@4.0.5", "", { "dependencies": { "cli-truncate": "^2.1.0", "colorette": "^2.0.16", "log-update": "^4.0.0", "p-map": "^4.0.0", "rfdc": "^1.3.0", "rxjs": "^7.5.5", "through": "^2.3.8", "wrap-ansi": "^7.0.0" }, "peerDependencies": { "enquirer": ">= 2.3.0 < 3" }, "optionalPeers": ["enquirer"] }, "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA=="], @@ -4140,10 +4563,14 @@ "@graphql-tools/code-file-loader/@graphql-tools/utils": ["@graphql-tools/utils@11.0.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-bM1HeZdXA2C3LSIeLOnH/bcqSgbQgKEDrjxODjqi3y58xai2TkNrtYcQSoWzGbt9VMN1dORGjR7Vem8SPnUFQA=="], + "@graphql-tools/code-file-loader/globby": ["globby@11.1.0", "", { "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.2.9", "ignore": "^5.2.0", "merge2": "^1.4.1", "slash": "^3.0.0" } }, "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g=="], + "@graphql-tools/executor/@graphql-tools/utils": ["@graphql-tools/utils@11.0.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-bM1HeZdXA2C3LSIeLOnH/bcqSgbQgKEDrjxODjqi3y58xai2TkNrtYcQSoWzGbt9VMN1dORGjR7Vem8SPnUFQA=="], "@graphql-tools/executor-graphql-ws/@graphql-tools/executor-common": ["@graphql-tools/executor-common@0.0.6", "", { "dependencies": { "@envelop/core": "^5.3.0", "@graphql-tools/utils": "^10.9.1" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-JAH/R1zf77CSkpYATIJw+eOJwsbWocdDjY+avY7G+P5HCXxwQjAjWVkJI1QJBQYjPQDVxwf1fmTZlIN3VOadow=="], + "@graphql-tools/executor-graphql-ws/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "@graphql-tools/executor-legacy-ws/@graphql-tools/utils": ["@graphql-tools/utils@11.0.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-bM1HeZdXA2C3LSIeLOnH/bcqSgbQgKEDrjxODjqi3y58xai2TkNrtYcQSoWzGbt9VMN1dORGjR7Vem8SPnUFQA=="], "@graphql-tools/executor-legacy-ws/@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], @@ -4156,12 +4583,16 @@ "@graphql-tools/graphql-file-loader/@graphql-tools/utils": ["@graphql-tools/utils@11.0.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-bM1HeZdXA2C3LSIeLOnH/bcqSgbQgKEDrjxODjqi3y58xai2TkNrtYcQSoWzGbt9VMN1dORGjR7Vem8SPnUFQA=="], + "@graphql-tools/graphql-file-loader/globby": ["globby@11.1.0", "", { "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.2.9", "ignore": "^5.2.0", "merge2": "^1.4.1", "slash": "^3.0.0" } }, "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g=="], + "@graphql-tools/graphql-tag-pluck/@graphql-tools/utils": ["@graphql-tools/utils@11.0.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-bM1HeZdXA2C3LSIeLOnH/bcqSgbQgKEDrjxODjqi3y58xai2TkNrtYcQSoWzGbt9VMN1dORGjR7Vem8SPnUFQA=="], "@graphql-tools/import/@graphql-tools/utils": ["@graphql-tools/utils@11.0.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-bM1HeZdXA2C3LSIeLOnH/bcqSgbQgKEDrjxODjqi3y58xai2TkNrtYcQSoWzGbt9VMN1dORGjR7Vem8SPnUFQA=="], "@graphql-tools/json-file-loader/@graphql-tools/utils": ["@graphql-tools/utils@11.0.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-bM1HeZdXA2C3LSIeLOnH/bcqSgbQgKEDrjxODjqi3y58xai2TkNrtYcQSoWzGbt9VMN1dORGjR7Vem8SPnUFQA=="], + "@graphql-tools/json-file-loader/globby": ["globby@11.1.0", "", { "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.2.9", "ignore": "^5.2.0", "merge2": "^1.4.1", "slash": "^3.0.0" } }, "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g=="], + "@graphql-tools/load/@graphql-tools/utils": ["@graphql-tools/utils@11.0.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@whatwg-node/promise-helpers": "^1.0.0", "cross-inspect": "1.0.1", "tslib": "^2.4.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "sha512-bM1HeZdXA2C3LSIeLOnH/bcqSgbQgKEDrjxODjqi3y58xai2TkNrtYcQSoWzGbt9VMN1dORGjR7Vem8SPnUFQA=="], "@graphql-tools/load/p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], @@ -4178,6 +4609,8 @@ "@graphql-tools/url-loader/sync-fetch": ["sync-fetch@0.6.0-2", "", { "dependencies": { "node-fetch": "^3.3.2", "timeout-signal": "^2.0.0", "whatwg-mimetype": "^4.0.0" } }, "sha512-c7AfkZ9udatCuAy9RSfiGPpeOKKUAUK5e1cXadLOGUjasdxqYqAK0jTNkM/FSEyJ3a5Ra27j/tw/PS0qLmaF/A=="], + "@graphql-tools/url-loader/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "@humanwhocodes/config-array/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], "@inquirer/external-editor/iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="], @@ -4188,6 +4621,14 @@ "@isaacs/cliui/wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], + "@joshwooding/vite-plugin-react-docgen-typescript/glob": ["glob@10.5.0", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg=="], + + "@jridgewell/gen-mapping/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], + + "@jridgewell/remapping/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], + + "@mapbox/node-pre-gyp/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine": ["@metamask/json-rpc-engine@7.3.3", "", { "dependencies": { "@metamask/rpc-errors": "^6.2.1", "@metamask/safe-event-emitter": "^3.0.0", "@metamask/utils": "^8.3.0" } }, "sha512-dwZPq8wx9yV3IX2caLi9q9xZBw2XeIoYqdyihDDDpuHVCEiqadJLwqM3zy+uwf6F1QYQ65A8aOMQg1Uw7LMLNg=="], "@metamask/eth-json-rpc-provider/@metamask/utils": ["@metamask/utils@5.0.2", "", { "dependencies": { "@ethereumjs/tx": "^4.1.2", "@types/debug": "^4.1.7", "debug": "^4.3.4", "semver": "^7.3.8", "superstruct": "^1.0.3" } }, "sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g=="], @@ -4214,8 +4655,14 @@ "@metamask/sdk-communication-layer/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], + "@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], + "@nomicfoundation/hardhat-verify/@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + + "@nomicfoundation/hardhat-verify/cbor": ["cbor@8.1.0", "", { "dependencies": { "nofilter": "^3.1.0" } }, "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg=="], + "@paraspell/sdk-core/@scure/base": ["@scure/base@2.0.0", "", {}, "sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w=="], "@polkadot/rpc-provider/@polkadot/x-global": ["@polkadot/x-global@14.0.1", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-aCI44DJU4fU0XXqrrSGIpi7JrZXK2kpe0jaQ2p6oDVXOOYEnZYXnMhTTmBE1lF/xtxzX50MnZrrU87jziU0qbA=="], @@ -4234,6 +4681,8 @@ "@polkadot/x-ws/@polkadot/x-global": ["@polkadot/x-global@14.0.1", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-aCI44DJU4fU0XXqrrSGIpi7JrZXK2kpe0jaQ2p6oDVXOOYEnZYXnMhTTmBE1lF/xtxzX50MnZrrU87jziU0qbA=="], + "@polkadot/x-ws/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "@reown/appkit/@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.23.1", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.1", "@walletconnect/sign-client": "2.23.1", "@walletconnect/types": "2.23.1", "@walletconnect/utils": "2.23.1", "es-toolkit": "1.39.3", "events": "3.3.0" } }, "sha512-XlvG1clsL7Ds+g28Oz5dXsPA+5ERtQGYvd+L8cskMaTvtphGhipVGgX8WNAhp7p1gfNcDg4tCiTHlj131jctwA=="], "@reown/appkit/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], @@ -4254,22 +4703,40 @@ "@rushstack/node-core-library/fs-extra": ["fs-extra@11.3.3", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg=="], + "@rushstack/node-core-library/resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], + "@rushstack/node-core-library/semver": ["semver@7.5.4", "", { "dependencies": { "lru-cache": "^6.0.0" }, "bin": { "semver": "bin/semver.js" } }, "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA=="], "@safe-global/protocol-kit/@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], + "@safe-global/protocol-kit/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "@safe-global/safe-deployments/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@scure/bip39/@noble/hashes": ["@noble/hashes@2.0.1", "", {}, "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw=="], "@scure/bip39/@scure/base": ["@scure/base@2.0.0", "", {}, "sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w=="], - "@sentry/bundler-plugin-core/find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], - "@sentry/bundler-plugin-core/glob": ["glob@9.3.5", "", { "dependencies": { "fs.realpath": "^1.0.0", "minimatch": "^8.0.2", "minipass": "^4.2.4", "path-scurry": "^1.6.1" } }, "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q=="], "@sentry/bundler-plugin-core/magic-string": ["magic-string@0.30.8", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" } }, "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ=="], "@sentry/bundler-plugin-core/unplugin": ["unplugin@1.0.1", "", { "dependencies": { "acorn": "^8.8.1", "chokidar": "^3.5.3", "webpack-sources": "^3.2.3", "webpack-virtual-modules": "^0.5.0" } }, "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA=="], + "@sentry/hub/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], + + "@sentry/minimal/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], + + "@sentry/node/@sentry/core": ["@sentry/core@5.30.0", "", { "dependencies": { "@sentry/hub": "5.30.0", "@sentry/minimal": "5.30.0", "@sentry/types": "5.30.0", "@sentry/utils": "5.30.0", "tslib": "^1.9.3" } }, "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg=="], + + "@sentry/node/cookie": ["cookie@0.4.2", "", {}, "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA=="], + + "@sentry/node/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], + + "@sentry/tracing/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], + + "@sentry/utils/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], + "@sentry/vite-plugin/unplugin": ["unplugin@1.0.1", "", { "dependencies": { "acorn": "^8.8.1", "chokidar": "^3.5.3", "webpack-sources": "^3.2.3", "webpack-virtual-modules": "^0.5.0" } }, "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA=="], "@snowbridge/api/ethers": ["ethers@6.15.0", "", { "dependencies": { "@adraffy/ens-normalize": "1.10.1", "@noble/curves": "1.2.0", "@noble/hashes": "1.3.2", "@types/node": "22.7.5", "aes-js": "4.0.0-beta.5", "tslib": "2.7.0", "ws": "8.17.1" } }, "sha512-Kf/3ZW54L4UT0pZtsY/rf+EkBU7Qi5nnhonjUb8yTXcxH3cdcWrV2cRyk0Xk/4jK6OoHhxxZHriyhje20If2hQ=="], @@ -4308,10 +4775,18 @@ "@storybook/csf-plugin/unplugin": ["unplugin@1.16.1", "", { "dependencies": { "acorn": "^8.14.0", "webpack-virtual-modules": "^0.6.2" } }, "sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w=="], + "@storybook/react-vite/find-up": ["find-up@7.0.0", "", { "dependencies": { "locate-path": "^7.2.0", "path-exists": "^5.0.0", "unicorn-magic": "^0.1.0" } }, "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g=="], + + "@storybook/react-vite/resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], + "@supabase/realtime-js/@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], + "@supabase/realtime-js/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "@swc/cli/commander": ["commander@8.3.0", "", {}, "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="], + "@swc/cli/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@tailwindcss/node/jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.8.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.1.0", "tslib": "^2.4.0" }, "bundled": true }, "sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg=="], @@ -4336,10 +4811,20 @@ "@testing-library/dom/dom-accessibility-api": ["dom-accessibility-api@0.5.16", "", {}, "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg=="], + "@typechain/hardhat/fs-extra": ["fs-extra@9.1.0", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="], + + "@typescript-eslint/eslint-plugin/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@typescript-eslint/project-service/@typescript-eslint/types": ["@typescript-eslint/types@8.53.0", "", {}, "sha512-Bmh9KX31Vlxa13+PqPvt4RzKRN1XORYSLlAE+sO1i28NkisGbTtSLFVB3l7PWdHtR3E0mVMuC7JilWJ99m2HxQ=="], + "@typescript-eslint/typescript-estree/globby": ["globby@11.1.0", "", { "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.2.9", "ignore": "^5.2.0", "merge2": "^1.4.1", "slash": "^3.0.0" } }, "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g=="], + + "@typescript-eslint/typescript-estree/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@typescript-eslint/utils/eslint-scope": ["eslint-scope@5.1.1", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw=="], + "@typescript-eslint/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@vitest/mocker/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], "@wagmi/core/zustand": ["zustand@5.0.0", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ=="], @@ -4360,8 +4845,6 @@ "@walletconnect/jsonrpc-utils/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], - "@walletconnect/jsonrpc-ws-connection/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], - "@walletconnect/modal-core/valtio": ["valtio@1.11.2", "", { "dependencies": { "proxy-compare": "2.5.1", "use-sync-external-store": "1.2.0" }, "peerDependencies": { "@types/react": ">=16.8", "react": ">=16.8" }, "optionalPeers": ["@types/react", "react"] }, "sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw=="], "@walletconnect/modal-ui/lit": ["lit@2.8.0", "", { "dependencies": { "@lit/reactive-element": "^1.6.0", "lit-element": "^3.3.0", "lit-html": "^2.8.0" } }, "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA=="], @@ -4386,6 +4869,8 @@ "@walletconnect/window-metadata/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], + "@whatwg-node/node-fetch/@fastify/busboy": ["@fastify/busboy@3.2.0", "", {}, "sha512-m9FVDXU3GT2ITSe0UaMA5rU3QkfC/UXtCU8y0gSN/GugTqtVldOBWIB5V6V3sbmenVZUIpU6f+mPEO2+m5iTaA=="], + "@xhmikosr/downloader/content-disposition": ["content-disposition@0.5.4", "", { "dependencies": { "safe-buffer": "5.2.1" } }, "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ=="], "accepts/negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="], @@ -4398,26 +4883,42 @@ "axios-retry/is-retry-allowed": ["is-retry-allowed@2.2.0", "", {}, "sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg=="], - "babel-plugin-polyfill-corejs2/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + "babel-plugin-transform-vite-meta-glob/glob": ["glob@10.5.0", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg=="], "basic-auth/safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="], + "bin-version-check/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "bl/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="], "body-parser/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], "borsh/bs58": ["bs58@4.0.1", "", { "dependencies": { "base-x": "^3.0.2" } }, "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw=="], + "boxen/type-fest": ["type-fest@0.20.2", "", {}, "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ=="], + + "boxen/wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "browser-resolve/resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], + "browserify-sign/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="], + "bs58check/bs58": ["bs58@4.0.1", "", { "dependencies": { "base-x": "^3.0.2" } }, "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw=="], + "bson/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="], "cbw-sdk/clsx": ["clsx@1.2.1", "", {}, "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="], "cbw-sdk/preact": ["preact@10.28.2", "", {}, "sha512-lbteaWGzGHdlIuiJ0l2Jq454m6kcpI1zNje6d8MlGAFlYvP2GO4ibnat7P74Esfz4sPTdM6UxtTwh/d3pwM9JA=="], + "chai/deep-eql": ["deep-eql@5.0.2", "", {}, "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q=="], + + "chai-as-promised/check-error": ["check-error@1.0.3", "", { "dependencies": { "get-func-name": "^2.0.2" } }, "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg=="], + "chalk/supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], + "cli-table3/string-width": ["string-width@2.1.1", "", { "dependencies": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" } }, "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw=="], + "cli-truncate/string-width": ["string-width@8.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.0", "strip-ansi": "^7.1.0" } }, "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg=="], "cliui/wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], @@ -4426,8 +4927,16 @@ "color-string/color-name": ["color-name@2.1.0", "", {}, "sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg=="], + "command-line-usage/array-back": ["array-back@4.0.2", "", {}, "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg=="], + + "command-line-usage/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="], + + "command-line-usage/typical": ["typical@5.2.0", "", {}, "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg=="], + "compression/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + "concat-stream/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="], + "create-ecdh/bn.js": ["bn.js@4.12.2", "", {}, "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw=="], "decompress-response/mimic-response": ["mimic-response@3.1.0", "", {}, "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="], @@ -4440,11 +4949,21 @@ "editorconfig/minimatch": ["minimatch@9.0.1", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w=="], + "editorconfig/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "elliptic/bn.js": ["bn.js@4.12.2", "", {}, "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw=="], - "eslint/ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="], + "engine.io-client/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + + "escodegen/esprima": ["esprima@2.7.3", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A=="], - "eslint/find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], + "escodegen/estraverse": ["estraverse@1.9.3", "", {}, "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA=="], + + "escodegen/optionator": ["optionator@0.8.3", "", { "dependencies": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", "word-wrap": "~1.2.3" } }, "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA=="], + + "escodegen/source-map": ["source-map@0.2.0", "", { "dependencies": { "amdefine": ">=0.0.4" } }, "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA=="], + + "eslint/ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="], "eslint/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], @@ -4454,21 +4973,27 @@ "eslint-plugin-react/resolve": ["resolve@2.0.0-next.5", "", { "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA=="], - "eslint-plugin-react/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "eslint-plugin-storybook/@typescript-eslint/utils": ["@typescript-eslint/utils@8.53.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.53.0", "@typescript-eslint/types": "8.53.0", "@typescript-eslint/typescript-estree": "8.53.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-XDY4mXTez3Z1iRDI5mbRhH4DFSt46oaIFsLg+Zn97+sYrXACziXSQcSelMybnVZ5pa1P6xYkPr5cMJyunM1ZDA=="], "eth-block-tracker/@metamask/utils": ["@metamask/utils@5.0.2", "", { "dependencies": { "@ethereumjs/tx": "^4.1.2", "@types/debug": "^4.1.7", "debug": "^4.3.4", "semver": "^7.3.8", "superstruct": "^1.0.3" } }, "sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g=="], + "eth-block-tracker/pify": ["pify@3.0.0", "", {}, "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg=="], + + "eth-gas-reporter/@solidity-parser/parser": ["@solidity-parser/parser@0.14.5", "", { "dependencies": { "antlr4ts": "^0.5.0-alpha.4" } }, "sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg=="], + + "eth-gas-reporter/axios": ["axios@1.13.2", "", { "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA=="], + + "eth-gas-reporter/ethers": ["ethers@5.8.0", "", { "dependencies": { "@ethersproject/abi": "5.8.0", "@ethersproject/abstract-provider": "5.8.0", "@ethersproject/abstract-signer": "5.8.0", "@ethersproject/address": "5.8.0", "@ethersproject/base64": "5.8.0", "@ethersproject/basex": "5.8.0", "@ethersproject/bignumber": "5.8.0", "@ethersproject/bytes": "5.8.0", "@ethersproject/constants": "5.8.0", "@ethersproject/contracts": "5.8.0", "@ethersproject/hash": "5.8.0", "@ethersproject/hdnode": "5.8.0", "@ethersproject/json-wallets": "5.8.0", "@ethersproject/keccak256": "5.8.0", "@ethersproject/logger": "5.8.0", "@ethersproject/networks": "5.8.0", "@ethersproject/pbkdf2": "5.8.0", "@ethersproject/properties": "5.8.0", "@ethersproject/providers": "5.8.0", "@ethersproject/random": "5.8.0", "@ethersproject/rlp": "5.8.0", "@ethersproject/sha2": "5.8.0", "@ethersproject/signing-key": "5.8.0", "@ethersproject/solidity": "5.8.0", "@ethersproject/strings": "5.8.0", "@ethersproject/transactions": "5.8.0", "@ethersproject/units": "5.8.0", "@ethersproject/wallet": "5.8.0", "@ethersproject/web": "5.8.0", "@ethersproject/wordlists": "5.8.0" } }, "sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg=="], + "eth-json-rpc-filters/pify": ["pify@5.0.0", "", {}, "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA=="], - "ethereum-cryptography/@noble/curves": ["@noble/curves@1.4.2", "", { "dependencies": { "@noble/hashes": "1.4.0" } }, "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw=="], + "ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.2.0", "", {}, "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ=="], - "ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], + "ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.1.5", "", { "dependencies": { "@noble/hashes": "~1.2.0", "@noble/secp256k1": "~1.7.0", "@scure/base": "~1.1.0" } }, "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw=="], - "ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.4.0", "", { "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg=="], + "ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.1.1", "", { "dependencies": { "@noble/hashes": "~1.2.0", "@scure/base": "~1.1.0" } }, "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg=="], - "ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], + "ethereumjs-util/ethereum-cryptography": ["ethereum-cryptography@0.1.3", "", { "dependencies": { "@types/pbkdf2": "^3.0.0", "@types/secp256k1": "^4.0.1", "blakejs": "^1.1.0", "browserify-aes": "^1.2.0", "bs58check": "^2.1.2", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", "hash.js": "^1.1.7", "keccak": "^3.0.0", "pbkdf2": "^3.0.17", "randombytes": "^2.1.0", "safe-buffer": "^5.1.2", "scrypt-js": "^3.0.0", "secp256k1": "^4.0.1", "setimmediate": "^1.0.5" } }, "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ=="], "ethers/@noble/curves": ["@noble/curves@1.2.0", "", { "dependencies": { "@noble/hashes": "1.3.2" } }, "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw=="], @@ -4480,6 +5005,8 @@ "ethers/ws": ["ws@8.17.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ=="], + "ethjs-unit/bn.js": ["bn.js@4.11.6", "", {}, "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA=="], + "express/body-parser": ["body-parser@2.2.2", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^1.0.5", "debug": "^4.4.3", "http-errors": "^2.0.0", "iconv-lite": "^0.7.0", "on-finished": "^2.4.1", "qs": "^6.14.1", "raw-body": "^3.0.1", "type-is": "^2.0.1" } }, "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA=="], "express/cookie-signature": ["cookie-signature@1.2.2", "", {}, "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="], @@ -4488,6 +5015,8 @@ "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + "fbjs/promise": ["promise@7.3.1", "", { "dependencies": { "asap": "~2.0.3" } }, "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg=="], + "figures/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="], "foreground-child/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], @@ -4500,16 +5029,32 @@ "gaxios/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], - "glob/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], + "ghost-testrpc/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="], + + "glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "global-prefix/which": ["which@1.3.1", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "which": "./bin/which" } }, "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ=="], "globals/type-fest": ["type-fest@0.20.2", "", {}, "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ=="], + "globby/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], + "graphql-config/jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], + "graphql-ws/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "h3/cookie-es": ["cookie-es@1.2.2", "", {}, "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg=="], + "handlebars/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + + "hardhat/fs-extra": ["fs-extra@7.0.1", "", { "dependencies": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw=="], + + "hardhat/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], + "http-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], + "http-response-object/@types/node": ["@types/node@10.17.60", "", {}, "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw=="], + "import-fresh/resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="], "inquirer/wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="], @@ -4524,7 +5069,7 @@ "jayson/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], - "jayson/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], + "js-beautify/glob": ["glob@10.5.0", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg=="], "js-beautify/nopt": ["nopt@7.2.1", "", { "dependencies": { "abbrev": "^2.0.0" }, "bin": { "nopt": "bin/nopt.js" } }, "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w=="], @@ -4542,26 +5087,42 @@ "lru-cache/yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], - "make-dir/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "md5.js/hash-base": ["hash-base@3.1.2", "", { "dependencies": { "inherits": "^2.0.4", "readable-stream": "^2.3.8", "safe-buffer": "^5.2.1", "to-buffer": "^1.2.1" } }, "sha512-Bb33KbowVTIj5s7Ked1OsqHUeCpz//tPwR+E2zJgJKo9Z5XolZ9b6bdUgjmYlwnWhoOQKoTd1TYToZGn5mAYOg=="], "memoizee/is-promise": ["is-promise@2.2.2", "", {}, "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="], "method-override/debug": ["debug@3.1.0", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g=="], + "micro-eth-signer/@noble/curves": ["@noble/curves@1.8.1", "", { "dependencies": { "@noble/hashes": "1.7.1" } }, "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ=="], + + "micro-eth-signer/@noble/hashes": ["@noble/hashes@1.7.1", "", {}, "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ=="], + "micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], "miller-rabin/bn.js": ["bn.js@4.12.2", "", {}, "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw=="], "minizlib/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], + "mocha/chokidar": ["chokidar@3.6.0", "", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="], + + "mocha/diff": ["diff@5.2.2", "", {}, "sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A=="], + + "mocha/glob": ["glob@8.1.0", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^5.0.1", "once": "^1.3.0" } }, "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ=="], + + "mocha/minimatch": ["minimatch@5.1.9", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw=="], + + "mocha/yargs": ["yargs@16.2.0", "", { "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" } }, "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw=="], + + "mocha/yargs-parser": ["yargs-parser@20.2.9", "", {}, "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w=="], + "mongodb-connection-string-url/whatwg-url": ["whatwg-url@11.0.0", "", { "dependencies": { "tr46": "^3.0.0", "webidl-conversions": "^7.0.0" } }, "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ=="], "morgan/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], "morgan/on-finished": ["on-finished@2.3.0", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww=="], + "ndjson/split2": ["split2@3.2.2", "", { "dependencies": { "readable-stream": "^3.0.0" } }, "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg=="], + "node-stdlib-browser/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="], "node-stdlib-browser/punycode": ["punycode@1.4.1", "", {}, "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ=="], @@ -4576,20 +5137,22 @@ "nodemon/supports-color": ["supports-color@5.5.0", "", { "dependencies": { "has-flag": "^3.0.0" } }, "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow=="], + "nopt/abbrev": ["abbrev@1.1.1", "", {}, "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="], + + "number-to-bn/bn.js": ["bn.js@4.11.6", "", {}, "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA=="], + "obj-multiplex/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="], "ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], "ox/@scure/bip39": ["@scure/bip39@1.6.0", "", { "dependencies": { "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A=="], - "p-locate/p-limit": ["p-limit@4.0.0", "", { "dependencies": { "yocto-queue": "^1.0.0" } }, "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ=="], + "p-locate/p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], "path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], "path-scurry/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], - "pkg-dir/find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], - "porto/ox": ["ox@0.9.17", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.0.9", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-rKAnhzhRU3Xh3hiko+i1ZxywZ55eWQzeS/Q4HRKLx2PqfHOolisZHErSsJVipGlmQKHW5qwOED/GighEw9dbLg=="], "porto/zod": ["zod@4.3.5", "", {}, "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g=="], @@ -4602,10 +5165,18 @@ "qrcode/yargs": ["yargs@15.4.1", "", { "dependencies": { "cliui": "^6.0.0", "decamelize": "^1.2.0", "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^18.1.2" } }, "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A=="], + "react-docgen/resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], + "recast/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + "rechoir/resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], + + "recursive-readdir/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + "redent/strip-indent": ["strip-indent@3.0.0", "", { "dependencies": { "min-indent": "^1.0.0" } }, "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ=="], + "req-from/resolve-from": ["resolve-from@3.0.0", "", {}, "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw=="], + "rimraf/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], "ripemd160/hash-base": ["hash-base@3.1.2", "", { "dependencies": { "inherits": "^2.0.4", "readable-stream": "^2.3.8", "safe-buffer": "^5.2.1", "to-buffer": "^1.2.1" } }, "sha512-Bb33KbowVTIj5s7Ked1OsqHUeCpz//tPwR+E2zJgJKo9Z5XolZ9b6bdUgjmYlwnWhoOQKoTd1TYToZGn5mAYOg=="], @@ -4616,28 +5187,92 @@ "rpc-websockets/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], + "rpc-websockets/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + + "sc-istanbul/async": ["async@1.5.2", "", {}, "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w=="], + + "sc-istanbul/esprima": ["esprima@2.7.3", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A=="], + + "sc-istanbul/glob": ["glob@5.0.15", "", { "dependencies": { "inflight": "^1.0.4", "inherits": "2", "minimatch": "2 || 3", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA=="], + + "sc-istanbul/js-yaml": ["js-yaml@3.14.2", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg=="], + + "sc-istanbul/mkdirp": ["mkdirp@0.5.6", "", { "dependencies": { "minimist": "^1.2.6" }, "bin": { "mkdirp": "bin/cmd.js" } }, "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw=="], + + "sc-istanbul/nopt": ["nopt@3.0.6", "", { "dependencies": { "abbrev": "1" }, "bin": { "nopt": "./bin/nopt.js" } }, "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg=="], + + "sc-istanbul/resolve": ["resolve@1.1.7", "", {}, "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg=="], + + "sc-istanbul/supports-color": ["supports-color@3.2.3", "", { "dependencies": { "has-flag": "^1.0.0" } }, "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A=="], + + "sc-istanbul/which": ["which@1.3.1", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "which": "./bin/which" } }, "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ=="], + "seek-bzip/commander": ["commander@6.2.1", "", {}, "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA=="], + "semver-truncate/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "sequelize/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "sequelize/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], + "sequelize-cli/fs-extra": ["fs-extra@9.1.0", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="], + + "sequelize-cli/resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], + "sequelize-cli/umzug": ["umzug@2.3.0", "", { "dependencies": { "bluebird": "^3.7.2" } }, "sha512-Z274K+e8goZK8QJxmbRPhl89HPO1K+ORFtm6rySPhFKfKc5GHhqdzD0SGhSWHkzoXasqJuItdhorSvY7/Cgflw=="], "sequelize-cli/yargs": ["yargs@16.2.0", "", { "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" } }, "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw=="], + "shelljs/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], + "simple-update-notifier/semver": ["semver@7.0.0", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A=="], "slice-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], "slice-ansi/is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="], + "smoldot/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + + "solc/commander": ["commander@8.3.0", "", {}, "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="], + + "solc/semver": ["semver@5.7.2", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="], + + "solidity-coverage/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="], + + "solidity-coverage/fs-extra": ["fs-extra@8.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g=="], + + "solidity-coverage/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "solidity-coverage/web3-utils": ["web3-utils@1.10.4", "", { "dependencies": { "@ethereumjs/util": "^8.1.0", "bn.js": "^5.2.1", "ethereum-bloom-filters": "^1.0.6", "ethereum-cryptography": "^2.1.2", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", "randombytes": "^2.1.0", "utf8": "3.0.0" } }, "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A=="], + + "sort-keys/is-plain-obj": ["is-plain-obj@1.1.0", "", {}, "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg=="], + "source-map-support/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + "stacktrace-parser/type-fest": ["type-fest@0.7.1", "", {}, "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg=="], + + "storybook/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "storybook/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + + "strip-dirs/is-plain-obj": ["is-plain-obj@1.1.0", "", {}, "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg=="], + "strip-literal/js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="], "sucrase/commander": ["commander@4.1.1", "", {}, "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="], "sync-fetch/node-fetch": ["node-fetch@3.3.2", "", { "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", "formdata-polyfill": "^4.0.10" } }, "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA=="], + "table/slice-ansi": ["slice-ansi@4.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" } }, "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ=="], + + "table-layout/array-back": ["array-back@4.0.2", "", {}, "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg=="], + + "table-layout/typical": ["typical@5.2.0", "", {}, "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg=="], + + "then-request/@types/node": ["@types/node@8.10.66", "", {}, "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw=="], + + "then-request/form-data": ["form-data@2.5.5", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.2", "mime-types": "^2.1.35", "safe-buffer": "^5.2.1" } }, "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A=="], + "tsup/esbuild": ["esbuild@0.27.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.27.2", "@esbuild/android-arm": "0.27.2", "@esbuild/android-arm64": "0.27.2", "@esbuild/android-x64": "0.27.2", "@esbuild/darwin-arm64": "0.27.2", "@esbuild/darwin-x64": "0.27.2", "@esbuild/freebsd-arm64": "0.27.2", "@esbuild/freebsd-x64": "0.27.2", "@esbuild/linux-arm": "0.27.2", "@esbuild/linux-arm64": "0.27.2", "@esbuild/linux-ia32": "0.27.2", "@esbuild/linux-loong64": "0.27.2", "@esbuild/linux-mips64el": "0.27.2", "@esbuild/linux-ppc64": "0.27.2", "@esbuild/linux-riscv64": "0.27.2", "@esbuild/linux-s390x": "0.27.2", "@esbuild/linux-x64": "0.27.2", "@esbuild/netbsd-arm64": "0.27.2", "@esbuild/netbsd-x64": "0.27.2", "@esbuild/openbsd-arm64": "0.27.2", "@esbuild/openbsd-x64": "0.27.2", "@esbuild/openharmony-arm64": "0.27.2", "@esbuild/sunos-x64": "0.27.2", "@esbuild/win32-arm64": "0.27.2", "@esbuild/win32-ia32": "0.27.2", "@esbuild/win32-x64": "0.27.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw=="], "tsutils/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], @@ -4646,6 +5281,8 @@ "type-is/mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="], + "typechain/fs-extra": ["fs-extra@7.0.1", "", { "dependencies": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw=="], + "unbzip2-stream/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="], "unixify/normalize-path": ["normalize-path@2.1.1", "", { "dependencies": { "remove-trailing-separator": "^1.0.1" } }, "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w=="], @@ -4658,6 +5295,8 @@ "viem/@scure/bip39": ["@scure/bip39@1.6.0", "", { "dependencies": { "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A=="], + "viem/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "vortex-backend/@scure/bip39": ["@scure/bip39@1.6.0", "", { "dependencies": { "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A=="], "wagmi/use-sync-external-store": ["use-sync-external-store@1.4.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw=="], @@ -4666,12 +5305,22 @@ "web3-eth-abi/abitype": ["abitype@0.7.1", "", { "peerDependencies": { "typescript": ">=4.9.4", "zod": "^3 >=3.19.1" }, "optionalPeers": ["zod"] }, "sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ=="], - "web3-eth-contract/@ethereumjs/rlp": ["@ethereumjs/rlp@5.0.2", "", { "bin": { "rlp": "bin/rlp.cjs" } }, "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA=="], + "web3-eth-accounts/@ethereumjs/rlp": ["@ethereumjs/rlp@4.0.1", "", { "bin": { "rlp": "bin/rlp" } }, "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw=="], + + "web3-eth-accounts/ethereum-cryptography": ["ethereum-cryptography@2.2.1", "", { "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", "@scure/bip32": "1.4.0", "@scure/bip39": "1.3.0" } }, "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg=="], "web3-eth-ens/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], "web3-providers-http/cross-fetch": ["cross-fetch@4.1.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw=="], + "web3-providers-ws/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + + "web3-utils/ethereum-cryptography": ["ethereum-cryptography@2.2.1", "", { "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", "@scure/bip32": "1.4.0", "@scure/bip39": "1.3.0" } }, "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg=="], + + "web3-validator/ethereum-cryptography": ["ethereum-cryptography@2.2.1", "", { "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", "@scure/bip32": "1.4.0", "@scure/bip39": "1.3.0" } }, "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg=="], + + "wordwrapjs/typical": ["typical@5.2.0", "", {}, "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg=="], + "wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], "wrap-ansi/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], @@ -4704,6 +5353,26 @@ "@eslint/eslintrc/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + "@ethereumjs/common/@ethereumjs/util/@ethereumjs/rlp": ["@ethereumjs/rlp@4.0.1", "", { "bin": { "rlp": "bin/rlp" } }, "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw=="], + + "@ethereumjs/common/@ethereumjs/util/ethereum-cryptography": ["ethereum-cryptography@2.2.1", "", { "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", "@scure/bip32": "1.4.0", "@scure/bip39": "1.3.0" } }, "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg=="], + + "@ethereumjs/tx/ethereum-cryptography/@noble/curves": ["@noble/curves@1.4.2", "", { "dependencies": { "@noble/hashes": "1.4.0" } }, "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw=="], + + "@ethereumjs/tx/ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], + + "@ethereumjs/tx/ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.4.0", "", { "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg=="], + + "@ethereumjs/tx/ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], + + "@ethereumjs/util/ethereum-cryptography/@noble/curves": ["@noble/curves@1.4.2", "", { "dependencies": { "@noble/hashes": "1.4.0" } }, "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw=="], + + "@ethereumjs/util/ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], + + "@ethereumjs/util/ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.4.0", "", { "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg=="], + + "@ethereumjs/util/ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], + "@graphql-codegen/cli/listr2/cli-truncate": ["cli-truncate@2.1.0", "", { "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" } }, "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg=="], "@graphql-codegen/cli/listr2/log-update": ["log-update@4.0.0", "", { "dependencies": { "ansi-escapes": "^4.3.0", "cli-cursor": "^3.1.0", "slice-ansi": "^4.0.0", "wrap-ansi": "^6.2.0" } }, "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg=="], @@ -4726,20 +5395,30 @@ "@isaacs/cliui/wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + "@joshwooding/vite-plugin-react-docgen-typescript/glob/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], + "@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/rpc-errors": ["@metamask/rpc-errors@6.4.0", "", { "dependencies": { "@metamask/utils": "^9.0.0", "fast-safe-stringify": "^2.0.6" } }, "sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg=="], "@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/utils": ["@metamask/utils@8.5.0", "", { "dependencies": { "@ethereumjs/tx": "^4.2.0", "@metamask/superstruct": "^3.0.0", "@noble/hashes": "^1.3.1", "@scure/base": "^1.1.3", "@types/debug": "^4.1.7", "debug": "^4.3.4", "pony-cause": "^2.1.10", "semver": "^7.5.4", "uuid": "^9.0.1" } }, "sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ=="], + "@metamask/eth-json-rpc-provider/@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/eth-json-rpc-provider/@metamask/utils/superstruct": ["superstruct@1.0.4", "", {}, "sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ=="], "@metamask/json-rpc-engine/@metamask/rpc-errors/@metamask/utils": ["@metamask/utils@9.3.0", "", { "dependencies": { "@ethereumjs/tx": "^4.2.0", "@metamask/superstruct": "^3.1.0", "@noble/hashes": "^1.3.1", "@scure/base": "^1.1.3", "@types/debug": "^4.1.7", "debug": "^4.3.4", "pony-cause": "^2.1.10", "semver": "^7.5.4", "uuid": "^9.0.1" } }, "sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g=="], + "@metamask/json-rpc-engine/@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/json-rpc-engine/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], + "@metamask/json-rpc-middleware-stream/@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/json-rpc-middleware-stream/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], "@metamask/providers/@metamask/rpc-errors/@metamask/utils": ["@metamask/utils@9.3.0", "", { "dependencies": { "@ethereumjs/tx": "^4.2.0", "@metamask/superstruct": "^3.1.0", "@noble/hashes": "^1.3.1", "@scure/base": "^1.1.3", "@types/debug": "^4.1.7", "debug": "^4.3.4", "pony-cause": "^2.1.10", "semver": "^7.5.4", "uuid": "^9.0.1" } }, "sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g=="], + "@metamask/providers/@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/providers/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], "@metamask/sdk-communication-layer/debug/ms": ["ms@2.1.2", "", {}, "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="], @@ -4778,10 +5457,6 @@ "@rushstack/node-core-library/semver/lru-cache": ["lru-cache@6.0.0", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="], - "@sentry/bundler-plugin-core/find-up/locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], - - "@sentry/bundler-plugin-core/find-up/path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], - "@sentry/bundler-plugin-core/glob/minimatch": ["minimatch@8.0.4", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA=="], "@sentry/bundler-plugin-core/glob/minipass": ["minipass@4.2.8", "", {}, "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ=="], @@ -4818,6 +5493,10 @@ "@solana/web3.js/bs58/base-x": ["base-x@3.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA=="], + "@storybook/react-vite/find-up/locate-path": ["locate-path@7.2.0", "", { "dependencies": { "p-locate": "^6.0.0" } }, "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA=="], + + "@storybook/react-vite/find-up/path-exists": ["path-exists@5.0.0", "", {}, "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ=="], + "@tanstack/router-plugin/chokidar/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], "@tanstack/router-plugin/chokidar/readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="], @@ -4880,6 +5559,8 @@ "@walletconnect/utils/ox/@scure/bip39": ["@scure/bip39@1.6.0", "", { "dependencies": { "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A=="], + "babel-plugin-transform-vite-meta-glob/glob/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], + "body-parser/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], "borsh/bs58/base-x": ["base-x@3.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA=="], @@ -4890,12 +5571,36 @@ "browserify-sign/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], + "bs58check/bs58/base-x": ["base-x@3.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA=="], + + "cli-table3/string-width/is-fullwidth-code-point": ["is-fullwidth-code-point@2.0.0", "", {}, "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w=="], + + "cli-table3/string-width/strip-ansi": ["strip-ansi@4.0.0", "", { "dependencies": { "ansi-regex": "^3.0.0" } }, "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow=="], + "cli-truncate/string-width/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], "color/color-convert/color-name": ["color-name@2.1.0", "", {}, "sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg=="], + "command-line-usage/chalk/ansi-styles": ["ansi-styles@3.2.1", "", { "dependencies": { "color-convert": "^1.9.0" } }, "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA=="], + + "command-line-usage/chalk/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="], + + "command-line-usage/chalk/supports-color": ["supports-color@5.5.0", "", { "dependencies": { "has-flag": "^3.0.0" } }, "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow=="], + "compression/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], + "concat-stream/readable-stream/isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="], + + "concat-stream/readable-stream/safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="], + + "concat-stream/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], + + "escodegen/optionator/levn": ["levn@0.3.0", "", { "dependencies": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" } }, "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA=="], + + "escodegen/optionator/prelude-ls": ["prelude-ls@1.1.2", "", {}, "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w=="], + + "escodegen/optionator/type-check": ["type-check@0.3.2", "", { "dependencies": { "prelude-ls": "~1.1.2" } }, "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg=="], + "eslint-plugin-react/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], "eslint-plugin-storybook/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.53.0", "", { "dependencies": { "@typescript-eslint/types": "8.53.0", "@typescript-eslint/visitor-keys": "8.53.0" } }, "sha512-kWNj3l01eOGSdVBnfAF2K1BTh06WS0Yet6JUgb9Cmkqaz3Jlu0fdVUjj9UI8gPidBWSMqDIglmEXifSgDT/D0g=="], @@ -4906,14 +5611,14 @@ "eslint/ajv/json-schema-traverse": ["json-schema-traverse@0.4.1", "", {}, "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="], - "eslint/find-up/locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], - - "eslint/find-up/path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], - "eslint/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + "eth-block-tracker/@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "eth-block-tracker/@metamask/utils/superstruct": ["superstruct@1.0.4", "", {}, "sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ=="], + "eth-gas-reporter/ethers/@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + "ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], "ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], @@ -4930,8 +5635,24 @@ "gaxios/https-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], + "ghost-testrpc/chalk/ansi-styles": ["ansi-styles@3.2.1", "", { "dependencies": { "color-convert": "^1.9.0" } }, "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA=="], + + "ghost-testrpc/chalk/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="], + + "ghost-testrpc/chalk/supports-color": ["supports-color@5.5.0", "", { "dependencies": { "has-flag": "^3.0.0" } }, "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow=="], + + "glob/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + + "globby/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "hardhat/fs-extra/jsonfile": ["jsonfile@4.0.0", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="], + + "hardhat/fs-extra/universalify": ["universalify@0.1.2", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="], + "jayson/@types/ws/@types/node": ["@types/node@22.19.6", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-qm+G8HuG6hOHQigsi7VGuLjUVu6TtBo/F05zvX04Mw2uCg9Dv0Qxy3Qw7j41SidlTcl5D/5yg0SEZqOB+EqZnQ=="], + "js-beautify/glob/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], + "js-beautify/nopt/abbrev": ["abbrev@2.0.0", "", {}, "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ=="], "log-update/cli-cursor/restore-cursor": ["restore-cursor@5.1.0", "", { "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" } }, "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA=="], @@ -4942,6 +5663,12 @@ "method-override/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], + "mocha/chokidar/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + + "mocha/chokidar/readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="], + + "mocha/yargs/cliui": ["cliui@7.0.4", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ=="], + "mongodb-connection-string-url/whatwg-url/tr46": ["tr46@3.0.0", "", { "dependencies": { "punycode": "^2.1.1" } }, "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA=="], "mongodb-connection-string-url/whatwg-url/webidl-conversions": ["webidl-conversions@7.0.0", "", {}, "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="], @@ -4962,9 +5689,7 @@ "obj-multiplex/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], - "pkg-dir/find-up/locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], - - "pkg-dir/find-up/path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + "p-locate/p-limit/yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], "porto/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], @@ -4972,20 +5697,50 @@ "qrcode/yargs/cliui": ["cliui@6.0.0", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^6.2.0" } }, "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ=="], + "qrcode/yargs/decamelize": ["decamelize@1.2.0", "", {}, "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA=="], + "qrcode/yargs/find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], "qrcode/yargs/y18n": ["y18n@4.0.3", "", {}, "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ=="], "qrcode/yargs/yargs-parser": ["yargs-parser@18.1.3", "", { "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ=="], + "recursive-readdir/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + "rimraf/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], "ripemd160/hash-base/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="], + "sc-istanbul/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "sc-istanbul/js-yaml/esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], + + "sc-istanbul/nopt/abbrev": ["abbrev@1.1.1", "", {}, "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="], + + "sc-istanbul/supports-color/has-flag": ["has-flag@1.0.0", "", {}, "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA=="], + "sequelize-cli/yargs/cliui": ["cliui@7.0.4", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ=="], "sequelize-cli/yargs/yargs-parser": ["yargs-parser@20.2.9", "", {}, "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w=="], + "shelljs/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "solidity-coverage/chalk/ansi-styles": ["ansi-styles@3.2.1", "", { "dependencies": { "color-convert": "^1.9.0" } }, "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA=="], + + "solidity-coverage/chalk/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="], + + "solidity-coverage/chalk/supports-color": ["supports-color@5.5.0", "", { "dependencies": { "has-flag": "^3.0.0" } }, "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow=="], + + "solidity-coverage/fs-extra/jsonfile": ["jsonfile@4.0.0", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="], + + "solidity-coverage/fs-extra/universalify": ["universalify@0.1.2", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="], + + "solidity-coverage/web3-utils/@ethereumjs/util": ["@ethereumjs/util@8.1.0", "", { "dependencies": { "@ethereumjs/rlp": "^4.0.1", "ethereum-cryptography": "^2.0.0", "micro-ftch": "^0.3.1" } }, "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA=="], + + "solidity-coverage/web3-utils/ethereum-cryptography": ["ethereum-cryptography@2.2.1", "", { "dependencies": { "@noble/curves": "1.4.2", "@noble/hashes": "1.4.0", "@scure/bip32": "1.4.0", "@scure/bip39": "1.3.0" } }, "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg=="], + + "then-request/form-data/mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="], + "tsup/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.27.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw=="], "tsup/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.27.2", "", { "os": "android", "cpu": "arm" }, "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA=="], @@ -5092,10 +5847,38 @@ "type-is/mime-types/mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="], + "typechain/fs-extra/jsonfile": ["jsonfile@4.0.0", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="], + + "typechain/fs-extra/universalify": ["universalify@0.1.2", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="], + "unstorage/chokidar/readdirp": ["readdirp@5.0.0", "", {}, "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ=="], "wcwidth/defaults/clone": ["clone@1.0.4", "", {}, "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg=="], + "web3-eth-accounts/ethereum-cryptography/@noble/curves": ["@noble/curves@1.4.2", "", { "dependencies": { "@noble/hashes": "1.4.0" } }, "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw=="], + + "web3-eth-accounts/ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], + + "web3-eth-accounts/ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.4.0", "", { "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg=="], + + "web3-eth-accounts/ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], + + "web3-utils/ethereum-cryptography/@noble/curves": ["@noble/curves@1.4.2", "", { "dependencies": { "@noble/hashes": "1.4.0" } }, "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw=="], + + "web3-utils/ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], + + "web3-utils/ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.4.0", "", { "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg=="], + + "web3-utils/ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], + + "web3-validator/ethereum-cryptography/@noble/curves": ["@noble/curves@1.4.2", "", { "dependencies": { "@noble/hashes": "1.4.0" } }, "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw=="], + + "web3-validator/ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], + + "web3-validator/ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.4.0", "", { "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg=="], + + "web3-validator/ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], + "wrap-ansi/string-width/emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], "wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], @@ -5104,6 +5887,22 @@ "@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/is-array-buffer@2.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="], + "@ethereumjs/common/@ethereumjs/util/ethereum-cryptography/@noble/curves": ["@noble/curves@1.4.2", "", { "dependencies": { "@noble/hashes": "1.4.0" } }, "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw=="], + + "@ethereumjs/common/@ethereumjs/util/ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], + + "@ethereumjs/common/@ethereumjs/util/ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.4.0", "", { "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg=="], + + "@ethereumjs/common/@ethereumjs/util/ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], + + "@ethereumjs/tx/ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "@ethereumjs/tx/ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "@ethereumjs/util/ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "@ethereumjs/util/ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + "@graphql-codegen/cli/listr2/cli-truncate/slice-ansi": ["slice-ansi@3.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" } }, "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ=="], "@graphql-codegen/cli/listr2/log-update/slice-ansi": ["slice-ansi@4.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" } }, "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ=="], @@ -5112,10 +5911,16 @@ "@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/rpc-errors/@metamask/utils": ["@metamask/utils@9.3.0", "", { "dependencies": { "@ethereumjs/tx": "^4.2.0", "@metamask/superstruct": "^3.1.0", "@noble/hashes": "^1.3.1", "@scure/base": "^1.1.3", "@types/debug": "^4.1.7", "debug": "^4.3.4", "pony-cause": "^2.1.10", "semver": "^7.5.4", "uuid": "^9.0.1" } }, "sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g=="], + "@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], + "@metamask/json-rpc-engine/@metamask/rpc-errors/@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/json-rpc-engine/@metamask/rpc-errors/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], + "@metamask/providers/@metamask/rpc-errors/@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/providers/@metamask/rpc-errors/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], "@reown/appkit-adapter-wagmi/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core": ["@walletconnect/core@2.23.1", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "3.0.1", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.23.1", "@walletconnect/utils": "2.23.1", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.39.3", "events": "3.3.0", "uint8arrays": "3.1.1" } }, "sha512-fW48PIw41Q/LJW+q0msFogD/OcelkrrDONQMcpGw4C4Y6w+IvFKGEg+7dxGLKWx1g8QuHk/p6C9VEIV/tDsm5A=="], @@ -5142,8 +5947,6 @@ "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/ox": ["ox@0.9.3", "", { "dependencies": { "@adraffy/ens-normalize": "^1.11.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "1.9.1", "@noble/hashes": "^1.8.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "abitype": "^1.0.9", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-KzyJP+fPV4uhuuqrTZyok4DC7vFzi7HLUFiUNEmpbyh59htKWkOC98IONC1zgXJPbHAhQgqs6B0Z6StCGhmQvg=="], - "@sentry/bundler-plugin-core/find-up/locate-path/p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], - "@sentry/bundler-plugin-core/unplugin/chokidar/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], "@sentry/bundler-plugin-core/unplugin/chokidar/readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="], @@ -5156,6 +5959,8 @@ "@snowbridge/contract-types/ethers/@types/node/undici-types": ["undici-types@6.19.8", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="], + "@storybook/react-vite/find-up/locate-path/p-locate": ["p-locate@6.0.0", "", { "dependencies": { "p-limit": "^4.0.0" } }, "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw=="], + "@tanstack/router-plugin/chokidar/readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], "@walletconnect/ethereum-provider/@reown/appkit/@reown/appkit-utils/@walletconnect/logger": ["@walletconnect/logger@2.1.2", "", { "dependencies": { "@walletconnect/safe-json": "^1.0.2", "pino": "7.11.0" } }, "sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw=="], @@ -5188,13 +5993,25 @@ "@walletconnect/ethereum-provider/@walletconnect/universal-provider/@walletconnect/logger/pino": ["pino@7.11.0", "", { "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.0.0", "on-exit-leak-free": "^0.2.0", "pino-abstract-transport": "v0.5.0", "pino-std-serializers": "^4.0.0", "process-warning": "^1.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.1.0", "safe-stable-stringify": "^2.1.0", "sonic-boom": "^2.2.1", "thread-stream": "^0.15.1" }, "bin": { "pino": "bin.js" } }, "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg=="], + "cli-table3/string-width/strip-ansi/ansi-regex": ["ansi-regex@3.0.1", "", {}, "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw=="], + "cli-truncate/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "command-line-usage/chalk/ansi-styles/color-convert": ["color-convert@1.9.3", "", { "dependencies": { "color-name": "1.1.3" } }, "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="], + + "command-line-usage/chalk/supports-color/has-flag": ["has-flag@3.0.0", "", {}, "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="], + "eslint-plugin-storybook/@typescript-eslint/utils/@typescript-eslint/scope-manager/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.53.0", "", { "dependencies": { "@typescript-eslint/types": "8.53.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-LZ2NqIHFhvFwxG0qZeLL9DvdNAHPGCY5dIRwBhyYeU+LfLhcStE1ImjsuTG/WaVh3XysGaeLW8Rqq7cGkPCFvw=="], "eslint-plugin-storybook/@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.53.0", "", { "dependencies": { "@typescript-eslint/types": "8.53.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-LZ2NqIHFhvFwxG0qZeLL9DvdNAHPGCY5dIRwBhyYeU+LfLhcStE1ImjsuTG/WaVh3XysGaeLW8Rqq7cGkPCFvw=="], - "eslint/find-up/locate-path/p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], + "eslint-plugin-storybook/@typescript-eslint/utils/@typescript-eslint/typescript-estree/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "ghost-testrpc/chalk/ansi-styles/color-convert": ["color-convert@1.9.3", "", { "dependencies": { "color-name": "1.1.3" } }, "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="], + + "ghost-testrpc/chalk/supports-color/has-flag": ["has-flag@3.0.0", "", {}, "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="], + + "globby/glob/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], "log-update/cli-cursor/restore-cursor/onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="], @@ -5206,15 +6023,17 @@ "md5.js/hash-base/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], - "nodemon/chokidar/readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + "mocha/chokidar/readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], - "pkg-dir/find-up/locate-path/p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], + "mocha/yargs/cliui/wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "nodemon/chokidar/readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], "qrcode/yargs/cliui/wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="], "qrcode/yargs/find-up/locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="], - "qrcode/yargs/find-up/path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + "qrcode/yargs/yargs-parser/camelcase": ["camelcase@5.3.1", "", {}, "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="], "rimraf/glob/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], @@ -5224,8 +6043,46 @@ "ripemd160/hash-base/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], + "sc-istanbul/glob/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + "sequelize-cli/yargs/cliui/wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + "shelljs/glob/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + + "solidity-coverage/chalk/ansi-styles/color-convert": ["color-convert@1.9.3", "", { "dependencies": { "color-name": "1.1.3" } }, "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg=="], + + "solidity-coverage/chalk/supports-color/has-flag": ["has-flag@3.0.0", "", {}, "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="], + + "solidity-coverage/web3-utils/@ethereumjs/util/@ethereumjs/rlp": ["@ethereumjs/rlp@4.0.1", "", { "bin": { "rlp": "bin/rlp" } }, "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw=="], + + "solidity-coverage/web3-utils/ethereum-cryptography/@noble/curves": ["@noble/curves@1.4.2", "", { "dependencies": { "@noble/hashes": "1.4.0" } }, "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw=="], + + "solidity-coverage/web3-utils/ethereum-cryptography/@noble/hashes": ["@noble/hashes@1.4.0", "", {}, "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg=="], + + "solidity-coverage/web3-utils/ethereum-cryptography/@scure/bip32": ["@scure/bip32@1.4.0", "", { "dependencies": { "@noble/curves": "~1.4.0", "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg=="], + + "solidity-coverage/web3-utils/ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="], + + "then-request/form-data/mime-types/mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="], + + "web3-eth-accounts/ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "web3-eth-accounts/ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "web3-utils/ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "web3-utils/ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "web3-validator/ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "web3-validator/ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "@ethereumjs/common/@ethereumjs/util/ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "@ethereumjs/common/@ethereumjs/util/ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/rpc-errors/@metamask/utils/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/rpc-errors/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], "@reown/appkit-adapter-wagmi/@walletconnect/universal-provider/@walletconnect/utils/ox/@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="], @@ -5252,12 +6109,12 @@ "@reown/appkit/@walletconnect/universal-provider/@walletconnect/utils/ox/@scure/bip39": ["@scure/bip39@1.6.0", "", { "dependencies": { "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A=="], - "@sentry/bundler-plugin-core/find-up/locate-path/p-locate/p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], - "@sentry/bundler-plugin-core/unplugin/chokidar/readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], "@sentry/vite-plugin/unplugin/chokidar/readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + "@storybook/react-vite/find-up/locate-path/p-locate/p-limit": ["p-limit@4.0.0", "", { "dependencies": { "yocto-queue": "^1.0.0" } }, "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ=="], + "@walletconnect/ethereum-provider/@reown/appkit/@reown/appkit-utils/@walletconnect/logger/pino": ["pino@7.11.0", "", { "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.0.0", "on-exit-leak-free": "^0.2.0", "pino-abstract-transport": "v0.5.0", "pino-std-serializers": "^4.0.0", "process-warning": "^1.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.1.0", "safe-stable-stringify": "^2.1.0", "sonic-boom": "^2.2.1", "thread-stream": "^0.15.1" }, "bin": { "pino": "bin.js" } }, "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg=="], "@walletconnect/ethereum-provider/@reown/appkit/@reown/appkit-wallet/@walletconnect/logger/pino": ["pino@7.11.0", "", { "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.0.0", "on-exit-leak-free": "^0.2.0", "pino-abstract-transport": "v0.5.0", "pino-std-serializers": "^4.0.0", "process-warning": "^1.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.1.0", "safe-stable-stringify": "^2.1.0", "sonic-boom": "^2.2.1", "thread-stream": "^0.15.1" }, "bin": { "pino": "bin.js" } }, "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg=="], @@ -5318,17 +6175,21 @@ "@walletconnect/ethereum-provider/@walletconnect/universal-provider/@walletconnect/logger/pino/thread-stream": ["thread-stream@0.15.2", "", { "dependencies": { "real-require": "^0.1.0" } }, "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA=="], + "command-line-usage/chalk/ansi-styles/color-convert/color-name": ["color-name@1.1.3", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="], + "eslint-plugin-storybook/@typescript-eslint/utils/@typescript-eslint/scope-manager/@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@4.2.1", "", {}, "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ=="], "eslint-plugin-storybook/@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@4.2.1", "", {}, "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ=="], - "eslint/find-up/locate-path/p-locate/p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], - - "pkg-dir/find-up/locate-path/p-locate/p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], + "ghost-testrpc/chalk/ansi-styles/color-convert/color-name": ["color-name@1.1.3", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="], "qrcode/yargs/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="], - "@sentry/bundler-plugin-core/find-up/locate-path/p-locate/p-limit/yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + "solidity-coverage/chalk/ansi-styles/color-convert/color-name": ["color-name@1.1.3", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="], + + "solidity-coverage/web3-utils/ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], + + "solidity-coverage/web3-utils/ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="], "@walletconnect/ethereum-provider/@reown/appkit/@reown/appkit-utils/@walletconnect/logger/pino/on-exit-leak-free": ["on-exit-leak-free@0.2.0", "", {}, "sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg=="], @@ -5388,10 +6249,6 @@ "@walletconnect/ethereum-provider/@reown/appkit/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core/uint8arrays": ["uint8arrays@3.1.0", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog=="], - "eslint/find-up/locate-path/p-locate/p-limit/yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], - - "pkg-dir/find-up/locate-path/p-locate/p-limit/yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], - "qrcode/yargs/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="], } } diff --git a/contracts/README.md b/contracts/README.md new file mode 100644 index 000000000..23423fb7c --- /dev/null +++ b/contracts/README.md @@ -0,0 +1,17 @@ +# Contracts Workspace + +This directory contains smart-contract projects managed as Bun workspaces. + +## Structure + +- `contracts//` - Independent contract project (Hardhat, Foundry, etc.) + +## Conventions + +- Workspace package names: `@vortexfi/contracts-` +- Root scripts: `dev:contracts:`, `compile:contracts:`, `test:contracts:` +- Keep generated outputs out of git (`artifacts`, `cache`, and similar tool outputs) + +## Current projects + +- `relayer/` - Relayer contract project (Hardhat) diff --git a/contracts/relayer/.env.example b/contracts/relayer/.env.example new file mode 100644 index 000000000..841b95081 --- /dev/null +++ b/contracts/relayer/.env.example @@ -0,0 +1,5 @@ +# Polygon Amoy Testnet RPC +AMOY_RPC_URL=https://rpc-amoy.polygon.technology + +# Private key for deployment (DO NOT COMMIT THIS FILE!) +PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000000 diff --git a/contracts/relayer/SECURITY_AUDIT.md b/contracts/relayer/SECURITY_AUDIT.md new file mode 100644 index 000000000..00bb0fca9 --- /dev/null +++ b/contracts/relayer/SECURITY_AUDIT.md @@ -0,0 +1,332 @@ +# Security Audit Report — `TokenRelayer.sol` + +**Date:** 2026-03-04 +**Auditor:** AI Security Review +**Contract:** `TokenRelayer.sol` (175 lines, Solidity ^0.8.20) +**Scope:** Full contract review including signature verification, token handling, access control, and reentrancy vectors. + +--- + +## Summary + +The `TokenRelayer` contract acts as a meta-transaction relayer. It accepts an ERC-20 `permit` signature and a custom EIP-712 "Payload" signature, then: +1. Calls `permit()` to set a token allowance from `owner → relayer` +2. Calls `transferFrom()` to pull tokens into the relayer +3. Forwards an arbitrary `call` to a fixed `destinationContract` + +The contract has **several findings** ranging from critical to informational severity. + +| Severity | Count | +|---|---| +| 🔴 Critical | 2 | +| 🟠 High | 2 | +| 🟡 Medium | 3 | +| 🔵 Low | 2 | +| ⚪ Informational | 3 | + +--- + +## 🔴 Critical Findings + +### C-1: Reentrancy in `execute()` — State Changes After External Calls + +**Location:** Lines 62–97 (`execute` function) + +**Description:** +The function performs external calls (`permit`, `transferFrom`, `approve`, and the forwarded `destinationContract.call`) **before** marking the execution as completed on line 93: + +```solidity +executedCalls[keccak256(abi.encodePacked(owner, nonce))] = true; // line 93 +``` + +While the nonce is marked as used on line 69 (before external calls), the `executedCalls` mapping is updated after all external calls. More critically, the `_forwardCall` on line 89 makes a low-level `.call()` to an external contract with arbitrary `data`, which can trigger a reentrant call back into the relayer. + +**Impact:** If the `destinationContract` is malicious or compromised, it could reenter `execute()` with different parameters. The nonce check mitigates replay of the *same* nonce, but reentrancy could interact with other state in unexpected ways (e.g., draining residual token balances held by the contract). + +**Recommendation:** +- Add OpenZeppelin's `ReentrancyGuard` and apply the `nonReentrant` modifier to `execute()`. +- Move all state changes before external calls (Checks-Effects-Interactions pattern). + +```solidity +import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; + +contract TokenRelayer is ReentrancyGuard { + function execute(ExecuteParams calldata params) external payable nonReentrant returns (bool) { + // ... nonce + signature checks ... + + // Effects BEFORE interactions + executedCalls[keccak256(abi.encodePacked(owner, nonce))] = true; + + // Interactions + _executePermitAndSelfTransfer(...); + bool callSuccess = _forwardCall(params.payloadData, msg.value); + // ... + } +} +``` + +--- + +### C-2: Signature Malleability — Missing `s` Value Validation in `ecrecover` + +**Location:** Lines 123–127 (`_recoverSigner`) + +**Description:** +The `ecrecover` precompile is susceptible to **signature malleability**. For any valid signature `(v, r, s)`, there exists a second valid signature `(v', r, s')` where `s' = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s`. The contract does not validate that `s` is in the lower half of the curve order. + +An attacker who observes a valid signature in the mempool can compute the malleable counterpart. Although the nonce prevents **replay** of the exact same parameters, the malleable signature could be used in a front-running scenario — an attacker submits the transaction with the alternate signature before the legitimate relayer, potentially causing the relayer's transaction to revert (griefing). + +**Impact:** Signature griefing / front-running. The relayer's legitimate transaction can be front-run and replaced by an attacker using the malleable signature. + +**Recommendation:** +Use OpenZeppelin's `ECDSA.recover()` which enforces `s` to be in the lower half of the secp256k1 curve: + +```solidity +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; + +function _recoverSigner(bytes32 digest, uint8 v, bytes32 r, bytes32 s) private pure returns (address) { + return ECDSA.recover(digest, v, r, s); +} +``` + +--- + +## 🟠 High Findings + +### H-1: Unlimited Token Approval to `destinationContract` + +**Location:** Lines 148–152 (`_executePermitAndSelfTransfer`) + +```solidity +if (!tokenApproved[token]) { + IERC20(token).approve(destinationContract, type(uint256).max); + tokenApproved[token] = true; +} +``` + +**Description:** +The relayer approves `type(uint256).max` tokens to the `destinationContract` the first time any token is used. This is a **permanent, unlimited approval**. If the `destinationContract` is upgradeable (proxy pattern), compromised, or has any vulnerability, it can drain **all tokens of every approved type** held by the relayer at any point in the future. + +**Impact:** Total loss of all tokens held by the relayer contract if `destinationContract` is ever compromised. + +**Recommendation:** +Approve only the exact amount needed per transaction instead of `type(uint256).max`: + +```solidity +IERC20(token).approve(destinationContract, 0); // reset first (for tokens like USDT) +IERC20(token).approve(destinationContract, value); +``` + +Or revoke the approval after the forwarded call completes: + +```solidity +IERC20(token).approve(destinationContract, value); +_forwardCall(params.payloadData, msg.value); +IERC20(token).approve(destinationContract, 0); // revoke +``` + +--- + +### H-2: Arbitrary Call Execution — No Payload Data Validation + +**Location:** Lines 156–158 (`_forwardCall`) + +```solidity +function _forwardCall(bytes memory data, uint256 value) internal returns (bool) { + (bool success, ) = destinationContract.call{value: value}(data); + return success; +} +``` + +**Description:** +The forwarded call sends **arbitrary calldata** to the `destinationContract`. The only constraint is that the `owner` signed the payload, but there is no validation of *what* the payload does. The signed payload includes `destination` in the EIP-712 struct, but **this `destination` field is never checked against `destinationContract`** — it is only hashed into the digest for signature verification. + +This means: +- The user signs a payload specifying `destination: 0xABC`, but the contract always forwards to the immutable `destinationContract`, regardless of what was signed. +- If the user believes their signed payload targets a specific contract but the relayer's `destinationContract` is different, the signed data would be executed on an unintended target. + +**Impact:** User intent mismatch. The signed `destination` field provides no actual routing guarantee. Users may be misled about which contract will execute their data. + +**Recommendation:** +Either: +1. Verify that the signed `destination` matches `destinationContract`: +```solidity +// In _computeDigest or execute: +require(signedDestination == destinationContract, "Destination mismatch"); +``` +2. Or remove `destination` from the signed payload struct if it's always `destinationContract`. + +--- + +## 🟡 Medium Findings + +### M-1: No `receive()` or `fallback()` — ETH Can Be Trapped + +**Location:** Contract-wide + +**Description:** +The `execute()` function is `payable` and forwards `msg.value` via `_forwardCall`. However, if the forwarded call returns **less ETH than was sent** (partial refund) or if ETH is sent to the contract by any other means, there is **no mechanism to recover native ETH**. The contract has no `receive()` function, no `fallback()`, and the `withdrawToken()` function only handles ERC-20 tokens. + +**Impact:** Native ETH sent to or trapped in the contract is permanently lost. + +**Recommendation:** +Add an ETH withdrawal function for the deployer: + +```solidity +function withdrawETH(uint256 amount) external { + require(msg.sender == deployer, "Only deployer"); + (bool success, ) = deployer.call{value: amount}(""); + require(success, "ETH transfer failed"); +} + +receive() external payable {} +``` + +--- + +### M-2: `permit()` Front-Running / DoS Vector + +**Location:** Line 143 (`_executePermitAndSelfTransfer`) + +```solidity +IERC20Permit(token).permit(owner, address(this), value, deadline, v, r, s); +``` + +**Description:** +The `permit()` call can be front-run. An attacker who sees the transaction in the mempool can extract the permit signature and call `permit()` directly on the token contract before the relayer's transaction executes. When the relayer's `execute()` then calls `permit()`, it will **revert** because the nonce has already been consumed. + +This is a known issue with ERC-2612 permit. The actual allowance is still set correctly (the front-runner sets it), but the relayer's transaction reverts, causing a DoS. + +**Impact:** Griefing / DoS — legitimate relayer transactions can be blocked. + +**Recommendation:** +Wrap the `permit()` call in a try-catch so that if it reverts (because someone front-ran it), the function can still proceed if the allowance is already sufficient: + +```solidity +try IERC20Permit(token).permit(owner, address(this), value, deadline, v, r, s) { + // permit succeeded +} catch { + // permit was front-run, check allowance is sufficient + require( + IERC20(token).allowance(owner, address(this)) >= value, + "Permit failed and insufficient allowance" + ); +} +``` + +--- + +### M-3: Missing `payloadValue` in Test ABI — Potential Integration Bug + +**Location:** Test file `relayer-execution.ts`, line 73–101 + +**Description:** +The test ABI for `tokenRelayerAbi` is **missing the `payloadValue` field** in the `ExecuteParams` struct. The actual contract expects a `payloadValue` field (line 42 in the contract), but the test ABI omits it. This means the test is constructing transactions with an incorrect ABI, which would either fail at runtime or encode data incorrectly. + +**Impact:** Tests may not accurately validate the contract's behavior, masking bugs. + +**Recommendation:** +Update the test ABI to include `{ name: "payloadValue", type: "uint256" }` in the struct components, between `payloadData` and `payloadNonce`. + +--- + +## 🔵 Low Findings + +### L-1: Redundant `executedCalls` Mapping + +**Location:** Lines 30 and 93 + +**Description:** +The `executedCalls` mapping tracks `keccak256(owner, nonce) → bool`, but the `usedPayloadNonces` mapping on line 29 already tracks `owner → nonce → bool` and is checked first (line 67). Both store essentially the same information — whether a given `(owner, nonce)` pair has been used. + +**Impact:** Unnecessary gas cost (~20,000 gas for SSTORE) on every `execute()` call. No security impact, but adds code complexity and gas overhead. + +**Recommendation:** +Remove `executedCalls` and use `usedPayloadNonces` for the `isExecutionCompleted` query: + +```solidity +function isExecutionCompleted(address signer, uint256 nonce) external view returns (bool) { + return usedPayloadNonces[signer][nonce]; +} +``` + +--- + +### L-2: No Event for `withdrawToken` + +**Location:** Lines 166–169 + +**Description:** +The `withdrawToken()` function transfers tokens to the deployer but emits no event. This makes it harder to monitor and audit token movements from the contract. + +**Recommendation:** +Add an event: + +```solidity +event TokenWithdrawn(address indexed token, uint256 amount, address indexed to); + +function withdrawToken(address token, uint256 amount) external { + require(msg.sender == deployer, "Only deployer"); + require(IERC20(token).transfer(deployer, amount), "Transfer failed"); + emit TokenWithdrawn(token, amount, deployer); +} +``` + +--- + +## ⚪ Informational Findings + +### I-1: No Access Control Library Used + +The contract rolls its own deployer-based access control (`deployer` + manual `require` checks) instead of using OpenZeppelin's `Ownable` or `AccessControl`. While functionally correct for a single-admin pattern, using a battle-tested library reduces risk of mistakes and provides standard interfaces (e.g., ownership transfer). + +--- + +### I-2: `execute()` Returns Redundant Value + +The `execute()` function returns `callSuccess` (line 96), but line 90 already `require(callSuccess, ...)`. If the call fails, the function reverts, so it can only ever return `true`. The return value is misleading. + +**Recommendation:** Either remove the return value or remove the require and let callers handle failures. + +--- + +### I-3: Consider Using EIP-712 Helpers from OpenZeppelin + +The contract manually constructs the EIP-712 domain separator and digest. OpenZeppelin provides `EIP712` abstract contract that handles domain separator caching, chain ID changes on forks, and proper hashing — reducing the surface area for bugs. + +```solidity +import "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; + +contract TokenRelayer is EIP712 { + constructor(address _dest) EIP712("TokenRelayer", "1") { + // ... + } +} +``` + +--- + +## Recommendations Summary + +| # | Finding | Severity | Fix Effort | +|---|---|---|---| +| C-1 | Add `ReentrancyGuard` + CEI pattern | 🔴 Critical | Low | +| C-2 | Use OZ `ECDSA.recover()` for malleability protection | 🔴 Critical | Low | +| H-1 | Replace `type(uint256).max` approval with exact amounts | 🟠 High | Low | +| H-2 | Validate signed `destination` matches `destinationContract` | 🟠 High | Low | +| M-1 | Add ETH recovery mechanism | 🟡 Medium | Low | +| M-2 | Wrap `permit()` in try-catch for front-run resilience | 🟡 Medium | Low | +| M-3 | Fix test ABI to include `payloadValue` | 🟡 Medium | Low | +| L-1 | Remove redundant `executedCalls` mapping | 🔵 Low | Low | +| L-2 | Add event to `withdrawToken` | 🔵 Low | Low | +| I-1 | Use OpenZeppelin `Ownable` | ⚪ Info | Low | +| I-2 | Remove redundant return from `execute()` | ⚪ Info | Low | +| I-3 | Use OpenZeppelin `EIP712` helper | ⚪ Info | Medium | + +--- + +> [!CAUTION] +> **C-1 (Reentrancy)** and **C-2 (Signature Malleability)** should be addressed before any mainnet deployment. Both have low fix effort and high impact. + +> [!WARNING] +> **H-1 (Unlimited Approval)** is particularly dangerous if `destinationContract` is upgradeable or could be compromised in the future. diff --git a/contracts/relayer/contracts/TokenRelayer.sol b/contracts/relayer/contracts/TokenRelayer.sol new file mode 100644 index 000000000..828417656 --- /dev/null +++ b/contracts/relayer/contracts/TokenRelayer.sol @@ -0,0 +1,218 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.28; + +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; +import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; + +/** + * @title TokenRelayer + * @notice A relayer contract that accepts ERC20 permit signatures and executes + * arbitrary calls to a destination contract, both authorized via signature. + * + * Flow: + * 1. User signs a permit allowing the relayer to spend their tokens + * 2. User signs a payload (e.g., transfer from relayer to another user) + * 3. Relayer: + * a. Executes permit to approve the tokens + * b. Transfers tokens from user to relayer (via transferFrom) + * c. Forwards the payload call (transfer from relayer to another user) + */ +contract TokenRelayer is Ownable, ReentrancyGuard, EIP712 { + using SafeERC20 for IERC20; + + // Using OZ EIP712 for domain separator management + bytes32 private constant _TYPE_HASH_PAYLOAD = keccak256( + "Payload(address destination,address owner,address token,uint256 value,bytes data,uint256 ethValue,uint256 nonce,uint256 deadline)" + ); + + address public immutable destinationContract; + + mapping(address => mapping(uint256 => bool)) public usedPayloadNonces; + // Removed redundant executedCalls mapping — usedPayloadNonces is sufficient + + struct ExecuteParams { + address token; + address owner; + uint256 value; + uint256 deadline; + uint8 permitV; + bytes32 permitR; + bytes32 permitS; + bytes payloadData; + uint256 payloadValue; + uint256 payloadNonce; + uint256 payloadDeadline; + uint8 payloadV; + bytes32 payloadR; + bytes32 payloadS; + } + + event RelayerExecuted( + address indexed signer, + address indexed token, + uint256 amount + ); + + // Events for withdrawal operations + event TokenWithdrawn(address indexed token, uint256 amount, address indexed to); + event ETHWithdrawn(uint256 amount, address indexed to); + + // Ownable constructor sets deployer as owner; EIP712 constructor + constructor(address _destinationContract) + Ownable(msg.sender) + EIP712("TokenRelayer", "1") + { + require(_destinationContract != address(0), "Invalid destination"); + destinationContract = _destinationContract; + } + + // Allow contract to receive ETH (e.g., refunds from destination) + receive() external payable {} + + // nonReentrant modifier prevents reentrancy via _forwardCall + // Removed redundant bool return — function reverts on failure + function execute(ExecuteParams calldata params) external payable nonReentrant { + address owner = params.owner; + uint256 nonce = params.payloadNonce; + + // --- Checks --- + require(owner != address(0), "Invalid owner"); + require(params.token != address(0), "Invalid token"); + require(!usedPayloadNonces[owner][nonce], "Nonce used"); + require(block.timestamp <= params.payloadDeadline, "Payload expired"); + + // Verify payload signature and validate signed destination + bytes32 digest = _computeDigest( + owner, + params.token, + params.value, + params.payloadData, + params.payloadValue, + nonce, + params.payloadDeadline + ); + // Using ECDSA.recover() which enforces low-s and rejects address(0) + require(ECDSA.recover(digest, params.payloadV, params.payloadR, params.payloadS) == owner, "Invalid sig"); + + require(msg.value == params.payloadValue, "Incorrect ETH value provided"); + + // --- Effects (before interactions per CEI pattern) --- + // State changes before any external calls + usedPayloadNonces[owner][nonce] = true; + + // --- Interactions --- + // permit wrapped in try-catch for front-run resilience + _executePermitAndTransfer( + params.token, + owner, + params.value, + params.deadline, + params.permitV, + params.permitR, + params.permitS + ); + + // Approve exact amount, forward call, then revoke + IERC20(params.token).forceApprove(destinationContract, params.value); + + bool callSuccess = _forwardCall(params.payloadData, msg.value); + require(callSuccess, "Call failed"); + + // Revoke approval after the call to prevent residual allowance + IERC20(params.token).forceApprove(destinationContract, 0); + + emit RelayerExecuted(owner, params.token, params.value); + } + + // Using inherited _hashTypedDataV4 from OZ EIP712 + function _computeDigest( + address owner, + address token, + uint256 value, + bytes memory data, + uint256 ethValue, + uint256 nonce, + uint256 deadline + ) private view returns (bytes32) { + return _hashTypedDataV4( + keccak256(abi.encode( + _TYPE_HASH_PAYLOAD, + destinationContract, // [H-2] destination is always destinationContract + owner, + token, + value, + keccak256(data), + ethValue, + nonce, + deadline + )) + ); + } + + /** + * @dev Execute permit approval and then transfer tokens from owner to self (relayer). + * Permit is wrapped in try-catch: if it was front-run, we check + * that the allowance is already sufficient before proceeding. + */ + function _executePermitAndTransfer( + address token, + address owner, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) internal { + // Wrap permit in try-catch for front-run resilience + try IERC20Permit(token).permit(owner, address(this), value, deadline, v, r, s) { + // permit succeeded + } catch { + // permit was front-run, verify allowance is sufficient + require( + IERC20(token).allowance(owner, address(this)) >= value, + "Permit failed and insufficient allowance" + ); + } + + // Transfer tokens from owner to this contract + IERC20(token).safeTransferFrom(owner, address(this), value); + } + + function _forwardCall(bytes memory data, uint256 value) internal returns (bool) { + (bool success, ) = destinationContract.call{value: value}(data); + return success; + } + + /** + * @notice Allows the owner to recover any ERC20 tokens held by this contract. + * @param token The ERC20 token contract address. + * @param amount The amount of tokens to transfer to the owner. + */ + // Using Ownable's onlyOwner instead of manual deployer check + // Added TokenWithdrawn event + function withdrawToken(address token, uint256 amount) external onlyOwner { + IERC20(token).safeTransfer(owner(), amount); + emit TokenWithdrawn(token, amount, owner()); + } + + /** + * @notice Allows the owner to recover any native ETH held by this contract. + * @param amount The amount of ETH to transfer to the owner. + */ + // ETH recovery function + function withdrawETH(uint256 amount) external onlyOwner { + (bool success, ) = owner().call{value: amount}(""); + require(success, "ETH transfer failed"); + emit ETHWithdrawn(amount, owner()); + } + + // Using usedPayloadNonces instead of redundant executedCalls + function isExecutionCompleted(address signer, uint256 nonce) external view returns (bool) { + return usedPayloadNonces[signer][nonce]; + } +} diff --git a/contracts/relayer/hardhat.config.ts b/contracts/relayer/hardhat.config.ts new file mode 100644 index 000000000..e7dcc85af --- /dev/null +++ b/contracts/relayer/hardhat.config.ts @@ -0,0 +1,43 @@ +import { HardhatUserConfig } from "hardhat/config"; +import "@nomicfoundation/hardhat-toolbox"; +import "dotenv/config"; + +const config: HardhatUserConfig = { + networks: { + amoy: { + accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [], + chainId: 80002, + url: process.env.AMOY_RPC_URL || "https://rpc-amoy.polygon.technology" + }, + arbitrum: { + accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [], + chainId: 42161, + url: process.env.ARBITRUM_RPC_URL || "https://arb1.arbitrum.io/rpc" + }, + base: { + accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [], + chainId: 8453, + url: process.env.BASE_RPC_URL || "https://mainnet.base.org" + }, + hardhat: { + chainId: 80002 + }, + polygon: { + accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [], + chainId: 137, + url: process.env.POLYGON_RPC_URL || "https://polygon.drpc.org" + } + }, + solidity: { + settings: { + evmVersion: "cancun", + optimizer: { + enabled: true, + runs: 200 + } + }, + version: "0.8.28" + } +}; + +export default config; diff --git a/contracts/relayer/ignition/deployments/chain-137/artifacts/TokenRelayer#TokenRelayer.dbg.json b/contracts/relayer/ignition/deployments/chain-137/artifacts/TokenRelayer#TokenRelayer.dbg.json new file mode 100644 index 000000000..14933beb6 --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-137/artifacts/TokenRelayer#TokenRelayer.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/1f88a3ad5921d6bc8b511a85d672df5a.json" +} diff --git a/contracts/relayer/ignition/deployments/chain-137/artifacts/TokenRelayer#TokenRelayer.json b/contracts/relayer/ignition/deployments/chain-137/artifacts/TokenRelayer#TokenRelayer.json new file mode 100644 index 000000000..007aaf524 --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-137/artifacts/TokenRelayer#TokenRelayer.json @@ -0,0 +1,454 @@ +{ + "_format": "hh-sol-artifact-1", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_destinationContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "ETHWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RelayerExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "TokenWithdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "destinationContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "permitV", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "permitR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "permitS", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "payloadData", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "payloadValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloadNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloadDeadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "payloadV", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "payloadR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "payloadS", + "type": "bytes32" + } + ], + "internalType": "struct TokenRelayer.ExecuteParams", + "name": "params", + "type": "tuple" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "isExecutionCompleted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "usedPayloadNonces", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x610180604052348015610010575f5ffd5b50604051611a4d380380611a4d83398101604081905261002f91610294565b604080518082018252600c81526b2a37b5b2b72932b630bcb2b960a11b602080830191909152825180840190935260018352603160f81b9083015290338061009157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61009a816101d6565b5060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00556100ca826001610225565b610120526100d9816002610225565b61014052815160208084019190912060e052815190820120610100524660a05261016560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166101c45760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642064657374696e6174696f6e000000000000000000000000006044820152606401610088565b6001600160a01b03166101605261046b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6020835110156102405761023983610257565b9050610251565b8161024b8482610359565b5060ff90505b92915050565b5f5f829050601f81511115610281578260405163305a27a960e01b81526004016100889190610413565b805161028c82610448565b179392505050565b5f602082840312156102a4575f5ffd5b81516001600160a01b03811681146102ba575f5ffd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102e957607f821691505b60208210810361030757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561035457805f5260205f20601f840160051c810160208510156103325750805b601f840160051c820191505b81811015610351575f815560010161033e565b50505b505050565b81516001600160401b03811115610372576103726102c1565b6103868161038084546102d5565b8461030d565b6020601f8211600181146103b8575f83156103a15750848201515b5f19600385901b1c1916600184901b178455610351565b5f84815260208120601f198516915b828110156103e757878501518255602094850194600190920191016103c7565b508482101561040457868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610307575f1960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161156c6104e15f395f818160d701528181610525015281816105f4015281816109500152610bf801525f610d2d01525f610cfb01525f6111bc01525f61119401525f6110ef01525f61111901525f611143015261156c5ff3fe608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033", + "contractName": "TokenRelayer", + "deployedBytecode": "0x608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033", + "deployedLinkReferences": {}, + "linkReferences": {}, + "sourceName": "contracts/TokenRelayer.sol" +} diff --git a/contracts/relayer/ignition/deployments/chain-137/build-info/1f88a3ad5921d6bc8b511a85d672df5a.json b/contracts/relayer/ignition/deployments/chain-137/build-info/1f88a3ad5921d6bc8b511a85d672df5a.json new file mode 100644 index 000000000..8b7c007e9 --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-137/build-info/1f88a3ad5921d6bc8b511a85d672df5a.json @@ -0,0 +1,137942 @@ +{ + "id": "1f88a3ad5921d6bc8b511a85d672df5a", + "_format": "hh-sol-build-info-1", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "input": { + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "@openzeppelin/contracts/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "@openzeppelin/contracts/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC5267.sol)\n\npragma solidity >=0.4.16;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also applies here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n if (!_safeTransfer(token, to, value, true)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n if (!_safeTransferFrom(token, from, to, value, true)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _safeTransfer(token, to, value, false);\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _safeTransferFrom(token, from, to, value, false);\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n *\n * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n if (!_safeApprove(token, spender, value, false)) {\n if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));\n if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n * return value is optional (but if data is returned, it must not be false).\n *\n * @param token The token targeted by the call.\n * @param to The recipient of the tokens\n * @param value The amount of token to transfer\n * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n */\n function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {\n bytes4 selector = IERC20.transfer.selector;\n\n assembly (\"memory-safe\") {\n let fmp := mload(0x40)\n mstore(0x00, selector)\n mstore(0x04, and(to, shr(96, not(0))))\n mstore(0x24, value)\n success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n // if call success and return is true, all is good.\n // otherwise (not success or return is not true), we need to perform further checks\n if iszero(and(success, eq(mload(0x00), 1))) {\n // if the call was a failure and bubble is enabled, bubble the error\n if and(iszero(success), bubble) {\n returndatacopy(fmp, 0x00, returndatasize())\n revert(fmp, returndatasize())\n }\n // if the return value is not true, then the call is only successful if:\n // - the token address has code\n // - the returndata is empty\n success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n }\n mstore(0x40, fmp)\n }\n }\n\n /**\n * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n * value: the return value is optional (but if data is returned, it must not be false).\n *\n * @param token The token targeted by the call.\n * @param from The sender of the tokens\n * @param to The recipient of the tokens\n * @param value The amount of token to transfer\n * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n */\n function _safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value,\n bool bubble\n ) private returns (bool success) {\n bytes4 selector = IERC20.transferFrom.selector;\n\n assembly (\"memory-safe\") {\n let fmp := mload(0x40)\n mstore(0x00, selector)\n mstore(0x04, and(from, shr(96, not(0))))\n mstore(0x24, and(to, shr(96, not(0))))\n mstore(0x44, value)\n success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)\n // if call success and return is true, all is good.\n // otherwise (not success or return is not true), we need to perform further checks\n if iszero(and(success, eq(mload(0x00), 1))) {\n // if the call was a failure and bubble is enabled, bubble the error\n if and(iszero(success), bubble) {\n returndatacopy(fmp, 0x00, returndatasize())\n revert(fmp, returndatasize())\n }\n // if the return value is not true, then the call is only successful if:\n // - the token address has code\n // - the returndata is empty\n success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n }\n mstore(0x40, fmp)\n mstore(0x60, 0)\n }\n }\n\n /**\n * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n * the return value is optional (but if data is returned, it must not be false).\n *\n * @param token The token targeted by the call.\n * @param spender The spender of the tokens\n * @param value The amount of token to transfer\n * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n */\n function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {\n bytes4 selector = IERC20.approve.selector;\n\n assembly (\"memory-safe\") {\n let fmp := mload(0x40)\n mstore(0x00, selector)\n mstore(0x04, and(spender, shr(96, not(0))))\n mstore(0x24, value)\n success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n // if call success and return is true, all is good.\n // otherwise (not success or return is not true), we need to perform further checks\n if iszero(and(success, eq(mload(0x00), 1))) {\n // if the call was a failure and bubble is enabled, bubble the error\n if and(iszero(success), bubble) {\n returndatacopy(fmp, 0x00, returndatasize())\n revert(fmp, returndatasize())\n }\n // if the return value is not true, then the call is only successful if:\n // - the token address has code\n // - the returndata is empty\n success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n }\n mstore(0x40, fmp)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Bytes.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/Bytes.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\n\n/**\n * @dev Bytes operations.\n */\nlibrary Bytes {\n /**\n * @dev Forward search for `s` in `buffer`\n * * If `s` is present in the buffer, returns the index of the first instance\n * * If `s` is not present in the buffer, returns type(uint256).max\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n */\n function indexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n return indexOf(buffer, s, 0);\n }\n\n /**\n * @dev Forward search for `s` in `buffer` starting at position `pos`\n * * If `s` is present in the buffer (at or after `pos`), returns the index of the next instance\n * * If `s` is not present in the buffer (at or after `pos`), returns type(uint256).max\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n */\n function indexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n uint256 length = buffer.length;\n for (uint256 i = pos; i < length; ++i) {\n if (bytes1(_unsafeReadBytesOffset(buffer, i)) == s) {\n return i;\n }\n }\n return type(uint256).max;\n }\n\n /**\n * @dev Backward search for `s` in `buffer`\n * * If `s` is present in the buffer, returns the index of the last instance\n * * If `s` is not present in the buffer, returns type(uint256).max\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n */\n function lastIndexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n return lastIndexOf(buffer, s, type(uint256).max);\n }\n\n /**\n * @dev Backward search for `s` in `buffer` starting at position `pos`\n * * If `s` is present in the buffer (at or before `pos`), returns the index of the previous instance\n * * If `s` is not present in the buffer (at or before `pos`), returns type(uint256).max\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n */\n function lastIndexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n unchecked {\n uint256 length = buffer.length;\n for (uint256 i = Math.min(Math.saturatingAdd(pos, 1), length); i > 0; --i) {\n if (bytes1(_unsafeReadBytesOffset(buffer, i - 1)) == s) {\n return i - 1;\n }\n }\n return type(uint256).max;\n }\n }\n\n /**\n * @dev Copies the content of `buffer`, from `start` (included) to the end of `buffer` into a new bytes object in\n * memory.\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n */\n function slice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n return slice(buffer, start, buffer.length);\n }\n\n /**\n * @dev Copies the content of `buffer`, from `start` (included) to `end` (excluded) into a new bytes object in\n * memory. The `end` argument is truncated to the length of the `buffer`.\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n */\n function slice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n // sanitize\n end = Math.min(end, buffer.length);\n start = Math.min(start, end);\n\n // allocate and copy\n bytes memory result = new bytes(end - start);\n assembly (\"memory-safe\") {\n mcopy(add(result, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n }\n\n return result;\n }\n\n /**\n * @dev Moves the content of `buffer`, from `start` (included) to the end of `buffer` to the start of that buffer,\n * and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:].\n *\n * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead\n */\n function splice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n return splice(buffer, start, buffer.length);\n }\n\n /**\n * @dev Moves the content of `buffer`, from `start` (included) to `end` (excluded) to the start of that buffer,\n * and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:end].\n * The `end` argument is truncated to the length of the `buffer`.\n *\n * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead\n */\n function splice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n // sanitize\n end = Math.min(end, buffer.length);\n start = Math.min(start, end);\n\n // move and resize\n assembly (\"memory-safe\") {\n mcopy(add(buffer, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n mstore(buffer, sub(end, start))\n }\n\n return buffer;\n }\n\n /**\n * @dev Replaces bytes in `buffer` starting at `pos` with all bytes from `replacement`.\n *\n * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`).\n * If `pos >= buffer.length`, no replacement occurs and the buffer is returned unchanged.\n *\n * NOTE: This function modifies the provided buffer in place.\n */\n function replace(bytes memory buffer, uint256 pos, bytes memory replacement) internal pure returns (bytes memory) {\n return replace(buffer, pos, replacement, 0, replacement.length);\n }\n\n /**\n * @dev Replaces bytes in `buffer` starting at `pos` with bytes from `replacement` starting at `offset`.\n * Copies at most `length` bytes from `replacement` to `buffer`.\n *\n * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`, `offset` is\n * clamped to `[0, replacement.length]`, and `length` is clamped to `min(length, replacement.length - offset,\n * buffer.length - pos))`. If `pos >= buffer.length` or `offset >= replacement.length`, no replacement occurs\n * and the buffer is returned unchanged.\n *\n * NOTE: This function modifies the provided buffer in place.\n */\n function replace(\n bytes memory buffer,\n uint256 pos,\n bytes memory replacement,\n uint256 offset,\n uint256 length\n ) internal pure returns (bytes memory) {\n // sanitize\n pos = Math.min(pos, buffer.length);\n offset = Math.min(offset, replacement.length);\n length = Math.min(length, Math.min(replacement.length - offset, buffer.length - pos));\n\n // replace\n assembly (\"memory-safe\") {\n mcopy(add(add(buffer, 0x20), pos), add(add(replacement, 0x20), offset), length)\n }\n\n return buffer;\n }\n\n /**\n * @dev Concatenate an array of bytes into a single bytes object.\n *\n * For fixed bytes types, we recommend using the solidity built-in `bytes.concat` or (equivalent)\n * `abi.encodePacked`.\n *\n * NOTE: this could be done in assembly with a single loop that expands starting at the FMP, but that would be\n * significantly less readable. It might be worth benchmarking the savings of the full-assembly approach.\n */\n function concat(bytes[] memory buffers) internal pure returns (bytes memory) {\n uint256 length = 0;\n for (uint256 i = 0; i < buffers.length; ++i) {\n length += buffers[i].length;\n }\n\n bytes memory result = new bytes(length);\n\n uint256 offset = 0x20;\n for (uint256 i = 0; i < buffers.length; ++i) {\n bytes memory input = buffers[i];\n assembly (\"memory-safe\") {\n mcopy(add(result, offset), add(input, 0x20), mload(input))\n }\n unchecked {\n offset += input.length;\n }\n }\n\n return result;\n }\n\n /**\n * @dev Split each byte in `input` into two nibbles (4 bits each)\n *\n * Example: hex\"01234567\" → hex\"0001020304050607\"\n */\n function toNibbles(bytes memory input) internal pure returns (bytes memory output) {\n assembly (\"memory-safe\") {\n let length := mload(input)\n output := mload(0x40)\n mstore(0x40, add(add(output, 0x20), mul(length, 2)))\n mstore(output, mul(length, 2))\n for {\n let i := 0\n } lt(i, length) {\n i := add(i, 0x10)\n } {\n let chunk := shr(128, mload(add(add(input, 0x20), i)))\n chunk := and(\n 0x0000000000000000ffffffffffffffff0000000000000000ffffffffffffffff,\n or(shl(64, chunk), chunk)\n )\n chunk := and(\n 0x00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff,\n or(shl(32, chunk), chunk)\n )\n chunk := and(\n 0x0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff,\n or(shl(16, chunk), chunk)\n )\n chunk := and(\n 0x00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff,\n or(shl(8, chunk), chunk)\n )\n chunk := and(\n 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f,\n or(shl(4, chunk), chunk)\n )\n mstore(add(add(output, 0x20), mul(i, 2)), chunk)\n }\n }\n }\n\n /**\n * @dev Returns true if the two byte buffers are equal.\n */\n function equal(bytes memory a, bytes memory b) internal pure returns (bool) {\n return a.length == b.length && keccak256(a) == keccak256(b);\n }\n\n /**\n * @dev Reverses the byte order of a bytes32 value, converting between little-endian and big-endian.\n * Inspired by https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel[Reverse Parallel]\n */\n function reverseBytes32(bytes32 value) internal pure returns (bytes32) {\n value = // swap bytes\n ((value >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\n ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\n value = // swap 2-byte long pairs\n ((value >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\n ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\n value = // swap 4-byte long pairs\n ((value >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\n ((value & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\n value = // swap 8-byte long pairs\n ((value >> 64) & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) |\n ((value & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) << 64);\n return (value >> 128) | (value << 128); // swap 16-byte long pairs\n }\n\n /// @dev Same as {reverseBytes32} but optimized for 128-bit values.\n function reverseBytes16(bytes16 value) internal pure returns (bytes16) {\n value = // swap bytes\n ((value & 0xFF00FF00FF00FF00FF00FF00FF00FF00) >> 8) |\n ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\n value = // swap 2-byte long pairs\n ((value & 0xFFFF0000FFFF0000FFFF0000FFFF0000) >> 16) |\n ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\n value = // swap 4-byte long pairs\n ((value & 0xFFFFFFFF00000000FFFFFFFF00000000) >> 32) |\n ((value & 0x00000000FFFFFFFF00000000FFFFFFFF) << 32);\n return (value >> 64) | (value << 64); // swap 8-byte long pairs\n }\n\n /// @dev Same as {reverseBytes32} but optimized for 64-bit values.\n function reverseBytes8(bytes8 value) internal pure returns (bytes8) {\n value = ((value & 0xFF00FF00FF00FF00) >> 8) | ((value & 0x00FF00FF00FF00FF) << 8); // swap bytes\n value = ((value & 0xFFFF0000FFFF0000) >> 16) | ((value & 0x0000FFFF0000FFFF) << 16); // swap 2-byte long pairs\n return (value >> 32) | (value << 32); // swap 4-byte long pairs\n }\n\n /// @dev Same as {reverseBytes32} but optimized for 32-bit values.\n function reverseBytes4(bytes4 value) internal pure returns (bytes4) {\n value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); // swap bytes\n return (value >> 16) | (value << 16); // swap 2-byte long pairs\n }\n\n /// @dev Same as {reverseBytes32} but optimized for 16-bit values.\n function reverseBytes2(bytes2 value) internal pure returns (bytes2) {\n return (value >> 8) | (value << 8);\n }\n\n /**\n * @dev Counts the number of leading zero bits a bytes array. Returns `8 * buffer.length`\n * if the buffer is all zeros.\n */\n function clz(bytes memory buffer) internal pure returns (uint256) {\n for (uint256 i = 0; i < buffer.length; i += 0x20) {\n bytes32 chunk = _unsafeReadBytesOffset(buffer, i);\n if (chunk != bytes32(0)) {\n return Math.min(8 * i + Math.clz(uint256(chunk)), 8 * buffer.length);\n }\n }\n return 8 * buffer.length;\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(add(buffer, 0x20), offset))\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature is invalid.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n * invalidation or nonces for replay protection.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n *\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Variant of {tryRecover} that takes a signature in calldata\n */\n function tryRecoverCalldata(\n bytes32 hash,\n bytes calldata signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, calldata slices would work here, but are\n // significantly more expensive (length check) than using calldataload in assembly.\n assembly (\"memory-safe\") {\n r := calldataload(signature.offset)\n s := calldataload(add(signature.offset, 0x20))\n v := byte(0, calldataload(add(signature.offset, 0x40)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n * invalidation or nonces for replay protection.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Variant of {recover} that takes a signature in calldata\n */\n function recoverCalldata(bytes32 hash, bytes calldata signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecoverCalldata(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r` and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Parse a signature into its `v`, `r` and `s` components. Supports 65-byte and 64-byte (ERC-2098)\n * formats. Returns (0,0,0) for invalid signatures.\n *\n * For 64-byte signatures, `v` is automatically normalized to 27 or 28.\n * For 65-byte signatures, `v` is returned as-is and MUST already be 27 or 28 for use with ecrecover.\n *\n * Consider validating the result before use, or use {tryRecover}/{recover} which perform full validation.\n */\n function parse(bytes memory signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) {\n assembly (\"memory-safe\") {\n // Check the signature length\n switch mload(signature)\n // - case 65: r,s,v signature (standard)\n case 65 {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098)\n case 64 {\n let vs := mload(add(signature, 0x40))\n r := mload(add(signature, 0x20))\n s := and(vs, shr(1, not(0)))\n v := add(shr(255, vs), 27)\n }\n default {\n r := 0\n s := 0\n v := 0\n }\n }\n }\n\n /**\n * @dev Variant of {parse} that takes a signature in calldata\n */\n function parseCalldata(bytes calldata signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) {\n assembly (\"memory-safe\") {\n // Check the signature length\n switch signature.length\n // - case 65: r,s,v signature (standard)\n case 65 {\n r := calldataload(signature.offset)\n s := calldataload(add(signature.offset, 0x20))\n v := byte(0, calldataload(add(signature.offset, 0x40)))\n }\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098)\n case 64 {\n let vs := calldataload(add(signature.offset, 0x20))\n r := calldataload(signature.offset)\n s := and(vs, shr(1, not(0)))\n v := add(shr(255, vs), 27)\n }\n default {\n r := 0\n s := 0\n v := 0\n }\n }\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.24;\n\nimport {MessageHashUtils} from \"./MessageHashUtils.sol\";\nimport {ShortStrings, ShortString} from \"../ShortStrings.sol\";\nimport {IERC5267} from \"../../interfaces/IERC5267.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n *\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable\n */\nabstract contract EIP712 is IERC5267 {\n using ShortStrings for *;\n\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n bytes32 private immutable _cachedDomainSeparator;\n uint256 private immutable _cachedChainId;\n address private immutable _cachedThis;\n\n bytes32 private immutable _hashedName;\n bytes32 private immutable _hashedVersion;\n\n ShortString private immutable _name;\n ShortString private immutable _version;\n // slither-disable-next-line constable-states\n string private _nameFallback;\n // slither-disable-next-line constable-states\n string private _versionFallback;\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor(string memory name, string memory version) {\n _name = name.toShortStringWithFallback(_nameFallback);\n _version = version.toShortStringWithFallback(_versionFallback);\n _hashedName = keccak256(bytes(name));\n _hashedVersion = keccak256(bytes(version));\n\n _cachedChainId = block.chainid;\n _cachedDomainSeparator = _buildDomainSeparator();\n _cachedThis = address(this);\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (address(this) == _cachedThis && block.chainid == _cachedChainId) {\n return _cachedDomainSeparator;\n } else {\n return _buildDomainSeparator();\n }\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /// @inheritdoc IERC5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: By default this function reads _name which is an immutable value.\n * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n */\n // solhint-disable-next-line func-name-mixedcase\n function _EIP712Name() internal view returns (string memory) {\n return _name.toStringWithFallback(_nameFallback);\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: By default this function reads _version which is an immutable value.\n * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n */\n // solhint-disable-next-line func-name-mixedcase\n function _EIP712Version() internal view returns (string memory) {\n return _version.toStringWithFallback(_versionFallback);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.24;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n error ERC5267ExtensionsNotSupported();\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns the EIP-712 domain separator constructed from an `eip712Domain`. See {IERC5267-eip712Domain}\n *\n * This function dynamically constructs the domain separator based on which fields are present in the\n * `fields` parameter. It contains flags that indicate which domain fields are present:\n *\n * * Bit 0 (0x01): name\n * * Bit 1 (0x02): version\n * * Bit 2 (0x04): chainId\n * * Bit 3 (0x08): verifyingContract\n * * Bit 4 (0x10): salt\n *\n * Arguments that correspond to fields which are not present in `fields` are ignored. For example, if `fields` is\n * `0x0f` (`0b01111`), then the `salt` parameter is ignored.\n */\n function toDomainSeparator(\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt\n ) internal pure returns (bytes32 hash) {\n return\n toDomainSeparator(\n fields,\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId,\n verifyingContract,\n salt\n );\n }\n\n /// @dev Variant of {toDomainSeparator-bytes1-string-string-uint256-address-bytes32} that uses hashed name and version.\n function toDomainSeparator(\n bytes1 fields,\n bytes32 nameHash,\n bytes32 versionHash,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt\n ) internal pure returns (bytes32 hash) {\n bytes32 domainTypeHash = toDomainTypeHash(fields);\n\n assembly (\"memory-safe\") {\n // align fields to the right for easy processing\n fields := shr(248, fields)\n\n // FMP used as scratch space\n let fmp := mload(0x40)\n mstore(fmp, domainTypeHash)\n\n let ptr := add(fmp, 0x20)\n if and(fields, 0x01) {\n mstore(ptr, nameHash)\n ptr := add(ptr, 0x20)\n }\n if and(fields, 0x02) {\n mstore(ptr, versionHash)\n ptr := add(ptr, 0x20)\n }\n if and(fields, 0x04) {\n mstore(ptr, chainId)\n ptr := add(ptr, 0x20)\n }\n if and(fields, 0x08) {\n mstore(ptr, verifyingContract)\n ptr := add(ptr, 0x20)\n }\n if and(fields, 0x10) {\n mstore(ptr, salt)\n ptr := add(ptr, 0x20)\n }\n\n hash := keccak256(fmp, sub(ptr, fmp))\n }\n }\n\n /// @dev Builds an EIP-712 domain type hash depending on the `fields` provided, following https://eips.ethereum.org/EIPS/eip-5267[ERC-5267]\n function toDomainTypeHash(bytes1 fields) internal pure returns (bytes32 hash) {\n if (fields & 0x20 == 0x20) revert ERC5267ExtensionsNotSupported();\n\n assembly (\"memory-safe\") {\n // align fields to the right for easy processing\n fields := shr(248, fields)\n\n // FMP used as scratch space\n let fmp := mload(0x40)\n mstore(fmp, \"EIP712Domain(\")\n\n let ptr := add(fmp, 0x0d)\n // name field\n if and(fields, 0x01) {\n mstore(ptr, \"string name,\")\n ptr := add(ptr, 0x0c)\n }\n // version field\n if and(fields, 0x02) {\n mstore(ptr, \"string version,\")\n ptr := add(ptr, 0x0f)\n }\n // chainId field\n if and(fields, 0x04) {\n mstore(ptr, \"uint256 chainId,\")\n ptr := add(ptr, 0x10)\n }\n // verifyingContract field\n if and(fields, 0x08) {\n mstore(ptr, \"address verifyingContract,\")\n ptr := add(ptr, 0x1a)\n }\n // salt field\n if and(fields, 0x10) {\n mstore(ptr, \"bytes32 salt,\")\n ptr := add(ptr, 0x0d)\n }\n // if any field is enabled, remove the trailing comma\n ptr := sub(ptr, iszero(iszero(and(fields, 0x1f))))\n // add the closing brace\n mstore8(ptr, 0x29) // add closing brace\n ptr := add(ptr, 1)\n\n hash := keccak256(fmp, sub(ptr, fmp))\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory buffer) private pure returns (bool) {\n uint256 chunk;\n for (uint256 i = 0; i < buffer.length; i += 0x20) {\n // See _unsafeReadBytesOffset from utils/Bytes.sol\n assembly (\"memory-safe\") {\n chunk := mload(add(add(buffer, 0x20), i))\n }\n if (chunk >> (8 * saturatingSub(i + 0x20, buffer.length)) != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the first 16 bytes (most significant half).\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n\n /**\n * @dev Counts the number of leading zero bits in a uint256.\n */\n function clz(uint256 x) internal pure returns (uint256) {\n return ternary(x == 0, 256, 255 - log2(x));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in a uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in a uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev A uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\n /**\n * @dev Returns the downcasted uint248 from uint256, reverting on\n * overflow (when the input is greater than largest uint248).\n *\n * Counterpart to Solidity's `uint248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n */\n function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\n return uint248(value);\n }\n\n /**\n * @dev Returns the downcasted uint240 from uint256, reverting on\n * overflow (when the input is greater than largest uint240).\n *\n * Counterpart to Solidity's `uint240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n */\n function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\n return uint240(value);\n }\n\n /**\n * @dev Returns the downcasted uint232 from uint256, reverting on\n * overflow (when the input is greater than largest uint232).\n *\n * Counterpart to Solidity's `uint232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n */\n function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\n return uint232(value);\n }\n\n /**\n * @dev Returns the downcasted uint224 from uint256, reverting on\n * overflow (when the input is greater than largest uint224).\n *\n * Counterpart to Solidity's `uint224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n */\n function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\n return uint224(value);\n }\n\n /**\n * @dev Returns the downcasted uint216 from uint256, reverting on\n * overflow (when the input is greater than largest uint216).\n *\n * Counterpart to Solidity's `uint216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n */\n function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\n return uint216(value);\n }\n\n /**\n * @dev Returns the downcasted uint208 from uint256, reverting on\n * overflow (when the input is greater than largest uint208).\n *\n * Counterpart to Solidity's `uint208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n */\n function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\n return uint208(value);\n }\n\n /**\n * @dev Returns the downcasted uint200 from uint256, reverting on\n * overflow (when the input is greater than largest uint200).\n *\n * Counterpart to Solidity's `uint200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n */\n function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\n return uint200(value);\n }\n\n /**\n * @dev Returns the downcasted uint192 from uint256, reverting on\n * overflow (when the input is greater than largest uint192).\n *\n * Counterpart to Solidity's `uint192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n */\n function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\n return uint192(value);\n }\n\n /**\n * @dev Returns the downcasted uint184 from uint256, reverting on\n * overflow (when the input is greater than largest uint184).\n *\n * Counterpart to Solidity's `uint184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n */\n function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\n return uint184(value);\n }\n\n /**\n * @dev Returns the downcasted uint176 from uint256, reverting on\n * overflow (when the input is greater than largest uint176).\n *\n * Counterpart to Solidity's `uint176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n */\n function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\n return uint176(value);\n }\n\n /**\n * @dev Returns the downcasted uint168 from uint256, reverting on\n * overflow (when the input is greater than largest uint168).\n *\n * Counterpart to Solidity's `uint168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n */\n function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\n return uint168(value);\n }\n\n /**\n * @dev Returns the downcasted uint160 from uint256, reverting on\n * overflow (when the input is greater than largest uint160).\n *\n * Counterpart to Solidity's `uint160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n */\n function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\n return uint160(value);\n }\n\n /**\n * @dev Returns the downcasted uint152 from uint256, reverting on\n * overflow (when the input is greater than largest uint152).\n *\n * Counterpart to Solidity's `uint152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n */\n function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\n return uint152(value);\n }\n\n /**\n * @dev Returns the downcasted uint144 from uint256, reverting on\n * overflow (when the input is greater than largest uint144).\n *\n * Counterpart to Solidity's `uint144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n */\n function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\n return uint144(value);\n }\n\n /**\n * @dev Returns the downcasted uint136 from uint256, reverting on\n * overflow (when the input is greater than largest uint136).\n *\n * Counterpart to Solidity's `uint136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n */\n function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\n return uint136(value);\n }\n\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint120 from uint256, reverting on\n * overflow (when the input is greater than largest uint120).\n *\n * Counterpart to Solidity's `uint120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n */\n function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\n return uint120(value);\n }\n\n /**\n * @dev Returns the downcasted uint112 from uint256, reverting on\n * overflow (when the input is greater than largest uint112).\n *\n * Counterpart to Solidity's `uint112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n */\n function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\n return uint112(value);\n }\n\n /**\n * @dev Returns the downcasted uint104 from uint256, reverting on\n * overflow (when the input is greater than largest uint104).\n *\n * Counterpart to Solidity's `uint104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n */\n function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\n return uint104(value);\n }\n\n /**\n * @dev Returns the downcasted uint96 from uint256, reverting on\n * overflow (when the input is greater than largest uint96).\n *\n * Counterpart to Solidity's `uint96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n */\n function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\n return uint96(value);\n }\n\n /**\n * @dev Returns the downcasted uint88 from uint256, reverting on\n * overflow (when the input is greater than largest uint88).\n *\n * Counterpart to Solidity's `uint88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n */\n function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\n return uint88(value);\n }\n\n /**\n * @dev Returns the downcasted uint80 from uint256, reverting on\n * overflow (when the input is greater than largest uint80).\n *\n * Counterpart to Solidity's `uint80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n */\n function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\n return uint80(value);\n }\n\n /**\n * @dev Returns the downcasted uint72 from uint256, reverting on\n * overflow (when the input is greater than largest uint72).\n *\n * Counterpart to Solidity's `uint72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n */\n function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\n return uint72(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint56 from uint256, reverting on\n * overflow (when the input is greater than largest uint56).\n *\n * Counterpart to Solidity's `uint56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n */\n function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\n return uint56(value);\n }\n\n /**\n * @dev Returns the downcasted uint48 from uint256, reverting on\n * overflow (when the input is greater than largest uint48).\n *\n * Counterpart to Solidity's `uint48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n */\n function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\n return uint48(value);\n }\n\n /**\n * @dev Returns the downcasted uint40 from uint256, reverting on\n * overflow (when the input is greater than largest uint40).\n *\n * Counterpart to Solidity's `uint40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n */\n function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\n return uint40(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint24 from uint256, reverting on\n * overflow (when the input is greater than largest uint24).\n *\n * Counterpart to Solidity's `uint24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n */\n function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\n return uint24(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int248 from int256, reverting on\n * overflow (when the input is less than smallest int248 or\n * greater than largest int248).\n *\n * Counterpart to Solidity's `int248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n */\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int240 from int256, reverting on\n * overflow (when the input is less than smallest int240 or\n * greater than largest int240).\n *\n * Counterpart to Solidity's `int240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n */\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int232 from int256, reverting on\n * overflow (when the input is less than smallest int232 or\n * greater than largest int232).\n *\n * Counterpart to Solidity's `int232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n */\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int224 from int256, reverting on\n * overflow (when the input is less than smallest int224 or\n * greater than largest int224).\n *\n * Counterpart to Solidity's `int224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n */\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int216 from int256, reverting on\n * overflow (when the input is less than smallest int216 or\n * greater than largest int216).\n *\n * Counterpart to Solidity's `int216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n */\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int208 from int256, reverting on\n * overflow (when the input is less than smallest int208 or\n * greater than largest int208).\n *\n * Counterpart to Solidity's `int208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n */\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int200 from int256, reverting on\n * overflow (when the input is less than smallest int200 or\n * greater than largest int200).\n *\n * Counterpart to Solidity's `int200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n */\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int192 from int256, reverting on\n * overflow (when the input is less than smallest int192 or\n * greater than largest int192).\n *\n * Counterpart to Solidity's `int192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n */\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int184 from int256, reverting on\n * overflow (when the input is less than smallest int184 or\n * greater than largest int184).\n *\n * Counterpart to Solidity's `int184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n */\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int176 from int256, reverting on\n * overflow (when the input is less than smallest int176 or\n * greater than largest int176).\n *\n * Counterpart to Solidity's `int176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n */\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int168 from int256, reverting on\n * overflow (when the input is less than smallest int168 or\n * greater than largest int168).\n *\n * Counterpart to Solidity's `int168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n */\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int160 from int256, reverting on\n * overflow (when the input is less than smallest int160 or\n * greater than largest int160).\n *\n * Counterpart to Solidity's `int160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n */\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int152 from int256, reverting on\n * overflow (when the input is less than smallest int152 or\n * greater than largest int152).\n *\n * Counterpart to Solidity's `int152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n */\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int144 from int256, reverting on\n * overflow (when the input is less than smallest int144 or\n * greater than largest int144).\n *\n * Counterpart to Solidity's `int144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n */\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int136 from int256, reverting on\n * overflow (when the input is less than smallest int136 or\n * greater than largest int136).\n *\n * Counterpart to Solidity's `int136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n */\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int120 from int256, reverting on\n * overflow (when the input is less than smallest int120 or\n * greater than largest int120).\n *\n * Counterpart to Solidity's `int120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n */\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int112 from int256, reverting on\n * overflow (when the input is less than smallest int112 or\n * greater than largest int112).\n *\n * Counterpart to Solidity's `int112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n */\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int104 from int256, reverting on\n * overflow (when the input is less than smallest int104 or\n * greater than largest int104).\n *\n * Counterpart to Solidity's `int104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n */\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int96 from int256, reverting on\n * overflow (when the input is less than smallest int96 or\n * greater than largest int96).\n *\n * Counterpart to Solidity's `int96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n */\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int88 from int256, reverting on\n * overflow (when the input is less than smallest int88 or\n * greater than largest int88).\n *\n * Counterpart to Solidity's `int88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n */\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int80 from int256, reverting on\n * overflow (when the input is less than smallest int80 or\n * greater than largest int80).\n *\n * Counterpart to Solidity's `int80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n */\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int72 from int256, reverting on\n * overflow (when the input is less than smallest int72 or\n * greater than largest int72).\n *\n * Counterpart to Solidity's `int72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n */\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int56 from int256, reverting on\n * overflow (when the input is less than smallest int56 or\n * greater than largest int56).\n *\n * Counterpart to Solidity's `int56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n */\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int48 from int256, reverting on\n * overflow (when the input is less than smallest int48 or\n * greater than largest int48).\n *\n * Counterpart to Solidity's `int48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n */\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int40 from int256, reverting on\n * overflow (when the input is less than smallest int40 or\n * greater than largest int40).\n *\n * Counterpart to Solidity's `int40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n */\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int24 from int256, reverting on\n * overflow (when the input is less than smallest int24 or\n * greater than largest int24).\n *\n * Counterpart to Solidity's `int24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n */\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n */\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\n\nimport {StorageSlot} from \"./StorageSlot.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n *\n * IMPORTANT: Deprecated. This storage-based reentrancy guard will be removed and replaced\n * by the {ReentrancyGuardTransient} variant in v6.0.\n *\n * @custom:stateless\n */\nabstract contract ReentrancyGuard {\n using StorageSlot for bytes32;\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant REENTRANCY_GUARD_STORAGE =\n 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant NOT_ENTERED = 1;\n uint256 private constant ENTERED = 2;\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n constructor() {\n _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n /**\n * @dev A `view` only version of {nonReentrant}. Use to block view functions\n * from being called, preventing reading from inconsistent contract state.\n *\n * CAUTION: This is a \"view\" modifier and does not change the reentrancy\n * status. Use it only on view functions. For payable or non-payable functions,\n * use the standard {nonReentrant} modifier instead.\n */\n modifier nonReentrantView() {\n _nonReentrantBeforeView();\n _;\n }\n\n function _nonReentrantBeforeView() private view {\n if (_reentrancyGuardEntered()) {\n revert ReentrancyGuardReentrantCall();\n }\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n _nonReentrantBeforeView();\n\n // Any calls to nonReentrant after this point will fail\n _reentrancyGuardStorageSlot().getUint256Slot().value = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _reentrancyGuardStorageSlot().getUint256Slot().value == ENTERED;\n }\n\n function _reentrancyGuardStorageSlot() internal pure virtual returns (bytes32) {\n return REENTRANCY_GUARD_STORAGE;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ShortStrings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/ShortStrings.sol)\n\npragma solidity ^0.8.20;\n\nimport {StorageSlot} from \"./StorageSlot.sol\";\n\n// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |\n// | length | 0x BB |\ntype ShortString is bytes32;\n\n/**\n * @dev This library provides functions to convert short memory strings\n * into a `ShortString` type that can be used as an immutable variable.\n *\n * Strings of arbitrary length can be optimized using this library if\n * they are short enough (up to 31 bytes) by packing them with their\n * length (1 byte) in a single EVM word (32 bytes). Additionally, a\n * fallback mechanism can be used for every other case.\n *\n * Usage example:\n *\n * ```solidity\n * contract Named {\n * using ShortStrings for *;\n *\n * ShortString private immutable _name;\n * string private _nameFallback;\n *\n * constructor(string memory contractName) {\n * _name = contractName.toShortStringWithFallback(_nameFallback);\n * }\n *\n * function name() external view returns (string memory) {\n * return _name.toStringWithFallback(_nameFallback);\n * }\n * }\n * ```\n */\nlibrary ShortStrings {\n // Used as an identifier for strings longer than 31 bytes.\n bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;\n\n error StringTooLong(string str);\n error InvalidShortString();\n\n /**\n * @dev Encode a string of at most 31 chars into a `ShortString`.\n *\n * This will trigger a `StringTooLong` error is the input string is too long.\n */\n function toShortString(string memory str) internal pure returns (ShortString) {\n bytes memory bstr = bytes(str);\n if (bstr.length > 0x1f) {\n revert StringTooLong(str);\n }\n return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));\n }\n\n /**\n * @dev Decode a `ShortString` back to a \"normal\" string.\n */\n function toString(ShortString sstr) internal pure returns (string memory) {\n uint256 len = byteLength(sstr);\n // using `new string(len)` would work locally but is not memory safe.\n string memory str = new string(0x20);\n assembly (\"memory-safe\") {\n mstore(str, len)\n mstore(add(str, 0x20), sstr)\n }\n return str;\n }\n\n /**\n * @dev Return the length of a `ShortString`.\n */\n function byteLength(ShortString sstr) internal pure returns (uint256) {\n uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;\n if (result > 0x1f) {\n revert InvalidShortString();\n }\n return result;\n }\n\n /**\n * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.\n */\n function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {\n if (bytes(value).length < 0x20) {\n return toShortString(value);\n } else {\n StorageSlot.getStringSlot(store).value = value;\n return ShortString.wrap(FALLBACK_SENTINEL);\n }\n }\n\n /**\n * @dev Decode a string that was encoded to `ShortString` or written to storage using {toShortStringWithFallback}.\n */\n function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {\n if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n return toString(value);\n } else {\n return store;\n }\n }\n\n /**\n * @dev Return the length of a string that was encoded to `ShortString` or written to storage using\n * {toShortStringWithFallback}.\n *\n * WARNING: This will return the \"byte length\" of the string. This may not reflect the actual length in terms of\n * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.\n */\n function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {\n if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n return byteLength(value);\n } else {\n return bytes(store).length;\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/Strings.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\nimport {Bytes} from \"./Bytes.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n 0xffffffff | // first 32 bits corresponding to the control characters (U+0000 to U+001F)\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(add(buffer, 0x20), length)\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `bytes` buffer to its ASCII `string` hexadecimal representation.\n */\n function toHexString(bytes memory input) internal pure returns (string memory) {\n unchecked {\n bytes memory buffer = new bytes(2 * input.length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 0; i < input.length; ++i) {\n uint8 v = uint8(input[i]);\n buffer[2 * i + 2] = HEX_DIGITS[v >> 4];\n buffer[2 * i + 3] = HEX_DIGITS[v & 0xf];\n }\n return string(buffer);\n }\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return Bytes.equal(bytes(a), bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes backslashes (including those in \\uXXXX sequences) and the characters in ranges\n * defined in section 2.5 of RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). All control characters in U+0000\n * to U+001F are escaped (\\b, \\t, \\n, \\f, \\r use short form; others use \\u00XX). ECMAScript's `JSON.parse` does\n * recover escaped unicode characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n\n // Put output at the FMP. Memory will be reserved later when we figure out the actual length of the escaped\n // string. All write are done using _unsafeWriteBytesOffset, which avoid the (expensive) length checks for\n // each character written.\n bytes memory output;\n assembly (\"memory-safe\") {\n output := mload(0x40)\n }\n uint256 outputLength = 0;\n\n for (uint256 i = 0; i < buffer.length; ++i) {\n uint8 char = uint8(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (((SPECIAL_CHARS_LOOKUP & (1 << char)) != 0)) {\n _unsafeWriteBytesOffset(output, outputLength++, \"\\\\\");\n if (char == 0x08) _unsafeWriteBytesOffset(output, outputLength++, \"b\");\n else if (char == 0x09) _unsafeWriteBytesOffset(output, outputLength++, \"t\");\n else if (char == 0x0a) _unsafeWriteBytesOffset(output, outputLength++, \"n\");\n else if (char == 0x0c) _unsafeWriteBytesOffset(output, outputLength++, \"f\");\n else if (char == 0x0d) _unsafeWriteBytesOffset(output, outputLength++, \"r\");\n else if (char == 0x5c) _unsafeWriteBytesOffset(output, outputLength++, \"\\\\\");\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n _unsafeWriteBytesOffset(output, outputLength++, '\"');\n } else {\n // U+0000 to U+001F without short form: output \\u00XX\n _unsafeWriteBytesOffset(output, outputLength++, \"u\");\n _unsafeWriteBytesOffset(output, outputLength++, \"0\");\n _unsafeWriteBytesOffset(output, outputLength++, \"0\");\n _unsafeWriteBytesOffset(output, outputLength++, HEX_DIGITS[char >> 4]);\n _unsafeWriteBytesOffset(output, outputLength++, HEX_DIGITS[char & 0x0f]);\n }\n } else {\n _unsafeWriteBytesOffset(output, outputLength++, bytes1(char));\n }\n }\n // write the actual length and reserve memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, add(outputLength, 0x20)))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(add(buffer, 0x20), offset))\n }\n }\n\n /**\n * @dev Write a bytes1 to a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeWriteBytesOffset(bytes memory buffer, uint256 offset, bytes1 value) private pure {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n mstore8(add(add(buffer, 0x20), offset), shr(248, value))\n }\n }\n}\n" + }, + "contracts/TokenRelayer.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IERC20Permit} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {EIP712} from \"@openzeppelin/contracts/utils/cryptography/EIP712.sol\";\n\n/**\n * @title TokenRelayer\n * @notice A relayer contract that accepts ERC20 permit signatures and executes\n * arbitrary calls to a destination contract, both authorized via signature.\n * \n * Flow:\n * 1. User signs a permit allowing the relayer to spend their tokens\n * 2. User signs a payload (e.g., transfer from relayer to another user)\n * 3. Relayer:\n * a. Executes permit to approve the tokens\n * b. Transfers tokens from user to relayer (via transferFrom)\n * c. Forwards the payload call (transfer from relayer to another user)\n */\ncontract TokenRelayer is Ownable, ReentrancyGuard, EIP712 {\n using SafeERC20 for IERC20;\n\n // Using OZ EIP712 for domain separator management\n bytes32 private constant _TYPE_HASH_PAYLOAD = keccak256(\n \"Payload(address destination,address owner,address token,uint256 value,bytes data,uint256 ethValue,uint256 nonce,uint256 deadline)\"\n );\n\n address public immutable destinationContract;\n\n mapping(address => mapping(uint256 => bool)) public usedPayloadNonces;\n // Removed redundant executedCalls mapping — usedPayloadNonces is sufficient\n\n struct ExecuteParams {\n address token;\n address owner;\n uint256 value;\n uint256 deadline;\n uint8 permitV;\n bytes32 permitR;\n bytes32 permitS;\n bytes payloadData;\n uint256 payloadValue;\n uint256 payloadNonce;\n uint256 payloadDeadline;\n uint8 payloadV;\n bytes32 payloadR;\n bytes32 payloadS;\n }\n\n event RelayerExecuted(\n address indexed signer,\n address indexed token,\n uint256 amount\n );\n\n // Events for withdrawal operations\n event TokenWithdrawn(address indexed token, uint256 amount, address indexed to);\n event ETHWithdrawn(uint256 amount, address indexed to);\n\n // Ownable constructor sets deployer as owner; EIP712 constructor\n constructor(address _destinationContract)\n Ownable(msg.sender)\n EIP712(\"TokenRelayer\", \"1\")\n {\n require(_destinationContract != address(0), \"Invalid destination\");\n destinationContract = _destinationContract;\n }\n\n // Allow contract to receive ETH (e.g., refunds from destination)\n receive() external payable {}\n\n // nonReentrant modifier prevents reentrancy via _forwardCall\n // Removed redundant bool return — function reverts on failure\n function execute(ExecuteParams calldata params) external payable nonReentrant {\n address owner = params.owner;\n uint256 nonce = params.payloadNonce;\n\n // --- Checks ---\n require(owner != address(0), \"Invalid owner\");\n require(params.token != address(0), \"Invalid token\");\n require(!usedPayloadNonces[owner][nonce], \"Nonce used\");\n require(block.timestamp <= params.payloadDeadline, \"Payload expired\");\n\n // Verify payload signature and validate signed destination\n bytes32 digest = _computeDigest(\n owner,\n params.token,\n params.value,\n params.payloadData,\n params.payloadValue,\n nonce,\n params.payloadDeadline\n );\n // Using ECDSA.recover() which enforces low-s and rejects address(0)\n require(ECDSA.recover(digest, params.payloadV, params.payloadR, params.payloadS) == owner, \"Invalid sig\");\n\n require(msg.value == params.payloadValue, \"Incorrect ETH value provided\");\n\n // --- Effects (before interactions per CEI pattern) ---\n // State changes before any external calls\n usedPayloadNonces[owner][nonce] = true;\n\n // --- Interactions ---\n // permit wrapped in try-catch for front-run resilience\n _executePermitAndTransfer(\n params.token,\n owner,\n params.value,\n params.deadline,\n params.permitV,\n params.permitR,\n params.permitS\n );\n\n // Approve exact amount, forward call, then revoke\n IERC20(params.token).forceApprove(destinationContract, params.value);\n\n bool callSuccess = _forwardCall(params.payloadData, msg.value);\n require(callSuccess, \"Call failed\");\n\n // Revoke approval after the call to prevent residual allowance\n IERC20(params.token).forceApprove(destinationContract, 0);\n\n emit RelayerExecuted(owner, params.token, params.value);\n }\n\n // Using inherited _hashTypedDataV4 from OZ EIP712\n function _computeDigest(\n address owner,\n address token,\n uint256 value,\n bytes memory data,\n uint256 ethValue,\n uint256 nonce,\n uint256 deadline\n ) private view returns (bytes32) {\n return _hashTypedDataV4(\n keccak256(abi.encode(\n _TYPE_HASH_PAYLOAD,\n destinationContract, // [H-2] destination is always destinationContract\n owner,\n token,\n value,\n keccak256(data),\n ethValue,\n nonce,\n deadline\n ))\n );\n }\n\n /**\n * @dev Execute permit approval and then transfer tokens from owner to self (relayer).\n * Permit is wrapped in try-catch: if it was front-run, we check\n * that the allowance is already sufficient before proceeding.\n */\n function _executePermitAndTransfer(\n address token,\n address owner,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n // Wrap permit in try-catch for front-run resilience\n try IERC20Permit(token).permit(owner, address(this), value, deadline, v, r, s) {\n // permit succeeded\n } catch {\n // permit was front-run, verify allowance is sufficient\n require(\n IERC20(token).allowance(owner, address(this)) >= value,\n \"Permit failed and insufficient allowance\"\n );\n }\n\n // Transfer tokens from owner to this contract\n IERC20(token).safeTransferFrom(owner, address(this), value);\n }\n\n function _forwardCall(bytes memory data, uint256 value) internal returns (bool) {\n (bool success, ) = destinationContract.call{value: value}(data);\n return success;\n }\n\n /**\n * @notice Allows the owner to recover any ERC20 tokens held by this contract.\n * @param token The ERC20 token contract address.\n * @param amount The amount of tokens to transfer to the owner.\n */\n // Using Ownable's onlyOwner instead of manual deployer check\n // Added TokenWithdrawn event\n function withdrawToken(address token, uint256 amount) external onlyOwner {\n IERC20(token).safeTransfer(owner(), amount);\n emit TokenWithdrawn(token, amount, owner());\n }\n\n /**\n * @notice Allows the owner to recover any native ETH held by this contract.\n * @param amount The amount of ETH to transfer to the owner.\n */\n // ETH recovery function\n function withdrawETH(uint256 amount) external onlyOwner {\n (bool success, ) = owner().call{value: amount}(\"\");\n require(success, \"ETH transfer failed\");\n emit ETHWithdrawn(amount, owner());\n }\n\n // Using usedPayloadNonces instead of redundant executedCalls\n function isExecutionCompleted(address signer, uint256 nonce) external view returns (bool) {\n return usedPayloadNonces[signer][nonce];\n }\n}\n" + } + }, + "settings": { + "evmVersion": "cancun", + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ], + "": [ + "ast" + ] + } + } + } + }, + "output": { + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "exportedSymbols": { + "Context": [ + 1662 + ], + "Ownable": [ + 147 + ] + }, + "id": 148, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "102:24:0" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Context.sol", + "file": "../utils/Context.sol", + "id": 3, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 148, + "sourceUnit": 1663, + "src": "128:45:0", + "symbolAliases": [ + { + "foreign": { + "id": 2, + "name": "Context", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1662, + "src": "136:7:0", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "baseName": { + "id": 5, + "name": "Context", + "nameLocations": [ + "692:7:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1662, + "src": "692:7:0" + }, + "id": 6, + "nodeType": "InheritanceSpecifier", + "src": "692:7:0" + } + ], + "canonicalName": "Ownable", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4, + "nodeType": "StructuredDocumentation", + "src": "175:487:0", + "text": " @dev Contract module which provides a basic access control mechanism, where\n there is an account (an owner) that can be granted exclusive access to\n specific functions.\n The initial owner is set to the address provided by the deployer. This can\n later be changed with {transferOwnership}.\n This module is used through inheritance. It will make available the modifier\n `onlyOwner`, which can be applied to your functions to restrict their use to\n the owner." + }, + "fullyImplemented": true, + "id": 147, + "linearizedBaseContracts": [ + 147, + 1662 + ], + "name": "Ownable", + "nameLocation": "681:7:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "mutability": "mutable", + "name": "_owner", + "nameLocation": "722:6:0", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "706:22:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "706:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "documentation": { + "id": 9, + "nodeType": "StructuredDocumentation", + "src": "735:85:0", + "text": " @dev The caller account is not authorized to perform an operation." + }, + "errorSelector": "118cdaa7", + "id": 13, + "name": "OwnableUnauthorizedAccount", + "nameLocation": "831:26:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 12, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11, + "mutability": "mutable", + "name": "account", + "nameLocation": "866:7:0", + "nodeType": "VariableDeclaration", + "scope": 13, + "src": "858:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "858:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "857:17:0" + }, + "src": "825:50:0" + }, + { + "documentation": { + "id": 14, + "nodeType": "StructuredDocumentation", + "src": "881:82:0", + "text": " @dev The owner is not a valid owner account. (eg. `address(0)`)" + }, + "errorSelector": "1e4fbdf7", + "id": 18, + "name": "OwnableInvalidOwner", + "nameLocation": "974:19:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16, + "mutability": "mutable", + "name": "owner", + "nameLocation": "1002:5:0", + "nodeType": "VariableDeclaration", + "scope": 18, + "src": "994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "994:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "993:15:0" + }, + "src": "968:41:0" + }, + { + "anonymous": false, + "eventSelector": "8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "id": 24, + "name": "OwnershipTransferred", + "nameLocation": "1021:20:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20, + "indexed": true, + "mutability": "mutable", + "name": "previousOwner", + "nameLocation": "1058:13:0", + "nodeType": "VariableDeclaration", + "scope": 24, + "src": "1042:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1042:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 22, + "indexed": true, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "1089:8:0", + "nodeType": "VariableDeclaration", + "scope": 24, + "src": "1073:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1073:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1041:57:0" + }, + "src": "1015:84:0" + }, + { + "body": { + "id": 49, + "nodeType": "Block", + "src": "1259:153:0", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 30, + "name": "initialOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1273:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 33, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1297:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 32, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1289:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 31, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1289:7:0", + "typeDescriptions": {} + } + }, + "id": 34, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1289:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1273:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 44, + "nodeType": "IfStatement", + "src": "1269:95:0", + "trueBody": { + "id": 43, + "nodeType": "Block", + "src": "1301:63:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1350:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1342:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 37, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1342:7:0", + "typeDescriptions": {} + } + }, + "id": 40, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1342:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 36, + "name": "OwnableInvalidOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "1322:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 41, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1322:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 42, + "nodeType": "RevertStatement", + "src": "1315:38:0" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 46, + "name": "initialOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1392:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 45, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 146, + "src": "1373:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1373:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 48, + "nodeType": "ExpressionStatement", + "src": "1373:32:0" + } + ] + }, + "documentation": { + "id": 25, + "nodeType": "StructuredDocumentation", + "src": "1105:115:0", + "text": " @dev Initializes the contract setting the address provided by the deployer as the initial owner." + }, + "id": 50, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 28, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "1245:12:0", + "nodeType": "VariableDeclaration", + "scope": 50, + "src": "1237:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 26, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1237:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1236:22:0" + }, + "returnParameters": { + "id": 29, + "nodeType": "ParameterList", + "parameters": [], + "src": "1259:0:0" + }, + "scope": 147, + "src": "1225:187:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 57, + "nodeType": "Block", + "src": "1521:41:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 53, + "name": "_checkOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "1531:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 54, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1531:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 55, + "nodeType": "ExpressionStatement", + "src": "1531:13:0" + }, + { + "id": 56, + "nodeType": "PlaceholderStatement", + "src": "1554:1:0" + } + ] + }, + "documentation": { + "id": 51, + "nodeType": "StructuredDocumentation", + "src": "1418:77:0", + "text": " @dev Throws if called by any account other than the owner." + }, + "id": 58, + "name": "onlyOwner", + "nameLocation": "1509:9:0", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [], + "src": "1518:2:0" + }, + "src": "1500:62:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 66, + "nodeType": "Block", + "src": "1693:30:0", + "statements": [ + { + "expression": { + "id": 64, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1710:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 63, + "id": 65, + "nodeType": "Return", + "src": "1703:13:0" + } + ] + }, + "documentation": { + "id": 59, + "nodeType": "StructuredDocumentation", + "src": "1568:65:0", + "text": " @dev Returns the address of the current owner." + }, + "functionSelector": "8da5cb5b", + "id": 67, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "1647:5:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [], + "src": "1652:2:0" + }, + "returnParameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "1684:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 61, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1684:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1683:9:0" + }, + "scope": 147, + "src": "1638:85:0", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 83, + "nodeType": "Block", + "src": "1841:117:0", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 71, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "1855:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1855:7:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 73, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1644, + "src": "1866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1866:12:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1855:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 82, + "nodeType": "IfStatement", + "src": "1851:101:0", + "trueBody": { + "id": 81, + "nodeType": "Block", + "src": "1880:72:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 77, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1644, + "src": "1928:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1928:12:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 76, + "name": "OwnableUnauthorizedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1901:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1901:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 80, + "nodeType": "RevertStatement", + "src": "1894:47:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 68, + "nodeType": "StructuredDocumentation", + "src": "1729:62:0", + "text": " @dev Throws if the sender is not the owner." + }, + "id": 84, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_checkOwner", + "nameLocation": "1805:11:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 69, + "nodeType": "ParameterList", + "parameters": [], + "src": "1816:2:0" + }, + "returnParameters": { + "id": 70, + "nodeType": "ParameterList", + "parameters": [], + "src": "1841:0:0" + }, + "scope": 147, + "src": "1796:162:0", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 97, + "nodeType": "Block", + "src": "2347:47:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2384:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 91, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2376:7:0", + "typeDescriptions": {} + } + }, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2376:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 90, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 146, + "src": "2357:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2357:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 96, + "nodeType": "ExpressionStatement", + "src": "2357:30:0" + } + ] + }, + "documentation": { + "id": 85, + "nodeType": "StructuredDocumentation", + "src": "1964:324:0", + "text": " @dev Leaves the contract without owner. It will not be possible to call\n `onlyOwner` functions. Can only be called by the current owner.\n NOTE: Renouncing ownership will leave the contract without an owner,\n thereby disabling any functionality that is only available to the owner." + }, + "functionSelector": "715018a6", + "id": 98, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 88, + "kind": "modifierInvocation", + "modifierName": { + "id": 87, + "name": "onlyOwner", + "nameLocations": [ + "2337:9:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58, + "src": "2337:9:0" + }, + "nodeType": "ModifierInvocation", + "src": "2337:9:0" + } + ], + "name": "renounceOwnership", + "nameLocation": "2302:17:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 86, + "nodeType": "ParameterList", + "parameters": [], + "src": "2319:2:0" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [], + "src": "2347:0:0" + }, + "scope": 147, + "src": "2293:101:0", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 125, + "nodeType": "Block", + "src": "2613:145:0", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 106, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "2627:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2647:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2639:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 107, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2639:7:0", + "typeDescriptions": {} + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2639:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2627:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "IfStatement", + "src": "2623:91:0", + "trueBody": { + "id": 119, + "nodeType": "Block", + "src": "2651:63:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2700:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 113, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2692:7:0", + "typeDescriptions": {} + } + }, + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2692:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 112, + "name": "OwnableInvalidOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "2672:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2672:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 118, + "nodeType": "RevertStatement", + "src": "2665:38:0" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 122, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "2742:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 121, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 146, + "src": "2723:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2723:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 124, + "nodeType": "ExpressionStatement", + "src": "2723:28:0" + } + ] + }, + "documentation": { + "id": 99, + "nodeType": "StructuredDocumentation", + "src": "2400:138:0", + "text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Can only be called by the current owner." + }, + "functionSelector": "f2fde38b", + "id": 126, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 104, + "kind": "modifierInvocation", + "modifierName": { + "id": 103, + "name": "onlyOwner", + "nameLocations": [ + "2603:9:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58, + "src": "2603:9:0" + }, + "nodeType": "ModifierInvocation", + "src": "2603:9:0" + } + ], + "name": "transferOwnership", + "nameLocation": "2552:17:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 101, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "2578:8:0", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "2570:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2570:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2569:18:0" + }, + "returnParameters": { + "id": 105, + "nodeType": "ParameterList", + "parameters": [], + "src": "2613:0:0" + }, + "scope": 147, + "src": "2543:215:0", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 145, + "nodeType": "Block", + "src": "2975:124:0", + "statements": [ + { + "assignments": [ + 133 + ], + "declarations": [ + { + "constant": false, + "id": 133, + "mutability": "mutable", + "name": "oldOwner", + "nameLocation": "2993:8:0", + "nodeType": "VariableDeclaration", + "scope": 145, + "src": "2985:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2985:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 135, + "initialValue": { + "id": 134, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "3004:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2985:25:0" + }, + { + "expression": { + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 136, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "3020:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 137, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 129, + "src": "3029:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3020:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "3020:17:0" + }, + { + "eventCall": { + "arguments": [ + { + "id": 141, + "name": "oldOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 133, + "src": "3073:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 142, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 129, + "src": "3083:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 140, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "3052:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3052:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 144, + "nodeType": "EmitStatement", + "src": "3047:45:0" + } + ] + }, + "documentation": { + "id": 127, + "nodeType": "StructuredDocumentation", + "src": "2764:143:0", + "text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Internal function without access restriction." + }, + "id": 146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transferOwnership", + "nameLocation": "2921:18:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 129, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "2948:8:0", + "nodeType": "VariableDeclaration", + "scope": 146, + "src": "2940:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2940:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2939:18:0" + }, + "returnParameters": { + "id": 131, + "nodeType": "ParameterList", + "parameters": [], + "src": "2975:0:0" + }, + "scope": 147, + "src": "2912:187:0", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 148, + "src": "663:2438:0", + "usedErrors": [ + 13, + 18 + ], + "usedEvents": [ + 24 + ] + } + ], + "src": "102:3000:0" + }, + "id": 0 + }, + "@openzeppelin/contracts/interfaces/IERC1363.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC1363.sol", + "exportedSymbols": { + "IERC1363": [ + 229 + ], + "IERC165": [ + 4547 + ], + "IERC20": [ + 340 + ] + }, + "id": 230, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 149, + "literals": [ + "solidity", + ">=", + "0.6", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "107:24:1" + }, + { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC20.sol", + "file": "./IERC20.sol", + "id": 151, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 230, + "sourceUnit": 238, + "src": "133:36:1", + "symbolAliases": [ + { + "foreign": { + "id": 150, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "141:6:1", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 153, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 230, + "sourceUnit": 234, + "src": "170:38:1", + "symbolAliases": [ + { + "foreign": { + "id": 152, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4547, + "src": "178:7:1", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 155, + "name": "IERC20", + "nameLocations": [ + "590:6:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "590:6:1" + }, + "id": 156, + "nodeType": "InheritanceSpecifier", + "src": "590:6:1" + }, + { + "baseName": { + "id": 157, + "name": "IERC165", + "nameLocations": [ + "598:7:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4547, + "src": "598:7:1" + }, + "id": 158, + "nodeType": "InheritanceSpecifier", + "src": "598:7:1" + } + ], + "canonicalName": "IERC1363", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 154, + "nodeType": "StructuredDocumentation", + "src": "210:357:1", + "text": " @title IERC1363\n @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction." + }, + "fullyImplemented": false, + "id": 229, + "linearizedBaseContracts": [ + 229, + 4547, + 340 + ], + "name": "IERC1363", + "nameLocation": "578:8:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 159, + "nodeType": "StructuredDocumentation", + "src": "1148:370:1", + "text": " @dev Moves a `value` amount of tokens from the caller's account to `to`\n and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n @param to The address which you want to transfer to.\n @param value The amount of tokens to be transferred.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "1296ee62", + "id": 168, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferAndCall", + "nameLocation": "1532:15:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 161, + "mutability": "mutable", + "name": "to", + "nameLocation": "1556:2:1", + "nodeType": "VariableDeclaration", + "scope": 168, + "src": "1548:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 163, + "mutability": "mutable", + "name": "value", + "nameLocation": "1568:5:1", + "nodeType": "VariableDeclaration", + "scope": 168, + "src": "1560:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 162, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1560:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1547:27:1" + }, + "returnParameters": { + "id": 167, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 166, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 168, + "src": "1593:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 165, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1593:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1592:6:1" + }, + "scope": 229, + "src": "1523:76:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 169, + "nodeType": "StructuredDocumentation", + "src": "1605:453:1", + "text": " @dev Moves a `value` amount of tokens from the caller's account to `to`\n and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n @param to The address which you want to transfer to.\n @param value The amount of tokens to be transferred.\n @param data Additional data with no specified format, sent in call to `to`.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "4000aea0", + "id": 180, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferAndCall", + "nameLocation": "2072:15:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 171, + "mutability": "mutable", + "name": "to", + "nameLocation": "2096:2:1", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "2088:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 170, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2088:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 173, + "mutability": "mutable", + "name": "value", + "nameLocation": "2108:5:1", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "2100:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2100:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "mutability": "mutable", + "name": "data", + "nameLocation": "2130:4:1", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "2115:19:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 174, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2115:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2087:48:1" + }, + "returnParameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 178, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "2154:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 177, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2154:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2153:6:1" + }, + "scope": 229, + "src": "2063:97:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 181, + "nodeType": "StructuredDocumentation", + "src": "2166:453:1", + "text": " @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n @param from The address which you want to send tokens from.\n @param to The address which you want to transfer to.\n @param value The amount of tokens to be transferred.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "d8fbe994", + "id": 192, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFromAndCall", + "nameLocation": "2633:19:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 183, + "mutability": "mutable", + "name": "from", + "nameLocation": "2661:4:1", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "2653:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2653:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 185, + "mutability": "mutable", + "name": "to", + "nameLocation": "2675:2:1", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "2667:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 184, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2667:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 187, + "mutability": "mutable", + "name": "value", + "nameLocation": "2687:5:1", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "2679:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2679:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2652:41:1" + }, + "returnParameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "2712:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 189, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2712:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2711:6:1" + }, + "scope": 229, + "src": "2624:94:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 193, + "nodeType": "StructuredDocumentation", + "src": "2724:536:1", + "text": " @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n @param from The address which you want to send tokens from.\n @param to The address which you want to transfer to.\n @param value The amount of tokens to be transferred.\n @param data Additional data with no specified format, sent in call to `to`.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "c1d34b89", + "id": 206, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFromAndCall", + "nameLocation": "3274:19:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 195, + "mutability": "mutable", + "name": "from", + "nameLocation": "3302:4:1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3294:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 197, + "mutability": "mutable", + "name": "to", + "nameLocation": "3316:2:1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3308:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 196, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3308:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 199, + "mutability": "mutable", + "name": "value", + "nameLocation": "3328:5:1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3320:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3320:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 201, + "mutability": "mutable", + "name": "data", + "nameLocation": "3350:4:1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3335:19:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 200, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3335:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3293:62:1" + }, + "returnParameters": { + "id": 205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 204, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3374:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 203, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3374:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3373:6:1" + }, + "scope": 229, + "src": "3265:115:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 207, + "nodeType": "StructuredDocumentation", + "src": "3386:390:1", + "text": " @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n @param spender The address which will spend the funds.\n @param value The amount of tokens to be spent.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "3177029f", + "id": 216, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approveAndCall", + "nameLocation": "3790:14:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 209, + "mutability": "mutable", + "name": "spender", + "nameLocation": "3813:7:1", + "nodeType": "VariableDeclaration", + "scope": 216, + "src": "3805:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3805:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 211, + "mutability": "mutable", + "name": "value", + "nameLocation": "3830:5:1", + "nodeType": "VariableDeclaration", + "scope": 216, + "src": "3822:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 210, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3822:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3804:32:1" + }, + "returnParameters": { + "id": 215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 214, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 216, + "src": "3855:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3855:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3854:6:1" + }, + "scope": 229, + "src": "3781:80:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 217, + "nodeType": "StructuredDocumentation", + "src": "3867:478:1", + "text": " @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n @param spender The address which will spend the funds.\n @param value The amount of tokens to be spent.\n @param data Additional data with no specified format, sent in call to `spender`.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "cae9ca51", + "id": 228, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approveAndCall", + "nameLocation": "4359:14:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 224, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "mutability": "mutable", + "name": "spender", + "nameLocation": "4382:7:1", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "4374:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 218, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4374:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 221, + "mutability": "mutable", + "name": "value", + "nameLocation": "4399:5:1", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "4391:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4391:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 223, + "mutability": "mutable", + "name": "data", + "nameLocation": "4421:4:1", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "4406:19:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 222, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4406:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4373:53:1" + }, + "returnParameters": { + "id": 227, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "4445:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 225, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4445:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4444:6:1" + }, + "scope": 229, + "src": "4350:101:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 230, + "src": "568:3885:1", + "usedErrors": [], + "usedEvents": [ + 274, + 283 + ] + } + ], + "src": "107:4347:1" + }, + "id": 1 + }, + "@openzeppelin/contracts/interfaces/IERC165.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC165.sol", + "exportedSymbols": { + "IERC165": [ + 4547 + ] + }, + "id": 234, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 231, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "106:25:2" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol", + "file": "../utils/introspection/IERC165.sol", + "id": 233, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 234, + "sourceUnit": 4548, + "src": "133:59:2", + "symbolAliases": [ + { + "foreign": { + "id": 232, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4547, + "src": "141:7:2", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + } + ], + "src": "106:87:2" + }, + "id": 2 + }, + "@openzeppelin/contracts/interfaces/IERC20.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 340 + ] + }, + "id": 238, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 235, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "105:25:3" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "../token/ERC20/IERC20.sol", + "id": 237, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 238, + "sourceUnit": 341, + "src": "132:49:3", + "symbolAliases": [ + { + "foreign": { + "id": 236, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "140:6:3", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + } + ], + "src": "105:77:3" + }, + "id": 3 + }, + "@openzeppelin/contracts/interfaces/IERC5267.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC5267.sol", + "exportedSymbols": { + "IERC5267": [ + 262 + ] + }, + "id": 263, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 239, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "107:25:4" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC5267", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 262, + "linearizedBaseContracts": [ + 262 + ], + "name": "IERC5267", + "nameLocation": "144:8:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 240, + "nodeType": "StructuredDocumentation", + "src": "159:84:4", + "text": " @dev MAY be emitted to signal that the domain could have changed." + }, + "eventSelector": "0a6387c9ea3628b88a633bb4f3b151770f70085117a15f9bf3787cda53f13d31", + "id": 242, + "name": "EIP712DomainChanged", + "nameLocation": "254:19:4", + "nodeType": "EventDefinition", + "parameters": { + "id": 241, + "nodeType": "ParameterList", + "parameters": [], + "src": "273:2:4" + }, + "src": "248:28:4" + }, + { + "documentation": { + "id": 243, + "nodeType": "StructuredDocumentation", + "src": "282:140:4", + "text": " @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n signature." + }, + "functionSelector": "84b0196e", + "id": 261, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "eip712Domain", + "nameLocation": "436:12:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [], + "src": "448:2:4" + }, + "returnParameters": { + "id": 260, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 246, + "mutability": "mutable", + "name": "fields", + "nameLocation": "518:6:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "511:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 245, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "511:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 248, + "mutability": "mutable", + "name": "name", + "nameLocation": "552:4:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "538:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 247, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "538:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 250, + "mutability": "mutable", + "name": "version", + "nameLocation": "584:7:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "570:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 249, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "570:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "mutability": "mutable", + "name": "chainId", + "nameLocation": "613:7:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "605:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "605:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "mutability": "mutable", + "name": "verifyingContract", + "nameLocation": "642:17:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "634:25:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "634:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 256, + "mutability": "mutable", + "name": "salt", + "nameLocation": "681:4:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "673:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 255, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "673:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 259, + "mutability": "mutable", + "name": "extensions", + "nameLocation": "716:10:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "699:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "699:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 258, + "nodeType": "ArrayTypeName", + "src": "699:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "497:239:4" + }, + "scope": 262, + "src": "427:310:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 263, + "src": "134:605:4", + "usedErrors": [], + "usedEvents": [ + 242 + ] + } + ], + "src": "107:633:4" + }, + "id": 4 + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 340 + ] + }, + "id": 341, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 264, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "106:25:5" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 265, + "nodeType": "StructuredDocumentation", + "src": "133:71:5", + "text": " @dev Interface of the ERC-20 standard as defined in the ERC." + }, + "fullyImplemented": false, + "id": 340, + "linearizedBaseContracts": [ + 340 + ], + "name": "IERC20", + "nameLocation": "215:6:5", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 266, + "nodeType": "StructuredDocumentation", + "src": "228:158:5", + "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero." + }, + "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "id": 274, + "name": "Transfer", + "nameLocation": "397:8:5", + "nodeType": "EventDefinition", + "parameters": { + "id": 273, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 268, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "422:4:5", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "406:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 267, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "406:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "444:2:5", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "428:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 269, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "428:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 272, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "456:5:5", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "448:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 271, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "448:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "405:57:5" + }, + "src": "391:72:5" + }, + { + "anonymous": false, + "documentation": { + "id": 275, + "nodeType": "StructuredDocumentation", + "src": "469:148:5", + "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance." + }, + "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "id": 283, + "name": "Approval", + "nameLocation": "628:8:5", + "nodeType": "EventDefinition", + "parameters": { + "id": 282, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 277, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "653:5:5", + "nodeType": "VariableDeclaration", + "scope": 283, + "src": "637:21:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "637:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 279, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nameLocation": "676:7:5", + "nodeType": "VariableDeclaration", + "scope": 283, + "src": "660:23:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "660:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 281, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "693:5:5", + "nodeType": "VariableDeclaration", + "scope": 283, + "src": "685:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 280, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "685:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "636:63:5" + }, + "src": "622:78:5" + }, + { + "documentation": { + "id": 284, + "nodeType": "StructuredDocumentation", + "src": "706:65:5", + "text": " @dev Returns the value of tokens in existence." + }, + "functionSelector": "18160ddd", + "id": 289, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nameLocation": "785:11:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [], + "src": "796:2:5" + }, + "returnParameters": { + "id": 288, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 287, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "822:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "822:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "821:9:5" + }, + "scope": 340, + "src": "776:55:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 290, + "nodeType": "StructuredDocumentation", + "src": "837:71:5", + "text": " @dev Returns the value of tokens owned by `account`." + }, + "functionSelector": "70a08231", + "id": 297, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "922:9:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 292, + "mutability": "mutable", + "name": "account", + "nameLocation": "940:7:5", + "nodeType": "VariableDeclaration", + "scope": 297, + "src": "932:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 291, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "932:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "931:17:5" + }, + "returnParameters": { + "id": 296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 295, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 297, + "src": "972:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "972:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "971:9:5" + }, + "scope": 340, + "src": "913:68:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 298, + "nodeType": "StructuredDocumentation", + "src": "987:213:5", + "text": " @dev Moves a `value` amount of tokens from the caller's account to `to`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." + }, + "functionSelector": "a9059cbb", + "id": 307, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "1214:8:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 300, + "mutability": "mutable", + "name": "to", + "nameLocation": "1231:2:5", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "1223:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 299, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1223:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "mutability": "mutable", + "name": "value", + "nameLocation": "1243:5:5", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "1235:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1235:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1222:27:5" + }, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 305, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "1268:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 304, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1268:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1267:6:5" + }, + "scope": 340, + "src": "1205:69:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 308, + "nodeType": "StructuredDocumentation", + "src": "1280:264:5", + "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called." + }, + "functionSelector": "dd62ed3e", + "id": 317, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nameLocation": "1558:9:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 310, + "mutability": "mutable", + "name": "owner", + "nameLocation": "1576:5:5", + "nodeType": "VariableDeclaration", + "scope": 317, + "src": "1568:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1568:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 312, + "mutability": "mutable", + "name": "spender", + "nameLocation": "1591:7:5", + "nodeType": "VariableDeclaration", + "scope": 317, + "src": "1583:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1583:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1567:32:5" + }, + "returnParameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 315, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 317, + "src": "1623:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 314, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1623:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1622:9:5" + }, + "scope": 340, + "src": "1549:83:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 318, + "nodeType": "StructuredDocumentation", + "src": "1638:667:5", + "text": " @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event." + }, + "functionSelector": "095ea7b3", + "id": 327, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2319:7:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 323, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2335:7:5", + "nodeType": "VariableDeclaration", + "scope": 327, + "src": "2327:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 319, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2327:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 322, + "mutability": "mutable", + "name": "value", + "nameLocation": "2352:5:5", + "nodeType": "VariableDeclaration", + "scope": 327, + "src": "2344:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 321, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2344:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2326:32:5" + }, + "returnParameters": { + "id": 326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 325, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 327, + "src": "2377:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 324, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2377:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2376:6:5" + }, + "scope": 340, + "src": "2310:73:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 328, + "nodeType": "StructuredDocumentation", + "src": "2389:297:5", + "text": " @dev Moves a `value` amount of tokens from `from` to `to` using the\n allowance mechanism. `value` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." + }, + "functionSelector": "23b872dd", + "id": 339, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "2700:12:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 330, + "mutability": "mutable", + "name": "from", + "nameLocation": "2721:4:5", + "nodeType": "VariableDeclaration", + "scope": 339, + "src": "2713:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 329, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2713:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 332, + "mutability": "mutable", + "name": "to", + "nameLocation": "2735:2:5", + "nodeType": "VariableDeclaration", + "scope": 339, + "src": "2727:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 331, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2727:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 334, + "mutability": "mutable", + "name": "value", + "nameLocation": "2747:5:5", + "nodeType": "VariableDeclaration", + "scope": 339, + "src": "2739:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 333, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2739:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2712:41:5" + }, + "returnParameters": { + "id": 338, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 337, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 339, + "src": "2772:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 336, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2772:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2771:6:5" + }, + "scope": 340, + "src": "2691:87:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 341, + "src": "205:2575:5", + "usedErrors": [], + "usedEvents": [ + 274, + 283 + ] + } + ], + "src": "106:2675:5" + }, + "id": 5 + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol", + "exportedSymbols": { + "IERC20Permit": [ + 376 + ] + }, + "id": 377, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 342, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "123:25:6" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20Permit", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 343, + "nodeType": "StructuredDocumentation", + "src": "150:1965:6", + "text": " @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in\n https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].\n Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by\n presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n need to send a transaction, and thus is not required to hold Ether at all.\n ==== Security Considerations\n There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n considered as an intention to spend the allowance in any specific way. The second is that because permits have\n built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n generally recommended is:\n ```solidity\n function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n doThing(..., value);\n }\n function doThing(..., uint256 value) public {\n token.safeTransferFrom(msg.sender, address(this), value);\n ...\n }\n ```\n Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n {SafeERC20-safeTransferFrom}).\n Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n contracts should have entry points that don't rely on permit." + }, + "fullyImplemented": false, + "id": 376, + "linearizedBaseContracts": [ + 376 + ], + "name": "IERC20Permit", + "nameLocation": "2126:12:6", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 344, + "nodeType": "StructuredDocumentation", + "src": "2145:852:6", + "text": " @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n given ``owner``'s signed approval.\n IMPORTANT: The same issues {IERC20-approve} has related to transaction\n ordering also applies here.\n Emits an {Approval} event.\n Requirements:\n - `spender` cannot be the zero address.\n - `deadline` must be a timestamp in the future.\n - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n over the EIP712-formatted function arguments.\n - the signature must use ``owner``'s current nonce (see {nonces}).\n For more information on the signature format, see the\n https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n section].\n CAUTION: See Security Considerations above." + }, + "functionSelector": "d505accf", + "id": 361, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "permit", + "nameLocation": "3011:6:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 359, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 346, + "mutability": "mutable", + "name": "owner", + "nameLocation": "3035:5:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3027:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 345, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3027:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 348, + "mutability": "mutable", + "name": "spender", + "nameLocation": "3058:7:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3050:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 347, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3050:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 350, + "mutability": "mutable", + "name": "value", + "nameLocation": "3083:5:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3075:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 349, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3075:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 352, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "3106:8:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3098:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3098:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 354, + "mutability": "mutable", + "name": "v", + "nameLocation": "3130:1:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3124:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 353, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3124:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 356, + "mutability": "mutable", + "name": "r", + "nameLocation": "3149:1:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3141:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 355, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3141:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 358, + "mutability": "mutable", + "name": "s", + "nameLocation": "3168:1:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3160:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 357, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3160:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3017:158:6" + }, + "returnParameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [], + "src": "3184:0:6" + }, + "scope": 376, + "src": "3002:183:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 362, + "nodeType": "StructuredDocumentation", + "src": "3191:294:6", + "text": " @dev Returns the current nonce for `owner`. This value must be\n included whenever a signature is generated for {permit}.\n Every successful call to {permit} increases ``owner``'s nonce by one. This\n prevents a signature from being used multiple times." + }, + "functionSelector": "7ecebe00", + "id": 369, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nonces", + "nameLocation": "3499:6:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 365, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 364, + "mutability": "mutable", + "name": "owner", + "nameLocation": "3514:5:6", + "nodeType": "VariableDeclaration", + "scope": 369, + "src": "3506:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 363, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3506:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3505:15:6" + }, + "returnParameters": { + "id": 368, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 367, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 369, + "src": "3544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 366, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3543:9:6" + }, + "scope": 376, + "src": "3490:63:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 370, + "nodeType": "StructuredDocumentation", + "src": "3559:128:6", + "text": " @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}." + }, + "functionSelector": "3644e515", + "id": 375, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "DOMAIN_SEPARATOR", + "nameLocation": "3754:16:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "3770:2:6" + }, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "3796:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 372, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3795:9:6" + }, + "scope": 376, + "src": "3745:60:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 377, + "src": "2116:1691:6", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "123:3685:6" + }, + "id": 6 + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "exportedSymbols": { + "IERC1363": [ + 229 + ], + "IERC20": [ + 340 + ], + "SafeERC20": [ + 831 + ] + }, + "id": 832, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 378, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "115:24:7" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "../IERC20.sol", + "id": 380, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 832, + "sourceUnit": 341, + "src": "141:37:7", + "symbolAliases": [ + { + "foreign": { + "id": 379, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "149:6:7", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC1363.sol", + "file": "../../../interfaces/IERC1363.sol", + "id": 382, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 832, + "sourceUnit": 230, + "src": "179:58:7", + "symbolAliases": [ + { + "foreign": { + "id": 381, + "name": "IERC1363", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "187:8:7", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SafeERC20", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 383, + "nodeType": "StructuredDocumentation", + "src": "239:458:7", + "text": " @title SafeERC20\n @dev Wrappers around ERC-20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc." + }, + "fullyImplemented": true, + "id": 831, + "linearizedBaseContracts": [ + 831 + ], + "name": "SafeERC20", + "nameLocation": "706:9:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 384, + "nodeType": "StructuredDocumentation", + "src": "722:65:7", + "text": " @dev An operation with an ERC-20 token failed." + }, + "errorSelector": "5274afe7", + "id": 388, + "name": "SafeERC20FailedOperation", + "nameLocation": "798:24:7", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 386, + "mutability": "mutable", + "name": "token", + "nameLocation": "831:5:7", + "nodeType": "VariableDeclaration", + "scope": 388, + "src": "823:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "823:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "822:15:7" + }, + "src": "792:46:7" + }, + { + "documentation": { + "id": 389, + "nodeType": "StructuredDocumentation", + "src": "844:71:7", + "text": " @dev Indicates a failed `decreaseAllowance` request." + }, + "errorSelector": "e570110f", + "id": 397, + "name": "SafeERC20FailedDecreaseAllowance", + "nameLocation": "926:32:7", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 391, + "mutability": "mutable", + "name": "spender", + "nameLocation": "967:7:7", + "nodeType": "VariableDeclaration", + "scope": 397, + "src": "959:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "959:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 393, + "mutability": "mutable", + "name": "currentAllowance", + "nameLocation": "984:16:7", + "nodeType": "VariableDeclaration", + "scope": 397, + "src": "976:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 392, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "976:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 395, + "mutability": "mutable", + "name": "requestedDecrease", + "nameLocation": "1010:17:7", + "nodeType": "VariableDeclaration", + "scope": 397, + "src": "1002:25:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 394, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1002:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "958:70:7" + }, + "src": "920:109:7" + }, + { + "body": { + "id": 424, + "nodeType": "Block", + "src": "1291:132:7", + "statements": [ + { + "condition": { + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1305:38:7", + "subExpression": { + "arguments": [ + { + "id": 409, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "1320:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 410, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 403, + "src": "1327:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 411, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1331:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "74727565", + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1338:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 408, + "name": "_safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "1306:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1306:37:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 423, + "nodeType": "IfStatement", + "src": "1301:116:7", + "trueBody": { + "id": 422, + "nodeType": "Block", + "src": "1345:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 418, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "1399:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + ], + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1391:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 416, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1391:7:7", + "typeDescriptions": {} + } + }, + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1391:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 415, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "1366:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1366:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 421, + "nodeType": "RevertStatement", + "src": "1359:47:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 398, + "nodeType": "StructuredDocumentation", + "src": "1035:179:7", + "text": " @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n non-reverting calls are assumed to be successful." + }, + "id": 425, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransfer", + "nameLocation": "1228:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 401, + "mutability": "mutable", + "name": "token", + "nameLocation": "1248:5:7", + "nodeType": "VariableDeclaration", + "scope": 425, + "src": "1241:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 400, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 399, + "name": "IERC20", + "nameLocations": [ + "1241:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "1241:6:7" + }, + "referencedDeclaration": 340, + "src": "1241:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 403, + "mutability": "mutable", + "name": "to", + "nameLocation": "1263:2:7", + "nodeType": "VariableDeclaration", + "scope": 425, + "src": "1255:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 402, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1255:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 405, + "mutability": "mutable", + "name": "value", + "nameLocation": "1275:5:7", + "nodeType": "VariableDeclaration", + "scope": 425, + "src": "1267:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 404, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1267:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1240:41:7" + }, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [], + "src": "1291:0:7" + }, + "scope": 831, + "src": "1219:204:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 455, + "nodeType": "Block", + "src": "1752:142:7", + "statements": [ + { + "condition": { + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1766:48:7", + "subExpression": { + "arguments": [ + { + "id": 439, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "1785:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 440, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 431, + "src": "1792:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 441, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "1798:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 442, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 435, + "src": "1802:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "74727565", + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1809:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 438, + "name": "_safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 807, + "src": "1767:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,address,uint256,bool) returns (bool)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1767:47:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 454, + "nodeType": "IfStatement", + "src": "1762:126:7", + "trueBody": { + "id": 453, + "nodeType": "Block", + "src": "1816:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 449, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "1870:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + ], + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1862:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1862:7:7", + "typeDescriptions": {} + } + }, + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1862:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 446, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "1837:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1837:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 452, + "nodeType": "RevertStatement", + "src": "1830:47:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 426, + "nodeType": "StructuredDocumentation", + "src": "1429:228:7", + "text": " @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n calling contract. If `token` returns no value, non-reverting calls are assumed to be successful." + }, + "id": 456, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "1671:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 429, + "mutability": "mutable", + "name": "token", + "nameLocation": "1695:5:7", + "nodeType": "VariableDeclaration", + "scope": 456, + "src": "1688:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 428, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 427, + "name": "IERC20", + "nameLocations": [ + "1688:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "1688:6:7" + }, + "referencedDeclaration": 340, + "src": "1688:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 431, + "mutability": "mutable", + "name": "from", + "nameLocation": "1710:4:7", + "nodeType": "VariableDeclaration", + "scope": 456, + "src": "1702:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 430, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1702:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 433, + "mutability": "mutable", + "name": "to", + "nameLocation": "1724:2:7", + "nodeType": "VariableDeclaration", + "scope": 456, + "src": "1716:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 432, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1716:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 435, + "mutability": "mutable", + "name": "value", + "nameLocation": "1736:5:7", + "nodeType": "VariableDeclaration", + "scope": 456, + "src": "1728:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 434, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1728:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1687:55:7" + }, + "returnParameters": { + "id": 437, + "nodeType": "ParameterList", + "parameters": [], + "src": "1752:0:7" + }, + "scope": 831, + "src": "1662:232:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 476, + "nodeType": "Block", + "src": "2121:62:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 470, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "2152:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 471, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "2159:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 472, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "2163:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "66616c7365", + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2170:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 469, + "name": "_safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "2138:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2138:38:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 468, + "id": 475, + "nodeType": "Return", + "src": "2131:45:7" + } + ] + }, + "documentation": { + "id": 457, + "nodeType": "StructuredDocumentation", + "src": "1900:126:7", + "text": " @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful." + }, + "id": 477, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "trySafeTransfer", + "nameLocation": "2040:15:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 460, + "mutability": "mutable", + "name": "token", + "nameLocation": "2063:5:7", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "2056:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 459, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 458, + "name": "IERC20", + "nameLocations": [ + "2056:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "2056:6:7" + }, + "referencedDeclaration": 340, + "src": "2056:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 462, + "mutability": "mutable", + "name": "to", + "nameLocation": "2078:2:7", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "2070:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2070:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 464, + "mutability": "mutable", + "name": "value", + "nameLocation": "2090:5:7", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "2082:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 463, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2082:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2055:41:7" + }, + "returnParameters": { + "id": 468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 467, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "2115:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 466, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2115:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2114:6:7" + }, + "scope": 831, + "src": "2031:152:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 500, + "nodeType": "Block", + "src": "2432:72:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 493, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 481, + "src": "2467:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 494, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 483, + "src": "2474:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 495, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 485, + "src": "2480:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 496, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 487, + "src": "2484:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "66616c7365", + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2491:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 492, + "name": "_safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 807, + "src": "2449:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,address,uint256,bool) returns (bool)" + } + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2449:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 491, + "id": 499, + "nodeType": "Return", + "src": "2442:55:7" + } + ] + }, + "documentation": { + "id": 478, + "nodeType": "StructuredDocumentation", + "src": "2189:130:7", + "text": " @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful." + }, + "id": 501, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "trySafeTransferFrom", + "nameLocation": "2333:19:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 488, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 481, + "mutability": "mutable", + "name": "token", + "nameLocation": "2360:5:7", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2353:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 480, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 479, + "name": "IERC20", + "nameLocations": [ + "2353:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "2353:6:7" + }, + "referencedDeclaration": 340, + "src": "2353:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 483, + "mutability": "mutable", + "name": "from", + "nameLocation": "2375:4:7", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2367:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2367:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 485, + "mutability": "mutable", + "name": "to", + "nameLocation": "2389:2:7", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2381:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 484, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2381:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 487, + "mutability": "mutable", + "name": "value", + "nameLocation": "2401:5:7", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2393:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 486, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2393:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2352:55:7" + }, + "returnParameters": { + "id": 491, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 490, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2426:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 489, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2426:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2425:6:7" + }, + "scope": 831, + "src": "2324:180:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 531, + "nodeType": "Block", + "src": "3246:139:7", + "statements": [ + { + "assignments": [ + 513 + ], + "declarations": [ + { + "constant": false, + "id": 513, + "mutability": "mutable", + "name": "oldAllowance", + "nameLocation": "3264:12:7", + "nodeType": "VariableDeclaration", + "scope": 531, + "src": "3256:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 512, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3256:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 522, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 518, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3303:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$831", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$831", + "typeString": "library SafeERC20" + } + ], + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3295:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 516, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3295:7:7", + "typeDescriptions": {} + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3295:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 520, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 507, + "src": "3310:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 514, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 505, + "src": "3279:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3285:9:7", + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 317, + "src": "3279:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3279:39:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3256:62:7" + }, + { + "expression": { + "arguments": [ + { + "id": 524, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 505, + "src": "3341:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 525, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 507, + "src": "3348:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 526, + "name": "oldAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "3357:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 527, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 509, + "src": "3372:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3357:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 523, + "name": "forceApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "3328:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3328:50:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 530, + "nodeType": "ExpressionStatement", + "src": "3328:50:7" + } + ] + }, + "documentation": { + "id": 502, + "nodeType": "StructuredDocumentation", + "src": "2510:645:7", + "text": " @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n non-reverting calls are assumed to be successful.\n IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior." + }, + "id": 532, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeIncreaseAllowance", + "nameLocation": "3169:21:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 510, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 505, + "mutability": "mutable", + "name": "token", + "nameLocation": "3198:5:7", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "3191:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 504, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 503, + "name": "IERC20", + "nameLocations": [ + "3191:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "3191:6:7" + }, + "referencedDeclaration": 340, + "src": "3191:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 507, + "mutability": "mutable", + "name": "spender", + "nameLocation": "3213:7:7", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "3205:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 506, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3205:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 509, + "mutability": "mutable", + "name": "value", + "nameLocation": "3230:5:7", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "3222:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 508, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3222:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3190:46:7" + }, + "returnParameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [], + "src": "3246:0:7" + }, + "scope": 831, + "src": "3160:225:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 574, + "nodeType": "Block", + "src": "4151:370:7", + "statements": [ + { + "id": 573, + "nodeType": "UncheckedBlock", + "src": "4161:354:7", + "statements": [ + { + "assignments": [ + 544 + ], + "declarations": [ + { + "constant": false, + "id": 544, + "mutability": "mutable", + "name": "currentAllowance", + "nameLocation": "4193:16:7", + "nodeType": "VariableDeclaration", + "scope": 573, + "src": "4185:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4185:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 553, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 549, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4236:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$831", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$831", + "typeString": "library SafeERC20" + } + ], + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4228:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 547, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4228:7:7", + "typeDescriptions": {} + } + }, + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4228:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 551, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "4243:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 545, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "4212:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4218:9:7", + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 317, + "src": "4212:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4212:39:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4185:66:7" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 554, + "name": "currentAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 544, + "src": "4269:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 555, + "name": "requestedDecrease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 540, + "src": "4288:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4269:36:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 564, + "nodeType": "IfStatement", + "src": "4265:160:7", + "trueBody": { + "id": 563, + "nodeType": "Block", + "src": "4307:118:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 558, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "4365:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 559, + "name": "currentAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 544, + "src": "4374:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 560, + "name": "requestedDecrease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 540, + "src": "4392:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 557, + "name": "SafeERC20FailedDecreaseAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 397, + "src": "4332:32:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$_t_uint256_$_t_uint256_$returns$_t_error_$", + "typeString": "function (address,uint256,uint256) pure returns (error)" + } + }, + "id": 561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4332:78:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 562, + "nodeType": "RevertStatement", + "src": "4325:85:7" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 566, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "4451:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 567, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "4458:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 568, + "name": "currentAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 544, + "src": "4467:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 569, + "name": "requestedDecrease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 540, + "src": "4486:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4467:36:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 565, + "name": "forceApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "4438:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4438:66:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 572, + "nodeType": "ExpressionStatement", + "src": "4438:66:7" + } + ] + } + ] + }, + "documentation": { + "id": 533, + "nodeType": "StructuredDocumentation", + "src": "3391:657:7", + "text": " @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n value, non-reverting calls are assumed to be successful.\n IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior." + }, + "id": 575, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeDecreaseAllowance", + "nameLocation": "4062:21:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 541, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 536, + "mutability": "mutable", + "name": "token", + "nameLocation": "4091:5:7", + "nodeType": "VariableDeclaration", + "scope": 575, + "src": "4084:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 535, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 534, + "name": "IERC20", + "nameLocations": [ + "4084:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "4084:6:7" + }, + "referencedDeclaration": 340, + "src": "4084:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 538, + "mutability": "mutable", + "name": "spender", + "nameLocation": "4106:7:7", + "nodeType": "VariableDeclaration", + "scope": 575, + "src": "4098:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 537, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4098:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 540, + "mutability": "mutable", + "name": "requestedDecrease", + "nameLocation": "4123:17:7", + "nodeType": "VariableDeclaration", + "scope": 575, + "src": "4115:25:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 539, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4115:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4083:58:7" + }, + "returnParameters": { + "id": 542, + "nodeType": "ParameterList", + "parameters": [], + "src": "4151:0:7" + }, + "scope": 831, + "src": "4053:468:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 625, + "nodeType": "Block", + "src": "5175:290:7", + "statements": [ + { + "condition": { + "id": 592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5189:43:7", + "subExpression": { + "arguments": [ + { + "id": 587, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5203:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 588, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 581, + "src": "5210:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 589, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 583, + "src": "5219:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "66616c7365", + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5226:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 586, + "name": "_safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "5190:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5190:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 624, + "nodeType": "IfStatement", + "src": "5185:274:7", + "trueBody": { + "id": 623, + "nodeType": "Block", + "src": "5234:225:7", + "statements": [ + { + "condition": { + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5252:38:7", + "subExpression": { + "arguments": [ + { + "id": 594, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5266:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 595, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 581, + "src": "5273:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "30", + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5282:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "hexValue": "74727565", + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5285:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 593, + "name": "_safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "5253:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5253:37:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 607, + "nodeType": "IfStatement", + "src": "5248:91:7", + "trueBody": { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 603, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5332:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + ], + "id": 602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5324:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 601, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5324:7:7", + "typeDescriptions": {} + } + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5324:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 600, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5299:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5299:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 606, + "nodeType": "RevertStatement", + "src": "5292:47:7" + } + }, + { + "condition": { + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5357:42:7", + "subExpression": { + "arguments": [ + { + "id": 609, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5371:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 610, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 581, + "src": "5378:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 611, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 583, + "src": "5387:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "74727565", + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5394:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 608, + "name": "_safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "5358:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5358:41:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 622, + "nodeType": "IfStatement", + "src": "5353:95:7", + "trueBody": { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 618, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5441:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + ], + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5433:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5433:7:7", + "typeDescriptions": {} + } + }, + "id": 619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5433:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 615, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5408:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5408:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 621, + "nodeType": "RevertStatement", + "src": "5401:47:7" + } + } + ] + } + } + ] + }, + "documentation": { + "id": 576, + "nodeType": "StructuredDocumentation", + "src": "4527:566:7", + "text": " @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n to be set to zero before setting it to a non-zero value, such as USDT.\n NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n set here." + }, + "id": 626, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forceApprove", + "nameLocation": "5107:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 584, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 579, + "mutability": "mutable", + "name": "token", + "nameLocation": "5127:5:7", + "nodeType": "VariableDeclaration", + "scope": 626, + "src": "5120:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 578, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 577, + "name": "IERC20", + "nameLocations": [ + "5120:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "5120:6:7" + }, + "referencedDeclaration": 340, + "src": "5120:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 581, + "mutability": "mutable", + "name": "spender", + "nameLocation": "5142:7:7", + "nodeType": "VariableDeclaration", + "scope": 626, + "src": "5134:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 580, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5134:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 583, + "mutability": "mutable", + "name": "value", + "nameLocation": "5159:5:7", + "nodeType": "VariableDeclaration", + "scope": 626, + "src": "5151:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 582, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5151:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5119:46:7" + }, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "5175:0:7" + }, + "scope": 831, + "src": "5098:367:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 668, + "nodeType": "Block", + "src": "5914:219:7", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 639, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 632, + "src": "5928:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5931:4:7", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "5928:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5936:6:7", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5928:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5946:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5928:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6014:39:7", + "subExpression": { + "arguments": [ + { + "id": 653, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 632, + "src": "6037:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 654, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 634, + "src": "6041:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 655, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "6048:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 651, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 630, + "src": "6015:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6021:15:7", + "memberName": "transferAndCall", + "nodeType": "MemberAccess", + "referencedDeclaration": 180, + "src": "6015:21:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes memory) external returns (bool)" + } + }, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6015:38:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 666, + "nodeType": "IfStatement", + "src": "6010:117:7", + "trueBody": { + "id": 665, + "nodeType": "Block", + "src": "6055:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 661, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 630, + "src": "6109:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + ], + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6101:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6101:7:7", + "typeDescriptions": {} + } + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6101:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 658, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "6076:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6076:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 664, + "nodeType": "RevertStatement", + "src": "6069:47:7" + } + ] + } + }, + "id": 667, + "nodeType": "IfStatement", + "src": "5924:203:7", + "trueBody": { + "id": 650, + "nodeType": "Block", + "src": "5949:55:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 645, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 630, + "src": "5976:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + { + "id": 646, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 632, + "src": "5983:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 647, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 634, + "src": "5987:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 644, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 425, + "src": "5963:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5963:30:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 649, + "nodeType": "ExpressionStatement", + "src": "5963:30:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 627, + "nodeType": "StructuredDocumentation", + "src": "5471:335:7", + "text": " @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n targeting contracts.\n Reverts if the returned value is other than `true`." + }, + "id": 669, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferAndCallRelaxed", + "nameLocation": "5820:22:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 630, + "mutability": "mutable", + "name": "token", + "nameLocation": "5852:5:7", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "5843:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + "typeName": { + "id": 629, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 628, + "name": "IERC1363", + "nameLocations": [ + "5843:8:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 229, + "src": "5843:8:7" + }, + "referencedDeclaration": 229, + "src": "5843:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 632, + "mutability": "mutable", + "name": "to", + "nameLocation": "5867:2:7", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "5859:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 631, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5859:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 634, + "mutability": "mutable", + "name": "value", + "nameLocation": "5879:5:7", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "5871:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 633, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5871:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 636, + "mutability": "mutable", + "name": "data", + "nameLocation": "5899:4:7", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "5886:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 635, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5886:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "5842:62:7" + }, + "returnParameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [], + "src": "5914:0:7" + }, + "scope": 831, + "src": "5811:322:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 715, + "nodeType": "Block", + "src": "6654:239:7", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 684, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 677, + "src": "6668:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6671:4:7", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "6668:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6676:6:7", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6668:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6686:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6668:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "id": 704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6764:49:7", + "subExpression": { + "arguments": [ + { + "id": 699, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 675, + "src": "6791:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 700, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 677, + "src": "6797:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 701, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "6801:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 702, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "6808:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 697, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 673, + "src": "6765:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "id": 698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6771:19:7", + "memberName": "transferFromAndCall", + "nodeType": "MemberAccess", + "referencedDeclaration": 206, + "src": "6765:25:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bool)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6765:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 713, + "nodeType": "IfStatement", + "src": "6760:127:7", + "trueBody": { + "id": 712, + "nodeType": "Block", + "src": "6815:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 708, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 673, + "src": "6869:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + ], + "id": 707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6861:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 706, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6861:7:7", + "typeDescriptions": {} + } + }, + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6861:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 705, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "6836:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6836:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 711, + "nodeType": "RevertStatement", + "src": "6829:47:7" + } + ] + } + }, + "id": 714, + "nodeType": "IfStatement", + "src": "6664:223:7", + "trueBody": { + "id": 696, + "nodeType": "Block", + "src": "6689:65:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 690, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 673, + "src": "6720:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + { + "id": 691, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 675, + "src": "6727:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 692, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 677, + "src": "6733:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 693, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "6737:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 689, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6703:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,address,uint256)" + } + }, + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6703:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 695, + "nodeType": "ExpressionStatement", + "src": "6703:40:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 670, + "nodeType": "StructuredDocumentation", + "src": "6139:343:7", + "text": " @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n targeting contracts.\n Reverts if the returned value is other than `true`." + }, + "id": 716, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFromAndCallRelaxed", + "nameLocation": "6496:26:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 673, + "mutability": "mutable", + "name": "token", + "nameLocation": "6541:5:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6532:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + "typeName": { + "id": 672, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 671, + "name": "IERC1363", + "nameLocations": [ + "6532:8:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 229, + "src": "6532:8:7" + }, + "referencedDeclaration": 229, + "src": "6532:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 675, + "mutability": "mutable", + "name": "from", + "nameLocation": "6564:4:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6556:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6556:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 677, + "mutability": "mutable", + "name": "to", + "nameLocation": "6586:2:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6578:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 676, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6578:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 679, + "mutability": "mutable", + "name": "value", + "nameLocation": "6606:5:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6598:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 678, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6598:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 681, + "mutability": "mutable", + "name": "data", + "nameLocation": "6634:4:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6621:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 680, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6621:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "6522:122:7" + }, + "returnParameters": { + "id": 683, + "nodeType": "ParameterList", + "parameters": [], + "src": "6654:0:7" + }, + "scope": 831, + "src": "6487:406:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 758, + "nodeType": "Block", + "src": "7661:218:7", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 729, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 722, + "src": "7675:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7678:4:7", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "7675:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7683:6:7", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7675:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7693:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7675:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7761:38:7", + "subExpression": { + "arguments": [ + { + "id": 743, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 722, + "src": "7783:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 744, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 724, + "src": "7787:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 745, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 726, + "src": "7794:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 741, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 720, + "src": "7762:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "id": 742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7768:14:7", + "memberName": "approveAndCall", + "nodeType": "MemberAccess", + "referencedDeclaration": 228, + "src": "7762:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes memory) external returns (bool)" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7762:37:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 756, + "nodeType": "IfStatement", + "src": "7757:116:7", + "trueBody": { + "id": 755, + "nodeType": "Block", + "src": "7801:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 751, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 720, + "src": "7855:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + ], + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7847:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 749, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7847:7:7", + "typeDescriptions": {} + } + }, + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7847:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 748, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "7822:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7822:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 754, + "nodeType": "RevertStatement", + "src": "7815:47:7" + } + ] + } + }, + "id": 757, + "nodeType": "IfStatement", + "src": "7671:202:7", + "trueBody": { + "id": 740, + "nodeType": "Block", + "src": "7696:55:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 735, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 720, + "src": "7723:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + { + "id": 736, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 722, + "src": "7730:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 737, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 724, + "src": "7734:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 734, + "name": "forceApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "7710:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7710:30:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "7710:30:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 717, + "nodeType": "StructuredDocumentation", + "src": "6899:655:7", + "text": " @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n targeting contracts.\n NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n once without retrying, and relies on the returned value to be true.\n Reverts if the returned value is other than `true`." + }, + "id": 759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approveAndCallRelaxed", + "nameLocation": "7568:21:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 720, + "mutability": "mutable", + "name": "token", + "nameLocation": "7599:5:7", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "7590:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + "typeName": { + "id": 719, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 718, + "name": "IERC1363", + "nameLocations": [ + "7590:8:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 229, + "src": "7590:8:7" + }, + "referencedDeclaration": 229, + "src": "7590:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 722, + "mutability": "mutable", + "name": "to", + "nameLocation": "7614:2:7", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "7606:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 721, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7606:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 724, + "mutability": "mutable", + "name": "value", + "nameLocation": "7626:5:7", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "7618:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 723, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7618:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 726, + "mutability": "mutable", + "name": "data", + "nameLocation": "7646:4:7", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "7633:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 725, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7633:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "7589:62:7" + }, + "returnParameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [], + "src": "7661:0:7" + }, + "scope": 831, + "src": "7559:320:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 781, + "nodeType": "Block", + "src": "8481:1136:7", + "statements": [ + { + "assignments": [ + 775 + ], + "declarations": [ + { + "constant": false, + "id": 775, + "mutability": "mutable", + "name": "selector", + "nameLocation": "8498:8:7", + "nodeType": "VariableDeclaration", + "scope": 781, + "src": "8491:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 774, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "8491:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 779, + "initialValue": { + "expression": { + "expression": { + "id": 776, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "8509:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8516:8:7", + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 307, + "src": "8509:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function IERC20.transfer(address,uint256) returns (bool)" + } + }, + "id": 778, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8525:8:7", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "8509:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8491:42:7" + }, + { + "AST": { + "nativeSrc": "8569:1042:7", + "nodeType": "YulBlock", + "src": "8569:1042:7", + "statements": [ + { + "nativeSrc": "8583:22:7", + "nodeType": "YulVariableDeclaration", + "src": "8583:22:7", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8600:4:7", + "nodeType": "YulLiteral", + "src": "8600:4:7", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8594:5:7", + "nodeType": "YulIdentifier", + "src": "8594:5:7" + }, + "nativeSrc": "8594:11:7", + "nodeType": "YulFunctionCall", + "src": "8594:11:7" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "8587:3:7", + "nodeType": "YulTypedName", + "src": "8587:3:7", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8625:4:7", + "nodeType": "YulLiteral", + "src": "8625:4:7", + "type": "", + "value": "0x00" + }, + { + "name": "selector", + "nativeSrc": "8631:8:7", + "nodeType": "YulIdentifier", + "src": "8631:8:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8618:6:7", + "nodeType": "YulIdentifier", + "src": "8618:6:7" + }, + "nativeSrc": "8618:22:7", + "nodeType": "YulFunctionCall", + "src": "8618:22:7" + }, + "nativeSrc": "8618:22:7", + "nodeType": "YulExpressionStatement", + "src": "8618:22:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8660:4:7", + "nodeType": "YulLiteral", + "src": "8660:4:7", + "type": "", + "value": "0x04" + }, + { + "arguments": [ + { + "name": "to", + "nativeSrc": "8670:2:7", + "nodeType": "YulIdentifier", + "src": "8670:2:7" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8678:2:7", + "nodeType": "YulLiteral", + "src": "8678:2:7", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8686:1:7", + "nodeType": "YulLiteral", + "src": "8686:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "8682:3:7", + "nodeType": "YulIdentifier", + "src": "8682:3:7" + }, + "nativeSrc": "8682:6:7", + "nodeType": "YulFunctionCall", + "src": "8682:6:7" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "8674:3:7", + "nodeType": "YulIdentifier", + "src": "8674:3:7" + }, + "nativeSrc": "8674:15:7", + "nodeType": "YulFunctionCall", + "src": "8674:15:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8666:3:7", + "nodeType": "YulIdentifier", + "src": "8666:3:7" + }, + "nativeSrc": "8666:24:7", + "nodeType": "YulFunctionCall", + "src": "8666:24:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8653:6:7", + "nodeType": "YulIdentifier", + "src": "8653:6:7" + }, + "nativeSrc": "8653:38:7", + "nodeType": "YulFunctionCall", + "src": "8653:38:7" + }, + "nativeSrc": "8653:38:7", + "nodeType": "YulExpressionStatement", + "src": "8653:38:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8711:4:7", + "nodeType": "YulLiteral", + "src": "8711:4:7", + "type": "", + "value": "0x24" + }, + { + "name": "value", + "nativeSrc": "8717:5:7", + "nodeType": "YulIdentifier", + "src": "8717:5:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8704:6:7", + "nodeType": "YulIdentifier", + "src": "8704:6:7" + }, + "nativeSrc": "8704:19:7", + "nodeType": "YulFunctionCall", + "src": "8704:19:7" + }, + "nativeSrc": "8704:19:7", + "nodeType": "YulExpressionStatement", + "src": "8704:19:7" + }, + { + "nativeSrc": "8736:56:7", + "nodeType": "YulAssignment", + "src": "8736:56:7", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "8752:3:7", + "nodeType": "YulIdentifier", + "src": "8752:3:7" + }, + "nativeSrc": "8752:5:7", + "nodeType": "YulFunctionCall", + "src": "8752:5:7" + }, + { + "name": "token", + "nativeSrc": "8759:5:7", + "nodeType": "YulIdentifier", + "src": "8759:5:7" + }, + { + "kind": "number", + "nativeSrc": "8766:1:7", + "nodeType": "YulLiteral", + "src": "8766:1:7", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "8769:4:7", + "nodeType": "YulLiteral", + "src": "8769:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "8775:4:7", + "nodeType": "YulLiteral", + "src": "8775:4:7", + "type": "", + "value": "0x44" + }, + { + "kind": "number", + "nativeSrc": "8781:4:7", + "nodeType": "YulLiteral", + "src": "8781:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "8787:4:7", + "nodeType": "YulLiteral", + "src": "8787:4:7", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "call", + "nativeSrc": "8747:4:7", + "nodeType": "YulIdentifier", + "src": "8747:4:7" + }, + "nativeSrc": "8747:45:7", + "nodeType": "YulFunctionCall", + "src": "8747:45:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "8736:7:7", + "nodeType": "YulIdentifier", + "src": "8736:7:7" + } + ] + }, + { + "body": { + "nativeSrc": "9009:562:7", + "nodeType": "YulBlock", + "src": "9009:562:7", + "statements": [ + { + "body": { + "nativeSrc": "9144:133:7", + "nodeType": "YulBlock", + "src": "9144:133:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "9181:3:7", + "nodeType": "YulIdentifier", + "src": "9181:3:7" + }, + { + "kind": "number", + "nativeSrc": "9186:4:7", + "nodeType": "YulLiteral", + "src": "9186:4:7", + "type": "", + "value": "0x00" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "9192:14:7", + "nodeType": "YulIdentifier", + "src": "9192:14:7" + }, + "nativeSrc": "9192:16:7", + "nodeType": "YulFunctionCall", + "src": "9192:16:7" + } + ], + "functionName": { + "name": "returndatacopy", + "nativeSrc": "9166:14:7", + "nodeType": "YulIdentifier", + "src": "9166:14:7" + }, + "nativeSrc": "9166:43:7", + "nodeType": "YulFunctionCall", + "src": "9166:43:7" + }, + "nativeSrc": "9166:43:7", + "nodeType": "YulExpressionStatement", + "src": "9166:43:7" + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "9237:3:7", + "nodeType": "YulIdentifier", + "src": "9237:3:7" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "9242:14:7", + "nodeType": "YulIdentifier", + "src": "9242:14:7" + }, + "nativeSrc": "9242:16:7", + "nodeType": "YulFunctionCall", + "src": "9242:16:7" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9230:6:7", + "nodeType": "YulIdentifier", + "src": "9230:6:7" + }, + "nativeSrc": "9230:29:7", + "nodeType": "YulFunctionCall", + "src": "9230:29:7" + }, + "nativeSrc": "9230:29:7", + "nodeType": "YulExpressionStatement", + "src": "9230:29:7" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "9126:7:7", + "nodeType": "YulIdentifier", + "src": "9126:7:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "9119:6:7", + "nodeType": "YulIdentifier", + "src": "9119:6:7" + }, + "nativeSrc": "9119:15:7", + "nodeType": "YulFunctionCall", + "src": "9119:15:7" + }, + { + "name": "bubble", + "nativeSrc": "9136:6:7", + "nodeType": "YulIdentifier", + "src": "9136:6:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9115:3:7", + "nodeType": "YulIdentifier", + "src": "9115:3:7" + }, + "nativeSrc": "9115:28:7", + "nodeType": "YulFunctionCall", + "src": "9115:28:7" + }, + "nativeSrc": "9112:165:7", + "nodeType": "YulIf", + "src": "9112:165:7" + }, + { + "nativeSrc": "9476:81:7", + "nodeType": "YulAssignment", + "src": "9476:81:7", + "value": { + "arguments": [ + { + "name": "success", + "nativeSrc": "9491:7:7", + "nodeType": "YulIdentifier", + "src": "9491:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "9511:14:7", + "nodeType": "YulIdentifier", + "src": "9511:14:7" + }, + "nativeSrc": "9511:16:7", + "nodeType": "YulFunctionCall", + "src": "9511:16:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "9504:6:7", + "nodeType": "YulIdentifier", + "src": "9504:6:7" + }, + "nativeSrc": "9504:24:7", + "nodeType": "YulFunctionCall", + "src": "9504:24:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "token", + "nativeSrc": "9545:5:7", + "nodeType": "YulIdentifier", + "src": "9545:5:7" + } + ], + "functionName": { + "name": "extcodesize", + "nativeSrc": "9533:11:7", + "nodeType": "YulIdentifier", + "src": "9533:11:7" + }, + "nativeSrc": "9533:18:7", + "nodeType": "YulFunctionCall", + "src": "9533:18:7" + }, + { + "kind": "number", + "nativeSrc": "9553:1:7", + "nodeType": "YulLiteral", + "src": "9553:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "9530:2:7", + "nodeType": "YulIdentifier", + "src": "9530:2:7" + }, + "nativeSrc": "9530:25:7", + "nodeType": "YulFunctionCall", + "src": "9530:25:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9500:3:7", + "nodeType": "YulIdentifier", + "src": "9500:3:7" + }, + "nativeSrc": "9500:56:7", + "nodeType": "YulFunctionCall", + "src": "9500:56:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9487:3:7", + "nodeType": "YulIdentifier", + "src": "9487:3:7" + }, + "nativeSrc": "9487:70:7", + "nodeType": "YulFunctionCall", + "src": "9487:70:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "9476:7:7", + "nodeType": "YulIdentifier", + "src": "9476:7:7" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "8979:7:7", + "nodeType": "YulIdentifier", + "src": "8979:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8997:4:7", + "nodeType": "YulLiteral", + "src": "8997:4:7", + "type": "", + "value": "0x00" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8991:5:7", + "nodeType": "YulIdentifier", + "src": "8991:5:7" + }, + "nativeSrc": "8991:11:7", + "nodeType": "YulFunctionCall", + "src": "8991:11:7" + }, + { + "kind": "number", + "nativeSrc": "9004:1:7", + "nodeType": "YulLiteral", + "src": "9004:1:7", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "8988:2:7", + "nodeType": "YulIdentifier", + "src": "8988:2:7" + }, + "nativeSrc": "8988:18:7", + "nodeType": "YulFunctionCall", + "src": "8988:18:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8975:3:7", + "nodeType": "YulIdentifier", + "src": "8975:3:7" + }, + "nativeSrc": "8975:32:7", + "nodeType": "YulFunctionCall", + "src": "8975:32:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "8968:6:7", + "nodeType": "YulIdentifier", + "src": "8968:6:7" + }, + "nativeSrc": "8968:40:7", + "nodeType": "YulFunctionCall", + "src": "8968:40:7" + }, + "nativeSrc": "8965:606:7", + "nodeType": "YulIf", + "src": "8965:606:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9591:4:7", + "nodeType": "YulLiteral", + "src": "9591:4:7", + "type": "", + "value": "0x40" + }, + { + "name": "fmp", + "nativeSrc": "9597:3:7", + "nodeType": "YulIdentifier", + "src": "9597:3:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9584:6:7", + "nodeType": "YulIdentifier", + "src": "9584:6:7" + }, + "nativeSrc": "9584:17:7", + "nodeType": "YulFunctionCall", + "src": "9584:17:7" + }, + "nativeSrc": "9584:17:7", + "nodeType": "YulExpressionStatement", + "src": "9584:17:7" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 769, + "isOffset": false, + "isSlot": false, + "src": "9136:6:7", + "valueSize": 1 + }, + { + "declaration": 775, + "isOffset": false, + "isSlot": false, + "src": "8631:8:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "8736:7:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "8979:7:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "9126:7:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "9476:7:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "9491:7:7", + "valueSize": 1 + }, + { + "declaration": 765, + "isOffset": false, + "isSlot": false, + "src": "8670:2:7", + "valueSize": 1 + }, + { + "declaration": 763, + "isOffset": false, + "isSlot": false, + "src": "8759:5:7", + "valueSize": 1 + }, + { + "declaration": 763, + "isOffset": false, + "isSlot": false, + "src": "9545:5:7", + "valueSize": 1 + }, + { + "declaration": 767, + "isOffset": false, + "isSlot": false, + "src": "8717:5:7", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 780, + "nodeType": "InlineAssembly", + "src": "8544:1067:7" + } + ] + }, + "documentation": { + "id": 760, + "nodeType": "StructuredDocumentation", + "src": "7885:483:7", + "text": " @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param to The recipient of the tokens\n @param value The amount of token to transfer\n @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean." + }, + "id": 782, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeTransfer", + "nameLocation": "8382:13:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 763, + "mutability": "mutable", + "name": "token", + "nameLocation": "8403:5:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8396:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 762, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 761, + "name": "IERC20", + "nameLocations": [ + "8396:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "8396:6:7" + }, + "referencedDeclaration": 340, + "src": "8396:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 765, + "mutability": "mutable", + "name": "to", + "nameLocation": "8418:2:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8410:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 764, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8410:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 767, + "mutability": "mutable", + "name": "value", + "nameLocation": "8430:5:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8422:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 766, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8422:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 769, + "mutability": "mutable", + "name": "bubble", + "nameLocation": "8442:6:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8437:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 768, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8437:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "8395:54:7" + }, + "returnParameters": { + "id": 773, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 772, + "mutability": "mutable", + "name": "success", + "nameLocation": "8472:7:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8467:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 771, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8467:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "8466:14:7" + }, + "scope": 831, + "src": "8373:1244:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 806, + "nodeType": "Block", + "src": "10337:1221:7", + "statements": [ + { + "assignments": [ + 800 + ], + "declarations": [ + { + "constant": false, + "id": 800, + "mutability": "mutable", + "name": "selector", + "nameLocation": "10354:8:7", + "nodeType": "VariableDeclaration", + "scope": 806, + "src": "10347:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 799, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "10347:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 804, + "initialValue": { + "expression": { + "expression": { + "id": 801, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "10365:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10372:12:7", + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 339, + "src": "10365:19:7", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function IERC20.transferFrom(address,address,uint256) returns (bool)" + } + }, + "id": 803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10385:8:7", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "10365:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10347:46:7" + }, + { + "AST": { + "nativeSrc": "10429:1123:7", + "nodeType": "YulBlock", + "src": "10429:1123:7", + "statements": [ + { + "nativeSrc": "10443:22:7", + "nodeType": "YulVariableDeclaration", + "src": "10443:22:7", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10460:4:7", + "nodeType": "YulLiteral", + "src": "10460:4:7", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10454:5:7", + "nodeType": "YulIdentifier", + "src": "10454:5:7" + }, + "nativeSrc": "10454:11:7", + "nodeType": "YulFunctionCall", + "src": "10454:11:7" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "10447:3:7", + "nodeType": "YulTypedName", + "src": "10447:3:7", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10485:4:7", + "nodeType": "YulLiteral", + "src": "10485:4:7", + "type": "", + "value": "0x00" + }, + { + "name": "selector", + "nativeSrc": "10491:8:7", + "nodeType": "YulIdentifier", + "src": "10491:8:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10478:6:7", + "nodeType": "YulIdentifier", + "src": "10478:6:7" + }, + "nativeSrc": "10478:22:7", + "nodeType": "YulFunctionCall", + "src": "10478:22:7" + }, + "nativeSrc": "10478:22:7", + "nodeType": "YulExpressionStatement", + "src": "10478:22:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10520:4:7", + "nodeType": "YulLiteral", + "src": "10520:4:7", + "type": "", + "value": "0x04" + }, + { + "arguments": [ + { + "name": "from", + "nativeSrc": "10530:4:7", + "nodeType": "YulIdentifier", + "src": "10530:4:7" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10540:2:7", + "nodeType": "YulLiteral", + "src": "10540:2:7", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10548:1:7", + "nodeType": "YulLiteral", + "src": "10548:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "10544:3:7", + "nodeType": "YulIdentifier", + "src": "10544:3:7" + }, + "nativeSrc": "10544:6:7", + "nodeType": "YulFunctionCall", + "src": "10544:6:7" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10536:3:7", + "nodeType": "YulIdentifier", + "src": "10536:3:7" + }, + "nativeSrc": "10536:15:7", + "nodeType": "YulFunctionCall", + "src": "10536:15:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10526:3:7", + "nodeType": "YulIdentifier", + "src": "10526:3:7" + }, + "nativeSrc": "10526:26:7", + "nodeType": "YulFunctionCall", + "src": "10526:26:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10513:6:7", + "nodeType": "YulIdentifier", + "src": "10513:6:7" + }, + "nativeSrc": "10513:40:7", + "nodeType": "YulFunctionCall", + "src": "10513:40:7" + }, + "nativeSrc": "10513:40:7", + "nodeType": "YulExpressionStatement", + "src": "10513:40:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10573:4:7", + "nodeType": "YulLiteral", + "src": "10573:4:7", + "type": "", + "value": "0x24" + }, + { + "arguments": [ + { + "name": "to", + "nativeSrc": "10583:2:7", + "nodeType": "YulIdentifier", + "src": "10583:2:7" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10591:2:7", + "nodeType": "YulLiteral", + "src": "10591:2:7", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10599:1:7", + "nodeType": "YulLiteral", + "src": "10599:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "10595:3:7", + "nodeType": "YulIdentifier", + "src": "10595:3:7" + }, + "nativeSrc": "10595:6:7", + "nodeType": "YulFunctionCall", + "src": "10595:6:7" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10587:3:7", + "nodeType": "YulIdentifier", + "src": "10587:3:7" + }, + "nativeSrc": "10587:15:7", + "nodeType": "YulFunctionCall", + "src": "10587:15:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10579:3:7", + "nodeType": "YulIdentifier", + "src": "10579:3:7" + }, + "nativeSrc": "10579:24:7", + "nodeType": "YulFunctionCall", + "src": "10579:24:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10566:6:7", + "nodeType": "YulIdentifier", + "src": "10566:6:7" + }, + "nativeSrc": "10566:38:7", + "nodeType": "YulFunctionCall", + "src": "10566:38:7" + }, + "nativeSrc": "10566:38:7", + "nodeType": "YulExpressionStatement", + "src": "10566:38:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10624:4:7", + "nodeType": "YulLiteral", + "src": "10624:4:7", + "type": "", + "value": "0x44" + }, + { + "name": "value", + "nativeSrc": "10630:5:7", + "nodeType": "YulIdentifier", + "src": "10630:5:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10617:6:7", + "nodeType": "YulIdentifier", + "src": "10617:6:7" + }, + "nativeSrc": "10617:19:7", + "nodeType": "YulFunctionCall", + "src": "10617:19:7" + }, + "nativeSrc": "10617:19:7", + "nodeType": "YulExpressionStatement", + "src": "10617:19:7" + }, + { + "nativeSrc": "10649:56:7", + "nodeType": "YulAssignment", + "src": "10649:56:7", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "10665:3:7", + "nodeType": "YulIdentifier", + "src": "10665:3:7" + }, + "nativeSrc": "10665:5:7", + "nodeType": "YulFunctionCall", + "src": "10665:5:7" + }, + { + "name": "token", + "nativeSrc": "10672:5:7", + "nodeType": "YulIdentifier", + "src": "10672:5:7" + }, + { + "kind": "number", + "nativeSrc": "10679:1:7", + "nodeType": "YulLiteral", + "src": "10679:1:7", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "10682:4:7", + "nodeType": "YulLiteral", + "src": "10682:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "10688:4:7", + "nodeType": "YulLiteral", + "src": "10688:4:7", + "type": "", + "value": "0x64" + }, + { + "kind": "number", + "nativeSrc": "10694:4:7", + "nodeType": "YulLiteral", + "src": "10694:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "10700:4:7", + "nodeType": "YulLiteral", + "src": "10700:4:7", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "call", + "nativeSrc": "10660:4:7", + "nodeType": "YulIdentifier", + "src": "10660:4:7" + }, + "nativeSrc": "10660:45:7", + "nodeType": "YulFunctionCall", + "src": "10660:45:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "10649:7:7", + "nodeType": "YulIdentifier", + "src": "10649:7:7" + } + ] + }, + { + "body": { + "nativeSrc": "10922:562:7", + "nodeType": "YulBlock", + "src": "10922:562:7", + "statements": [ + { + "body": { + "nativeSrc": "11057:133:7", + "nodeType": "YulBlock", + "src": "11057:133:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "11094:3:7", + "nodeType": "YulIdentifier", + "src": "11094:3:7" + }, + { + "kind": "number", + "nativeSrc": "11099:4:7", + "nodeType": "YulLiteral", + "src": "11099:4:7", + "type": "", + "value": "0x00" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "11105:14:7", + "nodeType": "YulIdentifier", + "src": "11105:14:7" + }, + "nativeSrc": "11105:16:7", + "nodeType": "YulFunctionCall", + "src": "11105:16:7" + } + ], + "functionName": { + "name": "returndatacopy", + "nativeSrc": "11079:14:7", + "nodeType": "YulIdentifier", + "src": "11079:14:7" + }, + "nativeSrc": "11079:43:7", + "nodeType": "YulFunctionCall", + "src": "11079:43:7" + }, + "nativeSrc": "11079:43:7", + "nodeType": "YulExpressionStatement", + "src": "11079:43:7" + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "11150:3:7", + "nodeType": "YulIdentifier", + "src": "11150:3:7" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "11155:14:7", + "nodeType": "YulIdentifier", + "src": "11155:14:7" + }, + "nativeSrc": "11155:16:7", + "nodeType": "YulFunctionCall", + "src": "11155:16:7" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "11143:6:7", + "nodeType": "YulIdentifier", + "src": "11143:6:7" + }, + "nativeSrc": "11143:29:7", + "nodeType": "YulFunctionCall", + "src": "11143:29:7" + }, + "nativeSrc": "11143:29:7", + "nodeType": "YulExpressionStatement", + "src": "11143:29:7" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "11039:7:7", + "nodeType": "YulIdentifier", + "src": "11039:7:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "11032:6:7", + "nodeType": "YulIdentifier", + "src": "11032:6:7" + }, + "nativeSrc": "11032:15:7", + "nodeType": "YulFunctionCall", + "src": "11032:15:7" + }, + { + "name": "bubble", + "nativeSrc": "11049:6:7", + "nodeType": "YulIdentifier", + "src": "11049:6:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11028:3:7", + "nodeType": "YulIdentifier", + "src": "11028:3:7" + }, + "nativeSrc": "11028:28:7", + "nodeType": "YulFunctionCall", + "src": "11028:28:7" + }, + "nativeSrc": "11025:165:7", + "nodeType": "YulIf", + "src": "11025:165:7" + }, + { + "nativeSrc": "11389:81:7", + "nodeType": "YulAssignment", + "src": "11389:81:7", + "value": { + "arguments": [ + { + "name": "success", + "nativeSrc": "11404:7:7", + "nodeType": "YulIdentifier", + "src": "11404:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "11424:14:7", + "nodeType": "YulIdentifier", + "src": "11424:14:7" + }, + "nativeSrc": "11424:16:7", + "nodeType": "YulFunctionCall", + "src": "11424:16:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "11417:6:7", + "nodeType": "YulIdentifier", + "src": "11417:6:7" + }, + "nativeSrc": "11417:24:7", + "nodeType": "YulFunctionCall", + "src": "11417:24:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "token", + "nativeSrc": "11458:5:7", + "nodeType": "YulIdentifier", + "src": "11458:5:7" + } + ], + "functionName": { + "name": "extcodesize", + "nativeSrc": "11446:11:7", + "nodeType": "YulIdentifier", + "src": "11446:11:7" + }, + "nativeSrc": "11446:18:7", + "nodeType": "YulFunctionCall", + "src": "11446:18:7" + }, + { + "kind": "number", + "nativeSrc": "11466:1:7", + "nodeType": "YulLiteral", + "src": "11466:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "11443:2:7", + "nodeType": "YulIdentifier", + "src": "11443:2:7" + }, + "nativeSrc": "11443:25:7", + "nodeType": "YulFunctionCall", + "src": "11443:25:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11413:3:7", + "nodeType": "YulIdentifier", + "src": "11413:3:7" + }, + "nativeSrc": "11413:56:7", + "nodeType": "YulFunctionCall", + "src": "11413:56:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11400:3:7", + "nodeType": "YulIdentifier", + "src": "11400:3:7" + }, + "nativeSrc": "11400:70:7", + "nodeType": "YulFunctionCall", + "src": "11400:70:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "11389:7:7", + "nodeType": "YulIdentifier", + "src": "11389:7:7" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "10892:7:7", + "nodeType": "YulIdentifier", + "src": "10892:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10910:4:7", + "nodeType": "YulLiteral", + "src": "10910:4:7", + "type": "", + "value": "0x00" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10904:5:7", + "nodeType": "YulIdentifier", + "src": "10904:5:7" + }, + "nativeSrc": "10904:11:7", + "nodeType": "YulFunctionCall", + "src": "10904:11:7" + }, + { + "kind": "number", + "nativeSrc": "10917:1:7", + "nodeType": "YulLiteral", + "src": "10917:1:7", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "10901:2:7", + "nodeType": "YulIdentifier", + "src": "10901:2:7" + }, + "nativeSrc": "10901:18:7", + "nodeType": "YulFunctionCall", + "src": "10901:18:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10888:3:7", + "nodeType": "YulIdentifier", + "src": "10888:3:7" + }, + "nativeSrc": "10888:32:7", + "nodeType": "YulFunctionCall", + "src": "10888:32:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "10881:6:7", + "nodeType": "YulIdentifier", + "src": "10881:6:7" + }, + "nativeSrc": "10881:40:7", + "nodeType": "YulFunctionCall", + "src": "10881:40:7" + }, + "nativeSrc": "10878:606:7", + "nodeType": "YulIf", + "src": "10878:606:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11504:4:7", + "nodeType": "YulLiteral", + "src": "11504:4:7", + "type": "", + "value": "0x40" + }, + { + "name": "fmp", + "nativeSrc": "11510:3:7", + "nodeType": "YulIdentifier", + "src": "11510:3:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11497:6:7", + "nodeType": "YulIdentifier", + "src": "11497:6:7" + }, + "nativeSrc": "11497:17:7", + "nodeType": "YulFunctionCall", + "src": "11497:17:7" + }, + "nativeSrc": "11497:17:7", + "nodeType": "YulExpressionStatement", + "src": "11497:17:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11534:4:7", + "nodeType": "YulLiteral", + "src": "11534:4:7", + "type": "", + "value": "0x60" + }, + { + "kind": "number", + "nativeSrc": "11540:1:7", + "nodeType": "YulLiteral", + "src": "11540:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11527:6:7", + "nodeType": "YulIdentifier", + "src": "11527:6:7" + }, + "nativeSrc": "11527:15:7", + "nodeType": "YulFunctionCall", + "src": "11527:15:7" + }, + "nativeSrc": "11527:15:7", + "nodeType": "YulExpressionStatement", + "src": "11527:15:7" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 794, + "isOffset": false, + "isSlot": false, + "src": "11049:6:7", + "valueSize": 1 + }, + { + "declaration": 788, + "isOffset": false, + "isSlot": false, + "src": "10530:4:7", + "valueSize": 1 + }, + { + "declaration": 800, + "isOffset": false, + "isSlot": false, + "src": "10491:8:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "10649:7:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "10892:7:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "11039:7:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "11389:7:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "11404:7:7", + "valueSize": 1 + }, + { + "declaration": 790, + "isOffset": false, + "isSlot": false, + "src": "10583:2:7", + "valueSize": 1 + }, + { + "declaration": 786, + "isOffset": false, + "isSlot": false, + "src": "10672:5:7", + "valueSize": 1 + }, + { + "declaration": 786, + "isOffset": false, + "isSlot": false, + "src": "11458:5:7", + "valueSize": 1 + }, + { + "declaration": 792, + "isOffset": false, + "isSlot": false, + "src": "10630:5:7", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 805, + "nodeType": "InlineAssembly", + "src": "10404:1148:7" + } + ] + }, + "documentation": { + "id": 783, + "nodeType": "StructuredDocumentation", + "src": "9623:537:7", + "text": " @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n value: the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param from The sender of the tokens\n @param to The recipient of the tokens\n @param value The amount of token to transfer\n @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean." + }, + "id": 807, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeTransferFrom", + "nameLocation": "10174:17:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 795, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 786, + "mutability": "mutable", + "name": "token", + "nameLocation": "10208:5:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10201:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 785, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 784, + "name": "IERC20", + "nameLocations": [ + "10201:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "10201:6:7" + }, + "referencedDeclaration": 340, + "src": "10201:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 788, + "mutability": "mutable", + "name": "from", + "nameLocation": "10231:4:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10223:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10223:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 790, + "mutability": "mutable", + "name": "to", + "nameLocation": "10253:2:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10245:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10245:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 792, + "mutability": "mutable", + "name": "value", + "nameLocation": "10273:5:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10265:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10265:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 794, + "mutability": "mutable", + "name": "bubble", + "nameLocation": "10293:6:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10288:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 793, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10288:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "10191:114:7" + }, + "returnParameters": { + "id": 798, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 797, + "mutability": "mutable", + "name": "success", + "nameLocation": "10328:7:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10323:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 796, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10323:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "10322:14:7" + }, + "scope": 831, + "src": "10165:1393:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 829, + "nodeType": "Block", + "src": "12171:1140:7", + "statements": [ + { + "assignments": [ + 823 + ], + "declarations": [ + { + "constant": false, + "id": 823, + "mutability": "mutable", + "name": "selector", + "nameLocation": "12188:8:7", + "nodeType": "VariableDeclaration", + "scope": 829, + "src": "12181:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 822, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "12181:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 827, + "initialValue": { + "expression": { + "expression": { + "id": 824, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "12199:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 825, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12206:7:7", + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 327, + "src": "12199:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function IERC20.approve(address,uint256) returns (bool)" + } + }, + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12214:8:7", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "12199:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12181:41:7" + }, + { + "AST": { + "nativeSrc": "12258:1047:7", + "nodeType": "YulBlock", + "src": "12258:1047:7", + "statements": [ + { + "nativeSrc": "12272:22:7", + "nodeType": "YulVariableDeclaration", + "src": "12272:22:7", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12289:4:7", + "nodeType": "YulLiteral", + "src": "12289:4:7", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "12283:5:7", + "nodeType": "YulIdentifier", + "src": "12283:5:7" + }, + "nativeSrc": "12283:11:7", + "nodeType": "YulFunctionCall", + "src": "12283:11:7" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "12276:3:7", + "nodeType": "YulTypedName", + "src": "12276:3:7", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12314:4:7", + "nodeType": "YulLiteral", + "src": "12314:4:7", + "type": "", + "value": "0x00" + }, + { + "name": "selector", + "nativeSrc": "12320:8:7", + "nodeType": "YulIdentifier", + "src": "12320:8:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12307:6:7", + "nodeType": "YulIdentifier", + "src": "12307:6:7" + }, + "nativeSrc": "12307:22:7", + "nodeType": "YulFunctionCall", + "src": "12307:22:7" + }, + "nativeSrc": "12307:22:7", + "nodeType": "YulExpressionStatement", + "src": "12307:22:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12349:4:7", + "nodeType": "YulLiteral", + "src": "12349:4:7", + "type": "", + "value": "0x04" + }, + { + "arguments": [ + { + "name": "spender", + "nativeSrc": "12359:7:7", + "nodeType": "YulIdentifier", + "src": "12359:7:7" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12372:2:7", + "nodeType": "YulLiteral", + "src": "12372:2:7", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12380:1:7", + "nodeType": "YulLiteral", + "src": "12380:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "12376:3:7", + "nodeType": "YulIdentifier", + "src": "12376:3:7" + }, + "nativeSrc": "12376:6:7", + "nodeType": "YulFunctionCall", + "src": "12376:6:7" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "12368:3:7", + "nodeType": "YulIdentifier", + "src": "12368:3:7" + }, + "nativeSrc": "12368:15:7", + "nodeType": "YulFunctionCall", + "src": "12368:15:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "12355:3:7", + "nodeType": "YulIdentifier", + "src": "12355:3:7" + }, + "nativeSrc": "12355:29:7", + "nodeType": "YulFunctionCall", + "src": "12355:29:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12342:6:7", + "nodeType": "YulIdentifier", + "src": "12342:6:7" + }, + "nativeSrc": "12342:43:7", + "nodeType": "YulFunctionCall", + "src": "12342:43:7" + }, + "nativeSrc": "12342:43:7", + "nodeType": "YulExpressionStatement", + "src": "12342:43:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12405:4:7", + "nodeType": "YulLiteral", + "src": "12405:4:7", + "type": "", + "value": "0x24" + }, + { + "name": "value", + "nativeSrc": "12411:5:7", + "nodeType": "YulIdentifier", + "src": "12411:5:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12398:6:7", + "nodeType": "YulIdentifier", + "src": "12398:6:7" + }, + "nativeSrc": "12398:19:7", + "nodeType": "YulFunctionCall", + "src": "12398:19:7" + }, + "nativeSrc": "12398:19:7", + "nodeType": "YulExpressionStatement", + "src": "12398:19:7" + }, + { + "nativeSrc": "12430:56:7", + "nodeType": "YulAssignment", + "src": "12430:56:7", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "12446:3:7", + "nodeType": "YulIdentifier", + "src": "12446:3:7" + }, + "nativeSrc": "12446:5:7", + "nodeType": "YulFunctionCall", + "src": "12446:5:7" + }, + { + "name": "token", + "nativeSrc": "12453:5:7", + "nodeType": "YulIdentifier", + "src": "12453:5:7" + }, + { + "kind": "number", + "nativeSrc": "12460:1:7", + "nodeType": "YulLiteral", + "src": "12460:1:7", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "12463:4:7", + "nodeType": "YulLiteral", + "src": "12463:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "12469:4:7", + "nodeType": "YulLiteral", + "src": "12469:4:7", + "type": "", + "value": "0x44" + }, + { + "kind": "number", + "nativeSrc": "12475:4:7", + "nodeType": "YulLiteral", + "src": "12475:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "12481:4:7", + "nodeType": "YulLiteral", + "src": "12481:4:7", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "call", + "nativeSrc": "12441:4:7", + "nodeType": "YulIdentifier", + "src": "12441:4:7" + }, + "nativeSrc": "12441:45:7", + "nodeType": "YulFunctionCall", + "src": "12441:45:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "12430:7:7", + "nodeType": "YulIdentifier", + "src": "12430:7:7" + } + ] + }, + { + "body": { + "nativeSrc": "12703:562:7", + "nodeType": "YulBlock", + "src": "12703:562:7", + "statements": [ + { + "body": { + "nativeSrc": "12838:133:7", + "nodeType": "YulBlock", + "src": "12838:133:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "12875:3:7", + "nodeType": "YulIdentifier", + "src": "12875:3:7" + }, + { + "kind": "number", + "nativeSrc": "12880:4:7", + "nodeType": "YulLiteral", + "src": "12880:4:7", + "type": "", + "value": "0x00" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "12886:14:7", + "nodeType": "YulIdentifier", + "src": "12886:14:7" + }, + "nativeSrc": "12886:16:7", + "nodeType": "YulFunctionCall", + "src": "12886:16:7" + } + ], + "functionName": { + "name": "returndatacopy", + "nativeSrc": "12860:14:7", + "nodeType": "YulIdentifier", + "src": "12860:14:7" + }, + "nativeSrc": "12860:43:7", + "nodeType": "YulFunctionCall", + "src": "12860:43:7" + }, + "nativeSrc": "12860:43:7", + "nodeType": "YulExpressionStatement", + "src": "12860:43:7" + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "12931:3:7", + "nodeType": "YulIdentifier", + "src": "12931:3:7" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "12936:14:7", + "nodeType": "YulIdentifier", + "src": "12936:14:7" + }, + "nativeSrc": "12936:16:7", + "nodeType": "YulFunctionCall", + "src": "12936:16:7" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "12924:6:7", + "nodeType": "YulIdentifier", + "src": "12924:6:7" + }, + "nativeSrc": "12924:29:7", + "nodeType": "YulFunctionCall", + "src": "12924:29:7" + }, + "nativeSrc": "12924:29:7", + "nodeType": "YulExpressionStatement", + "src": "12924:29:7" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "12820:7:7", + "nodeType": "YulIdentifier", + "src": "12820:7:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "12813:6:7", + "nodeType": "YulIdentifier", + "src": "12813:6:7" + }, + "nativeSrc": "12813:15:7", + "nodeType": "YulFunctionCall", + "src": "12813:15:7" + }, + { + "name": "bubble", + "nativeSrc": "12830:6:7", + "nodeType": "YulIdentifier", + "src": "12830:6:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "12809:3:7", + "nodeType": "YulIdentifier", + "src": "12809:3:7" + }, + "nativeSrc": "12809:28:7", + "nodeType": "YulFunctionCall", + "src": "12809:28:7" + }, + "nativeSrc": "12806:165:7", + "nodeType": "YulIf", + "src": "12806:165:7" + }, + { + "nativeSrc": "13170:81:7", + "nodeType": "YulAssignment", + "src": "13170:81:7", + "value": { + "arguments": [ + { + "name": "success", + "nativeSrc": "13185:7:7", + "nodeType": "YulIdentifier", + "src": "13185:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "13205:14:7", + "nodeType": "YulIdentifier", + "src": "13205:14:7" + }, + "nativeSrc": "13205:16:7", + "nodeType": "YulFunctionCall", + "src": "13205:16:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "13198:6:7", + "nodeType": "YulIdentifier", + "src": "13198:6:7" + }, + "nativeSrc": "13198:24:7", + "nodeType": "YulFunctionCall", + "src": "13198:24:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "token", + "nativeSrc": "13239:5:7", + "nodeType": "YulIdentifier", + "src": "13239:5:7" + } + ], + "functionName": { + "name": "extcodesize", + "nativeSrc": "13227:11:7", + "nodeType": "YulIdentifier", + "src": "13227:11:7" + }, + "nativeSrc": "13227:18:7", + "nodeType": "YulFunctionCall", + "src": "13227:18:7" + }, + { + "kind": "number", + "nativeSrc": "13247:1:7", + "nodeType": "YulLiteral", + "src": "13247:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "13224:2:7", + "nodeType": "YulIdentifier", + "src": "13224:2:7" + }, + "nativeSrc": "13224:25:7", + "nodeType": "YulFunctionCall", + "src": "13224:25:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "13194:3:7", + "nodeType": "YulIdentifier", + "src": "13194:3:7" + }, + "nativeSrc": "13194:56:7", + "nodeType": "YulFunctionCall", + "src": "13194:56:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "13181:3:7", + "nodeType": "YulIdentifier", + "src": "13181:3:7" + }, + "nativeSrc": "13181:70:7", + "nodeType": "YulFunctionCall", + "src": "13181:70:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "13170:7:7", + "nodeType": "YulIdentifier", + "src": "13170:7:7" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "12673:7:7", + "nodeType": "YulIdentifier", + "src": "12673:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12691:4:7", + "nodeType": "YulLiteral", + "src": "12691:4:7", + "type": "", + "value": "0x00" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "12685:5:7", + "nodeType": "YulIdentifier", + "src": "12685:5:7" + }, + "nativeSrc": "12685:11:7", + "nodeType": "YulFunctionCall", + "src": "12685:11:7" + }, + { + "kind": "number", + "nativeSrc": "12698:1:7", + "nodeType": "YulLiteral", + "src": "12698:1:7", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "12682:2:7", + "nodeType": "YulIdentifier", + "src": "12682:2:7" + }, + "nativeSrc": "12682:18:7", + "nodeType": "YulFunctionCall", + "src": "12682:18:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "12669:3:7", + "nodeType": "YulIdentifier", + "src": "12669:3:7" + }, + "nativeSrc": "12669:32:7", + "nodeType": "YulFunctionCall", + "src": "12669:32:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "12662:6:7", + "nodeType": "YulIdentifier", + "src": "12662:6:7" + }, + "nativeSrc": "12662:40:7", + "nodeType": "YulFunctionCall", + "src": "12662:40:7" + }, + "nativeSrc": "12659:606:7", + "nodeType": "YulIf", + "src": "12659:606:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13285:4:7", + "nodeType": "YulLiteral", + "src": "13285:4:7", + "type": "", + "value": "0x40" + }, + { + "name": "fmp", + "nativeSrc": "13291:3:7", + "nodeType": "YulIdentifier", + "src": "13291:3:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "13278:6:7", + "nodeType": "YulIdentifier", + "src": "13278:6:7" + }, + "nativeSrc": "13278:17:7", + "nodeType": "YulFunctionCall", + "src": "13278:17:7" + }, + "nativeSrc": "13278:17:7", + "nodeType": "YulExpressionStatement", + "src": "13278:17:7" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 817, + "isOffset": false, + "isSlot": false, + "src": "12830:6:7", + "valueSize": 1 + }, + { + "declaration": 823, + "isOffset": false, + "isSlot": false, + "src": "12320:8:7", + "valueSize": 1 + }, + { + "declaration": 813, + "isOffset": false, + "isSlot": false, + "src": "12359:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "12430:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "12673:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "12820:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "13170:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "13185:7:7", + "valueSize": 1 + }, + { + "declaration": 811, + "isOffset": false, + "isSlot": false, + "src": "12453:5:7", + "valueSize": 1 + }, + { + "declaration": 811, + "isOffset": false, + "isSlot": false, + "src": "13239:5:7", + "valueSize": 1 + }, + { + "declaration": 815, + "isOffset": false, + "isSlot": false, + "src": "12411:5:7", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 828, + "nodeType": "InlineAssembly", + "src": "12233:1072:7" + } + ] + }, + "documentation": { + "id": 808, + "nodeType": "StructuredDocumentation", + "src": "11564:490:7", + "text": " @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param spender The spender of the tokens\n @param value The amount of token to transfer\n @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean." + }, + "id": 830, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeApprove", + "nameLocation": "12068:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 818, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 811, + "mutability": "mutable", + "name": "token", + "nameLocation": "12088:5:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12081:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 809, + "name": "IERC20", + "nameLocations": [ + "12081:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "12081:6:7" + }, + "referencedDeclaration": 340, + "src": "12081:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 813, + "mutability": "mutable", + "name": "spender", + "nameLocation": "12103:7:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12095:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 812, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12095:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 815, + "mutability": "mutable", + "name": "value", + "nameLocation": "12120:5:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12112:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 814, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12112:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 817, + "mutability": "mutable", + "name": "bubble", + "nameLocation": "12132:6:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12127:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 816, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12127:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12080:59:7" + }, + "returnParameters": { + "id": 821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 820, + "mutability": "mutable", + "name": "success", + "nameLocation": "12162:7:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12157:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 819, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12157:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12156:14:7" + }, + "scope": 831, + "src": "12059:1252:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 832, + "src": "698:12615:7", + "usedErrors": [ + 388, + 397 + ], + "usedEvents": [] + } + ], + "src": "115:13199:7" + }, + "id": 7 + }, + "@openzeppelin/contracts/utils/Bytes.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/Bytes.sol", + "exportedSymbols": { + "Bytes": [ + 1632 + ], + "Math": [ + 6204 + ] + }, + "id": 1633, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 833, + "literals": [ + "solidity", + "^", + "0.8", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "99:24:8" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/Math.sol", + "file": "./math/Math.sol", + "id": 835, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1633, + "sourceUnit": 6205, + "src": "125:37:8", + "symbolAliases": [ + { + "foreign": { + "id": 834, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "133:4:8", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Bytes", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 836, + "nodeType": "StructuredDocumentation", + "src": "164:33:8", + "text": " @dev Bytes operations." + }, + "fullyImplemented": true, + "id": 1632, + "linearizedBaseContracts": [ + 1632 + ], + "name": "Bytes", + "nameLocation": "206:5:8", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 852, + "nodeType": "Block", + "src": "687:45:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 847, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 839, + "src": "712:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 848, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "720:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + { + "hexValue": "30", + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "723:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 846, + "name": "indexOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 853, + 902 + ], + "referencedDeclaration": 902, + "src": "704:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes1_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bytes memory,bytes1,uint256) pure returns (uint256)" + } + }, + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "704:21:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 845, + "id": 851, + "nodeType": "Return", + "src": "697:28:8" + } + ] + }, + "documentation": { + "id": 837, + "nodeType": "StructuredDocumentation", + "src": "218:384:8", + "text": " @dev Forward search for `s` in `buffer`\n * If `s` is present in the buffer, returns the index of the first instance\n * If `s` is not present in the buffer, returns type(uint256).max\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]" + }, + "id": 853, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "indexOf", + "nameLocation": "616:7:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 839, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "637:6:8", + "nodeType": "VariableDeclaration", + "scope": 853, + "src": "624:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 838, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "624:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 841, + "mutability": "mutable", + "name": "s", + "nameLocation": "652:1:8", + "nodeType": "VariableDeclaration", + "scope": 853, + "src": "645:8:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 840, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "645:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "623:31:8" + }, + "returnParameters": { + "id": 845, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 844, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 853, + "src": "678:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "678:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "677:9:8" + }, + "scope": 1632, + "src": "607:125:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 901, + "nodeType": "Block", + "src": "1286:246:8", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "mutability": "mutable", + "name": "length", + "nameLocation": "1304:6:8", + "nodeType": "VariableDeclaration", + "scope": 901, + "src": "1296:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1296:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 869, + "initialValue": { + "expression": { + "id": 867, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "1313:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1320:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1313:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1296:30:8" + }, + { + "body": { + "id": 893, + "nodeType": "Block", + "src": "1375:117:8", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 883, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "1423:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 884, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "1431:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 882, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "1400:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1400:33:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1393:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 880, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "1393:6:8", + "typeDescriptions": {} + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1393:41:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 887, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "1438:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "1393:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 892, + "nodeType": "IfStatement", + "src": "1389:93:8", + "trueBody": { + "id": 891, + "nodeType": "Block", + "src": "1441:41:8", + "statements": [ + { + "expression": { + "id": 889, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "1466:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 864, + "id": 890, + "nodeType": "Return", + "src": "1459:8:8" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 874, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "1358:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 875, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "1362:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1358:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 894, + "initializationExpression": { + "assignments": [ + 871 + ], + "declarations": [ + { + "constant": false, + "id": 871, + "mutability": "mutable", + "name": "i", + "nameLocation": "1349:1:8", + "nodeType": "VariableDeclaration", + "scope": 894, + "src": "1341:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1341:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 873, + "initialValue": { + "id": 872, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "1353:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1341:15:8" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "1370:3:8", + "subExpression": { + "id": 877, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "1372:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 879, + "nodeType": "ExpressionStatement", + "src": "1370:3:8" + }, + "nodeType": "ForStatement", + "src": "1336:156:8" + }, + { + "expression": { + "expression": { + "arguments": [ + { + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1513:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1513:7:8", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 895, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1508:4:8", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1508:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1522:3:8", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "1508:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 864, + "id": 900, + "nodeType": "Return", + "src": "1501:24:8" + } + ] + }, + "documentation": { + "id": 854, + "nodeType": "StructuredDocumentation", + "src": "738:450:8", + "text": " @dev Forward search for `s` in `buffer` starting at position `pos`\n * If `s` is present in the buffer (at or after `pos`), returns the index of the next instance\n * If `s` is not present in the buffer (at or after `pos`), returns type(uint256).max\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]" + }, + "id": 902, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "indexOf", + "nameLocation": "1202:7:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 861, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 856, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "1223:6:8", + "nodeType": "VariableDeclaration", + "scope": 902, + "src": "1210:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 855, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1210:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 858, + "mutability": "mutable", + "name": "s", + "nameLocation": "1238:1:8", + "nodeType": "VariableDeclaration", + "scope": 902, + "src": "1231:8:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 857, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "1231:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 860, + "mutability": "mutable", + "name": "pos", + "nameLocation": "1249:3:8", + "nodeType": "VariableDeclaration", + "scope": 902, + "src": "1241:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1241:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1209:44:8" + }, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 863, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 902, + "src": "1277:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 862, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1277:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1276:9:8" + }, + "scope": 1632, + "src": "1193:339:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 922, + "nodeType": "Block", + "src": "2019:65:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 913, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "2048:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 914, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 907, + "src": "2056:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + { + "expression": { + "arguments": [ + { + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2064:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 916, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2064:7:8", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 915, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "2059:4:8", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2059:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2073:3:8", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "2059:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 912, + "name": "lastIndexOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 923, + 985 + ], + "referencedDeclaration": 985, + "src": "2036:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes1_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bytes memory,bytes1,uint256) pure returns (uint256)" + } + }, + "id": 920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2036:41:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 911, + "id": 921, + "nodeType": "Return", + "src": "2029:48:8" + } + ] + }, + "documentation": { + "id": 903, + "nodeType": "StructuredDocumentation", + "src": "1538:392:8", + "text": " @dev Backward search for `s` in `buffer`\n * If `s` is present in the buffer, returns the index of the last instance\n * If `s` is not present in the buffer, returns type(uint256).max\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]" + }, + "id": 923, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lastIndexOf", + "nameLocation": "1944:11:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 908, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 905, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "1969:6:8", + "nodeType": "VariableDeclaration", + "scope": 923, + "src": "1956:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 904, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1956:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 907, + "mutability": "mutable", + "name": "s", + "nameLocation": "1984:1:8", + "nodeType": "VariableDeclaration", + "scope": 923, + "src": "1977:8:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 906, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "1977:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "1955:31:8" + }, + "returnParameters": { + "id": 911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 910, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 923, + "src": "2010:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 909, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2009:9:8" + }, + "scope": 1632, + "src": "1935:149:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 984, + "nodeType": "Block", + "src": "2657:348:8", + "statements": [ + { + "id": 983, + "nodeType": "UncheckedBlock", + "src": "2667:332:8", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "mutability": "mutable", + "name": "length", + "nameLocation": "2699:6:8", + "nodeType": "VariableDeclaration", + "scope": 983, + "src": "2691:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2691:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 939, + "initialValue": { + "expression": { + "id": 937, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "2708:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2715:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2708:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2691:30:8" + }, + { + "body": { + "id": 975, + "nodeType": "Block", + "src": "2810:141:8", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 961, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "2862:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 962, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2870:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2874:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2870:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 960, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "2839:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2839:37:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2832:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 958, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "2832:6:8", + "typeDescriptions": {} + } + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2832:45:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 967, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "2881:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "2832:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 974, + "nodeType": "IfStatement", + "src": "2828:109:8", + "trueBody": { + "id": 973, + "nodeType": "Block", + "src": "2884:53:8", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 969, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2913:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 970, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2917:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2913:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 934, + "id": 972, + "nodeType": "Return", + "src": "2906:12:8" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 952, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2798:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2802:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2798:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 976, + "initializationExpression": { + "assignments": [ + 941 + ], + "declarations": [ + { + "constant": false, + "id": 941, + "mutability": "mutable", + "name": "i", + "nameLocation": "2748:1:8", + "nodeType": "VariableDeclaration", + "scope": 976, + "src": "2740:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 940, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2740:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 951, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 946, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 930, + "src": "2780:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2785:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 944, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "2761:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2766:13:8", + "memberName": "saturatingAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 4759, + "src": "2761:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2761:26:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 949, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "2789:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 942, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "2752:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2757:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "2752:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2752:44:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2740:56:8" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": true, + "src": "2805:3:8", + "subExpression": { + "id": 955, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2807:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "2805:3:8" + }, + "nodeType": "ForStatement", + "src": "2735:216:8" + }, + { + "expression": { + "expression": { + "arguments": [ + { + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2976:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 978, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2976:7:8", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 977, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "2971:4:8", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2971:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2985:3:8", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "2971:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 934, + "id": 982, + "nodeType": "Return", + "src": "2964:24:8" + } + ] + } + ] + }, + "documentation": { + "id": 924, + "nodeType": "StructuredDocumentation", + "src": "2090:465:8", + "text": " @dev Backward search for `s` in `buffer` starting at position `pos`\n * If `s` is present in the buffer (at or before `pos`), returns the index of the previous instance\n * If `s` is not present in the buffer (at or before `pos`), returns type(uint256).max\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]" + }, + "id": 985, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lastIndexOf", + "nameLocation": "2569:11:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "2594:6:8", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "2581:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 925, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2581:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "mutability": "mutable", + "name": "s", + "nameLocation": "2609:1:8", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "2602:8:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 927, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "2602:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 930, + "mutability": "mutable", + "name": "pos", + "nameLocation": "2620:3:8", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "2612:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2612:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2580:44:8" + }, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 933, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "2648:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2648:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2647:9:8" + }, + "scope": 1632, + "src": "2560:445:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1002, + "nodeType": "Block", + "src": "3416:59:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 996, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "3439:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 997, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 990, + "src": "3447:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 998, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "3454:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3461:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3454:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 995, + "name": "slice", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1003, + 1045 + ], + "referencedDeclaration": 1045, + "src": "3433:5:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" + } + }, + "id": 1000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3433:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 994, + "id": 1001, + "nodeType": "Return", + "src": "3426:42:8" + } + ] + }, + "documentation": { + "id": 986, + "nodeType": "StructuredDocumentation", + "src": "3011:312:8", + "text": " @dev Copies the content of `buffer`, from `start` (included) to the end of `buffer` into a new bytes object in\n memory.\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]" + }, + "id": 1003, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "slice", + "nameLocation": "3337:5:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 988, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "3356:6:8", + "nodeType": "VariableDeclaration", + "scope": 1003, + "src": "3343:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 987, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3343:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 990, + "mutability": "mutable", + "name": "start", + "nameLocation": "3372:5:8", + "nodeType": "VariableDeclaration", + "scope": 1003, + "src": "3364:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 989, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3364:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3342:36:8" + }, + "returnParameters": { + "id": 994, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 993, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1003, + "src": "3402:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 992, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3402:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3401:14:8" + }, + "scope": 1632, + "src": "3328:147:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1044, + "nodeType": "Block", + "src": "3959:347:8", + "statements": [ + { + "expression": { + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1015, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "3989:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1018, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "4004:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1019, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1006, + "src": "4009:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4016:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4009:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1016, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "3995:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4000:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "3995:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3995:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3989:34:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1023, + "nodeType": "ExpressionStatement", + "src": "3989:34:8" + }, + { + "expression": { + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1024, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1008, + "src": "4033:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1027, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1008, + "src": "4050:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1028, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "4057:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1025, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "4041:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4046:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "4041:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4041:20:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4033:28:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "nodeType": "ExpressionStatement", + "src": "4033:28:8" + }, + { + "assignments": [ + 1033 + ], + "declarations": [ + { + "constant": false, + "id": 1033, + "mutability": "mutable", + "name": "result", + "nameLocation": "4114:6:8", + "nodeType": "VariableDeclaration", + "scope": 1044, + "src": "4101:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1032, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4101:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 1040, + "initialValue": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1036, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "4133:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 1037, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1008, + "src": "4139:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4133:11:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4123:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 1034, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4127:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4123:22:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4101:44:8" + }, + { + "AST": { + "nativeSrc": "4180:96:8", + "nodeType": "YulBlock", + "src": "4180:96:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "result", + "nativeSrc": "4204:6:8", + "nodeType": "YulIdentifier", + "src": "4204:6:8" + }, + { + "kind": "number", + "nativeSrc": "4212:4:8", + "nodeType": "YulLiteral", + "src": "4212:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4200:3:8", + "nodeType": "YulIdentifier", + "src": "4200:3:8" + }, + "nativeSrc": "4200:17:8", + "nodeType": "YulFunctionCall", + "src": "4200:17:8" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "4227:6:8", + "nodeType": "YulIdentifier", + "src": "4227:6:8" + }, + { + "kind": "number", + "nativeSrc": "4235:4:8", + "nodeType": "YulLiteral", + "src": "4235:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4223:3:8", + "nodeType": "YulIdentifier", + "src": "4223:3:8" + }, + "nativeSrc": "4223:17:8", + "nodeType": "YulFunctionCall", + "src": "4223:17:8" + }, + { + "name": "start", + "nativeSrc": "4242:5:8", + "nodeType": "YulIdentifier", + "src": "4242:5:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4219:3:8", + "nodeType": "YulIdentifier", + "src": "4219:3:8" + }, + "nativeSrc": "4219:29:8", + "nodeType": "YulFunctionCall", + "src": "4219:29:8" + }, + { + "arguments": [ + { + "name": "end", + "nativeSrc": "4254:3:8", + "nodeType": "YulIdentifier", + "src": "4254:3:8" + }, + { + "name": "start", + "nativeSrc": "4259:5:8", + "nodeType": "YulIdentifier", + "src": "4259:5:8" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4250:3:8", + "nodeType": "YulIdentifier", + "src": "4250:3:8" + }, + "nativeSrc": "4250:15:8", + "nodeType": "YulFunctionCall", + "src": "4250:15:8" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "4194:5:8", + "nodeType": "YulIdentifier", + "src": "4194:5:8" + }, + "nativeSrc": "4194:72:8", + "nodeType": "YulFunctionCall", + "src": "4194:72:8" + }, + "nativeSrc": "4194:72:8", + "nodeType": "YulExpressionStatement", + "src": "4194:72:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1006, + "isOffset": false, + "isSlot": false, + "src": "4227:6:8", + "valueSize": 1 + }, + { + "declaration": 1010, + "isOffset": false, + "isSlot": false, + "src": "4254:3:8", + "valueSize": 1 + }, + { + "declaration": 1033, + "isOffset": false, + "isSlot": false, + "src": "4204:6:8", + "valueSize": 1 + }, + { + "declaration": 1008, + "isOffset": false, + "isSlot": false, + "src": "4242:5:8", + "valueSize": 1 + }, + { + "declaration": 1008, + "isOffset": false, + "isSlot": false, + "src": "4259:5:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1041, + "nodeType": "InlineAssembly", + "src": "4155:121:8" + }, + { + "expression": { + "id": 1042, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1033, + "src": "4293:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1014, + "id": 1043, + "nodeType": "Return", + "src": "4286:13:8" + } + ] + }, + "documentation": { + "id": 1004, + "nodeType": "StructuredDocumentation", + "src": "3481:372:8", + "text": " @dev Copies the content of `buffer`, from `start` (included) to `end` (excluded) into a new bytes object in\n memory. The `end` argument is truncated to the length of the `buffer`.\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]" + }, + "id": 1045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "slice", + "nameLocation": "3867:5:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1006, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "3886:6:8", + "nodeType": "VariableDeclaration", + "scope": 1045, + "src": "3873:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1005, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3873:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1008, + "mutability": "mutable", + "name": "start", + "nameLocation": "3902:5:8", + "nodeType": "VariableDeclaration", + "scope": 1045, + "src": "3894:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1007, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3894:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1010, + "mutability": "mutable", + "name": "end", + "nameLocation": "3917:3:8", + "nodeType": "VariableDeclaration", + "scope": 1045, + "src": "3909:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1009, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3909:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3872:49:8" + }, + "returnParameters": { + "id": 1014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1013, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1045, + "src": "3945:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1012, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3945:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3944:14:8" + }, + "scope": 1632, + "src": "3858:448:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1062, + "nodeType": "Block", + "src": "4790:60:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1056, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1048, + "src": "4814:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 1057, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "4822:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1058, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1048, + "src": "4829:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4836:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4829:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1055, + "name": "splice", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1063, + 1096 + ], + "referencedDeclaration": 1096, + "src": "4807:6:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" + } + }, + "id": 1060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4807:36:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1054, + "id": 1061, + "nodeType": "Return", + "src": "4800:43:8" + } + ] + }, + "documentation": { + "id": 1046, + "nodeType": "StructuredDocumentation", + "src": "4312:384:8", + "text": " @dev Moves the content of `buffer`, from `start` (included) to the end of `buffer` to the start of that buffer,\n and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:].\n NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead" + }, + "id": 1063, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "splice", + "nameLocation": "4710:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1048, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "4730:6:8", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "4717:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1047, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4717:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1050, + "mutability": "mutable", + "name": "start", + "nameLocation": "4746:5:8", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "4738:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1049, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4738:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4716:36:8" + }, + "returnParameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "4776:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1052, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4776:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4775:14:8" + }, + "scope": 1632, + "src": "4701:149:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1095, + "nodeType": "Block", + "src": "5417:335:8", + "statements": [ + { + "expression": { + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1075, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5447:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1078, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5462:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1079, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1066, + "src": "5467:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5474:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5467:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1076, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "5453:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5458:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "5453:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5453:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5447:34:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1083, + "nodeType": "ExpressionStatement", + "src": "5447:34:8" + }, + { + "expression": { + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1084, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1068, + "src": "5491:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1087, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1068, + "src": "5508:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1088, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5515:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1085, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "5499:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5504:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "5499:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5499:20:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5491:28:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1091, + "nodeType": "ExpressionStatement", + "src": "5491:28:8" + }, + { + "AST": { + "nativeSrc": "5582:140:8", + "nodeType": "YulBlock", + "src": "5582:140:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "5606:6:8", + "nodeType": "YulIdentifier", + "src": "5606:6:8" + }, + { + "kind": "number", + "nativeSrc": "5614:4:8", + "nodeType": "YulLiteral", + "src": "5614:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5602:3:8", + "nodeType": "YulIdentifier", + "src": "5602:3:8" + }, + "nativeSrc": "5602:17:8", + "nodeType": "YulFunctionCall", + "src": "5602:17:8" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "5629:6:8", + "nodeType": "YulIdentifier", + "src": "5629:6:8" + }, + { + "kind": "number", + "nativeSrc": "5637:4:8", + "nodeType": "YulLiteral", + "src": "5637:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5625:3:8", + "nodeType": "YulIdentifier", + "src": "5625:3:8" + }, + "nativeSrc": "5625:17:8", + "nodeType": "YulFunctionCall", + "src": "5625:17:8" + }, + { + "name": "start", + "nativeSrc": "5644:5:8", + "nodeType": "YulIdentifier", + "src": "5644:5:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5621:3:8", + "nodeType": "YulIdentifier", + "src": "5621:3:8" + }, + "nativeSrc": "5621:29:8", + "nodeType": "YulFunctionCall", + "src": "5621:29:8" + }, + { + "arguments": [ + { + "name": "end", + "nativeSrc": "5656:3:8", + "nodeType": "YulIdentifier", + "src": "5656:3:8" + }, + { + "name": "start", + "nativeSrc": "5661:5:8", + "nodeType": "YulIdentifier", + "src": "5661:5:8" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5652:3:8", + "nodeType": "YulIdentifier", + "src": "5652:3:8" + }, + "nativeSrc": "5652:15:8", + "nodeType": "YulFunctionCall", + "src": "5652:15:8" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "5596:5:8", + "nodeType": "YulIdentifier", + "src": "5596:5:8" + }, + "nativeSrc": "5596:72:8", + "nodeType": "YulFunctionCall", + "src": "5596:72:8" + }, + "nativeSrc": "5596:72:8", + "nodeType": "YulExpressionStatement", + "src": "5596:72:8" + }, + { + "expression": { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "5688:6:8", + "nodeType": "YulIdentifier", + "src": "5688:6:8" + }, + { + "arguments": [ + { + "name": "end", + "nativeSrc": "5700:3:8", + "nodeType": "YulIdentifier", + "src": "5700:3:8" + }, + { + "name": "start", + "nativeSrc": "5705:5:8", + "nodeType": "YulIdentifier", + "src": "5705:5:8" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5696:3:8", + "nodeType": "YulIdentifier", + "src": "5696:3:8" + }, + "nativeSrc": "5696:15:8", + "nodeType": "YulFunctionCall", + "src": "5696:15:8" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5681:6:8", + "nodeType": "YulIdentifier", + "src": "5681:6:8" + }, + "nativeSrc": "5681:31:8", + "nodeType": "YulFunctionCall", + "src": "5681:31:8" + }, + "nativeSrc": "5681:31:8", + "nodeType": "YulExpressionStatement", + "src": "5681:31:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1066, + "isOffset": false, + "isSlot": false, + "src": "5606:6:8", + "valueSize": 1 + }, + { + "declaration": 1066, + "isOffset": false, + "isSlot": false, + "src": "5629:6:8", + "valueSize": 1 + }, + { + "declaration": 1066, + "isOffset": false, + "isSlot": false, + "src": "5688:6:8", + "valueSize": 1 + }, + { + "declaration": 1070, + "isOffset": false, + "isSlot": false, + "src": "5656:3:8", + "valueSize": 1 + }, + { + "declaration": 1070, + "isOffset": false, + "isSlot": false, + "src": "5700:3:8", + "valueSize": 1 + }, + { + "declaration": 1068, + "isOffset": false, + "isSlot": false, + "src": "5644:5:8", + "valueSize": 1 + }, + { + "declaration": 1068, + "isOffset": false, + "isSlot": false, + "src": "5661:5:8", + "valueSize": 1 + }, + { + "declaration": 1068, + "isOffset": false, + "isSlot": false, + "src": "5705:5:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1092, + "nodeType": "InlineAssembly", + "src": "5557:165:8" + }, + { + "expression": { + "id": 1093, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1066, + "src": "5739:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1074, + "id": 1094, + "nodeType": "Return", + "src": "5732:13:8" + } + ] + }, + "documentation": { + "id": 1064, + "nodeType": "StructuredDocumentation", + "src": "4856:454:8", + "text": " @dev Moves the content of `buffer`, from `start` (included) to `end` (excluded) to the start of that buffer,\n and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:end].\n The `end` argument is truncated to the length of the `buffer`.\n NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead" + }, + "id": 1096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "splice", + "nameLocation": "5324:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1071, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1066, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "5344:6:8", + "nodeType": "VariableDeclaration", + "scope": 1096, + "src": "5331:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1065, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5331:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1068, + "mutability": "mutable", + "name": "start", + "nameLocation": "5360:5:8", + "nodeType": "VariableDeclaration", + "scope": 1096, + "src": "5352:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1067, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5352:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1070, + "mutability": "mutable", + "name": "end", + "nameLocation": "5375:3:8", + "nodeType": "VariableDeclaration", + "scope": 1096, + "src": "5367:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5367:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5330:49:8" + }, + "returnParameters": { + "id": 1074, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1073, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1096, + "src": "5403:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1072, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5403:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "5402:14:8" + }, + "scope": 1632, + "src": "5315:437:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1117, + "nodeType": "Block", + "src": "6249:80:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1109, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1099, + "src": "6274:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 1110, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1101, + "src": "6282:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1111, + "name": "replacement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1103, + "src": "6287:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "hexValue": "30", + "id": 1112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6300:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "id": 1113, + "name": "replacement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1103, + "src": "6303:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6315:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6303:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1108, + "name": "replace", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1118, + 1174 + ], + "referencedDeclaration": 1174, + "src": "6266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory,uint256,bytes memory,uint256,uint256) pure returns (bytes memory)" + } + }, + "id": 1115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6266:56:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1107, + "id": 1116, + "nodeType": "Return", + "src": "6259:63:8" + } + ] + }, + "documentation": { + "id": 1097, + "nodeType": "StructuredDocumentation", + "src": "5758:372:8", + "text": " @dev Replaces bytes in `buffer` starting at `pos` with all bytes from `replacement`.\n Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`).\n If `pos >= buffer.length`, no replacement occurs and the buffer is returned unchanged.\n NOTE: This function modifies the provided buffer in place." + }, + "id": 1118, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "6144:7:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1099, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "6165:6:8", + "nodeType": "VariableDeclaration", + "scope": 1118, + "src": "6152:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1098, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6152:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1101, + "mutability": "mutable", + "name": "pos", + "nameLocation": "6181:3:8", + "nodeType": "VariableDeclaration", + "scope": 1118, + "src": "6173:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1100, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6173:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1103, + "mutability": "mutable", + "name": "replacement", + "nameLocation": "6199:11:8", + "nodeType": "VariableDeclaration", + "scope": 1118, + "src": "6186:24:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1102, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6186:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "6151:60:8" + }, + "returnParameters": { + "id": 1107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1106, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1118, + "src": "6235:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1105, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6235:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "6234:14:8" + }, + "scope": 1632, + "src": "6135:194:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1173, + "nodeType": "Block", + "src": "7180:402:8", + "statements": [ + { + "expression": { + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1134, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "7210:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1137, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "7225:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1138, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7230:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7237:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7230:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1135, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "7216:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7221:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "7216:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7216:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7210:34:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1142, + "nodeType": "ExpressionStatement", + "src": "7210:34:8" + }, + { + "expression": { + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1143, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1127, + "src": "7254:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1146, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1127, + "src": "7272:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1147, + "name": "replacement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1125, + "src": "7280:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7292:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7280:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1144, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "7263:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7268:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "7263:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7263:36:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7254:45:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1151, + "nodeType": "ExpressionStatement", + "src": "7254:45:8" + }, + { + "expression": { + "id": 1168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1152, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1129, + "src": "7309:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1155, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1129, + "src": "7327:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1158, + "name": "replacement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1125, + "src": "7344:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7356:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7344:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 1160, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1127, + "src": "7365:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7344:27:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1162, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7373:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7380:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7373:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 1164, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "7389:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7373:19:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1156, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "7335:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7340:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "7335:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7335:58:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1153, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "7318:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7323:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "7318:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7318:76:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7309:85:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1169, + "nodeType": "ExpressionStatement", + "src": "7309:85:8" + }, + { + "AST": { + "nativeSrc": "7449:103:8", + "nodeType": "YulBlock", + "src": "7449:103:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "7477:6:8", + "nodeType": "YulIdentifier", + "src": "7477:6:8" + }, + { + "kind": "number", + "nativeSrc": "7485:4:8", + "nodeType": "YulLiteral", + "src": "7485:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7473:3:8", + "nodeType": "YulIdentifier", + "src": "7473:3:8" + }, + "nativeSrc": "7473:17:8", + "nodeType": "YulFunctionCall", + "src": "7473:17:8" + }, + { + "name": "pos", + "nativeSrc": "7492:3:8", + "nodeType": "YulIdentifier", + "src": "7492:3:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7469:3:8", + "nodeType": "YulIdentifier", + "src": "7469:3:8" + }, + "nativeSrc": "7469:27:8", + "nodeType": "YulFunctionCall", + "src": "7469:27:8" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "replacement", + "nativeSrc": "7506:11:8", + "nodeType": "YulIdentifier", + "src": "7506:11:8" + }, + { + "kind": "number", + "nativeSrc": "7519:4:8", + "nodeType": "YulLiteral", + "src": "7519:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7502:3:8", + "nodeType": "YulIdentifier", + "src": "7502:3:8" + }, + "nativeSrc": "7502:22:8", + "nodeType": "YulFunctionCall", + "src": "7502:22:8" + }, + { + "name": "offset", + "nativeSrc": "7526:6:8", + "nodeType": "YulIdentifier", + "src": "7526:6:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7498:3:8", + "nodeType": "YulIdentifier", + "src": "7498:3:8" + }, + "nativeSrc": "7498:35:8", + "nodeType": "YulFunctionCall", + "src": "7498:35:8" + }, + { + "name": "length", + "nativeSrc": "7535:6:8", + "nodeType": "YulIdentifier", + "src": "7535:6:8" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "7463:5:8", + "nodeType": "YulIdentifier", + "src": "7463:5:8" + }, + "nativeSrc": "7463:79:8", + "nodeType": "YulFunctionCall", + "src": "7463:79:8" + }, + "nativeSrc": "7463:79:8", + "nodeType": "YulExpressionStatement", + "src": "7463:79:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1121, + "isOffset": false, + "isSlot": false, + "src": "7477:6:8", + "valueSize": 1 + }, + { + "declaration": 1129, + "isOffset": false, + "isSlot": false, + "src": "7535:6:8", + "valueSize": 1 + }, + { + "declaration": 1127, + "isOffset": false, + "isSlot": false, + "src": "7526:6:8", + "valueSize": 1 + }, + { + "declaration": 1123, + "isOffset": false, + "isSlot": false, + "src": "7492:3:8", + "valueSize": 1 + }, + { + "declaration": 1125, + "isOffset": false, + "isSlot": false, + "src": "7506:11:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1170, + "nodeType": "InlineAssembly", + "src": "7424:128:8" + }, + { + "expression": { + "id": 1171, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7569:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1133, + "id": 1172, + "nodeType": "Return", + "src": "7562:13:8" + } + ] + }, + "documentation": { + "id": 1119, + "nodeType": "StructuredDocumentation", + "src": "6335:648:8", + "text": " @dev Replaces bytes in `buffer` starting at `pos` with bytes from `replacement` starting at `offset`.\n Copies at most `length` bytes from `replacement` to `buffer`.\n Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`, `offset` is\n clamped to `[0, replacement.length]`, and `length` is clamped to `min(length, replacement.length - offset,\n buffer.length - pos))`. If `pos >= buffer.length` or `offset >= replacement.length`, no replacement occurs\n and the buffer is returned unchanged.\n NOTE: This function modifies the provided buffer in place." + }, + "id": 1174, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "6997:7:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1121, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "7027:6:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7014:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1120, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7014:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1123, + "mutability": "mutable", + "name": "pos", + "nameLocation": "7051:3:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7043:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7043:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1125, + "mutability": "mutable", + "name": "replacement", + "nameLocation": "7077:11:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7064:24:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1124, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7064:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1127, + "mutability": "mutable", + "name": "offset", + "nameLocation": "7106:6:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7098:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1126, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7098:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1129, + "mutability": "mutable", + "name": "length", + "nameLocation": "7130:6:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7122:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1128, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7122:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7004:138:8" + }, + "returnParameters": { + "id": 1133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1132, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7166:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1131, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7166:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "7165:14:8" + }, + "scope": 1632, + "src": "6988:594:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1246, + "nodeType": "Block", + "src": "8119:563:8", + "statements": [ + { + "assignments": [ + 1184 + ], + "declarations": [ + { + "constant": false, + "id": 1184, + "mutability": "mutable", + "name": "length", + "nameLocation": "8137:6:8", + "nodeType": "VariableDeclaration", + "scope": 1246, + "src": "8129:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8129:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1186, + "initialValue": { + "hexValue": "30", + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8146:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8129:18:8" + }, + { + "body": { + "id": 1205, + "nodeType": "Block", + "src": "8202:52:8", + "statements": [ + { + "expression": { + "id": 1203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1198, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1184, + "src": "8216:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "expression": { + "baseExpression": { + "id": 1199, + "name": "buffers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "8226:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "id": 1201, + "indexExpression": { + "id": 1200, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "8234:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8226:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8237:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8226:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8216:27:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1204, + "nodeType": "ExpressionStatement", + "src": "8216:27:8" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1191, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "8177:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1192, + "name": "buffers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "8181:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8189:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8181:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8177:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1206, + "initializationExpression": { + "assignments": [ + 1188 + ], + "declarations": [ + { + "constant": false, + "id": 1188, + "mutability": "mutable", + "name": "i", + "nameLocation": "8170:1:8", + "nodeType": "VariableDeclaration", + "scope": 1206, + "src": "8162:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8162:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1190, + "initialValue": { + "hexValue": "30", + "id": 1189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8174:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8162:13:8" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 1196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "8197:3:8", + "subExpression": { + "id": 1195, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "8199:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1197, + "nodeType": "ExpressionStatement", + "src": "8197:3:8" + }, + "nodeType": "ForStatement", + "src": "8157:97:8" + }, + { + "assignments": [ + 1208 + ], + "declarations": [ + { + "constant": false, + "id": 1208, + "mutability": "mutable", + "name": "result", + "nameLocation": "8277:6:8", + "nodeType": "VariableDeclaration", + "scope": 1246, + "src": "8264:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1207, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8264:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 1213, + "initialValue": { + "arguments": [ + { + "id": 1211, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1184, + "src": "8296:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "8286:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 1209, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8290:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 1212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8286:17:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8264:39:8" + }, + { + "assignments": [ + 1215 + ], + "declarations": [ + { + "constant": false, + "id": 1215, + "mutability": "mutable", + "name": "offset", + "nameLocation": "8322:6:8", + "nodeType": "VariableDeclaration", + "scope": 1246, + "src": "8314:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1214, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8314:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1217, + "initialValue": { + "hexValue": "30783230", + "id": 1216, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8331:4:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8314:21:8" + }, + { + "body": { + "id": 1242, + "nodeType": "Block", + "src": "8390:262:8", + "statements": [ + { + "assignments": [ + 1230 + ], + "declarations": [ + { + "constant": false, + "id": 1230, + "mutability": "mutable", + "name": "input", + "nameLocation": "8417:5:8", + "nodeType": "VariableDeclaration", + "scope": 1242, + "src": "8404:18:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1229, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8404:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 1234, + "initialValue": { + "baseExpression": { + "id": 1231, + "name": "buffers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "8425:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "id": 1233, + "indexExpression": { + "id": 1232, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1219, + "src": "8433:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8425:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8404:31:8" + }, + { + "AST": { + "nativeSrc": "8474:90:8", + "nodeType": "YulBlock", + "src": "8474:90:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "result", + "nativeSrc": "8502:6:8", + "nodeType": "YulIdentifier", + "src": "8502:6:8" + }, + { + "name": "offset", + "nativeSrc": "8510:6:8", + "nodeType": "YulIdentifier", + "src": "8510:6:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8498:3:8", + "nodeType": "YulIdentifier", + "src": "8498:3:8" + }, + "nativeSrc": "8498:19:8", + "nodeType": "YulFunctionCall", + "src": "8498:19:8" + }, + { + "arguments": [ + { + "name": "input", + "nativeSrc": "8523:5:8", + "nodeType": "YulIdentifier", + "src": "8523:5:8" + }, + { + "kind": "number", + "nativeSrc": "8530:4:8", + "nodeType": "YulLiteral", + "src": "8530:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8519:3:8", + "nodeType": "YulIdentifier", + "src": "8519:3:8" + }, + "nativeSrc": "8519:16:8", + "nodeType": "YulFunctionCall", + "src": "8519:16:8" + }, + { + "arguments": [ + { + "name": "input", + "nativeSrc": "8543:5:8", + "nodeType": "YulIdentifier", + "src": "8543:5:8" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8537:5:8", + "nodeType": "YulIdentifier", + "src": "8537:5:8" + }, + "nativeSrc": "8537:12:8", + "nodeType": "YulFunctionCall", + "src": "8537:12:8" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "8492:5:8", + "nodeType": "YulIdentifier", + "src": "8492:5:8" + }, + "nativeSrc": "8492:58:8", + "nodeType": "YulFunctionCall", + "src": "8492:58:8" + }, + "nativeSrc": "8492:58:8", + "nodeType": "YulExpressionStatement", + "src": "8492:58:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1230, + "isOffset": false, + "isSlot": false, + "src": "8523:5:8", + "valueSize": 1 + }, + { + "declaration": 1230, + "isOffset": false, + "isSlot": false, + "src": "8543:5:8", + "valueSize": 1 + }, + { + "declaration": 1215, + "isOffset": false, + "isSlot": false, + "src": "8510:6:8", + "valueSize": 1 + }, + { + "declaration": 1208, + "isOffset": false, + "isSlot": false, + "src": "8502:6:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1235, + "nodeType": "InlineAssembly", + "src": "8449:115:8" + }, + { + "id": 1241, + "nodeType": "UncheckedBlock", + "src": "8577:65:8", + "statements": [ + { + "expression": { + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1236, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1215, + "src": "8605:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "expression": { + "id": 1237, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1230, + "src": "8615:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8621:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8615:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8605:22:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1240, + "nodeType": "ExpressionStatement", + "src": "8605:22:8" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1222, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1219, + "src": "8365:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1223, + "name": "buffers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "8369:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8377:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8369:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8365:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1243, + "initializationExpression": { + "assignments": [ + 1219 + ], + "declarations": [ + { + "constant": false, + "id": 1219, + "mutability": "mutable", + "name": "i", + "nameLocation": "8358:1:8", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "8350:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8350:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1221, + "initialValue": { + "hexValue": "30", + "id": 1220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8362:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8350:13:8" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 1227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "8385:3:8", + "subExpression": { + "id": 1226, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1219, + "src": "8387:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1228, + "nodeType": "ExpressionStatement", + "src": "8385:3:8" + }, + "nodeType": "ForStatement", + "src": "8345:307:8" + }, + { + "expression": { + "id": 1244, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "8669:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1182, + "id": 1245, + "nodeType": "Return", + "src": "8662:13:8" + } + ] + }, + "documentation": { + "id": 1175, + "nodeType": "StructuredDocumentation", + "src": "7588:449:8", + "text": " @dev Concatenate an array of bytes into a single bytes object.\n For fixed bytes types, we recommend using the solidity built-in `bytes.concat` or (equivalent)\n `abi.encodePacked`.\n NOTE: this could be done in assembly with a single loop that expands starting at the FMP, but that would be\n significantly less readable. It might be worth benchmarking the savings of the full-assembly approach." + }, + "id": 1247, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "concat", + "nameLocation": "8051:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1178, + "mutability": "mutable", + "name": "buffers", + "nameLocation": "8073:7:8", + "nodeType": "VariableDeclaration", + "scope": 1247, + "src": "8058:22:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes[]" + }, + "typeName": { + "baseType": { + "id": 1176, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8058:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "id": 1177, + "nodeType": "ArrayTypeName", + "src": "8058:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", + "typeString": "bytes[]" + } + }, + "visibility": "internal" + } + ], + "src": "8057:24:8" + }, + "returnParameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1181, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1247, + "src": "8105:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1180, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8105:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "8104:14:8" + }, + "scope": 1632, + "src": "8042:640:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1256, + "nodeType": "Block", + "src": "8920:1416:8", + "statements": [ + { + "AST": { + "nativeSrc": "8955:1375:8", + "nodeType": "YulBlock", + "src": "8955:1375:8", + "statements": [ + { + "nativeSrc": "8969:26:8", + "nodeType": "YulVariableDeclaration", + "src": "8969:26:8", + "value": { + "arguments": [ + { + "name": "input", + "nativeSrc": "8989:5:8", + "nodeType": "YulIdentifier", + "src": "8989:5:8" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8983:5:8", + "nodeType": "YulIdentifier", + "src": "8983:5:8" + }, + "nativeSrc": "8983:12:8", + "nodeType": "YulFunctionCall", + "src": "8983:12:8" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "8973:6:8", + "nodeType": "YulTypedName", + "src": "8973:6:8", + "type": "" + } + ] + }, + { + "nativeSrc": "9008:21:8", + "nodeType": "YulAssignment", + "src": "9008:21:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9024:4:8", + "nodeType": "YulLiteral", + "src": "9024:4:8", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9018:5:8", + "nodeType": "YulIdentifier", + "src": "9018:5:8" + }, + "nativeSrc": "9018:11:8", + "nodeType": "YulFunctionCall", + "src": "9018:11:8" + }, + "variableNames": [ + { + "name": "output", + "nativeSrc": "9008:6:8", + "nodeType": "YulIdentifier", + "src": "9008:6:8" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9049:4:8", + "nodeType": "YulLiteral", + "src": "9049:4:8", + "type": "", + "value": "0x40" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "output", + "nativeSrc": "9063:6:8", + "nodeType": "YulIdentifier", + "src": "9063:6:8" + }, + { + "kind": "number", + "nativeSrc": "9071:4:8", + "nodeType": "YulLiteral", + "src": "9071:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9059:3:8", + "nodeType": "YulIdentifier", + "src": "9059:3:8" + }, + "nativeSrc": "9059:17:8", + "nodeType": "YulFunctionCall", + "src": "9059:17:8" + }, + { + "arguments": [ + { + "name": "length", + "nativeSrc": "9082:6:8", + "nodeType": "YulIdentifier", + "src": "9082:6:8" + }, + { + "kind": "number", + "nativeSrc": "9090:1:8", + "nodeType": "YulLiteral", + "src": "9090:1:8", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "9078:3:8", + "nodeType": "YulIdentifier", + "src": "9078:3:8" + }, + "nativeSrc": "9078:14:8", + "nodeType": "YulFunctionCall", + "src": "9078:14:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9055:3:8", + "nodeType": "YulIdentifier", + "src": "9055:3:8" + }, + "nativeSrc": "9055:38:8", + "nodeType": "YulFunctionCall", + "src": "9055:38:8" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9042:6:8", + "nodeType": "YulIdentifier", + "src": "9042:6:8" + }, + "nativeSrc": "9042:52:8", + "nodeType": "YulFunctionCall", + "src": "9042:52:8" + }, + "nativeSrc": "9042:52:8", + "nodeType": "YulExpressionStatement", + "src": "9042:52:8" + }, + { + "expression": { + "arguments": [ + { + "name": "output", + "nativeSrc": "9114:6:8", + "nodeType": "YulIdentifier", + "src": "9114:6:8" + }, + { + "arguments": [ + { + "name": "length", + "nativeSrc": "9126:6:8", + "nodeType": "YulIdentifier", + "src": "9126:6:8" + }, + { + "kind": "number", + "nativeSrc": "9134:1:8", + "nodeType": "YulLiteral", + "src": "9134:1:8", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "9122:3:8", + "nodeType": "YulIdentifier", + "src": "9122:3:8" + }, + "nativeSrc": "9122:14:8", + "nodeType": "YulFunctionCall", + "src": "9122:14:8" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9107:6:8", + "nodeType": "YulIdentifier", + "src": "9107:6:8" + }, + "nativeSrc": "9107:30:8", + "nodeType": "YulFunctionCall", + "src": "9107:30:8" + }, + "nativeSrc": "9107:30:8", + "nodeType": "YulExpressionStatement", + "src": "9107:30:8" + }, + { + "body": { + "nativeSrc": "9261:1059:8", + "nodeType": "YulBlock", + "src": "9261:1059:8", + "statements": [ + { + "nativeSrc": "9279:54:8", + "nodeType": "YulVariableDeclaration", + "src": "9279:54:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9296:3:8", + "nodeType": "YulLiteral", + "src": "9296:3:8", + "type": "", + "value": "128" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "input", + "nativeSrc": "9315:5:8", + "nodeType": "YulIdentifier", + "src": "9315:5:8" + }, + { + "kind": "number", + "nativeSrc": "9322:4:8", + "nodeType": "YulLiteral", + "src": "9322:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9311:3:8", + "nodeType": "YulIdentifier", + "src": "9311:3:8" + }, + "nativeSrc": "9311:16:8", + "nodeType": "YulFunctionCall", + "src": "9311:16:8" + }, + { + "name": "i", + "nativeSrc": "9329:1:8", + "nodeType": "YulIdentifier", + "src": "9329:1:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9307:3:8", + "nodeType": "YulIdentifier", + "src": "9307:3:8" + }, + "nativeSrc": "9307:24:8", + "nodeType": "YulFunctionCall", + "src": "9307:24:8" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9301:5:8", + "nodeType": "YulIdentifier", + "src": "9301:5:8" + }, + "nativeSrc": "9301:31:8", + "nodeType": "YulFunctionCall", + "src": "9301:31:8" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "9292:3:8", + "nodeType": "YulIdentifier", + "src": "9292:3:8" + }, + "nativeSrc": "9292:41:8", + "nodeType": "YulFunctionCall", + "src": "9292:41:8" + }, + "variables": [ + { + "name": "chunk", + "nativeSrc": "9283:5:8", + "nodeType": "YulTypedName", + "src": "9283:5:8", + "type": "" + } + ] + }, + { + "nativeSrc": "9350:165:8", + "nodeType": "YulAssignment", + "src": "9350:165:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9384:66:8", + "nodeType": "YulLiteral", + "src": "9384:66:8", + "type": "", + "value": "0x0000000000000000ffffffffffffffff0000000000000000ffffffffffffffff" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9479:2:8", + "nodeType": "YulLiteral", + "src": "9479:2:8", + "type": "", + "value": "64" + }, + { + "name": "chunk", + "nativeSrc": "9483:5:8", + "nodeType": "YulIdentifier", + "src": "9483:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9475:3:8", + "nodeType": "YulIdentifier", + "src": "9475:3:8" + }, + "nativeSrc": "9475:14:8", + "nodeType": "YulFunctionCall", + "src": "9475:14:8" + }, + { + "name": "chunk", + "nativeSrc": "9491:5:8", + "nodeType": "YulIdentifier", + "src": "9491:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "9472:2:8", + "nodeType": "YulIdentifier", + "src": "9472:2:8" + }, + "nativeSrc": "9472:25:8", + "nodeType": "YulFunctionCall", + "src": "9472:25:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9359:3:8", + "nodeType": "YulIdentifier", + "src": "9359:3:8" + }, + "nativeSrc": "9359:156:8", + "nodeType": "YulFunctionCall", + "src": "9359:156:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "9350:5:8", + "nodeType": "YulIdentifier", + "src": "9350:5:8" + } + ] + }, + { + "nativeSrc": "9532:165:8", + "nodeType": "YulAssignment", + "src": "9532:165:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9566:66:8", + "nodeType": "YulLiteral", + "src": "9566:66:8", + "type": "", + "value": "0x00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9661:2:8", + "nodeType": "YulLiteral", + "src": "9661:2:8", + "type": "", + "value": "32" + }, + { + "name": "chunk", + "nativeSrc": "9665:5:8", + "nodeType": "YulIdentifier", + "src": "9665:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9657:3:8", + "nodeType": "YulIdentifier", + "src": "9657:3:8" + }, + "nativeSrc": "9657:14:8", + "nodeType": "YulFunctionCall", + "src": "9657:14:8" + }, + { + "name": "chunk", + "nativeSrc": "9673:5:8", + "nodeType": "YulIdentifier", + "src": "9673:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "9654:2:8", + "nodeType": "YulIdentifier", + "src": "9654:2:8" + }, + "nativeSrc": "9654:25:8", + "nodeType": "YulFunctionCall", + "src": "9654:25:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9541:3:8", + "nodeType": "YulIdentifier", + "src": "9541:3:8" + }, + "nativeSrc": "9541:156:8", + "nodeType": "YulFunctionCall", + "src": "9541:156:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "9532:5:8", + "nodeType": "YulIdentifier", + "src": "9532:5:8" + } + ] + }, + { + "nativeSrc": "9714:165:8", + "nodeType": "YulAssignment", + "src": "9714:165:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9748:66:8", + "nodeType": "YulLiteral", + "src": "9748:66:8", + "type": "", + "value": "0x0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9843:2:8", + "nodeType": "YulLiteral", + "src": "9843:2:8", + "type": "", + "value": "16" + }, + { + "name": "chunk", + "nativeSrc": "9847:5:8", + "nodeType": "YulIdentifier", + "src": "9847:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9839:3:8", + "nodeType": "YulIdentifier", + "src": "9839:3:8" + }, + "nativeSrc": "9839:14:8", + "nodeType": "YulFunctionCall", + "src": "9839:14:8" + }, + { + "name": "chunk", + "nativeSrc": "9855:5:8", + "nodeType": "YulIdentifier", + "src": "9855:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "9836:2:8", + "nodeType": "YulIdentifier", + "src": "9836:2:8" + }, + "nativeSrc": "9836:25:8", + "nodeType": "YulFunctionCall", + "src": "9836:25:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9723:3:8", + "nodeType": "YulIdentifier", + "src": "9723:3:8" + }, + "nativeSrc": "9723:156:8", + "nodeType": "YulFunctionCall", + "src": "9723:156:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "9714:5:8", + "nodeType": "YulIdentifier", + "src": "9714:5:8" + } + ] + }, + { + "nativeSrc": "9896:164:8", + "nodeType": "YulAssignment", + "src": "9896:164:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9930:66:8", + "nodeType": "YulLiteral", + "src": "9930:66:8", + "type": "", + "value": "0x00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10025:1:8", + "nodeType": "YulLiteral", + "src": "10025:1:8", + "type": "", + "value": "8" + }, + { + "name": "chunk", + "nativeSrc": "10028:5:8", + "nodeType": "YulIdentifier", + "src": "10028:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "10021:3:8", + "nodeType": "YulIdentifier", + "src": "10021:3:8" + }, + "nativeSrc": "10021:13:8", + "nodeType": "YulFunctionCall", + "src": "10021:13:8" + }, + { + "name": "chunk", + "nativeSrc": "10036:5:8", + "nodeType": "YulIdentifier", + "src": "10036:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "10018:2:8", + "nodeType": "YulIdentifier", + "src": "10018:2:8" + }, + "nativeSrc": "10018:24:8", + "nodeType": "YulFunctionCall", + "src": "10018:24:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9905:3:8", + "nodeType": "YulIdentifier", + "src": "9905:3:8" + }, + "nativeSrc": "9905:155:8", + "nodeType": "YulFunctionCall", + "src": "9905:155:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "9896:5:8", + "nodeType": "YulIdentifier", + "src": "9896:5:8" + } + ] + }, + { + "nativeSrc": "10077:164:8", + "nodeType": "YulAssignment", + "src": "10077:164:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10111:66:8", + "nodeType": "YulLiteral", + "src": "10111:66:8", + "type": "", + "value": "0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10206:1:8", + "nodeType": "YulLiteral", + "src": "10206:1:8", + "type": "", + "value": "4" + }, + { + "name": "chunk", + "nativeSrc": "10209:5:8", + "nodeType": "YulIdentifier", + "src": "10209:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "10202:3:8", + "nodeType": "YulIdentifier", + "src": "10202:3:8" + }, + "nativeSrc": "10202:13:8", + "nodeType": "YulFunctionCall", + "src": "10202:13:8" + }, + { + "name": "chunk", + "nativeSrc": "10217:5:8", + "nodeType": "YulIdentifier", + "src": "10217:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "10199:2:8", + "nodeType": "YulIdentifier", + "src": "10199:2:8" + }, + "nativeSrc": "10199:24:8", + "nodeType": "YulFunctionCall", + "src": "10199:24:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10086:3:8", + "nodeType": "YulIdentifier", + "src": "10086:3:8" + }, + "nativeSrc": "10086:155:8", + "nodeType": "YulFunctionCall", + "src": "10086:155:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "10077:5:8", + "nodeType": "YulIdentifier", + "src": "10077:5:8" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "output", + "nativeSrc": "10273:6:8", + "nodeType": "YulIdentifier", + "src": "10273:6:8" + }, + { + "kind": "number", + "nativeSrc": "10281:4:8", + "nodeType": "YulLiteral", + "src": "10281:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10269:3:8", + "nodeType": "YulIdentifier", + "src": "10269:3:8" + }, + "nativeSrc": "10269:17:8", + "nodeType": "YulFunctionCall", + "src": "10269:17:8" + }, + { + "arguments": [ + { + "name": "i", + "nativeSrc": "10292:1:8", + "nodeType": "YulIdentifier", + "src": "10292:1:8" + }, + { + "kind": "number", + "nativeSrc": "10295:1:8", + "nodeType": "YulLiteral", + "src": "10295:1:8", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "10288:3:8", + "nodeType": "YulIdentifier", + "src": "10288:3:8" + }, + "nativeSrc": "10288:9:8", + "nodeType": "YulFunctionCall", + "src": "10288:9:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10265:3:8", + "nodeType": "YulIdentifier", + "src": "10265:3:8" + }, + "nativeSrc": "10265:33:8", + "nodeType": "YulFunctionCall", + "src": "10265:33:8" + }, + { + "name": "chunk", + "nativeSrc": "10300:5:8", + "nodeType": "YulIdentifier", + "src": "10300:5:8" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10258:6:8", + "nodeType": "YulIdentifier", + "src": "10258:6:8" + }, + "nativeSrc": "10258:48:8", + "nodeType": "YulFunctionCall", + "src": "10258:48:8" + }, + "nativeSrc": "10258:48:8", + "nodeType": "YulExpressionStatement", + "src": "10258:48:8" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "9200:1:8", + "nodeType": "YulIdentifier", + "src": "9200:1:8" + }, + { + "name": "length", + "nativeSrc": "9203:6:8", + "nodeType": "YulIdentifier", + "src": "9203:6:8" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "9197:2:8", + "nodeType": "YulIdentifier", + "src": "9197:2:8" + }, + "nativeSrc": "9197:13:8", + "nodeType": "YulFunctionCall", + "src": "9197:13:8" + }, + "nativeSrc": "9150:1170:8", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "9211:49:8", + "nodeType": "YulBlock", + "src": "9211:49:8", + "statements": [ + { + "nativeSrc": "9229:17:8", + "nodeType": "YulAssignment", + "src": "9229:17:8", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "9238:1:8", + "nodeType": "YulIdentifier", + "src": "9238:1:8" + }, + { + "kind": "number", + "nativeSrc": "9241:4:8", + "nodeType": "YulLiteral", + "src": "9241:4:8", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9234:3:8", + "nodeType": "YulIdentifier", + "src": "9234:3:8" + }, + "nativeSrc": "9234:12:8", + "nodeType": "YulFunctionCall", + "src": "9234:12:8" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "9229:1:8", + "nodeType": "YulIdentifier", + "src": "9229:1:8" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "9154:42:8", + "nodeType": "YulBlock", + "src": "9154:42:8", + "statements": [ + { + "nativeSrc": "9172:10:8", + "nodeType": "YulVariableDeclaration", + "src": "9172:10:8", + "value": { + "kind": "number", + "nativeSrc": "9181:1:8", + "nodeType": "YulLiteral", + "src": "9181:1:8", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "9176:1:8", + "nodeType": "YulTypedName", + "src": "9176:1:8", + "type": "" + } + ] + } + ] + }, + "src": "9150:1170:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1250, + "isOffset": false, + "isSlot": false, + "src": "8989:5:8", + "valueSize": 1 + }, + { + "declaration": 1250, + "isOffset": false, + "isSlot": false, + "src": "9315:5:8", + "valueSize": 1 + }, + { + "declaration": 1253, + "isOffset": false, + "isSlot": false, + "src": "10273:6:8", + "valueSize": 1 + }, + { + "declaration": 1253, + "isOffset": false, + "isSlot": false, + "src": "9008:6:8", + "valueSize": 1 + }, + { + "declaration": 1253, + "isOffset": false, + "isSlot": false, + "src": "9063:6:8", + "valueSize": 1 + }, + { + "declaration": 1253, + "isOffset": false, + "isSlot": false, + "src": "9114:6:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1255, + "nodeType": "InlineAssembly", + "src": "8930:1400:8" + } + ] + }, + "documentation": { + "id": 1248, + "nodeType": "StructuredDocumentation", + "src": "8688:144:8", + "text": " @dev Split each byte in `input` into two nibbles (4 bits each)\n Example: hex\"01234567\" → hex\"0001020304050607\"" + }, + "id": 1257, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toNibbles", + "nameLocation": "8846:9:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "mutability": "mutable", + "name": "input", + "nameLocation": "8869:5:8", + "nodeType": "VariableDeclaration", + "scope": 1257, + "src": "8856:18:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1249, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8856:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "8855:20:8" + }, + "returnParameters": { + "id": 1254, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1253, + "mutability": "mutable", + "name": "output", + "nameLocation": "8912:6:8", + "nodeType": "VariableDeclaration", + "scope": 1257, + "src": "8899:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1252, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8899:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "8898:21:8" + }, + "scope": 1632, + "src": "8837:1499:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1281, + "nodeType": "Block", + "src": "10494:76:8", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1267, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1260, + "src": "10511:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10513:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10511:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 1269, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "10523:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10525:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10523:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10511:20:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1273, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1260, + "src": "10545:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1272, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "10535:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10535:12:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "id": 1276, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "10561:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1275, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "10551:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10551:12:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "10535:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10511:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1266, + "id": 1280, + "nodeType": "Return", + "src": "10504:59:8" + } + ] + }, + "documentation": { + "id": 1258, + "nodeType": "StructuredDocumentation", + "src": "10342:71:8", + "text": " @dev Returns true if the two byte buffers are equal." + }, + "id": 1282, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "equal", + "nameLocation": "10427:5:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1260, + "mutability": "mutable", + "name": "a", + "nameLocation": "10446:1:8", + "nodeType": "VariableDeclaration", + "scope": 1282, + "src": "10433:14:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1259, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10433:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1262, + "mutability": "mutable", + "name": "b", + "nameLocation": "10462:1:8", + "nodeType": "VariableDeclaration", + "scope": 1282, + "src": "10449:14:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1261, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10449:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "10432:32:8" + }, + "returnParameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1265, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1282, + "src": "10488:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1264, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10488:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "10487:6:8" + }, + "scope": 1632, + "src": "10418:152:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1372, + "nodeType": "Block", + "src": "10874:1024:8", + "statements": [ + { + "expression": { + "id": 1306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1290, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "10884:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1291, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "10920:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1292, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10929:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "10920:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1294, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10919:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830304646303046463030464630304646303046463030464630304646303046463030464630304646303046463030464630304646303046463030464630304646", + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10934:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_450552876409790643671482431940419874915447411150352389258589821042463539455_by_1", + "typeString": "int_const 4505...(67 digits omitted)...9455" + }, + "value": "0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF" + }, + "src": "10919:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1297, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10918:83:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1298, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11018:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830304646303046463030464630304646303046463030464630304646303046463030464630304646303046463030464630304646303046463030464630304646", + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11026:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_450552876409790643671482431940419874915447411150352389258589821042463539455_by_1", + "typeString": "int_const 4505...(67 digits omitted)...9455" + }, + "value": "0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF" + }, + "src": "11018:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1301, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11017:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1302, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11097:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "11017:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1304, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11016:83:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "10918:181:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "10884:215:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1307, + "nodeType": "ExpressionStatement", + "src": "10884:215:8" + }, + { + "expression": { + "id": 1324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1308, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11109:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1309, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11157:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3136", + "id": 1310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11166:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "11157:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1312, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11156:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030464646463030303046464646303030304646464630303030464646463030303046464646303030304646464630303030464646463030303046464646", + "id": 1313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11172:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1766820105243087041267848467410591083712559083657179364930612997358944255_by_1", + "typeString": "int_const 1766...(65 digits omitted)...4255" + }, + "value": "0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF" + }, + "src": "11156:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1315, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11155:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1316, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11256:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030464646463030303046464646303030304646464630303030464646463030303046464646303030304646464630303030464646463030303046464646", + "id": 1317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11264:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1766820105243087041267848467410591083712559083657179364930612997358944255_by_1", + "typeString": "int_const 1766...(65 digits omitted)...4255" + }, + "value": "0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF" + }, + "src": "11256:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1319, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11255:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 1320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11335:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "11255:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1322, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11254:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11155:183:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11109:229:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1325, + "nodeType": "ExpressionStatement", + "src": "11109:229:8" + }, + { + "expression": { + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1326, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11348:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1327, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11396:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3332", + "id": 1328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11405:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "11396:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1330, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11395:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030303030304646464646464646303030303030303046464646464646463030303030303030464646464646464630303030303030304646464646464646", + "id": 1331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11411:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_26959946660873538060741835960174461801791452538186943042387869433855_by_1", + "typeString": "int_const 2695...(60 digits omitted)...3855" + }, + "value": "0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF" + }, + "src": "11395:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1333, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11394:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1334, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11495:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030303030304646464646464646303030303030303046464646464646463030303030303030464646464646464630303030303030304646464646464646", + "id": 1335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11503:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_26959946660873538060741835960174461801791452538186943042387869433855_by_1", + "typeString": "int_const 2695...(60 digits omitted)...3855" + }, + "value": "0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF" + }, + "src": "11495:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1337, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11494:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3332", + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11574:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "11494:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1340, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11493:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11394:183:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11348:229:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1343, + "nodeType": "ExpressionStatement", + "src": "11348:229:8" + }, + { + "expression": { + "id": 1360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1344, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11587:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1345, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11635:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3634", + "id": 1346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11644:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "11635:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1348, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11634:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030303030303030303030303030464646464646464646464646464646463030303030303030303030303030303046464646464646464646464646464646", + "id": 1349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11650:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_6277101735386680763495507056286727952657427581105975853055_by_1", + "typeString": "int_const 6277...(50 digits omitted)...3055" + }, + "value": "0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF" + }, + "src": "11634:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1351, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11633:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1352, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11734:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030303030303030303030303030464646464646464646464646464646463030303030303030303030303030303046464646464646464646464646464646", + "id": 1353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11742:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_6277101735386680763495507056286727952657427581105975853055_by_1", + "typeString": "int_const 6277...(50 digits omitted)...3055" + }, + "value": "0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF" + }, + "src": "11734:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1355, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11733:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3634", + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11813:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "11733:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1358, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11732:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11633:183:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11587:229:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1361, + "nodeType": "ExpressionStatement", + "src": "11587:229:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1362, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11834:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "313238", + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11843:3:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "11834:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1365, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11833:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1366, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11851:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 1367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11860:3:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "11851:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1369, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11850:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11833:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1289, + "id": 1371, + "nodeType": "Return", + "src": "11826:38:8" + } + ] + }, + "documentation": { + "id": 1283, + "nodeType": "StructuredDocumentation", + "src": "10576:222:8", + "text": " @dev Reverses the byte order of a bytes32 value, converting between little-endian and big-endian.\n Inspired by https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel[Reverse Parallel]" + }, + "id": 1373, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes32", + "nameLocation": "10812:14:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1285, + "mutability": "mutable", + "name": "value", + "nameLocation": "10835:5:8", + "nodeType": "VariableDeclaration", + "scope": 1373, + "src": "10827:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1284, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10827:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "10826:15:8" + }, + "returnParameters": { + "id": 1289, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1288, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1373, + "src": "10865:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1287, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10865:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "10864:9:8" + }, + "scope": 1632, + "src": "10803:1095:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1445, + "nodeType": "Block", + "src": "12047:590:8", + "statements": [ + { + "expression": { + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1381, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12057:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1382, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12093:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646303046463030464630304646303046463030464630304646303046463030", + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12101:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_338958311018522360492699998064329424640_by_1", + "typeString": "int_const 3389...(31 digits omitted)...4640" + }, + "value": "0xFF00FF00FF00FF00FF00FF00FF00FF00" + }, + "src": "12093:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1385, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12092:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12140:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "12092:49:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1388, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12091:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1389, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12159:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783030464630304646303046463030464630304646303046463030464630304646", + "id": 1390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12167:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1324055902416102970674609367438786815_by_1", + "typeString": "int_const 1324...(29 digits omitted)...6815" + }, + "value": "0x00FF00FF00FF00FF00FF00FF00FF00FF" + }, + "src": "12159:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1392, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12158:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12206:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "12158:49:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1395, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12157:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12091:117:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12057:151:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 1398, + "nodeType": "ExpressionStatement", + "src": "12057:151:8" + }, + { + "expression": { + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1399, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12218:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1400, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12266:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646464630303030464646463030303046464646303030304646464630303030", + "id": 1401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12274:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_340277174703306882242637262502835978240_by_1", + "typeString": "int_const 3402...(31 digits omitted)...8240" + }, + "value": "0xFFFF0000FFFF0000FFFF0000FFFF0000" + }, + "src": "12266:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1403, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12265:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3136", + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12313:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "12265:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1406, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12264:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1407, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12333:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783030303046464646303030304646464630303030464646463030303046464646", + "id": 1408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12341:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_5192217631581220737344928932233215_by_1", + "typeString": "int_const 5192...(26 digits omitted)...3215" + }, + "value": "0x0000FFFF0000FFFF0000FFFF0000FFFF" + }, + "src": "12333:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1410, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12332:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12380:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "12332:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1413, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12331:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12264:119:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12218:165:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 1416, + "nodeType": "ExpressionStatement", + "src": "12218:165:8" + }, + { + "expression": { + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1417, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12393:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1418, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12441:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646464646464646303030303030303046464646464646463030303030303030", + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12449:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366841710300967557013907638845440_by_1", + "typeString": "int_const 3402...(31 digits omitted)...5440" + }, + "value": "0xFFFFFFFF00000000FFFFFFFF00000000" + }, + "src": "12441:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1421, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12440:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3332", + "id": 1422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12488:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "12440:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1424, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12439:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1425, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12508:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783030303030303030464646464646464630303030303030304646464646464646", + "id": 1426, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12516:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_79228162495817593524129366015_by_1", + "typeString": "int_const 79228162495817593524129366015" + }, + "value": "0x00000000FFFFFFFF00000000FFFFFFFF" + }, + "src": "12508:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1428, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12507:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3332", + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12555:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "12507:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1431, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12506:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12439:119:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12393:165:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 1434, + "nodeType": "ExpressionStatement", + "src": "12393:165:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1435, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12576:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3634", + "id": 1436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12585:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "12576:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1438, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12575:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1439, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12592:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3634", + "id": 1440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12601:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "12592:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1442, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12591:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12575:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "functionReturnParameters": 1380, + "id": 1444, + "nodeType": "Return", + "src": "12568:36:8" + } + ] + }, + "documentation": { + "id": 1374, + "nodeType": "StructuredDocumentation", + "src": "11904:67:8", + "text": "@dev Same as {reverseBytes32} but optimized for 128-bit values." + }, + "id": 1446, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes16", + "nameLocation": "11985:14:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1377, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1376, + "mutability": "mutable", + "name": "value", + "nameLocation": "12008:5:8", + "nodeType": "VariableDeclaration", + "scope": 1446, + "src": "12000:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 1375, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "12000:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "visibility": "internal" + } + ], + "src": "11999:15:8" + }, + "returnParameters": { + "id": 1380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1379, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1446, + "src": "12038:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 1378, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "12038:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "visibility": "internal" + } + ], + "src": "12037:9:8" + }, + "scope": 1632, + "src": "11976:661:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1500, + "nodeType": "Block", + "src": "12782:303:8", + "statements": [ + { + "expression": { + "id": 1470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1454, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12792:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1455, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12802:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307846463030464630304646303046463030", + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12810:18:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_18374966859414961920_by_1", + "typeString": "int_const 18374966859414961920" + }, + "value": "0xFF00FF00FF00FF00" + }, + "src": "12802:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1458, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12801:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12833:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "12801:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1461, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12800:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1462, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12840:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830304646303046463030464630304646", + "id": 1463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12848:18:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_71777214294589695_by_1", + "typeString": "int_const 71777214294589695" + }, + "value": "0x00FF00FF00FF00FF" + }, + "src": "12840:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1465, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12839:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12871:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "12839:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1468, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12838:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "12800:73:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "12792:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "id": 1471, + "nodeType": "ExpressionStatement", + "src": "12792:81:8" + }, + { + "expression": { + "id": 1488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1472, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12897:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1473, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12907:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307846464646303030304646464630303030", + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12915:18:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446462603027742720_by_1", + "typeString": "int_const 18446462603027742720" + }, + "value": "0xFFFF0000FFFF0000" + }, + "src": "12907:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1476, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12906:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3136", + "id": 1477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12938:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "12906:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1479, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12905:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1480, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12946:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030464646463030303046464646", + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12954:18:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_281470681808895_by_1", + "typeString": "int_const 281470681808895" + }, + "value": "0x0000FFFF0000FFFF" + }, + "src": "12946:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1483, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12945:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 1484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12977:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "12945:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1486, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12944:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "12905:75:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "12897:83:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "id": 1489, + "nodeType": "ExpressionStatement", + "src": "12897:83:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1490, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "13024:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3332", + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13033:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "13024:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1493, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13023:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1494, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "13040:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3332", + "id": 1495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13049:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "13040:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1497, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13039:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "13023:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "functionReturnParameters": 1453, + "id": 1499, + "nodeType": "Return", + "src": "13016:36:8" + } + ] + }, + "documentation": { + "id": 1447, + "nodeType": "StructuredDocumentation", + "src": "12643:66:8", + "text": "@dev Same as {reverseBytes32} but optimized for 64-bit values." + }, + "id": 1501, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes8", + "nameLocation": "12723:13:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1449, + "mutability": "mutable", + "name": "value", + "nameLocation": "12744:5:8", + "nodeType": "VariableDeclaration", + "scope": 1501, + "src": "12737:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "typeName": { + "id": 1448, + "name": "bytes8", + "nodeType": "ElementaryTypeName", + "src": "12737:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "visibility": "internal" + } + ], + "src": "12736:14:8" + }, + "returnParameters": { + "id": 1453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1452, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1501, + "src": "12774:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "typeName": { + "id": 1451, + "name": "bytes8", + "nodeType": "ElementaryTypeName", + "src": "12774:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "visibility": "internal" + } + ], + "src": "12773:8:8" + }, + "scope": 1632, + "src": "12714:371:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1537, + "nodeType": "Block", + "src": "13230:168:8", + "statements": [ + { + "expression": { + "id": 1525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1509, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13240:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1510, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13250:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646303046463030", + "id": 1511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13258:10:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_4278255360_by_1", + "typeString": "int_const 4278255360" + }, + "value": "0xFF00FF00" + }, + "src": "13250:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1513, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13249:20:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13273:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13249:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1516, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13248:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1517, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13280:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783030464630304646", + "id": 1518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13288:10:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16711935_by_1", + "typeString": "int_const 16711935" + }, + "value": "0x00FF00FF" + }, + "src": "13280:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1520, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13279:20:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13303:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13279:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1523, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13278:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "13248:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "13240:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "id": 1526, + "nodeType": "ExpressionStatement", + "src": "13240:65:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1527, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13337:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3136", + "id": 1528, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13346:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "13337:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1530, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13336:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1531, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13353:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 1532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13362:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "13353:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1534, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13352:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "13336:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "functionReturnParameters": 1508, + "id": 1536, + "nodeType": "Return", + "src": "13329:36:8" + } + ] + }, + "documentation": { + "id": 1502, + "nodeType": "StructuredDocumentation", + "src": "13091:66:8", + "text": "@dev Same as {reverseBytes32} but optimized for 32-bit values." + }, + "id": 1538, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes4", + "nameLocation": "13171:13:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1505, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1504, + "mutability": "mutable", + "name": "value", + "nameLocation": "13192:5:8", + "nodeType": "VariableDeclaration", + "scope": 1538, + "src": "13185:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1503, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "13185:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "13184:14:8" + }, + "returnParameters": { + "id": 1508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1507, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1538, + "src": "13222:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1506, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "13222:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "13221:8:8" + }, + "scope": 1632, + "src": "13162:236:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1556, + "nodeType": "Block", + "src": "13543:51:8", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 1554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1546, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1541, + "src": "13561:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1547, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13570:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13561:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + } + ], + "id": 1549, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13560:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 1552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1550, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1541, + "src": "13576:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13585:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13576:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + } + ], + "id": 1553, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13575:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "src": "13560:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "functionReturnParameters": 1545, + "id": 1555, + "nodeType": "Return", + "src": "13553:34:8" + } + ] + }, + "documentation": { + "id": 1539, + "nodeType": "StructuredDocumentation", + "src": "13404:66:8", + "text": "@dev Same as {reverseBytes32} but optimized for 16-bit values." + }, + "id": 1557, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes2", + "nameLocation": "13484:13:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1541, + "mutability": "mutable", + "name": "value", + "nameLocation": "13505:5:8", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "13498:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "typeName": { + "id": 1540, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "13498:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "visibility": "internal" + } + ], + "src": "13497:14:8" + }, + "returnParameters": { + "id": 1545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "13535:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "typeName": { + "id": 1543, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "13535:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "visibility": "internal" + } + ], + "src": "13534:8:8" + }, + "scope": 1632, + "src": "13475:119:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1618, + "nodeType": "Block", + "src": "13811:313:8", + "statements": [ + { + "body": { + "id": 1611, + "nodeType": "Block", + "src": "13871:213:8", + "statements": [ + { + "assignments": [ + 1578 + ], + "declarations": [ + { + "constant": false, + "id": 1578, + "mutability": "mutable", + "name": "chunk", + "nameLocation": "13893:5:8", + "nodeType": "VariableDeclaration", + "scope": 1611, + "src": "13885:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1577, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13885:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1583, + "initialValue": { + "arguments": [ + { + "id": 1580, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1560, + "src": "13924:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 1581, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "13932:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1579, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "13901:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13901:33:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13885:49:8" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1584, + "name": "chunk", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "13952:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1587, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13969:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13961:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1585, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13961:7:8", + "typeDescriptions": {} + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13961:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "13952:19:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1610, + "nodeType": "IfStatement", + "src": "13948:126:8", + "trueBody": { + "id": 1609, + "nodeType": "Block", + "src": "13973:101:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "38", + "id": 1592, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14007:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 1593, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "14011:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14007:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1599, + "name": "chunk", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "14032:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14024:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14024:7:8", + "typeDescriptions": {} + } + }, + "id": 1600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14024:14:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1595, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "14015:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14020:3:8", + "memberName": "clz", + "nodeType": "MemberAccess", + "referencedDeclaration": 6203, + "src": "14015:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 1601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14015:24:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14007:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "38", + "id": 1603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14041:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "expression": { + "id": 1604, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1560, + "src": "14045:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14052:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "14045:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14041:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1590, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "13998:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14003:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "13998:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13998:61:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1564, + "id": 1608, + "nodeType": "Return", + "src": "13991:68:8" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1569, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "13841:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1570, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1560, + "src": "13845:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13852:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "13845:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13841:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1612, + "initializationExpression": { + "assignments": [ + 1566 + ], + "declarations": [ + { + "constant": false, + "id": 1566, + "mutability": "mutable", + "name": "i", + "nameLocation": "13834:1:8", + "nodeType": "VariableDeclaration", + "scope": 1612, + "src": "13826:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13826:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1568, + "initialValue": { + "hexValue": "30", + "id": 1567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13838:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13826:13:8" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 1575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1573, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "13860:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "30783230", + "id": 1574, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13865:4:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "13860:9:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1576, + "nodeType": "ExpressionStatement", + "src": "13860:9:8" + }, + "nodeType": "ForStatement", + "src": "13821:263:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "38", + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14100:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "expression": { + "id": 1614, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1560, + "src": "14104:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14111:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "14104:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14100:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1564, + "id": 1617, + "nodeType": "Return", + "src": "14093:24:8" + } + ] + }, + "documentation": { + "id": 1558, + "nodeType": "StructuredDocumentation", + "src": "13600:140:8", + "text": " @dev Counts the number of leading zero bits a bytes array. Returns `8 * buffer.length`\n if the buffer is all zeros." + }, + "id": 1619, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "clz", + "nameLocation": "13754:3:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1560, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "13771:6:8", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "13758:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1559, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13758:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "13757:21:8" + }, + "returnParameters": { + "id": 1564, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1563, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "13802:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13802:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13801:9:8" + }, + "scope": 1632, + "src": "13745:379:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1630, + "nodeType": "Block", + "src": "14509:225:8", + "statements": [ + { + "AST": { + "nativeSrc": "14658:70:8", + "nodeType": "YulBlock", + "src": "14658:70:8", + "statements": [ + { + "nativeSrc": "14672:46:8", + "nodeType": "YulAssignment", + "src": "14672:46:8", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "14695:6:8", + "nodeType": "YulIdentifier", + "src": "14695:6:8" + }, + { + "kind": "number", + "nativeSrc": "14703:4:8", + "nodeType": "YulLiteral", + "src": "14703:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14691:3:8", + "nodeType": "YulIdentifier", + "src": "14691:3:8" + }, + "nativeSrc": "14691:17:8", + "nodeType": "YulFunctionCall", + "src": "14691:17:8" + }, + { + "name": "offset", + "nativeSrc": "14710:6:8", + "nodeType": "YulIdentifier", + "src": "14710:6:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14687:3:8", + "nodeType": "YulIdentifier", + "src": "14687:3:8" + }, + "nativeSrc": "14687:30:8", + "nodeType": "YulFunctionCall", + "src": "14687:30:8" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "14681:5:8", + "nodeType": "YulIdentifier", + "src": "14681:5:8" + }, + "nativeSrc": "14681:37:8", + "nodeType": "YulFunctionCall", + "src": "14681:37:8" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "14672:5:8", + "nodeType": "YulIdentifier", + "src": "14672:5:8" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1622, + "isOffset": false, + "isSlot": false, + "src": "14695:6:8", + "valueSize": 1 + }, + { + "declaration": 1624, + "isOffset": false, + "isSlot": false, + "src": "14710:6:8", + "valueSize": 1 + }, + { + "declaration": 1627, + "isOffset": false, + "isSlot": false, + "src": "14672:5:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1629, + "nodeType": "InlineAssembly", + "src": "14633:95:8" + } + ] + }, + "documentation": { + "id": 1620, + "nodeType": "StructuredDocumentation", + "src": "14130:268:8", + "text": " @dev Reads a bytes32 from a bytes array without bounds checking.\n NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n assembly block as such would prevent some optimizations." + }, + "id": 1631, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_unsafeReadBytesOffset", + "nameLocation": "14412:22:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1625, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1622, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "14448:6:8", + "nodeType": "VariableDeclaration", + "scope": 1631, + "src": "14435:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1621, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "14435:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1624, + "mutability": "mutable", + "name": "offset", + "nameLocation": "14464:6:8", + "nodeType": "VariableDeclaration", + "scope": 1631, + "src": "14456:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1623, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14456:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14434:37:8" + }, + "returnParameters": { + "id": 1628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1627, + "mutability": "mutable", + "name": "value", + "nameLocation": "14502:5:8", + "nodeType": "VariableDeclaration", + "scope": 1631, + "src": "14494:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1626, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "14494:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "14493:15:8" + }, + "scope": 1632, + "src": "14403:331:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1633, + "src": "198:14538:8", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "99:14638:8" + }, + "id": 8 + }, + "@openzeppelin/contracts/utils/Context.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/Context.sol", + "exportedSymbols": { + "Context": [ + 1662 + ] + }, + "id": 1663, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1634, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "101:24:9" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "Context", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 1635, + "nodeType": "StructuredDocumentation", + "src": "127:496:9", + "text": " @dev Provides information about the current execution context, including the\n sender of the transaction and its data. While these are generally available\n via msg.sender and msg.data, they should not be accessed in such a direct\n manner, since when dealing with meta-transactions the account sending and\n paying for execution may not be the actual sender (as far as an application\n is concerned).\n This contract is only required for intermediate, library-like contracts." + }, + "fullyImplemented": true, + "id": 1662, + "linearizedBaseContracts": [ + 1662 + ], + "name": "Context", + "nameLocation": "642:7:9", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1643, + "nodeType": "Block", + "src": "718:34:9", + "statements": [ + { + "expression": { + "expression": { + "id": 1640, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "735:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "739:6:9", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "735:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1639, + "id": 1642, + "nodeType": "Return", + "src": "728:17:9" + } + ] + }, + "id": 1644, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgSender", + "nameLocation": "665:10:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1636, + "nodeType": "ParameterList", + "parameters": [], + "src": "675:2:9" + }, + "returnParameters": { + "id": 1639, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1638, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1644, + "src": "709:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1637, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "709:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "708:9:9" + }, + "scope": 1662, + "src": "656:96:9", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1652, + "nodeType": "Block", + "src": "825:32:9", + "statements": [ + { + "expression": { + "expression": { + "id": 1649, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "842:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "846:4:9", + "memberName": "data", + "nodeType": "MemberAccess", + "src": "842:8:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "functionReturnParameters": 1648, + "id": 1651, + "nodeType": "Return", + "src": "835:15:9" + } + ] + }, + "id": 1653, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgData", + "nameLocation": "767:8:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1645, + "nodeType": "ParameterList", + "parameters": [], + "src": "775:2:9" + }, + "returnParameters": { + "id": 1648, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1647, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1653, + "src": "809:14:9", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1646, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "809:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "808:16:9" + }, + "scope": 1662, + "src": "758:99:9", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1660, + "nodeType": "Block", + "src": "935:25:9", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 1658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "952:1:9", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1657, + "id": 1659, + "nodeType": "Return", + "src": "945:8:9" + } + ] + }, + "id": 1661, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_contextSuffixLength", + "nameLocation": "872:20:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1654, + "nodeType": "ParameterList", + "parameters": [], + "src": "892:2:9" + }, + "returnParameters": { + "id": 1657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1656, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1661, + "src": "926:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "926:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "925:9:9" + }, + "scope": 1662, + "src": "863:97:9", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 1663, + "src": "624:338:9", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "101:862:9" + }, + "id": 9 + }, + "@openzeppelin/contracts/utils/Panic.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/Panic.sol", + "exportedSymbols": { + "Panic": [ + 1714 + ] + }, + "id": 1715, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1664, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "99:24:10" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Panic", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 1665, + "nodeType": "StructuredDocumentation", + "src": "125:489:10", + "text": " @dev Helper library for emitting standardized panic codes.\n ```solidity\n contract Example {\n using Panic for uint256;\n // Use any of the declared internal constants\n function foo() { Panic.GENERIC.panic(); }\n // Alternatively\n function foo() { Panic.panic(Panic.GENERIC); }\n }\n ```\n Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n _Available since v5.1._" + }, + "fullyImplemented": true, + "id": 1714, + "linearizedBaseContracts": [ + 1714 + ], + "name": "Panic", + "nameLocation": "665:5:10", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "documentation": { + "id": 1666, + "nodeType": "StructuredDocumentation", + "src": "677:36:10", + "text": "@dev generic / unspecified error" + }, + "id": 1669, + "mutability": "constant", + "name": "GENERIC", + "nameLocation": "744:7:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "718:40:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1667, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783030", + "id": 1668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "754:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x00" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1670, + "nodeType": "StructuredDocumentation", + "src": "764:37:10", + "text": "@dev used by the assert() builtin" + }, + "id": 1673, + "mutability": "constant", + "name": "ASSERT", + "nameLocation": "832:6:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "806:39:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "806:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783031", + "id": 1672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "841:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "0x01" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1674, + "nodeType": "StructuredDocumentation", + "src": "851:41:10", + "text": "@dev arithmetic underflow or overflow" + }, + "id": 1677, + "mutability": "constant", + "name": "UNDER_OVERFLOW", + "nameLocation": "923:14:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "897:47:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1675, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "897:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783131", + "id": 1676, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "940:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_17_by_1", + "typeString": "int_const 17" + }, + "value": "0x11" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1678, + "nodeType": "StructuredDocumentation", + "src": "950:35:10", + "text": "@dev division or modulo by zero" + }, + "id": 1681, + "mutability": "constant", + "name": "DIVISION_BY_ZERO", + "nameLocation": "1016:16:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "990:49:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "990:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783132", + "id": 1680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1035:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "0x12" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1682, + "nodeType": "StructuredDocumentation", + "src": "1045:30:10", + "text": "@dev enum conversion error" + }, + "id": 1685, + "mutability": "constant", + "name": "ENUM_CONVERSION_ERROR", + "nameLocation": "1106:21:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1080:54:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1683, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1080:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783231", + "id": 1684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1130:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_33_by_1", + "typeString": "int_const 33" + }, + "value": "0x21" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1686, + "nodeType": "StructuredDocumentation", + "src": "1140:36:10", + "text": "@dev invalid encoding in storage" + }, + "id": 1689, + "mutability": "constant", + "name": "STORAGE_ENCODING_ERROR", + "nameLocation": "1207:22:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1181:55:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1181:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783232", + "id": 1688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1232:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "0x22" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1690, + "nodeType": "StructuredDocumentation", + "src": "1242:24:10", + "text": "@dev empty array pop" + }, + "id": 1693, + "mutability": "constant", + "name": "EMPTY_ARRAY_POP", + "nameLocation": "1297:15:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1271:48:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1691, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1271:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783331", + "id": 1692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1315:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_49_by_1", + "typeString": "int_const 49" + }, + "value": "0x31" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1694, + "nodeType": "StructuredDocumentation", + "src": "1325:35:10", + "text": "@dev array out of bounds access" + }, + "id": 1697, + "mutability": "constant", + "name": "ARRAY_OUT_OF_BOUNDS", + "nameLocation": "1391:19:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1365:52:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1695, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1365:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783332", + "id": 1696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1413:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "0x32" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1698, + "nodeType": "StructuredDocumentation", + "src": "1423:65:10", + "text": "@dev resource error (too large allocation or too large array)" + }, + "id": 1701, + "mutability": "constant", + "name": "RESOURCE_ERROR", + "nameLocation": "1519:14:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1493:47:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1493:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783431", + "id": 1700, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1536:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "0x41" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1702, + "nodeType": "StructuredDocumentation", + "src": "1546:42:10", + "text": "@dev calling invalid internal function" + }, + "id": 1705, + "mutability": "constant", + "name": "INVALID_INTERNAL_FUNCTION", + "nameLocation": "1619:25:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1593:58:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1703, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1593:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783531", + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1647:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_81_by_1", + "typeString": "int_const 81" + }, + "value": "0x51" + }, + "visibility": "internal" + }, + { + "body": { + "id": 1712, + "nodeType": "Block", + "src": "1819:151:10", + "statements": [ + { + "AST": { + "nativeSrc": "1854:110:10", + "nodeType": "YulBlock", + "src": "1854:110:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1875:4:10", + "nodeType": "YulLiteral", + "src": "1875:4:10", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "1881:10:10", + "nodeType": "YulLiteral", + "src": "1881:10:10", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1868:6:10", + "nodeType": "YulIdentifier", + "src": "1868:6:10" + }, + "nativeSrc": "1868:24:10", + "nodeType": "YulFunctionCall", + "src": "1868:24:10" + }, + "nativeSrc": "1868:24:10", + "nodeType": "YulExpressionStatement", + "src": "1868:24:10" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1912:4:10", + "nodeType": "YulLiteral", + "src": "1912:4:10", + "type": "", + "value": "0x20" + }, + { + "name": "code", + "nativeSrc": "1918:4:10", + "nodeType": "YulIdentifier", + "src": "1918:4:10" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1905:6:10", + "nodeType": "YulIdentifier", + "src": "1905:6:10" + }, + "nativeSrc": "1905:18:10", + "nodeType": "YulFunctionCall", + "src": "1905:18:10" + }, + "nativeSrc": "1905:18:10", + "nodeType": "YulExpressionStatement", + "src": "1905:18:10" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1943:4:10", + "nodeType": "YulLiteral", + "src": "1943:4:10", + "type": "", + "value": "0x1c" + }, + { + "kind": "number", + "nativeSrc": "1949:4:10", + "nodeType": "YulLiteral", + "src": "1949:4:10", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1936:6:10", + "nodeType": "YulIdentifier", + "src": "1936:6:10" + }, + "nativeSrc": "1936:18:10", + "nodeType": "YulFunctionCall", + "src": "1936:18:10" + }, + "nativeSrc": "1936:18:10", + "nodeType": "YulExpressionStatement", + "src": "1936:18:10" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1708, + "isOffset": false, + "isSlot": false, + "src": "1918:4:10", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1711, + "nodeType": "InlineAssembly", + "src": "1829:135:10" + } + ] + }, + "documentation": { + "id": 1706, + "nodeType": "StructuredDocumentation", + "src": "1658:113:10", + "text": "@dev Reverts with a panic code. Recommended to use with\n the internal constants with predefined codes." + }, + "id": 1713, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "panic", + "nameLocation": "1785:5:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1708, + "mutability": "mutable", + "name": "code", + "nameLocation": "1799:4:10", + "nodeType": "VariableDeclaration", + "scope": 1713, + "src": "1791:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1707, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1791:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1790:14:10" + }, + "returnParameters": { + "id": 1710, + "nodeType": "ParameterList", + "parameters": [], + "src": "1819:0:10" + }, + "scope": 1714, + "src": "1776:194:10", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1715, + "src": "657:1315:10", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "99:1874:10" + }, + "id": 10 + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "exportedSymbols": { + "ReentrancyGuard": [ + 1827 + ], + "StorageSlot": [ + 2168 + ] + }, + "id": 1828, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1716, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "109:24:11" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/StorageSlot.sol", + "file": "./StorageSlot.sol", + "id": 1718, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1828, + "sourceUnit": 2169, + "src": "135:46:11", + "symbolAliases": [ + { + "foreign": { + "id": 1717, + "name": "StorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "143:11:11", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "ReentrancyGuard", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 1719, + "nodeType": "StructuredDocumentation", + "src": "183:1066:11", + "text": " @dev Contract module that helps prevent reentrant calls to a function.\n Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n available, which can be applied to functions to make sure there are no nested\n (reentrant) calls to them.\n Note that because there is a single `nonReentrant` guard, functions marked as\n `nonReentrant` may not call one another. This can be worked around by making\n those functions `private`, and then adding `external` `nonReentrant` entry\n points to them.\n TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,\n consider using {ReentrancyGuardTransient} instead.\n TIP: If you would like to learn more about reentrancy and alternative ways\n to protect against it, check out our blog post\n https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n IMPORTANT: Deprecated. This storage-based reentrancy guard will be removed and replaced\n by the {ReentrancyGuardTransient} variant in v6.0.\n @custom:stateless" + }, + "fullyImplemented": true, + "id": 1827, + "linearizedBaseContracts": [ + 1827 + ], + "name": "ReentrancyGuard", + "nameLocation": "1268:15:11", + "nodeType": "ContractDefinition", + "nodes": [ + { + "global": false, + "id": 1722, + "libraryName": { + "id": 1720, + "name": "StorageSlot", + "nameLocations": [ + "1296:11:11" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2168, + "src": "1296:11:11" + }, + "nodeType": "UsingForDirective", + "src": "1290:30:11", + "typeName": { + "id": 1721, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1312:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + { + "constant": true, + "id": 1725, + "mutability": "constant", + "name": "REENTRANCY_GUARD_STORAGE", + "nameLocation": "1470:24:11", + "nodeType": "VariableDeclaration", + "scope": 1827, + "src": "1445:126:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1723, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1445:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "hexValue": "307839623737396231373432326430646639323232333031386233326234643166613436653037313732336436383137653234383664303033626563633535663030", + "id": 1724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1505:66:11", + "typeDescriptions": { + "typeIdentifier": "t_rational_70319816728846589445362000750570655803700195216363692647688146666176345628416_by_1", + "typeString": "int_const 7031...(69 digits omitted)...8416" + }, + "value": "0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 1728, + "mutability": "constant", + "name": "NOT_ENTERED", + "nameLocation": "2351:11:11", + "nodeType": "VariableDeclaration", + "scope": 1827, + "src": "2326:40:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2326:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "31", + "id": 1727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2365:1:11", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 1731, + "mutability": "constant", + "name": "ENTERED", + "nameLocation": "2397:7:11", + "nodeType": "VariableDeclaration", + "scope": 1827, + "src": "2372:36:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1729, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2372:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "32", + "id": 1730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2407:1:11", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "visibility": "private" + }, + { + "documentation": { + "id": 1732, + "nodeType": "StructuredDocumentation", + "src": "2415:52:11", + "text": " @dev Unauthorized reentrant call." + }, + "errorSelector": "3ee5aeb5", + "id": 1734, + "name": "ReentrancyGuardReentrantCall", + "nameLocation": "2478:28:11", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1733, + "nodeType": "ParameterList", + "parameters": [], + "src": "2506:2:11" + }, + "src": "2472:37:11" + }, + { + "body": { + "id": 1745, + "nodeType": "Block", + "src": "2529:83:11", + "statements": [ + { + "expression": { + "id": 1743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1737, + "name": "_reentrancyGuardStorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1826, + "src": "2539:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2539:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2569:14:11", + "memberName": "getUint256Slot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2112, + "src": "2539:44:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_Uint256Slot_$2059_storage_ptr_$attached_to$_t_bytes32_$", + "typeString": "function (bytes32) pure returns (struct StorageSlot.Uint256Slot storage pointer)" + } + }, + "id": 1740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2539:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot storage pointer" + } + }, + "id": 1741, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "2586:5:11", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2058, + "src": "2539:52:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1742, + "name": "NOT_ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1728, + "src": "2594:11:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2539:66:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1744, + "nodeType": "ExpressionStatement", + "src": "2539:66:11" + } + ] + }, + "id": 1746, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1735, + "nodeType": "ParameterList", + "parameters": [], + "src": "2526:2:11" + }, + "returnParameters": { + "id": 1736, + "nodeType": "ParameterList", + "parameters": [], + "src": "2529:0:11" + }, + "scope": 1827, + "src": "2515:97:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1756, + "nodeType": "Block", + "src": "3013:79:11", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1749, + "name": "_nonReentrantBefore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1791, + "src": "3023:19:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3023:21:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1751, + "nodeType": "ExpressionStatement", + "src": "3023:21:11" + }, + { + "id": 1752, + "nodeType": "PlaceholderStatement", + "src": "3054:1:11" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1753, + "name": "_nonReentrantAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1803, + "src": "3065:18:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3065:20:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1755, + "nodeType": "ExpressionStatement", + "src": "3065:20:11" + } + ] + }, + "documentation": { + "id": 1747, + "nodeType": "StructuredDocumentation", + "src": "2618:366:11", + "text": " @dev Prevents a contract from calling itself, directly or indirectly.\n Calling a `nonReentrant` function from another `nonReentrant`\n function is not supported. It is possible to prevent this from happening\n by making the `nonReentrant` function external, and making it call a\n `private` function that does the actual work." + }, + "id": 1757, + "name": "nonReentrant", + "nameLocation": "2998:12:11", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1748, + "nodeType": "ParameterList", + "parameters": [], + "src": "3010:2:11" + }, + "src": "2989:103:11", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1764, + "nodeType": "Block", + "src": "3527:53:11", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1760, + "name": "_nonReentrantBeforeView", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1776, + "src": "3537:23:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 1761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3537:25:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1762, + "nodeType": "ExpressionStatement", + "src": "3537:25:11" + }, + { + "id": 1763, + "nodeType": "PlaceholderStatement", + "src": "3572:1:11" + } + ] + }, + "documentation": { + "id": 1758, + "nodeType": "StructuredDocumentation", + "src": "3098:396:11", + "text": " @dev A `view` only version of {nonReentrant}. Use to block view functions\n from being called, preventing reading from inconsistent contract state.\n CAUTION: This is a \"view\" modifier and does not change the reentrancy\n status. Use it only on view functions. For payable or non-payable functions,\n use the standard {nonReentrant} modifier instead." + }, + "id": 1765, + "name": "nonReentrantView", + "nameLocation": "3508:16:11", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1759, + "nodeType": "ParameterList", + "parameters": [], + "src": "3524:2:11" + }, + "src": "3499:81:11", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1775, + "nodeType": "Block", + "src": "3634:109:11", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1768, + "name": "_reentrancyGuardEntered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1818, + "src": "3648:23:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 1769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3648:25:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1774, + "nodeType": "IfStatement", + "src": "3644:93:11", + "trueBody": { + "id": 1773, + "nodeType": "Block", + "src": "3675:62:11", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1770, + "name": "ReentrancyGuardReentrantCall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1734, + "src": "3696:28:11", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 1771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3696:30:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 1772, + "nodeType": "RevertStatement", + "src": "3689:37:11" + } + ] + } + } + ] + }, + "id": 1776, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_nonReentrantBeforeView", + "nameLocation": "3595:23:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1766, + "nodeType": "ParameterList", + "parameters": [], + "src": "3618:2:11" + }, + "returnParameters": { + "id": 1767, + "nodeType": "ParameterList", + "parameters": [], + "src": "3634:0:11" + }, + "scope": 1827, + "src": "3586:157:11", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1790, + "nodeType": "Block", + "src": "3788:253:11", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1779, + "name": "_nonReentrantBeforeView", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1776, + "src": "3872:23:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 1780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3872:25:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1781, + "nodeType": "ExpressionStatement", + "src": "3872:25:11" + }, + { + "expression": { + "id": 1788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1782, + "name": "_reentrancyGuardStorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1826, + "src": "3972:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3972:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4002:14:11", + "memberName": "getUint256Slot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2112, + "src": "3972:44:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_Uint256Slot_$2059_storage_ptr_$attached_to$_t_bytes32_$", + "typeString": "function (bytes32) pure returns (struct StorageSlot.Uint256Slot storage pointer)" + } + }, + "id": 1785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3972:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot storage pointer" + } + }, + "id": 1786, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "4019:5:11", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2058, + "src": "3972:52:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1787, + "name": "ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1731, + "src": "4027:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3972:62:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1789, + "nodeType": "ExpressionStatement", + "src": "3972:62:11" + } + ] + }, + "id": 1791, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_nonReentrantBefore", + "nameLocation": "3758:19:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1777, + "nodeType": "ParameterList", + "parameters": [], + "src": "3777:2:11" + }, + "returnParameters": { + "id": 1778, + "nodeType": "ParameterList", + "parameters": [], + "src": "3788:0:11" + }, + "scope": 1827, + "src": "3749:292:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1802, + "nodeType": "Block", + "src": "4085:215:11", + "statements": [ + { + "expression": { + "id": 1800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1794, + "name": "_reentrancyGuardStorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1826, + "src": "4227:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4227:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4257:14:11", + "memberName": "getUint256Slot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2112, + "src": "4227:44:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_Uint256Slot_$2059_storage_ptr_$attached_to$_t_bytes32_$", + "typeString": "function (bytes32) pure returns (struct StorageSlot.Uint256Slot storage pointer)" + } + }, + "id": 1797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4227:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot storage pointer" + } + }, + "id": 1798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "4274:5:11", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2058, + "src": "4227:52:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1799, + "name": "NOT_ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1728, + "src": "4282:11:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4227:66:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1801, + "nodeType": "ExpressionStatement", + "src": "4227:66:11" + } + ] + }, + "id": 1803, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_nonReentrantAfter", + "nameLocation": "4056:18:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1792, + "nodeType": "ParameterList", + "parameters": [], + "src": "4074:2:11" + }, + "returnParameters": { + "id": 1793, + "nodeType": "ParameterList", + "parameters": [], + "src": "4085:0:11" + }, + "scope": 1827, + "src": "4047:253:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1817, + "nodeType": "Block", + "src": "4543:87:11", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1809, + "name": "_reentrancyGuardStorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1826, + "src": "4560:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4560:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4590:14:11", + "memberName": "getUint256Slot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2112, + "src": "4560:44:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_Uint256Slot_$2059_storage_ptr_$attached_to$_t_bytes32_$", + "typeString": "function (bytes32) pure returns (struct StorageSlot.Uint256Slot storage pointer)" + } + }, + "id": 1812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4560:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot storage pointer" + } + }, + "id": 1813, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4607:5:11", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2058, + "src": "4560:52:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1814, + "name": "ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1731, + "src": "4616:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4560:63:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1808, + "id": 1816, + "nodeType": "Return", + "src": "4553:70:11" + } + ] + }, + "documentation": { + "id": 1804, + "nodeType": "StructuredDocumentation", + "src": "4306:168:11", + "text": " @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n `nonReentrant` function in the call stack." + }, + "id": 1818, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reentrancyGuardEntered", + "nameLocation": "4488:23:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1805, + "nodeType": "ParameterList", + "parameters": [], + "src": "4511:2:11" + }, + "returnParameters": { + "id": 1808, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1807, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "4537:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1806, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4537:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4536:6:11" + }, + "scope": 1827, + "src": "4479:151:11", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1825, + "nodeType": "Block", + "src": "4715:48:11", + "statements": [ + { + "expression": { + "id": 1823, + "name": "REENTRANCY_GUARD_STORAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1725, + "src": "4732:24:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1822, + "id": 1824, + "nodeType": "Return", + "src": "4725:31:11" + } + ] + }, + "id": 1826, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reentrancyGuardStorageSlot", + "nameLocation": "4645:27:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1819, + "nodeType": "ParameterList", + "parameters": [], + "src": "4672:2:11" + }, + "returnParameters": { + "id": 1822, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1821, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1826, + "src": "4706:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1820, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4706:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4705:9:11" + }, + "scope": 1827, + "src": "4636:127:11", + "stateMutability": "pure", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 1828, + "src": "1250:3515:11", + "usedErrors": [ + 1734 + ], + "usedEvents": [] + } + ], + "src": "109:4657:11" + }, + "id": 11 + }, + "@openzeppelin/contracts/utils/ShortStrings.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/ShortStrings.sol", + "exportedSymbols": { + "ShortString": [ + 1833 + ], + "ShortStrings": [ + 2044 + ], + "StorageSlot": [ + 2168 + ] + }, + "id": 2045, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1829, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "106:24:12" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/StorageSlot.sol", + "file": "./StorageSlot.sol", + "id": 1831, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 2045, + "sourceUnit": 2169, + "src": "132:46:12", + "symbolAliases": [ + { + "foreign": { + "id": 1830, + "name": "StorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "140:11:12", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "canonicalName": "ShortString", + "id": 1833, + "name": "ShortString", + "nameLocation": "353:11:12", + "nodeType": "UserDefinedValueTypeDefinition", + "src": "348:28:12", + "underlyingType": { + "id": 1832, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "368:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ShortStrings", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 1834, + "nodeType": "StructuredDocumentation", + "src": "378:876:12", + "text": " @dev This library provides functions to convert short memory strings\n into a `ShortString` type that can be used as an immutable variable.\n Strings of arbitrary length can be optimized using this library if\n they are short enough (up to 31 bytes) by packing them with their\n length (1 byte) in a single EVM word (32 bytes). Additionally, a\n fallback mechanism can be used for every other case.\n Usage example:\n ```solidity\n contract Named {\n using ShortStrings for *;\n ShortString private immutable _name;\n string private _nameFallback;\n constructor(string memory contractName) {\n _name = contractName.toShortStringWithFallback(_nameFallback);\n }\n function name() external view returns (string memory) {\n return _name.toStringWithFallback(_nameFallback);\n }\n }\n ```" + }, + "fullyImplemented": true, + "id": 2044, + "linearizedBaseContracts": [ + 2044 + ], + "name": "ShortStrings", + "nameLocation": "1263:12:12", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 1837, + "mutability": "constant", + "name": "FALLBACK_SENTINEL", + "nameLocation": "1370:17:12", + "nodeType": "VariableDeclaration", + "scope": 2044, + "src": "1345:111:12", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1835, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1345:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "hexValue": "307830303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030304646", + "id": 1836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1390:66:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0x00000000000000000000000000000000000000000000000000000000000000FF" + }, + "visibility": "private" + }, + { + "errorSelector": "305a27a9", + "id": 1841, + "name": "StringTooLong", + "nameLocation": "1469:13:12", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1840, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "str", + "nameLocation": "1490:3:12", + "nodeType": "VariableDeclaration", + "scope": 1841, + "src": "1483:10:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1838, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1483:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1482:12:12" + }, + "src": "1463:32:12" + }, + { + "errorSelector": "b3512b0c", + "id": 1843, + "name": "InvalidShortString", + "nameLocation": "1506:18:12", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1842, + "nodeType": "ParameterList", + "parameters": [], + "src": "1524:2:12" + }, + "src": "1500:27:12" + }, + { + "body": { + "id": 1886, + "nodeType": "Block", + "src": "1786:210:12", + "statements": [ + { + "assignments": [ + 1853 + ], + "declarations": [ + { + "constant": false, + "id": 1853, + "mutability": "mutable", + "name": "bstr", + "nameLocation": "1809:4:12", + "nodeType": "VariableDeclaration", + "scope": 1886, + "src": "1796:17:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1852, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1796:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 1858, + "initialValue": { + "arguments": [ + { + "id": 1856, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1846, + "src": "1822:3:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1816:5:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 1854, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1816:5:12", + "typeDescriptions": {} + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1816:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1796:30:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1859, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1853, + "src": "1840:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1845:6:12", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1840:11:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30783166", + "id": 1861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1854:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_31_by_1", + "typeString": "int_const 31" + }, + "value": "0x1f" + }, + "src": "1840:18:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1868, + "nodeType": "IfStatement", + "src": "1836:74:12", + "trueBody": { + "id": 1867, + "nodeType": "Block", + "src": "1860:50:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1864, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1846, + "src": "1895:3:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1863, + "name": "StringTooLong", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "1881:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_string_memory_ptr_$returns$_t_error_$", + "typeString": "function (string memory) pure returns (error)" + } + }, + "id": 1865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1881:18:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 1866, + "nodeType": "RevertStatement", + "src": "1874:25:12" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1877, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1853, + "src": "1967:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1959:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1875, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1959:7:12", + "typeDescriptions": {} + } + }, + "id": 1878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1959:13:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1874, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1951:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1873, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1951:7:12", + "typeDescriptions": {} + } + }, + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1951:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "expression": { + "id": 1880, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1853, + "src": "1976:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1981:6:12", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1976:11:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1951:36:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1943:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1871, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1943:7:12", + "typeDescriptions": {} + } + }, + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1943:45:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 1869, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "1926:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 1870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1938:4:12", + "memberName": "wrap", + "nodeType": "MemberAccess", + "src": "1926:16:12", + "typeDescriptions": { + "typeIdentifier": "t_function_wrap_pure$_t_bytes32_$returns$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (bytes32) pure returns (ShortString)" + } + }, + "id": 1884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1926:63:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "functionReturnParameters": 1851, + "id": 1885, + "nodeType": "Return", + "src": "1919:70:12" + } + ] + }, + "documentation": { + "id": 1844, + "nodeType": "StructuredDocumentation", + "src": "1533:170:12", + "text": " @dev Encode a string of at most 31 chars into a `ShortString`.\n This will trigger a `StringTooLong` error is the input string is too long." + }, + "id": 1887, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toShortString", + "nameLocation": "1717:13:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1847, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1846, + "mutability": "mutable", + "name": "str", + "nameLocation": "1745:3:12", + "nodeType": "VariableDeclaration", + "scope": 1887, + "src": "1731:17:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1845, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1731:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1730:19:12" + }, + "returnParameters": { + "id": 1851, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1850, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1887, + "src": "1773:11:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1849, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1848, + "name": "ShortString", + "nameLocations": [ + "1773:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "1773:11:12" + }, + "referencedDeclaration": 1833, + "src": "1773:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + } + ], + "src": "1772:13:12" + }, + "scope": 2044, + "src": "1708:288:12", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1912, + "nodeType": "Block", + "src": "2154:306:12", + "statements": [ + { + "assignments": [ + 1897 + ], + "declarations": [ + { + "constant": false, + "id": 1897, + "mutability": "mutable", + "name": "len", + "nameLocation": "2172:3:12", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2164:11:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2164:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1901, + "initialValue": { + "arguments": [ + { + "id": 1899, + "name": "sstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1891, + "src": "2189:4:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "id": 1898, + "name": "byteLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1945, + "src": "2178:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_uint256_$", + "typeString": "function (ShortString) pure returns (uint256)" + } + }, + "id": 1900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2178:16:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2164:30:12" + }, + { + "assignments": [ + 1903 + ], + "declarations": [ + { + "constant": false, + "id": 1903, + "mutability": "mutable", + "name": "str", + "nameLocation": "2296:3:12", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2282:17:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1902, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2282:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "id": 1908, + "initialValue": { + "arguments": [ + { + "hexValue": "30783230", + "id": 1906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2313:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + } + ], + "id": 1905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2302:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + }, + "typeName": { + "id": 1904, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2306:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + "id": 1907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2302:16:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2282:36:12" + }, + { + "AST": { + "nativeSrc": "2353:81:12", + "nodeType": "YulBlock", + "src": "2353:81:12", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "str", + "nativeSrc": "2374:3:12", + "nodeType": "YulIdentifier", + "src": "2374:3:12" + }, + { + "name": "len", + "nativeSrc": "2379:3:12", + "nodeType": "YulIdentifier", + "src": "2379:3:12" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2367:6:12", + "nodeType": "YulIdentifier", + "src": "2367:6:12" + }, + "nativeSrc": "2367:16:12", + "nodeType": "YulFunctionCall", + "src": "2367:16:12" + }, + "nativeSrc": "2367:16:12", + "nodeType": "YulExpressionStatement", + "src": "2367:16:12" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "str", + "nativeSrc": "2407:3:12", + "nodeType": "YulIdentifier", + "src": "2407:3:12" + }, + { + "kind": "number", + "nativeSrc": "2412:4:12", + "nodeType": "YulLiteral", + "src": "2412:4:12", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2403:3:12", + "nodeType": "YulIdentifier", + "src": "2403:3:12" + }, + "nativeSrc": "2403:14:12", + "nodeType": "YulFunctionCall", + "src": "2403:14:12" + }, + { + "name": "sstr", + "nativeSrc": "2419:4:12", + "nodeType": "YulIdentifier", + "src": "2419:4:12" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2396:6:12", + "nodeType": "YulIdentifier", + "src": "2396:6:12" + }, + "nativeSrc": "2396:28:12", + "nodeType": "YulFunctionCall", + "src": "2396:28:12" + }, + "nativeSrc": "2396:28:12", + "nodeType": "YulExpressionStatement", + "src": "2396:28:12" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1897, + "isOffset": false, + "isSlot": false, + "src": "2379:3:12", + "valueSize": 1 + }, + { + "declaration": 1891, + "isOffset": false, + "isSlot": false, + "src": "2419:4:12", + "valueSize": 1 + }, + { + "declaration": 1903, + "isOffset": false, + "isSlot": false, + "src": "2374:3:12", + "valueSize": 1 + }, + { + "declaration": 1903, + "isOffset": false, + "isSlot": false, + "src": "2407:3:12", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1909, + "nodeType": "InlineAssembly", + "src": "2328:106:12" + }, + { + "expression": { + "id": 1910, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1903, + "src": "2450:3:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1895, + "id": 1911, + "nodeType": "Return", + "src": "2443:10:12" + } + ] + }, + "documentation": { + "id": 1888, + "nodeType": "StructuredDocumentation", + "src": "2002:73:12", + "text": " @dev Decode a `ShortString` back to a \"normal\" string." + }, + "id": 1913, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toString", + "nameLocation": "2089:8:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1892, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "sstr", + "nameLocation": "2110:4:12", + "nodeType": "VariableDeclaration", + "scope": 1913, + "src": "2098:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1890, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1889, + "name": "ShortString", + "nameLocations": [ + "2098:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2098:11:12" + }, + "referencedDeclaration": 1833, + "src": "2098:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + } + ], + "src": "2097:18:12" + }, + "returnParameters": { + "id": 1895, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1894, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1913, + "src": "2139:13:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1893, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2139:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2138:15:12" + }, + "scope": 2044, + "src": "2080:380:12", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1944, + "nodeType": "Block", + "src": "2602:177:12", + "statements": [ + { + "assignments": [ + 1923 + ], + "declarations": [ + { + "constant": false, + "id": 1923, + "mutability": "mutable", + "name": "result", + "nameLocation": "2620:6:12", + "nodeType": "VariableDeclaration", + "scope": 1944, + "src": "2612:14:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1922, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2612:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1933, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1928, + "name": "sstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1917, + "src": "2656:4:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "expression": { + "id": 1926, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "2637:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2649:6:12", + "memberName": "unwrap", + "nodeType": "MemberAccess", + "src": "2637:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_bytes32_$", + "typeString": "function (ShortString) pure returns (bytes32)" + } + }, + "id": 1929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2637:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2629:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1924, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2629:7:12", + "typeDescriptions": {} + } + }, + "id": 1930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2629:33:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646", + "id": 1931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2665:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0xFF" + }, + "src": "2629:40:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2612:57:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1934, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1923, + "src": "2683:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30783166", + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2692:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_31_by_1", + "typeString": "int_const 31" + }, + "value": "0x1f" + }, + "src": "2683:13:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1941, + "nodeType": "IfStatement", + "src": "2679:71:12", + "trueBody": { + "id": 1940, + "nodeType": "Block", + "src": "2698:52:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1937, + "name": "InvalidShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1843, + "src": "2719:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 1938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2719:20:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 1939, + "nodeType": "RevertStatement", + "src": "2712:27:12" + } + ] + } + }, + { + "expression": { + "id": 1942, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1923, + "src": "2766:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1921, + "id": 1943, + "nodeType": "Return", + "src": "2759:13:12" + } + ] + }, + "documentation": { + "id": 1914, + "nodeType": "StructuredDocumentation", + "src": "2466:61:12", + "text": " @dev Return the length of a `ShortString`." + }, + "id": 1945, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "byteLength", + "nameLocation": "2541:10:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1917, + "mutability": "mutable", + "name": "sstr", + "nameLocation": "2564:4:12", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2552:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1916, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1915, + "name": "ShortString", + "nameLocations": [ + "2552:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2552:11:12" + }, + "referencedDeclaration": 1833, + "src": "2552:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + } + ], + "src": "2551:18:12" + }, + "returnParameters": { + "id": 1921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1920, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2593:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1919, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2593:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2592:9:12" + }, + "scope": 2044, + "src": "2532:247:12", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1984, + "nodeType": "Block", + "src": "3002:233:12", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 1958, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1948, + "src": "3022:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3016:5:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 1956, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3016:5:12", + "typeDescriptions": {} + } + }, + "id": 1959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3016:12:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3029:6:12", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3016:19:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "30783230", + "id": 1961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3038:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "3016:26:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1982, + "nodeType": "Block", + "src": "3102:127:12", + "statements": [ + { + "expression": { + "id": 1975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [ + { + "id": 1971, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1950, + "src": "3142:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + ], + "expression": { + "id": 1968, + "name": "StorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "3116:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_StorageSlot_$2168_$", + "typeString": "type(library StorageSlot)" + } + }, + "id": 1970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3128:13:12", + "memberName": "getStringSlot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2145, + "src": "3116:25:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_storage_ptr_$returns$_t_struct$_StringSlot_$2065_storage_ptr_$", + "typeString": "function (string storage pointer) pure returns (struct StorageSlot.StringSlot storage pointer)" + } + }, + "id": 1972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3116:32:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot storage pointer" + } + }, + "id": 1973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "3149:5:12", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2064, + "src": "3116:38:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1974, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1948, + "src": "3157:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3116:46:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 1976, + "nodeType": "ExpressionStatement", + "src": "3116:46:12" + }, + { + "expression": { + "arguments": [ + { + "id": 1979, + "name": "FALLBACK_SENTINEL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "3200:17:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 1977, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "3183:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 1978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3195:4:12", + "memberName": "wrap", + "nodeType": "MemberAccess", + "src": "3183:16:12", + "typeDescriptions": { + "typeIdentifier": "t_function_wrap_pure$_t_bytes32_$returns$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (bytes32) pure returns (ShortString)" + } + }, + "id": 1980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3183:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "functionReturnParameters": 1955, + "id": 1981, + "nodeType": "Return", + "src": "3176:42:12" + } + ] + }, + "id": 1983, + "nodeType": "IfStatement", + "src": "3012:217:12", + "trueBody": { + "id": 1967, + "nodeType": "Block", + "src": "3044:52:12", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1964, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1948, + "src": "3079:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1963, + "name": "toShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1887, + "src": "3065:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (string memory) pure returns (ShortString)" + } + }, + "id": 1965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3065:20:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "functionReturnParameters": 1955, + "id": 1966, + "nodeType": "Return", + "src": "3058:27:12" + } + ] + } + } + ] + }, + "documentation": { + "id": 1946, + "nodeType": "StructuredDocumentation", + "src": "2785:103:12", + "text": " @dev Encode a string into a `ShortString`, or write it to storage if it is too long." + }, + "id": 1985, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toShortStringWithFallback", + "nameLocation": "2902:25:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1951, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1948, + "mutability": "mutable", + "name": "value", + "nameLocation": "2942:5:12", + "nodeType": "VariableDeclaration", + "scope": 1985, + "src": "2928:19:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1947, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2928:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1950, + "mutability": "mutable", + "name": "store", + "nameLocation": "2964:5:12", + "nodeType": "VariableDeclaration", + "scope": 1985, + "src": "2949:20:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1949, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2949:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2927:43:12" + }, + "returnParameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1985, + "src": "2989:11:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1953, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1952, + "name": "ShortString", + "nameLocations": [ + "2989:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2989:11:12" + }, + "referencedDeclaration": 1833, + "src": "2989:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + } + ], + "src": "2988:13:12" + }, + "scope": 2044, + "src": "2893:342:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2011, + "nodeType": "Block", + "src": "3485:158:12", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 2001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1998, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1989, + "src": "3518:5:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "expression": { + "id": 1996, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "3499:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 1997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3511:6:12", + "memberName": "unwrap", + "nodeType": "MemberAccess", + "src": "3499:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_bytes32_$", + "typeString": "function (ShortString) pure returns (bytes32)" + } + }, + "id": 1999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3499:25:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 2000, + "name": "FALLBACK_SENTINEL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "3528:17:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3499:46:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2009, + "nodeType": "Block", + "src": "3600:37:12", + "statements": [ + { + "expression": { + "id": 2007, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1991, + "src": "3621:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + }, + "functionReturnParameters": 1995, + "id": 2008, + "nodeType": "Return", + "src": "3614:12:12" + } + ] + }, + "id": 2010, + "nodeType": "IfStatement", + "src": "3495:142:12", + "trueBody": { + "id": 2006, + "nodeType": "Block", + "src": "3547:47:12", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2003, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1989, + "src": "3577:5:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "id": 2002, + "name": "toString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1913, + "src": "3568:8:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_string_memory_ptr_$", + "typeString": "function (ShortString) pure returns (string memory)" + } + }, + "id": 2004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3568:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1995, + "id": 2005, + "nodeType": "Return", + "src": "3561:22:12" + } + ] + } + } + ] + }, + "documentation": { + "id": 1986, + "nodeType": "StructuredDocumentation", + "src": "3241:130:12", + "text": " @dev Decode a string that was encoded to `ShortString` or written to storage using {toShortStringWithFallback}." + }, + "id": 2012, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toStringWithFallback", + "nameLocation": "3385:20:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1989, + "mutability": "mutable", + "name": "value", + "nameLocation": "3418:5:12", + "nodeType": "VariableDeclaration", + "scope": 2012, + "src": "3406:17:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1988, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1987, + "name": "ShortString", + "nameLocations": [ + "3406:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "3406:11:12" + }, + "referencedDeclaration": 1833, + "src": "3406:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1991, + "mutability": "mutable", + "name": "store", + "nameLocation": "3440:5:12", + "nodeType": "VariableDeclaration", + "scope": 2012, + "src": "3425:20:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1990, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3425:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3405:41:12" + }, + "returnParameters": { + "id": 1995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1994, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2012, + "src": "3470:13:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1993, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3470:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3469:15:12" + }, + "scope": 2044, + "src": "3376:267:12", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2042, + "nodeType": "Block", + "src": "4133:174:12", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2025, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2016, + "src": "4166:5:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "expression": { + "id": 2023, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "4147:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 2024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4159:6:12", + "memberName": "unwrap", + "nodeType": "MemberAccess", + "src": "4147:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_bytes32_$", + "typeString": "function (ShortString) pure returns (bytes32)" + } + }, + "id": 2026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4147:25:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 2027, + "name": "FALLBACK_SENTINEL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "4176:17:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "4147:46:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2040, + "nodeType": "Block", + "src": "4250:51:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2036, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2018, + "src": "4277:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + ], + "id": 2035, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4271:5:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2034, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4271:5:12", + "typeDescriptions": {} + } + }, + "id": 2037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4271:12:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 2038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4284:6:12", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4271:19:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2022, + "id": 2039, + "nodeType": "Return", + "src": "4264:26:12" + } + ] + }, + "id": 2041, + "nodeType": "IfStatement", + "src": "4143:158:12", + "trueBody": { + "id": 2033, + "nodeType": "Block", + "src": "4195:49:12", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2030, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2016, + "src": "4227:5:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "id": 2029, + "name": "byteLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1945, + "src": "4216:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_uint256_$", + "typeString": "function (ShortString) pure returns (uint256)" + } + }, + "id": 2031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4216:17:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2022, + "id": 2032, + "nodeType": "Return", + "src": "4209:24:12" + } + ] + } + } + ] + }, + "documentation": { + "id": 2013, + "nodeType": "StructuredDocumentation", + "src": "3649:374:12", + "text": " @dev Return the length of a string that was encoded to `ShortString` or written to storage using\n {toShortStringWithFallback}.\n WARNING: This will return the \"byte length\" of the string. This may not reflect the actual length in terms of\n actual characters as the UTF-8 encoding of a single character can span over multiple bytes." + }, + "id": 2043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "byteLengthWithFallback", + "nameLocation": "4037:22:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2016, + "mutability": "mutable", + "name": "value", + "nameLocation": "4072:5:12", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "4060:17:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 2015, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2014, + "name": "ShortString", + "nameLocations": [ + "4060:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "4060:11:12" + }, + "referencedDeclaration": 1833, + "src": "4060:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2018, + "mutability": "mutable", + "name": "store", + "nameLocation": "4094:5:12", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "4079:20:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2017, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4079:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "4059:41:12" + }, + "returnParameters": { + "id": 2022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "4124:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2020, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4124:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4123:9:12" + }, + "scope": 2044, + "src": "4028:279:12", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2045, + "src": "1255:3054:12", + "usedErrors": [ + 1841, + 1843 + ], + "usedEvents": [] + } + ], + "src": "106:4204:12" + }, + "id": 12 + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/StorageSlot.sol", + "exportedSymbols": { + "StorageSlot": [ + 2168 + ] + }, + "id": 2169, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2046, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "193:24:13" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "StorageSlot", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 2047, + "nodeType": "StructuredDocumentation", + "src": "219:1187:13", + "text": " @dev Library for reading and writing primitive types to specific storage slots.\n Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n This library helps with reading and writing to such slots without the need for inline assembly.\n The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n Example usage to set ERC-1967 implementation slot:\n ```solidity\n contract ERC1967 {\n // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n function _setImplementation(address newImplementation) internal {\n require(newImplementation.code.length > 0);\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n }\n ```\n TIP: Consider using this library along with {SlotDerivation}." + }, + "fullyImplemented": true, + "id": 2168, + "linearizedBaseContracts": [ + 2168 + ], + "name": "StorageSlot", + "nameLocation": "1415:11:13", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "StorageSlot.AddressSlot", + "id": 2050, + "members": [ + { + "constant": false, + "id": 2049, + "mutability": "mutable", + "name": "value", + "nameLocation": "1470:5:13", + "nodeType": "VariableDeclaration", + "scope": 2050, + "src": "1462:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2048, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1462:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "AddressSlot", + "nameLocation": "1440:11:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1433:49:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.BooleanSlot", + "id": 2053, + "members": [ + { + "constant": false, + "id": 2052, + "mutability": "mutable", + "name": "value", + "nameLocation": "1522:5:13", + "nodeType": "VariableDeclaration", + "scope": 2053, + "src": "1517:10:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2051, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1517:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "name": "BooleanSlot", + "nameLocation": "1495:11:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1488:46:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.Bytes32Slot", + "id": 2056, + "members": [ + { + "constant": false, + "id": 2055, + "mutability": "mutable", + "name": "value", + "nameLocation": "1577:5:13", + "nodeType": "VariableDeclaration", + "scope": 2056, + "src": "1569:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2054, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1569:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "name": "Bytes32Slot", + "nameLocation": "1547:11:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1540:49:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.Uint256Slot", + "id": 2059, + "members": [ + { + "constant": false, + "id": 2058, + "mutability": "mutable", + "name": "value", + "nameLocation": "1632:5:13", + "nodeType": "VariableDeclaration", + "scope": 2059, + "src": "1624:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2057, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1624:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Uint256Slot", + "nameLocation": "1602:11:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1595:49:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.Int256Slot", + "id": 2062, + "members": [ + { + "constant": false, + "id": 2061, + "mutability": "mutable", + "name": "value", + "nameLocation": "1685:5:13", + "nodeType": "VariableDeclaration", + "scope": 2062, + "src": "1678:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2060, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1678:6:13", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "name": "Int256Slot", + "nameLocation": "1657:10:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1650:47:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.StringSlot", + "id": 2065, + "members": [ + { + "constant": false, + "id": 2064, + "mutability": "mutable", + "name": "value", + "nameLocation": "1738:5:13", + "nodeType": "VariableDeclaration", + "scope": 2065, + "src": "1731:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2063, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1731:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "name": "StringSlot", + "nameLocation": "1710:10:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1703:47:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.BytesSlot", + "id": 2068, + "members": [ + { + "constant": false, + "id": 2067, + "mutability": "mutable", + "name": "value", + "nameLocation": "1789:5:13", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "1783:11:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2066, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1783:5:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "name": "BytesSlot", + "nameLocation": "1763:9:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1756:45:13", + "visibility": "public" + }, + { + "body": { + "id": 2078, + "nodeType": "Block", + "src": "1983:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "2018:38:13", + "nodeType": "YulBlock", + "src": "2018:38:13", + "statements": [ + { + "nativeSrc": "2032:14:13", + "nodeType": "YulAssignment", + "src": "2032:14:13", + "value": { + "name": "slot", + "nativeSrc": "2042:4:13", + "nodeType": "YulIdentifier", + "src": "2042:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "2032:6:13", + "nodeType": "YulIdentifier", + "src": "2032:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2075, + "isOffset": false, + "isSlot": true, + "src": "2032:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2071, + "isOffset": false, + "isSlot": false, + "src": "2042:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2077, + "nodeType": "InlineAssembly", + "src": "1993:63:13" + } + ] + }, + "documentation": { + "id": 2069, + "nodeType": "StructuredDocumentation", + "src": "1807:87:13", + "text": " @dev Returns an `AddressSlot` with member `value` located at `slot`." + }, + "id": 2079, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAddressSlot", + "nameLocation": "1908:14:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2072, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2071, + "mutability": "mutable", + "name": "slot", + "nameLocation": "1931:4:13", + "nodeType": "VariableDeclaration", + "scope": 2079, + "src": "1923:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2070, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1923:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1922:14:13" + }, + "returnParameters": { + "id": 2076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2075, + "mutability": "mutable", + "name": "r", + "nameLocation": "1980:1:13", + "nodeType": "VariableDeclaration", + "scope": 2079, + "src": "1960:21:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSlot_$2050_storage_ptr", + "typeString": "struct StorageSlot.AddressSlot" + }, + "typeName": { + "id": 2074, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2073, + "name": "AddressSlot", + "nameLocations": [ + "1960:11:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2050, + "src": "1960:11:13" + }, + "referencedDeclaration": 2050, + "src": "1960:11:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSlot_$2050_storage_ptr", + "typeString": "struct StorageSlot.AddressSlot" + } + }, + "visibility": "internal" + } + ], + "src": "1959:23:13" + }, + "scope": 2168, + "src": "1899:163:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2089, + "nodeType": "Block", + "src": "2243:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "2278:38:13", + "nodeType": "YulBlock", + "src": "2278:38:13", + "statements": [ + { + "nativeSrc": "2292:14:13", + "nodeType": "YulAssignment", + "src": "2292:14:13", + "value": { + "name": "slot", + "nativeSrc": "2302:4:13", + "nodeType": "YulIdentifier", + "src": "2302:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "2292:6:13", + "nodeType": "YulIdentifier", + "src": "2292:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2086, + "isOffset": false, + "isSlot": true, + "src": "2292:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2082, + "isOffset": false, + "isSlot": false, + "src": "2302:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2088, + "nodeType": "InlineAssembly", + "src": "2253:63:13" + } + ] + }, + "documentation": { + "id": 2080, + "nodeType": "StructuredDocumentation", + "src": "2068:86:13", + "text": " @dev Returns a `BooleanSlot` with member `value` located at `slot`." + }, + "id": 2090, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBooleanSlot", + "nameLocation": "2168:14:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2082, + "mutability": "mutable", + "name": "slot", + "nameLocation": "2191:4:13", + "nodeType": "VariableDeclaration", + "scope": 2090, + "src": "2183:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2081, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2183:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2182:14:13" + }, + "returnParameters": { + "id": 2087, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2086, + "mutability": "mutable", + "name": "r", + "nameLocation": "2240:1:13", + "nodeType": "VariableDeclaration", + "scope": 2090, + "src": "2220:21:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BooleanSlot_$2053_storage_ptr", + "typeString": "struct StorageSlot.BooleanSlot" + }, + "typeName": { + "id": 2085, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2084, + "name": "BooleanSlot", + "nameLocations": [ + "2220:11:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2053, + "src": "2220:11:13" + }, + "referencedDeclaration": 2053, + "src": "2220:11:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BooleanSlot_$2053_storage_ptr", + "typeString": "struct StorageSlot.BooleanSlot" + } + }, + "visibility": "internal" + } + ], + "src": "2219:23:13" + }, + "scope": 2168, + "src": "2159:163:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2100, + "nodeType": "Block", + "src": "2503:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "2538:38:13", + "nodeType": "YulBlock", + "src": "2538:38:13", + "statements": [ + { + "nativeSrc": "2552:14:13", + "nodeType": "YulAssignment", + "src": "2552:14:13", + "value": { + "name": "slot", + "nativeSrc": "2562:4:13", + "nodeType": "YulIdentifier", + "src": "2562:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "2552:6:13", + "nodeType": "YulIdentifier", + "src": "2552:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2097, + "isOffset": false, + "isSlot": true, + "src": "2552:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2093, + "isOffset": false, + "isSlot": false, + "src": "2562:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2099, + "nodeType": "InlineAssembly", + "src": "2513:63:13" + } + ] + }, + "documentation": { + "id": 2091, + "nodeType": "StructuredDocumentation", + "src": "2328:86:13", + "text": " @dev Returns a `Bytes32Slot` with member `value` located at `slot`." + }, + "id": 2101, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBytes32Slot", + "nameLocation": "2428:14:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2094, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2093, + "mutability": "mutable", + "name": "slot", + "nameLocation": "2451:4:13", + "nodeType": "VariableDeclaration", + "scope": 2101, + "src": "2443:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2092, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2443:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2442:14:13" + }, + "returnParameters": { + "id": 2098, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2097, + "mutability": "mutable", + "name": "r", + "nameLocation": "2500:1:13", + "nodeType": "VariableDeclaration", + "scope": 2101, + "src": "2480:21:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Slot_$2056_storage_ptr", + "typeString": "struct StorageSlot.Bytes32Slot" + }, + "typeName": { + "id": 2096, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2095, + "name": "Bytes32Slot", + "nameLocations": [ + "2480:11:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2056, + "src": "2480:11:13" + }, + "referencedDeclaration": 2056, + "src": "2480:11:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Slot_$2056_storage_ptr", + "typeString": "struct StorageSlot.Bytes32Slot" + } + }, + "visibility": "internal" + } + ], + "src": "2479:23:13" + }, + "scope": 2168, + "src": "2419:163:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2111, + "nodeType": "Block", + "src": "2763:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "2798:38:13", + "nodeType": "YulBlock", + "src": "2798:38:13", + "statements": [ + { + "nativeSrc": "2812:14:13", + "nodeType": "YulAssignment", + "src": "2812:14:13", + "value": { + "name": "slot", + "nativeSrc": "2822:4:13", + "nodeType": "YulIdentifier", + "src": "2822:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "2812:6:13", + "nodeType": "YulIdentifier", + "src": "2812:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2108, + "isOffset": false, + "isSlot": true, + "src": "2812:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2104, + "isOffset": false, + "isSlot": false, + "src": "2822:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2110, + "nodeType": "InlineAssembly", + "src": "2773:63:13" + } + ] + }, + "documentation": { + "id": 2102, + "nodeType": "StructuredDocumentation", + "src": "2588:86:13", + "text": " @dev Returns a `Uint256Slot` with member `value` located at `slot`." + }, + "id": 2112, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getUint256Slot", + "nameLocation": "2688:14:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2105, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2104, + "mutability": "mutable", + "name": "slot", + "nameLocation": "2711:4:13", + "nodeType": "VariableDeclaration", + "scope": 2112, + "src": "2703:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2103, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2703:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2702:14:13" + }, + "returnParameters": { + "id": 2109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2108, + "mutability": "mutable", + "name": "r", + "nameLocation": "2760:1:13", + "nodeType": "VariableDeclaration", + "scope": 2112, + "src": "2740:21:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot" + }, + "typeName": { + "id": 2107, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2106, + "name": "Uint256Slot", + "nameLocations": [ + "2740:11:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2059, + "src": "2740:11:13" + }, + "referencedDeclaration": 2059, + "src": "2740:11:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot" + } + }, + "visibility": "internal" + } + ], + "src": "2739:23:13" + }, + "scope": 2168, + "src": "2679:163:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2122, + "nodeType": "Block", + "src": "3020:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "3055:38:13", + "nodeType": "YulBlock", + "src": "3055:38:13", + "statements": [ + { + "nativeSrc": "3069:14:13", + "nodeType": "YulAssignment", + "src": "3069:14:13", + "value": { + "name": "slot", + "nativeSrc": "3079:4:13", + "nodeType": "YulIdentifier", + "src": "3079:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "3069:6:13", + "nodeType": "YulIdentifier", + "src": "3069:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2119, + "isOffset": false, + "isSlot": true, + "src": "3069:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2115, + "isOffset": false, + "isSlot": false, + "src": "3079:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2121, + "nodeType": "InlineAssembly", + "src": "3030:63:13" + } + ] + }, + "documentation": { + "id": 2113, + "nodeType": "StructuredDocumentation", + "src": "2848:85:13", + "text": " @dev Returns a `Int256Slot` with member `value` located at `slot`." + }, + "id": 2123, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getInt256Slot", + "nameLocation": "2947:13:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2116, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2115, + "mutability": "mutable", + "name": "slot", + "nameLocation": "2969:4:13", + "nodeType": "VariableDeclaration", + "scope": 2123, + "src": "2961:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2114, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2961:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2960:14:13" + }, + "returnParameters": { + "id": 2120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2119, + "mutability": "mutable", + "name": "r", + "nameLocation": "3017:1:13", + "nodeType": "VariableDeclaration", + "scope": 2123, + "src": "2998:20:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Int256Slot_$2062_storage_ptr", + "typeString": "struct StorageSlot.Int256Slot" + }, + "typeName": { + "id": 2118, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2117, + "name": "Int256Slot", + "nameLocations": [ + "2998:10:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2062, + "src": "2998:10:13" + }, + "referencedDeclaration": 2062, + "src": "2998:10:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Int256Slot_$2062_storage_ptr", + "typeString": "struct StorageSlot.Int256Slot" + } + }, + "visibility": "internal" + } + ], + "src": "2997:22:13" + }, + "scope": 2168, + "src": "2938:161:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2133, + "nodeType": "Block", + "src": "3277:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "3312:38:13", + "nodeType": "YulBlock", + "src": "3312:38:13", + "statements": [ + { + "nativeSrc": "3326:14:13", + "nodeType": "YulAssignment", + "src": "3326:14:13", + "value": { + "name": "slot", + "nativeSrc": "3336:4:13", + "nodeType": "YulIdentifier", + "src": "3336:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "3326:6:13", + "nodeType": "YulIdentifier", + "src": "3326:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2130, + "isOffset": false, + "isSlot": true, + "src": "3326:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2126, + "isOffset": false, + "isSlot": false, + "src": "3336:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2132, + "nodeType": "InlineAssembly", + "src": "3287:63:13" + } + ] + }, + "documentation": { + "id": 2124, + "nodeType": "StructuredDocumentation", + "src": "3105:85:13", + "text": " @dev Returns a `StringSlot` with member `value` located at `slot`." + }, + "id": 2134, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getStringSlot", + "nameLocation": "3204:13:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2127, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2126, + "mutability": "mutable", + "name": "slot", + "nameLocation": "3226:4:13", + "nodeType": "VariableDeclaration", + "scope": 2134, + "src": "3218:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2125, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3218:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3217:14:13" + }, + "returnParameters": { + "id": 2131, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2130, + "mutability": "mutable", + "name": "r", + "nameLocation": "3274:1:13", + "nodeType": "VariableDeclaration", + "scope": 2134, + "src": "3255:20:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot" + }, + "typeName": { + "id": 2129, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2128, + "name": "StringSlot", + "nameLocations": [ + "3255:10:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2065, + "src": "3255:10:13" + }, + "referencedDeclaration": 2065, + "src": "3255:10:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot" + } + }, + "visibility": "internal" + } + ], + "src": "3254:22:13" + }, + "scope": 2168, + "src": "3195:161:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2144, + "nodeType": "Block", + "src": "3558:85:13", + "statements": [ + { + "AST": { + "nativeSrc": "3593:44:13", + "nodeType": "YulBlock", + "src": "3593:44:13", + "statements": [ + { + "nativeSrc": "3607:20:13", + "nodeType": "YulAssignment", + "src": "3607:20:13", + "value": { + "name": "store.slot", + "nativeSrc": "3617:10:13", + "nodeType": "YulIdentifier", + "src": "3617:10:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "3607:6:13", + "nodeType": "YulIdentifier", + "src": "3607:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2141, + "isOffset": false, + "isSlot": true, + "src": "3607:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2137, + "isOffset": false, + "isSlot": true, + "src": "3617:10:13", + "suffix": "slot", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2143, + "nodeType": "InlineAssembly", + "src": "3568:69:13" + } + ] + }, + "documentation": { + "id": 2135, + "nodeType": "StructuredDocumentation", + "src": "3362:101:13", + "text": " @dev Returns an `StringSlot` representation of the string storage pointer `store`." + }, + "id": 2145, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getStringSlot", + "nameLocation": "3477:13:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2137, + "mutability": "mutable", + "name": "store", + "nameLocation": "3506:5:13", + "nodeType": "VariableDeclaration", + "scope": 2145, + "src": "3491:20:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2136, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3491:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3490:22:13" + }, + "returnParameters": { + "id": 2142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2141, + "mutability": "mutable", + "name": "r", + "nameLocation": "3555:1:13", + "nodeType": "VariableDeclaration", + "scope": 2145, + "src": "3536:20:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot" + }, + "typeName": { + "id": 2140, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2139, + "name": "StringSlot", + "nameLocations": [ + "3536:10:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2065, + "src": "3536:10:13" + }, + "referencedDeclaration": 2065, + "src": "3536:10:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot" + } + }, + "visibility": "internal" + } + ], + "src": "3535:22:13" + }, + "scope": 2168, + "src": "3468:175:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2155, + "nodeType": "Block", + "src": "3818:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "3853:38:13", + "nodeType": "YulBlock", + "src": "3853:38:13", + "statements": [ + { + "nativeSrc": "3867:14:13", + "nodeType": "YulAssignment", + "src": "3867:14:13", + "value": { + "name": "slot", + "nativeSrc": "3877:4:13", + "nodeType": "YulIdentifier", + "src": "3877:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "3867:6:13", + "nodeType": "YulIdentifier", + "src": "3867:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2152, + "isOffset": false, + "isSlot": true, + "src": "3867:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2148, + "isOffset": false, + "isSlot": false, + "src": "3877:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2154, + "nodeType": "InlineAssembly", + "src": "3828:63:13" + } + ] + }, + "documentation": { + "id": 2146, + "nodeType": "StructuredDocumentation", + "src": "3649:84:13", + "text": " @dev Returns a `BytesSlot` with member `value` located at `slot`." + }, + "id": 2156, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBytesSlot", + "nameLocation": "3747:12:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2148, + "mutability": "mutable", + "name": "slot", + "nameLocation": "3768:4:13", + "nodeType": "VariableDeclaration", + "scope": 2156, + "src": "3760:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2147, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3760:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3759:14:13" + }, + "returnParameters": { + "id": 2153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2152, + "mutability": "mutable", + "name": "r", + "nameLocation": "3815:1:13", + "nodeType": "VariableDeclaration", + "scope": 2156, + "src": "3797:19:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BytesSlot_$2068_storage_ptr", + "typeString": "struct StorageSlot.BytesSlot" + }, + "typeName": { + "id": 2151, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2150, + "name": "BytesSlot", + "nameLocations": [ + "3797:9:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2068, + "src": "3797:9:13" + }, + "referencedDeclaration": 2068, + "src": "3797:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BytesSlot_$2068_storage_ptr", + "typeString": "struct StorageSlot.BytesSlot" + } + }, + "visibility": "internal" + } + ], + "src": "3796:21:13" + }, + "scope": 2168, + "src": "3738:159:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2166, + "nodeType": "Block", + "src": "4094:85:13", + "statements": [ + { + "AST": { + "nativeSrc": "4129:44:13", + "nodeType": "YulBlock", + "src": "4129:44:13", + "statements": [ + { + "nativeSrc": "4143:20:13", + "nodeType": "YulAssignment", + "src": "4143:20:13", + "value": { + "name": "store.slot", + "nativeSrc": "4153:10:13", + "nodeType": "YulIdentifier", + "src": "4153:10:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "4143:6:13", + "nodeType": "YulIdentifier", + "src": "4143:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2163, + "isOffset": false, + "isSlot": true, + "src": "4143:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2159, + "isOffset": false, + "isSlot": true, + "src": "4153:10:13", + "suffix": "slot", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2165, + "nodeType": "InlineAssembly", + "src": "4104:69:13" + } + ] + }, + "documentation": { + "id": 2157, + "nodeType": "StructuredDocumentation", + "src": "3903:99:13", + "text": " @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`." + }, + "id": 2167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBytesSlot", + "nameLocation": "4016:12:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2160, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2159, + "mutability": "mutable", + "name": "store", + "nameLocation": "4043:5:13", + "nodeType": "VariableDeclaration", + "scope": 2167, + "src": "4029:19:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2158, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4029:5:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4028:21:13" + }, + "returnParameters": { + "id": 2164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2163, + "mutability": "mutable", + "name": "r", + "nameLocation": "4091:1:13", + "nodeType": "VariableDeclaration", + "scope": 2167, + "src": "4073:19:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BytesSlot_$2068_storage_ptr", + "typeString": "struct StorageSlot.BytesSlot" + }, + "typeName": { + "id": 2162, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2161, + "name": "BytesSlot", + "nameLocations": [ + "4073:9:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2068, + "src": "4073:9:13" + }, + "referencedDeclaration": 2068, + "src": "4073:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BytesSlot_$2068_storage_ptr", + "typeString": "struct StorageSlot.BytesSlot" + } + }, + "visibility": "internal" + } + ], + "src": "4072:21:13" + }, + "scope": 2168, + "src": "4007:172:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2169, + "src": "1407:2774:13", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "193:3989:13" + }, + "id": 13 + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/Strings.sol", + "exportedSymbols": { + "Bytes": [ + 1632 + ], + "Math": [ + 6204 + ], + "SafeCast": [ + 7969 + ], + "SignedMath": [ + 8113 + ], + "Strings": [ + 3678 + ] + }, + "id": 3679, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2170, + "literals": [ + "solidity", + "^", + "0.8", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "101:24:14" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/Math.sol", + "file": "./math/Math.sol", + "id": 2172, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3679, + "sourceUnit": 6205, + "src": "127:37:14", + "symbolAliases": [ + { + "foreign": { + "id": 2171, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "135:4:14", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol", + "file": "./math/SafeCast.sol", + "id": 2174, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3679, + "sourceUnit": 7970, + "src": "165:45:14", + "symbolAliases": [ + { + "foreign": { + "id": 2173, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "173:8:14", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/SignedMath.sol", + "file": "./math/SignedMath.sol", + "id": 2176, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3679, + "sourceUnit": 8114, + "src": "211:49:14", + "symbolAliases": [ + { + "foreign": { + "id": 2175, + "name": "SignedMath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8113, + "src": "219:10:14", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Bytes.sol", + "file": "./Bytes.sol", + "id": 2178, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3679, + "sourceUnit": 1633, + "src": "261:34:14", + "symbolAliases": [ + { + "foreign": { + "id": 2177, + "name": "Bytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1632, + "src": "269:5:14", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Strings", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 2179, + "nodeType": "StructuredDocumentation", + "src": "297:34:14", + "text": " @dev String operations." + }, + "fullyImplemented": true, + "id": 3678, + "linearizedBaseContracts": [ + 3678 + ], + "name": "Strings", + "nameLocation": "340:7:14", + "nodeType": "ContractDefinition", + "nodes": [ + { + "global": false, + "id": 2181, + "libraryName": { + "id": 2180, + "name": "SafeCast", + "nameLocations": [ + "360:8:14" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 7969, + "src": "360:8:14" + }, + "nodeType": "UsingForDirective", + "src": "354:21:14" + }, + { + "constant": true, + "id": 2184, + "mutability": "constant", + "name": "HEX_DIGITS", + "nameLocation": "406:10:14", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "381:56:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 2182, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "381:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": { + "hexValue": "30313233343536373839616263646566", + "id": 2183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "419:18:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f", + "typeString": "literal_string \"0123456789abcdef\"" + }, + "value": "0123456789abcdef" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2187, + "mutability": "constant", + "name": "ADDRESS_LENGTH", + "nameLocation": "466:14:14", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "443:42:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2185, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "443:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "hexValue": "3230", + "id": 2186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "483:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_20_by_1", + "typeString": "int_const 20" + }, + "value": "20" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2200, + "mutability": "constant", + "name": "SPECIAL_CHARS_LOOKUP", + "nameLocation": "516:20:14", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "491:210:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2188, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "491:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_4951760157141521121071333375_by_1", + "typeString": "int_const 4951760157141521121071333375" + }, + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_rational_21474836479_by_1", + "typeString": "int_const 21474836479" + }, + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "30786666666666666666", + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "547:10:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967295_by_1", + "typeString": "int_const 4294967295" + }, + "value": "0xffffffff" + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_17179869184_by_1", + "typeString": "int_const 17179869184" + }, + "id": 2192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 2190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "649:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "30783232", + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "654:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "0x22" + }, + "src": "649:9:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_17179869184_by_1", + "typeString": "int_const 17179869184" + } + } + ], + "id": 2193, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "648:11:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_17179869184_by_1", + "typeString": "int_const 17179869184" + } + }, + "src": "547:112:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_21474836479_by_1", + "typeString": "int_const 21474836479" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_4951760157141521099596496896_by_1", + "typeString": "int_const 4951760157141521099596496896" + }, + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 2195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "691:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "30783563", + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "696:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_92_by_1", + "typeString": "int_const 92" + }, + "value": "0x5c" + }, + "src": "691:9:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4951760157141521099596496896_by_1", + "typeString": "int_const 4951760157141521099596496896" + } + } + ], + "id": 2198, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "690:11:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4951760157141521099596496896_by_1", + "typeString": "int_const 4951760157141521099596496896" + } + }, + "src": "547:154:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4951760157141521121071333375_by_1", + "typeString": "int_const 4951760157141521121071333375" + } + }, + "visibility": "private" + }, + { + "documentation": { + "id": 2201, + "nodeType": "StructuredDocumentation", + "src": "721:81:14", + "text": " @dev The `value` string doesn't fit in the specified `length`." + }, + "errorSelector": "e22e27eb", + "id": 2207, + "name": "StringsInsufficientHexLength", + "nameLocation": "813:28:14", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 2206, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2203, + "mutability": "mutable", + "name": "value", + "nameLocation": "850:5:14", + "nodeType": "VariableDeclaration", + "scope": 2207, + "src": "842:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2202, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "842:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2205, + "mutability": "mutable", + "name": "length", + "nameLocation": "865:6:14", + "nodeType": "VariableDeclaration", + "scope": 2207, + "src": "857:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2204, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "857:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "841:31:14" + }, + "src": "807:66:14" + }, + { + "documentation": { + "id": 2208, + "nodeType": "StructuredDocumentation", + "src": "879:108:14", + "text": " @dev The string being parsed contains characters that are not in scope of the given base." + }, + "errorSelector": "94e2737e", + "id": 2210, + "name": "StringsInvalidChar", + "nameLocation": "998:18:14", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 2209, + "nodeType": "ParameterList", + "parameters": [], + "src": "1016:2:14" + }, + "src": "992:27:14" + }, + { + "documentation": { + "id": 2211, + "nodeType": "StructuredDocumentation", + "src": "1025:84:14", + "text": " @dev The string being parsed is not a properly formatted address." + }, + "errorSelector": "1d15ae44", + "id": 2213, + "name": "StringsInvalidAddressFormat", + "nameLocation": "1120:27:14", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 2212, + "nodeType": "ParameterList", + "parameters": [], + "src": "1147:2:14" + }, + "src": "1114:36:14" + }, + { + "body": { + "id": 2260, + "nodeType": "Block", + "src": "1322:563:14", + "statements": [ + { + "id": 2259, + "nodeType": "UncheckedBlock", + "src": "1332:547:14", + "statements": [ + { + "assignments": [ + 2222 + ], + "declarations": [ + { + "constant": false, + "id": 2222, + "mutability": "mutable", + "name": "length", + "nameLocation": "1364:6:14", + "nodeType": "VariableDeclaration", + "scope": 2259, + "src": "1356:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2221, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1356:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2229, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2225, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2216, + "src": "1384:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2223, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "1373:4:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 2224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1378:5:14", + "memberName": "log10", + "nodeType": "MemberAccess", + "referencedDeclaration": 6015, + "src": "1373:10:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 2226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1373:17:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 2227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1393:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1373:21:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1356:38:14" + }, + { + "assignments": [ + 2231 + ], + "declarations": [ + { + "constant": false, + "id": 2231, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "1422:6:14", + "nodeType": "VariableDeclaration", + "scope": 2259, + "src": "1408:20:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2230, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1408:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "id": 2236, + "initialValue": { + "arguments": [ + { + "id": 2234, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2222, + "src": "1442:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1431:10:14", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + }, + "typeName": { + "id": 2232, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1435:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + "id": 2235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1431:18:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1408:41:14" + }, + { + "assignments": [ + 2238 + ], + "declarations": [ + { + "constant": false, + "id": 2238, + "mutability": "mutable", + "name": "ptr", + "nameLocation": "1471:3:14", + "nodeType": "VariableDeclaration", + "scope": 2259, + "src": "1463:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1463:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2239, + "nodeType": "VariableDeclarationStatement", + "src": "1463:11:14" + }, + { + "AST": { + "nativeSrc": "1513:69:14", + "nodeType": "YulBlock", + "src": "1513:69:14", + "statements": [ + { + "nativeSrc": "1531:37:14", + "nodeType": "YulAssignment", + "src": "1531:37:14", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "1546:6:14", + "nodeType": "YulIdentifier", + "src": "1546:6:14" + }, + { + "kind": "number", + "nativeSrc": "1554:4:14", + "nodeType": "YulLiteral", + "src": "1554:4:14", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1542:3:14", + "nodeType": "YulIdentifier", + "src": "1542:3:14" + }, + "nativeSrc": "1542:17:14", + "nodeType": "YulFunctionCall", + "src": "1542:17:14" + }, + { + "name": "length", + "nativeSrc": "1561:6:14", + "nodeType": "YulIdentifier", + "src": "1561:6:14" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1538:3:14", + "nodeType": "YulIdentifier", + "src": "1538:3:14" + }, + "nativeSrc": "1538:30:14", + "nodeType": "YulFunctionCall", + "src": "1538:30:14" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "1531:3:14", + "nodeType": "YulIdentifier", + "src": "1531:3:14" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2231, + "isOffset": false, + "isSlot": false, + "src": "1546:6:14", + "valueSize": 1 + }, + { + "declaration": 2222, + "isOffset": false, + "isSlot": false, + "src": "1561:6:14", + "valueSize": 1 + }, + { + "declaration": 2238, + "isOffset": false, + "isSlot": false, + "src": "1531:3:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2240, + "nodeType": "InlineAssembly", + "src": "1488:94:14" + }, + { + "body": { + "id": 2255, + "nodeType": "Block", + "src": "1608:234:14", + "statements": [ + { + "expression": { + "id": 2243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "1626:5:14", + "subExpression": { + "id": 2242, + "name": "ptr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2238, + "src": "1626:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2244, + "nodeType": "ExpressionStatement", + "src": "1626:5:14" + }, + { + "AST": { + "nativeSrc": "1674:86:14", + "nodeType": "YulBlock", + "src": "1674:86:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "1704:3:14", + "nodeType": "YulIdentifier", + "src": "1704:3:14" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1718:5:14", + "nodeType": "YulIdentifier", + "src": "1718:5:14" + }, + { + "kind": "number", + "nativeSrc": "1725:2:14", + "nodeType": "YulLiteral", + "src": "1725:2:14", + "type": "", + "value": "10" + } + ], + "functionName": { + "name": "mod", + "nativeSrc": "1714:3:14", + "nodeType": "YulIdentifier", + "src": "1714:3:14" + }, + "nativeSrc": "1714:14:14", + "nodeType": "YulFunctionCall", + "src": "1714:14:14" + }, + { + "name": "HEX_DIGITS", + "nativeSrc": "1730:10:14", + "nodeType": "YulIdentifier", + "src": "1730:10:14" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "1709:4:14", + "nodeType": "YulIdentifier", + "src": "1709:4:14" + }, + "nativeSrc": "1709:32:14", + "nodeType": "YulFunctionCall", + "src": "1709:32:14" + } + ], + "functionName": { + "name": "mstore8", + "nativeSrc": "1696:7:14", + "nodeType": "YulIdentifier", + "src": "1696:7:14" + }, + "nativeSrc": "1696:46:14", + "nodeType": "YulFunctionCall", + "src": "1696:46:14" + }, + "nativeSrc": "1696:46:14", + "nodeType": "YulExpressionStatement", + "src": "1696:46:14" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2184, + "isOffset": false, + "isSlot": false, + "src": "1730:10:14", + "valueSize": 1 + }, + { + "declaration": 2238, + "isOffset": false, + "isSlot": false, + "src": "1704:3:14", + "valueSize": 1 + }, + { + "declaration": 2216, + "isOffset": false, + "isSlot": false, + "src": "1718:5:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2245, + "nodeType": "InlineAssembly", + "src": "1649:111:14" + }, + { + "expression": { + "id": 2248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2246, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2216, + "src": "1777:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1786:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "1777:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2249, + "nodeType": "ExpressionStatement", + "src": "1777:11:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2250, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2216, + "src": "1810:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1819:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1810:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2254, + "nodeType": "IfStatement", + "src": "1806:21:14", + "trueBody": { + "id": 2253, + "nodeType": "Break", + "src": "1822:5:14" + } + } + ] + }, + "condition": { + "hexValue": "74727565", + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1602:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "id": 2256, + "nodeType": "WhileStatement", + "src": "1595:247:14" + }, + { + "expression": { + "id": 2257, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2231, + "src": "1862:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2220, + "id": 2258, + "nodeType": "Return", + "src": "1855:13:14" + } + ] + } + ] + }, + "documentation": { + "id": 2214, + "nodeType": "StructuredDocumentation", + "src": "1156:90:14", + "text": " @dev Converts a `uint256` to its ASCII `string` decimal representation." + }, + "id": 2261, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toString", + "nameLocation": "1260:8:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2216, + "mutability": "mutable", + "name": "value", + "nameLocation": "1277:5:14", + "nodeType": "VariableDeclaration", + "scope": 2261, + "src": "1269:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1269:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1268:15:14" + }, + "returnParameters": { + "id": 2220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2261, + "src": "1307:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2218, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1307:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1306:15:14" + }, + "scope": 3678, + "src": "1251:634:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2286, + "nodeType": "Block", + "src": "2061:92:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 2274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2272, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "2092:5:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "30", + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2100:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2092:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "hexValue": "", + "id": 2276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2110:2:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + "id": 2277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "2092:20:14", + "trueExpression": { + "hexValue": "2d", + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2104:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", + "typeString": "literal_string \"-\"" + }, + "value": "-" + }, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2281, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "2138:5:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "id": 2279, + "name": "SignedMath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8113, + "src": "2123:10:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SignedMath_$8113_$", + "typeString": "type(library SignedMath)" + } + }, + "id": 2280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2134:3:14", + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 8112, + "src": "2123:14:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 2282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2123:21:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2278, + "name": "toString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2261, + "src": "2114:8:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2114:31:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 2270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2078:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2269, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2078:6:14", + "typeDescriptions": {} + } + }, + "id": 2271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2085:6:14", + "memberName": "concat", + "nodeType": "MemberAccess", + "src": "2078:13:14", + "typeDescriptions": { + "typeIdentifier": "t_function_stringconcat_pure$__$returns$_t_string_memory_ptr_$", + "typeString": "function () pure returns (string memory)" + } + }, + "id": 2284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2078:68:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2268, + "id": 2285, + "nodeType": "Return", + "src": "2071:75:14" + } + ] + }, + "documentation": { + "id": 2262, + "nodeType": "StructuredDocumentation", + "src": "1891:89:14", + "text": " @dev Converts a `int256` to its ASCII `string` decimal representation." + }, + "id": 2287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toStringSigned", + "nameLocation": "1994:14:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2264, + "mutability": "mutable", + "name": "value", + "nameLocation": "2016:5:14", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "2009:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2263, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "2009:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "2008:14:14" + }, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2267, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "2046:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2266, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2046:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2045:15:14" + }, + "scope": 3678, + "src": "1985:168:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2306, + "nodeType": "Block", + "src": "2332:100:14", + "statements": [ + { + "id": 2305, + "nodeType": "UncheckedBlock", + "src": "2342:84:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2296, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2290, + "src": "2385:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2299, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2290, + "src": "2404:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2297, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "2392:4:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2397:6:14", + "memberName": "log256", + "nodeType": "MemberAccess", + "referencedDeclaration": 6126, + "src": "2392:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2392:18:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2413:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2392:22:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2295, + "name": "toHexString", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2307, + 2390, + 2410, + 2564 + ], + "referencedDeclaration": 2390, + "src": "2373:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256,uint256) pure returns (string memory)" + } + }, + "id": 2303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2373:42:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2294, + "id": 2304, + "nodeType": "Return", + "src": "2366:49:14" + } + ] + } + ] + }, + "documentation": { + "id": 2288, + "nodeType": "StructuredDocumentation", + "src": "2159:94:14", + "text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation." + }, + "id": 2307, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toHexString", + "nameLocation": "2267:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2291, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2290, + "mutability": "mutable", + "name": "value", + "nameLocation": "2287:5:14", + "nodeType": "VariableDeclaration", + "scope": 2307, + "src": "2279:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2279:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2278:15:14" + }, + "returnParameters": { + "id": 2294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2293, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2307, + "src": "2317:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2292, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2317:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2316:15:14" + }, + "scope": 3678, + "src": "2258:174:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2389, + "nodeType": "Block", + "src": "2645:435:14", + "statements": [ + { + "assignments": [ + 2318 + ], + "declarations": [ + { + "constant": false, + "id": 2318, + "mutability": "mutable", + "name": "localValue", + "nameLocation": "2663:10:14", + "nodeType": "VariableDeclaration", + "scope": 2389, + "src": "2655:18:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2317, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2655:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2320, + "initialValue": { + "id": 2319, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2310, + "src": "2676:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2655:26:14" + }, + { + "assignments": [ + 2322 + ], + "declarations": [ + { + "constant": false, + "id": 2322, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "2704:6:14", + "nodeType": "VariableDeclaration", + "scope": 2389, + "src": "2691:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2321, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2691:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2331, + "initialValue": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2723:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2326, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2312, + "src": "2727:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2723:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "32", + "id": 2328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2736:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "2723:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2713:9:14", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 2323, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2717:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2713:25:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2691:47:14" + }, + { + "expression": { + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2332, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2322, + "src": "2748:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2334, + "indexExpression": { + "hexValue": "30", + "id": 2333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2755:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2748:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 2335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2760:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "src": "2748:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2337, + "nodeType": "ExpressionStatement", + "src": "2748:15:14" + }, + { + "expression": { + "id": 2342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2338, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2322, + "src": "2773:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2340, + "indexExpression": { + "hexValue": "31", + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2780:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2773:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "78", + "id": 2341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2785:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83", + "typeString": "literal_string \"x\"" + }, + "value": "x" + }, + "src": "2773:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2343, + "nodeType": "ExpressionStatement", + "src": "2773:15:14" + }, + { + "body": { + "id": 2372, + "nodeType": "Block", + "src": "2843:95:14", + "statements": [ + { + "expression": { + "id": 2366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2358, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2322, + "src": "2857:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2360, + "indexExpression": { + "id": 2359, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2345, + "src": "2864:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2857:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 2361, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "2869:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 2365, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2362, + "name": "localValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2318, + "src": "2880:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307866", + "id": 2363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2893:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0xf" + }, + "src": "2880:16:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2869:28:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "2857:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2367, + "nodeType": "ExpressionStatement", + "src": "2857:40:14" + }, + { + "expression": { + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2368, + "name": "localValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2318, + "src": "2911:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "34", + "id": 2369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2926:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "2911:16:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2371, + "nodeType": "ExpressionStatement", + "src": "2911:16:14" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2352, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2345, + "src": "2831:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2831:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2373, + "initializationExpression": { + "assignments": [ + 2345 + ], + "declarations": [ + { + "constant": false, + "id": 2345, + "mutability": "mutable", + "name": "i", + "nameLocation": "2811:1:14", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "2803:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2344, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2803:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2351, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2815:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2347, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2312, + "src": "2819:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2815:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2828:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2815:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2803:26:14" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 2356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": true, + "src": "2838:3:14", + "subExpression": { + "id": 2355, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2345, + "src": "2840:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2357, + "nodeType": "ExpressionStatement", + "src": "2838:3:14" + }, + "nodeType": "ForStatement", + "src": "2798:140:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2374, + "name": "localValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2318, + "src": "2951:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2965:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2951:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2383, + "nodeType": "IfStatement", + "src": "2947:96:14", + "trueBody": { + "id": 2382, + "nodeType": "Block", + "src": "2968:75:14", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 2378, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2310, + "src": "3018:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2379, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2312, + "src": "3025:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2377, + "name": "StringsInsufficientHexLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2207, + "src": "2989:28:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint256,uint256) pure returns (error)" + } + }, + "id": 2380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2989:43:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 2381, + "nodeType": "RevertStatement", + "src": "2982:50:14" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2386, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2322, + "src": "3066:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3059:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2384, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3059:6:14", + "typeDescriptions": {} + } + }, + "id": 2387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3059:14:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2316, + "id": 2388, + "nodeType": "Return", + "src": "3052:21:14" + } + ] + }, + "documentation": { + "id": 2308, + "nodeType": "StructuredDocumentation", + "src": "2438:112:14", + "text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length." + }, + "id": 2390, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toHexString", + "nameLocation": "2564:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2310, + "mutability": "mutable", + "name": "value", + "nameLocation": "2584:5:14", + "nodeType": "VariableDeclaration", + "scope": 2390, + "src": "2576:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2576:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2312, + "mutability": "mutable", + "name": "length", + "nameLocation": "2599:6:14", + "nodeType": "VariableDeclaration", + "scope": 2390, + "src": "2591:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2311, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2591:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2575:31:14" + }, + "returnParameters": { + "id": 2316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2315, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2390, + "src": "2630:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2314, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2630:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2629:15:14" + }, + "scope": 3678, + "src": "2555:525:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2409, + "nodeType": "Block", + "src": "3312:75:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 2403, + "name": "addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2393, + "src": "3357:4:14", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3349:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 2401, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "3349:7:14", + "typeDescriptions": {} + } + }, + "id": 2404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3349:13:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3341:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3341:7:14", + "typeDescriptions": {} + } + }, + "id": 2405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3341:22:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2406, + "name": "ADDRESS_LENGTH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "3365:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2398, + "name": "toHexString", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2307, + 2390, + 2410, + 2564 + ], + "referencedDeclaration": 2390, + "src": "3329:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256,uint256) pure returns (string memory)" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3329:51:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2397, + "id": 2408, + "nodeType": "Return", + "src": "3322:58:14" + } + ] + }, + "documentation": { + "id": 2391, + "nodeType": "StructuredDocumentation", + "src": "3086:148:14", + "text": " @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n representation." + }, + "id": 2410, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toHexString", + "nameLocation": "3248:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2394, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2393, + "mutability": "mutable", + "name": "addr", + "nameLocation": "3268:4:14", + "nodeType": "VariableDeclaration", + "scope": 2410, + "src": "3260:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2392, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3260:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3259:14:14" + }, + "returnParameters": { + "id": 2397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2396, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2410, + "src": "3297:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2395, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3297:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3296:15:14" + }, + "scope": 3678, + "src": "3239:148:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2474, + "nodeType": "Block", + "src": "3644:642:14", + "statements": [ + { + "assignments": [ + 2419 + ], + "declarations": [ + { + "constant": false, + "id": 2419, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "3667:6:14", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "3654:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2418, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3654:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2426, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 2423, + "name": "addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2413, + "src": "3694:4:14", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2422, + "name": "toHexString", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2307, + 2390, + 2410, + 2564 + ], + "referencedDeclaration": 2410, + "src": "3682:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (address) pure returns (string memory)" + } + }, + "id": 2424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3682:17:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3676:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2420, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3676:5:14", + "typeDescriptions": {} + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3676:24:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3654:46:14" + }, + { + "assignments": [ + 2428 + ], + "declarations": [ + { + "constant": false, + "id": 2428, + "mutability": "mutable", + "name": "hashValue", + "nameLocation": "3793:9:14", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "3785:17:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2427, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3785:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2429, + "nodeType": "VariableDeclarationStatement", + "src": "3785:17:14" + }, + { + "AST": { + "nativeSrc": "3837:78:14", + "nodeType": "YulBlock", + "src": "3837:78:14", + "statements": [ + { + "nativeSrc": "3851:54:14", + "nodeType": "YulAssignment", + "src": "3851:54:14", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3868:2:14", + "nodeType": "YulLiteral", + "src": "3868:2:14", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "3886:6:14", + "nodeType": "YulIdentifier", + "src": "3886:6:14" + }, + { + "kind": "number", + "nativeSrc": "3894:4:14", + "nodeType": "YulLiteral", + "src": "3894:4:14", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3882:3:14", + "nodeType": "YulIdentifier", + "src": "3882:3:14" + }, + "nativeSrc": "3882:17:14", + "nodeType": "YulFunctionCall", + "src": "3882:17:14" + }, + { + "kind": "number", + "nativeSrc": "3901:2:14", + "nodeType": "YulLiteral", + "src": "3901:2:14", + "type": "", + "value": "40" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "3872:9:14", + "nodeType": "YulIdentifier", + "src": "3872:9:14" + }, + "nativeSrc": "3872:32:14", + "nodeType": "YulFunctionCall", + "src": "3872:32:14" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "3864:3:14", + "nodeType": "YulIdentifier", + "src": "3864:3:14" + }, + "nativeSrc": "3864:41:14", + "nodeType": "YulFunctionCall", + "src": "3864:41:14" + }, + "variableNames": [ + { + "name": "hashValue", + "nativeSrc": "3851:9:14", + "nodeType": "YulIdentifier", + "src": "3851:9:14" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2419, + "isOffset": false, + "isSlot": false, + "src": "3886:6:14", + "valueSize": 1 + }, + { + "declaration": 2428, + "isOffset": false, + "isSlot": false, + "src": "3851:9:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2430, + "nodeType": "InlineAssembly", + "src": "3812:103:14" + }, + { + "body": { + "id": 2467, + "nodeType": "Block", + "src": "3958:291:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2441, + "name": "hashValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2428, + "src": "4064:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307866", + "id": 2442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4076:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0xf" + }, + "src": "4064:15:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "37", + "id": 2444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4082:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "src": "4064:19:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "baseExpression": { + "id": 2448, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "4093:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2450, + "indexExpression": { + "id": 2449, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2432, + "src": "4100:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4093:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4087:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2446, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4087:5:14", + "typeDescriptions": {} + } + }, + "id": 2451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4087:16:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3936", + "id": 2452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4106:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + "src": "4087:21:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4064:44:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2462, + "nodeType": "IfStatement", + "src": "4060:150:14", + "trueBody": { + "id": 2461, + "nodeType": "Block", + "src": "4110:100:14", + "statements": [ + { + "expression": { + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2455, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "4178:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2457, + "indexExpression": { + "id": 2456, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2432, + "src": "4185:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4178:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "^=", + "rightHandSide": { + "hexValue": "30783230", + "id": 2458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4191:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "4178:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2460, + "nodeType": "ExpressionStatement", + "src": "4178:17:14" + } + ] + } + }, + { + "expression": { + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2463, + "name": "hashValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2428, + "src": "4223:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "34", + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4237:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "4223:15:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2466, + "nodeType": "ExpressionStatement", + "src": "4223:15:14" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2435, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2432, + "src": "3946:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 2436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3950:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3946:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2468, + "initializationExpression": { + "assignments": [ + 2432 + ], + "declarations": [ + { + "constant": false, + "id": 2432, + "mutability": "mutable", + "name": "i", + "nameLocation": "3938:1:14", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "3930:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3930:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2434, + "initialValue": { + "hexValue": "3431", + "id": 2433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3942:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_41_by_1", + "typeString": "int_const 41" + }, + "value": "41" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3930:14:14" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 2439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": true, + "src": "3953:3:14", + "subExpression": { + "id": 2438, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2432, + "src": "3955:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2440, + "nodeType": "ExpressionStatement", + "src": "3953:3:14" + }, + "nodeType": "ForStatement", + "src": "3925:324:14" + }, + { + "expression": { + "arguments": [ + { + "id": 2471, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "4272:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4265:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2469, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4265:6:14", + "typeDescriptions": {} + } + }, + "id": 2472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4265:14:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2417, + "id": 2473, + "nodeType": "Return", + "src": "4258:21:14" + } + ] + }, + "documentation": { + "id": 2411, + "nodeType": "StructuredDocumentation", + "src": "3393:165:14", + "text": " @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n representation, according to EIP-55." + }, + "id": 2475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toChecksumHexString", + "nameLocation": "3572:19:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2414, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2413, + "mutability": "mutable", + "name": "addr", + "nameLocation": "3600:4:14", + "nodeType": "VariableDeclaration", + "scope": 2475, + "src": "3592:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2412, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3592:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3591:14:14" + }, + "returnParameters": { + "id": 2417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2416, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2475, + "src": "3629:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3629:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3628:15:14" + }, + "scope": 3678, + "src": "3563:723:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2563, + "nodeType": "Block", + "src": "4475:424:14", + "statements": [ + { + "id": 2562, + "nodeType": "UncheckedBlock", + "src": "4485:408:14", + "statements": [ + { + "assignments": [ + 2484 + ], + "declarations": [ + { + "constant": false, + "id": 2484, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "4522:6:14", + "nodeType": "VariableDeclaration", + "scope": 2562, + "src": "4509:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2483, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4509:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2494, + "initialValue": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4541:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "expression": { + "id": 2488, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "4545:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4551:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4545:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4541:16:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "32", + "id": 2491, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4560:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4541:20:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4531:9:14", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 2485, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4535:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4531:31:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4509:53:14" + }, + { + "expression": { + "id": 2499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2495, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4576:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2497, + "indexExpression": { + "hexValue": "30", + "id": 2496, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4583:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4576:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 2498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4588:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "src": "4576:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2500, + "nodeType": "ExpressionStatement", + "src": "4576:15:14" + }, + { + "expression": { + "id": 2505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2501, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4605:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2503, + "indexExpression": { + "hexValue": "31", + "id": 2502, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4612:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4605:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "78", + "id": 2504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4617:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83", + "typeString": "literal_string \"x\"" + }, + "value": "x" + }, + "src": "4605:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2506, + "nodeType": "ExpressionStatement", + "src": "4605:15:14" + }, + { + "body": { + "id": 2555, + "nodeType": "Block", + "src": "4677:171:14", + "statements": [ + { + "assignments": [ + 2519 + ], + "declarations": [ + { + "constant": false, + "id": 2519, + "mutability": "mutable", + "name": "v", + "nameLocation": "4701:1:14", + "nodeType": "VariableDeclaration", + "scope": 2555, + "src": "4695:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2518, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4695:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 2526, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 2522, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "4711:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2524, + "indexExpression": { + "id": 2523, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4717:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4711:8:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4705:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2520, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4705:5:14", + "typeDescriptions": {} + } + }, + "id": 2525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4705:15:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4695:25:14" + }, + { + "expression": { + "id": 2539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2527, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4738:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2533, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2528, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4745:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2529, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4749:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4745:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "32", + "id": 2531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4753:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4745:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4738:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 2534, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "4758:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 2538, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2535, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2519, + "src": "4769:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "34", + "id": 2536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4774:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "4769:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4758:18:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "4738:38:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2540, + "nodeType": "ExpressionStatement", + "src": "4738:38:14" + }, + { + "expression": { + "id": 2553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2541, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4794:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2547, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4801:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2543, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4805:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4801:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "33", + "id": 2545, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4809:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "4801:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4794:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 2548, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "4814:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 2552, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2549, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2519, + "src": "4825:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307866", + "id": 2550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4829:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0xf" + }, + "src": "4825:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4814:19:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "4794:39:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2554, + "nodeType": "ExpressionStatement", + "src": "4794:39:14" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2511, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4654:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2512, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "4658:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4664:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4658:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4654:16:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2556, + "initializationExpression": { + "assignments": [ + 2508 + ], + "declarations": [ + { + "constant": false, + "id": 2508, + "mutability": "mutable", + "name": "i", + "nameLocation": "4647:1:14", + "nodeType": "VariableDeclaration", + "scope": 2556, + "src": "4639:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2507, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4639:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2510, + "initialValue": { + "hexValue": "30", + "id": 2509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4651:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4639:13:14" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 2516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "4672:3:14", + "subExpression": { + "id": 2515, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4674:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2517, + "nodeType": "ExpressionStatement", + "src": "4672:3:14" + }, + "nodeType": "ForStatement", + "src": "4634:214:14" + }, + { + "expression": { + "arguments": [ + { + "id": 2559, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4875:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4868:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2557, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4868:6:14", + "typeDescriptions": {} + } + }, + "id": 2560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4868:14:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2482, + "id": 2561, + "nodeType": "Return", + "src": "4861:21:14" + } + ] + } + ] + }, + "documentation": { + "id": 2476, + "nodeType": "StructuredDocumentation", + "src": "4292:99:14", + "text": " @dev Converts a `bytes` buffer to its ASCII `string` hexadecimal representation." + }, + "id": 2564, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toHexString", + "nameLocation": "4405:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2479, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2478, + "mutability": "mutable", + "name": "input", + "nameLocation": "4430:5:14", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "4417:18:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2477, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4417:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4416:20:14" + }, + "returnParameters": { + "id": 2482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2481, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "4460:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2480, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4460:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "4459:15:14" + }, + "scope": 3678, + "src": "4396:503:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2586, + "nodeType": "Block", + "src": "5054:55:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2578, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2567, + "src": "5089:1:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2577, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5083:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2576, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5083:5:14", + "typeDescriptions": {} + } + }, + "id": 2579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5083:8:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "arguments": [ + { + "id": 2582, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2569, + "src": "5099:1:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5093:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2580, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5093:5:14", + "typeDescriptions": {} + } + }, + "id": 2583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5093:8:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2574, + "name": "Bytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1632, + "src": "5071:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Bytes_$1632_$", + "typeString": "type(library Bytes)" + } + }, + "id": 2575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5077:5:14", + "memberName": "equal", + "nodeType": "MemberAccess", + "referencedDeclaration": 1282, + "src": "5071:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes memory,bytes memory) pure returns (bool)" + } + }, + "id": 2584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5071:31:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2573, + "id": 2585, + "nodeType": "Return", + "src": "5064:38:14" + } + ] + }, + "documentation": { + "id": 2565, + "nodeType": "StructuredDocumentation", + "src": "4905:66:14", + "text": " @dev Returns true if the two strings are equal." + }, + "id": 2587, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "equal", + "nameLocation": "4985:5:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2567, + "mutability": "mutable", + "name": "a", + "nameLocation": "5005:1:14", + "nodeType": "VariableDeclaration", + "scope": 2587, + "src": "4991:15:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2566, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4991:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "b", + "nameLocation": "5022:1:14", + "nodeType": "VariableDeclaration", + "scope": 2587, + "src": "5008:15:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2568, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5008:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "4990:34:14" + }, + "returnParameters": { + "id": 2573, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2572, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2587, + "src": "5048:4:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2571, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5048:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5047:6:14" + }, + "scope": 3678, + "src": "4976:133:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2605, + "nodeType": "Block", + "src": "5406:64:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2596, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "5433:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 2597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5440:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 2600, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "5449:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5443:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2598, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5443:5:14", + "typeDescriptions": {} + } + }, + "id": 2601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5443:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5456:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5443:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2595, + "name": "parseUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2606, + 2637 + ], + "referencedDeclaration": 2637, + "src": "5423:9:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (uint256)" + } + }, + "id": 2603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5423:40:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2594, + "id": 2604, + "nodeType": "Return", + "src": "5416:47:14" + } + ] + }, + "documentation": { + "id": 2588, + "nodeType": "StructuredDocumentation", + "src": "5115:214:14", + "text": " @dev Parse a decimal string and returns the value as a `uint256`.\n Requirements:\n - The string must be formatted as `[0-9]*`\n - The result must fit into an `uint256` type" + }, + "id": 2606, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseUint", + "nameLocation": "5343:9:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2591, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2590, + "mutability": "mutable", + "name": "input", + "nameLocation": "5367:5:14", + "nodeType": "VariableDeclaration", + "scope": 2606, + "src": "5353:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2589, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5353:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "5352:21:14" + }, + "returnParameters": { + "id": 2594, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2593, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2606, + "src": "5397:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2592, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5397:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5396:9:14" + }, + "scope": 3678, + "src": "5334:136:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2636, + "nodeType": "Block", + "src": "5875:153:14", + "statements": [ + { + "assignments": [ + 2619, + 2621 + ], + "declarations": [ + { + "constant": false, + "id": 2619, + "mutability": "mutable", + "name": "success", + "nameLocation": "5891:7:14", + "nodeType": "VariableDeclaration", + "scope": 2636, + "src": "5886:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2618, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5886:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2621, + "mutability": "mutable", + "name": "value", + "nameLocation": "5908:5:14", + "nodeType": "VariableDeclaration", + "scope": 2636, + "src": "5900:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2620, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5900:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2627, + "initialValue": { + "arguments": [ + { + "id": 2623, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2609, + "src": "5930:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 2624, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "5937:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2625, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2613, + "src": "5944:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2622, + "name": "tryParseUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2658, + 2695 + ], + "referencedDeclaration": 2695, + "src": "5917:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 2626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5917:31:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5885:63:14" + }, + { + "condition": { + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5962:8:14", + "subExpression": { + "id": 2628, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2619, + "src": "5963:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2633, + "nodeType": "IfStatement", + "src": "5958:41:14", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2630, + "name": "StringsInvalidChar", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2210, + "src": "5979:18:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 2631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5979:20:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 2632, + "nodeType": "RevertStatement", + "src": "5972:27:14" + } + }, + { + "expression": { + "id": 2634, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2621, + "src": "6016:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2617, + "id": 2635, + "nodeType": "Return", + "src": "6009:12:14" + } + ] + }, + "documentation": { + "id": 2607, + "nodeType": "StructuredDocumentation", + "src": "5476:294:14", + "text": " @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n `end` (excluded).\n Requirements:\n - The substring must be formatted as `[0-9]*`\n - The result must fit into an `uint256` type" + }, + "id": 2637, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseUint", + "nameLocation": "5784:9:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2614, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2609, + "mutability": "mutable", + "name": "input", + "nameLocation": "5808:5:14", + "nodeType": "VariableDeclaration", + "scope": 2637, + "src": "5794:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2608, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5794:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2611, + "mutability": "mutable", + "name": "begin", + "nameLocation": "5823:5:14", + "nodeType": "VariableDeclaration", + "scope": 2637, + "src": "5815:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2610, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5815:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2613, + "mutability": "mutable", + "name": "end", + "nameLocation": "5838:3:14", + "nodeType": "VariableDeclaration", + "scope": 2637, + "src": "5830:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2612, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5830:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5793:49:14" + }, + "returnParameters": { + "id": 2617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2616, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2637, + "src": "5866:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2615, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5866:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5865:9:14" + }, + "scope": 3678, + "src": "5775:253:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2657, + "nodeType": "Block", + "src": "6349:83:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2648, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2640, + "src": "6395:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6402:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 2652, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2640, + "src": "6411:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6405:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2650, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6405:5:14", + "typeDescriptions": {} + } + }, + "id": 2653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6405:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6418:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6405:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2647, + "name": "_tryParseUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "6366:28:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6366:59:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 2646, + "id": 2656, + "nodeType": "Return", + "src": "6359:66:14" + } + ] + }, + "documentation": { + "id": 2638, + "nodeType": "StructuredDocumentation", + "src": "6034:215:14", + "text": " @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n NOTE: This function will revert if the result does not fit in a `uint256`." + }, + "id": 2658, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseUint", + "nameLocation": "6263:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2640, + "mutability": "mutable", + "name": "input", + "nameLocation": "6290:5:14", + "nodeType": "VariableDeclaration", + "scope": 2658, + "src": "6276:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2639, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6276:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "6275:21:14" + }, + "returnParameters": { + "id": 2646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2643, + "mutability": "mutable", + "name": "success", + "nameLocation": "6325:7:14", + "nodeType": "VariableDeclaration", + "scope": 2658, + "src": "6320:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2642, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6320:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2645, + "mutability": "mutable", + "name": "value", + "nameLocation": "6342:5:14", + "nodeType": "VariableDeclaration", + "scope": 2658, + "src": "6334:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2644, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6334:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6319:29:14" + }, + "scope": 3678, + "src": "6254:178:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2694, + "nodeType": "Block", + "src": "6834:144:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2672, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2665, + "src": "6848:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 2675, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2661, + "src": "6860:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6854:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2673, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6854:5:14", + "typeDescriptions": {} + } + }, + "id": 2676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6854:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6867:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6854:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6848:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2679, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2663, + "src": "6877:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 2680, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2665, + "src": "6885:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6877:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6848:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2687, + "nodeType": "IfStatement", + "src": "6844:63:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 2683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6898:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6905:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 2685, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6897:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 2671, + "id": 2686, + "nodeType": "Return", + "src": "6890:17:14" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2689, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2661, + "src": "6953:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 2690, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2663, + "src": "6960:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2691, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2665, + "src": "6967:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2688, + "name": "_tryParseUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "6924:28:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 2692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6924:47:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 2671, + "id": 2693, + "nodeType": "Return", + "src": "6917:54:14" + } + ] + }, + "documentation": { + "id": 2659, + "nodeType": "StructuredDocumentation", + "src": "6438:238:14", + "text": " @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n character.\n NOTE: This function will revert if the result does not fit in a `uint256`." + }, + "id": 2695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseUint", + "nameLocation": "6690:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2666, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2661, + "mutability": "mutable", + "name": "input", + "nameLocation": "6726:5:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6712:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6712:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2663, + "mutability": "mutable", + "name": "begin", + "nameLocation": "6749:5:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6741:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2662, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6741:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2665, + "mutability": "mutable", + "name": "end", + "nameLocation": "6772:3:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6764:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2664, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6764:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6702:79:14" + }, + "returnParameters": { + "id": 2671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2668, + "mutability": "mutable", + "name": "success", + "nameLocation": "6810:7:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6805:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2667, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6805:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2670, + "mutability": "mutable", + "name": "value", + "nameLocation": "6827:5:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6819:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6819:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6804:29:14" + }, + "scope": 3678, + "src": "6681:297:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2764, + "nodeType": "Block", + "src": "7381:347:14", + "statements": [ + { + "assignments": [ + 2710 + ], + "declarations": [ + { + "constant": false, + "id": 2710, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "7404:6:14", + "nodeType": "VariableDeclaration", + "scope": 2764, + "src": "7391:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2709, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7391:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2715, + "initialValue": { + "arguments": [ + { + "id": 2713, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2698, + "src": "7419:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2712, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7413:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2711, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7413:5:14", + "typeDescriptions": {} + } + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7413:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7391:34:14" + }, + { + "assignments": [ + 2717 + ], + "declarations": [ + { + "constant": false, + "id": 2717, + "mutability": "mutable", + "name": "result", + "nameLocation": "7444:6:14", + "nodeType": "VariableDeclaration", + "scope": 2764, + "src": "7436:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2716, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7436:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2719, + "initialValue": { + "hexValue": "30", + "id": 2718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7453:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7436:18:14" + }, + { + "body": { + "id": 2758, + "nodeType": "Block", + "src": "7502:189:14", + "statements": [ + { + "assignments": [ + 2731 + ], + "declarations": [ + { + "constant": false, + "id": 2731, + "mutability": "mutable", + "name": "chr", + "nameLocation": "7522:3:14", + "nodeType": "VariableDeclaration", + "scope": 2758, + "src": "7516:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2730, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "7516:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 2741, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 2736, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2710, + "src": "7571:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 2737, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2721, + "src": "7579:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2735, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "7548:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 2738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7548:33:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7541:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2733, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "7541:6:14", + "typeDescriptions": {} + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7541:41:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2732, + "name": "_tryParseChr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "7528:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_uint8_$", + "typeString": "function (bytes1) pure returns (uint8)" + } + }, + "id": 2740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7528:55:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7516:67:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2742, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2731, + "src": "7601:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "39", + "id": 2743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7607:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_9_by_1", + "typeString": "int_const 9" + }, + "value": "9" + }, + "src": "7601:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2749, + "nodeType": "IfStatement", + "src": "7597:30:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 2745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7618:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 2746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7625:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 2747, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7617:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 2708, + "id": 2748, + "nodeType": "Return", + "src": "7610:17:14" + } + }, + { + "expression": { + "id": 2752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2750, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2717, + "src": "7641:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "hexValue": "3130", + "id": 2751, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7651:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "7641:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2753, + "nodeType": "ExpressionStatement", + "src": "7641:12:14" + }, + { + "expression": { + "id": 2756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2754, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2717, + "src": "7667:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 2755, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2731, + "src": "7677:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "7667:13:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2757, + "nodeType": "ExpressionStatement", + "src": "7667:13:14" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2724, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2721, + "src": "7488:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 2725, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2702, + "src": "7492:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7488:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2759, + "initializationExpression": { + "assignments": [ + 2721 + ], + "declarations": [ + { + "constant": false, + "id": 2721, + "mutability": "mutable", + "name": "i", + "nameLocation": "7477:1:14", + "nodeType": "VariableDeclaration", + "scope": 2759, + "src": "7469:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7469:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2723, + "initialValue": { + "id": 2722, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2700, + "src": "7481:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7469:17:14" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 2728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "7497:3:14", + "subExpression": { + "id": 2727, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2721, + "src": "7499:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2729, + "nodeType": "ExpressionStatement", + "src": "7497:3:14" + }, + "nodeType": "ForStatement", + "src": "7464:227:14" + }, + { + "expression": { + "components": [ + { + "hexValue": "74727565", + "id": 2760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7708:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "id": 2761, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2717, + "src": "7714:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2762, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7707:14:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 2708, + "id": 2763, + "nodeType": "Return", + "src": "7700:21:14" + } + ] + }, + "documentation": { + "id": 2696, + "nodeType": "StructuredDocumentation", + "src": "6984:224:14", + "text": " @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n `begin <= end <= input.length`. Other inputs would result in undefined behavior." + }, + "id": 2765, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_tryParseUintUncheckedBounds", + "nameLocation": "7222:28:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2703, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2698, + "mutability": "mutable", + "name": "input", + "nameLocation": "7274:5:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7260:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2697, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7260:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2700, + "mutability": "mutable", + "name": "begin", + "nameLocation": "7297:5:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7289:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7289:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2702, + "mutability": "mutable", + "name": "end", + "nameLocation": "7320:3:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7312:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2701, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7312:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7250:79:14" + }, + "returnParameters": { + "id": 2708, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2705, + "mutability": "mutable", + "name": "success", + "nameLocation": "7357:7:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7352:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2704, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7352:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2707, + "mutability": "mutable", + "name": "value", + "nameLocation": "7374:5:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7366:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2706, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7366:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7351:29:14" + }, + "scope": 3678, + "src": "7213:515:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "8025:63:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2774, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2768, + "src": "8051:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 2775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8058:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 2778, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2768, + "src": "8067:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8061:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2776, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8061:5:14", + "typeDescriptions": {} + } + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8061:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8074:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8061:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2773, + "name": "parseInt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2784, + 2815 + ], + "referencedDeclaration": 2815, + "src": "8042:8:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_int256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (int256)" + } + }, + "id": 2781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8042:39:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 2772, + "id": 2782, + "nodeType": "Return", + "src": "8035:46:14" + } + ] + }, + "documentation": { + "id": 2766, + "nodeType": "StructuredDocumentation", + "src": "7734:216:14", + "text": " @dev Parse a decimal string and returns the value as a `int256`.\n Requirements:\n - The string must be formatted as `[-+]?[0-9]*`\n - The result must fit in an `int256` type." + }, + "id": 2784, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseInt", + "nameLocation": "7964:8:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2768, + "mutability": "mutable", + "name": "input", + "nameLocation": "7987:5:14", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "7973:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2767, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7973:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "7972:21:14" + }, + "returnParameters": { + "id": 2772, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2771, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "8017:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2770, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "8017:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "8016:8:14" + }, + "scope": 3678, + "src": "7955:133:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2814, + "nodeType": "Block", + "src": "8493:151:14", + "statements": [ + { + "assignments": [ + 2797, + 2799 + ], + "declarations": [ + { + "constant": false, + "id": 2797, + "mutability": "mutable", + "name": "success", + "nameLocation": "8509:7:14", + "nodeType": "VariableDeclaration", + "scope": 2814, + "src": "8504:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2796, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8504:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2799, + "mutability": "mutable", + "name": "value", + "nameLocation": "8525:5:14", + "nodeType": "VariableDeclaration", + "scope": 2814, + "src": "8518:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2798, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "8518:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 2805, + "initialValue": { + "arguments": [ + { + "id": 2801, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2787, + "src": "8546:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 2802, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2789, + "src": "8553:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2803, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2791, + "src": "8560:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2800, + "name": "tryParseInt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2836, + 2878 + ], + "referencedDeclaration": 2878, + "src": "8534:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_int256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,int256)" + } + }, + "id": 2804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8534:30:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8503:61:14" + }, + { + "condition": { + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8578:8:14", + "subExpression": { + "id": 2806, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2797, + "src": "8579:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2811, + "nodeType": "IfStatement", + "src": "8574:41:14", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2808, + "name": "StringsInvalidChar", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2210, + "src": "8595:18:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 2809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8595:20:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 2810, + "nodeType": "RevertStatement", + "src": "8588:27:14" + } + }, + { + "expression": { + "id": 2812, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2799, + "src": "8632:5:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 2795, + "id": 2813, + "nodeType": "Return", + "src": "8625:12:14" + } + ] + }, + "documentation": { + "id": 2785, + "nodeType": "StructuredDocumentation", + "src": "8094:296:14", + "text": " @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n `end` (excluded).\n Requirements:\n - The substring must be formatted as `[-+]?[0-9]*`\n - The result must fit in an `int256` type." + }, + "id": 2815, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseInt", + "nameLocation": "8404:8:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2792, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2787, + "mutability": "mutable", + "name": "input", + "nameLocation": "8427:5:14", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "8413:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2786, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8413:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2789, + "mutability": "mutable", + "name": "begin", + "nameLocation": "8442:5:14", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "8434:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2788, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8434:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2791, + "mutability": "mutable", + "name": "end", + "nameLocation": "8457:3:14", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "8449:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2790, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8449:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8412:49:14" + }, + "returnParameters": { + "id": 2795, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2794, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "8485:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2793, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "8485:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "8484:8:14" + }, + "scope": 3678, + "src": "8395:249:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2835, + "nodeType": "Block", + "src": "9035:82:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2826, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "9080:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9087:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 2830, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "9096:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9090:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2828, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9090:5:14", + "typeDescriptions": {} + } + }, + "id": 2831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9090:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9103:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9090:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2825, + "name": "_tryParseIntUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2999, + "src": "9052:27:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_int256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,int256)" + } + }, + "id": 2833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9052:58:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "functionReturnParameters": 2824, + "id": 2834, + "nodeType": "Return", + "src": "9045:65:14" + } + ] + }, + "documentation": { + "id": 2816, + "nodeType": "StructuredDocumentation", + "src": "8650:287:14", + "text": " @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n the result does not fit in a `int256`.\n NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`." + }, + "id": 2836, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseInt", + "nameLocation": "8951:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2818, + "mutability": "mutable", + "name": "input", + "nameLocation": "8977:5:14", + "nodeType": "VariableDeclaration", + "scope": 2836, + "src": "8963:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2817, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8963:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "8962:21:14" + }, + "returnParameters": { + "id": 2824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2821, + "mutability": "mutable", + "name": "success", + "nameLocation": "9012:7:14", + "nodeType": "VariableDeclaration", + "scope": 2836, + "src": "9007:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2820, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9007:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2823, + "mutability": "mutable", + "name": "value", + "nameLocation": "9028:5:14", + "nodeType": "VariableDeclaration", + "scope": 2836, + "src": "9021:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2822, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "9021:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "9006:28:14" + }, + "scope": 3678, + "src": "8942:175:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "constant": true, + "id": 2841, + "mutability": "constant", + "name": "ABS_MIN_INT256", + "nameLocation": "9148:14:14", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "9123:50:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2837, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9123:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9165:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "323535", + "id": 2839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9170:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "9165:8:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 2877, + "nodeType": "Block", + "src": "9639:143:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2855, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2848, + "src": "9653:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 2858, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "9665:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9659:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2856, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9659:5:14", + "typeDescriptions": {} + } + }, + "id": 2859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9659:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9672:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9659:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9653:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2862, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2846, + "src": "9682:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 2863, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2848, + "src": "9690:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9682:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9653:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2870, + "nodeType": "IfStatement", + "src": "9649:63:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9703:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 2867, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9710:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 2868, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "9702:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 2854, + "id": 2869, + "nodeType": "Return", + "src": "9695:17:14" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2872, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "9757:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 2873, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2846, + "src": "9764:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2874, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2848, + "src": "9771:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2871, + "name": "_tryParseIntUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2999, + "src": "9729:27:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_int256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,int256)" + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9729:46:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "functionReturnParameters": 2854, + "id": 2876, + "nodeType": "Return", + "src": "9722:53:14" + } + ] + }, + "documentation": { + "id": 2842, + "nodeType": "StructuredDocumentation", + "src": "9180:303:14", + "text": " @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n character or if the result does not fit in a `int256`.\n NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`." + }, + "id": 2878, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseInt", + "nameLocation": "9497:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2844, + "mutability": "mutable", + "name": "input", + "nameLocation": "9532:5:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9518:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2843, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9518:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2846, + "mutability": "mutable", + "name": "begin", + "nameLocation": "9555:5:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9547:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2845, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9547:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2848, + "mutability": "mutable", + "name": "end", + "nameLocation": "9578:3:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9570:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2847, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9570:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9508:79:14" + }, + "returnParameters": { + "id": 2854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2851, + "mutability": "mutable", + "name": "success", + "nameLocation": "9616:7:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9611:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2850, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9611:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2853, + "mutability": "mutable", + "name": "value", + "nameLocation": "9632:5:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9625:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2852, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "9625:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "9610:28:14" + }, + "scope": 3678, + "src": "9488:294:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2998, + "nodeType": "Block", + "src": "10182:812:14", + "statements": [ + { + "assignments": [ + 2893 + ], + "declarations": [ + { + "constant": false, + "id": 2893, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "10205:6:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10192:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2892, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10192:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2898, + "initialValue": { + "arguments": [ + { + "id": 2896, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2881, + "src": "10220:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10214:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2894, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10214:5:14", + "typeDescriptions": {} + } + }, + "id": 2897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10214:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10192:34:14" + }, + { + "assignments": [ + 2900 + ], + "declarations": [ + { + "constant": false, + "id": 2900, + "mutability": "mutable", + "name": "sign", + "nameLocation": "10290:4:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10283:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 2899, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10283:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "id": 2916, + "initialValue": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2901, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "10297:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2902, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "10306:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10297:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 2911, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2893, + "src": "10354:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 2912, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "10362:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2910, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "10331:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 2913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10331:37:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10324:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2908, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10324:6:14", + "typeDescriptions": {} + } + }, + "id": 2914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10324:45:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "10297:72:14", + "trueExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 2906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10319:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10312:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2904, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10312:6:14", + "typeDescriptions": {} + } + }, + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10312:9:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10283:86:14" + }, + { + "assignments": [ + 2918 + ], + "declarations": [ + { + "constant": false, + "id": 2918, + "mutability": "mutable", + "name": "positiveSign", + "nameLocation": "10455:12:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10450:17:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2917, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10450:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 2925, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 2924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2919, + "name": "sign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2900, + "src": "10470:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "2b", + "id": 2922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10485:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_728b8dbbe730d9acd55e30e768e6a28a04bea0c61b88108287c2c87d79c98bb8", + "typeString": "literal_string \"+\"" + }, + "value": "+" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_728b8dbbe730d9acd55e30e768e6a28a04bea0c61b88108287c2c87d79c98bb8", + "typeString": "literal_string \"+\"" + } + ], + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10478:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2920, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10478:6:14", + "typeDescriptions": {} + } + }, + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10478:11:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "10470:19:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10450:39:14" + }, + { + "assignments": [ + 2927 + ], + "declarations": [ + { + "constant": false, + "id": 2927, + "mutability": "mutable", + "name": "negativeSign", + "nameLocation": "10504:12:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10499:17:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2926, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10499:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 2934, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2928, + "name": "sign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2900, + "src": "10519:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "2d", + "id": 2931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10534:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", + "typeString": "literal_string \"-\"" + }, + "value": "-" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", + "typeString": "literal_string \"-\"" + } + ], + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10527:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2929, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10527:6:14", + "typeDescriptions": {} + } + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10527:11:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "10519:19:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10499:39:14" + }, + { + "assignments": [ + 2936 + ], + "declarations": [ + { + "constant": false, + "id": 2936, + "mutability": "mutable", + "name": "offset", + "nameLocation": "10556:6:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10548:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10548:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2943, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2937, + "name": "positiveSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2918, + "src": "10566:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "id": 2938, + "name": "negativeSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2927, + "src": "10582:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10566:28:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 2940, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10565:30:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10596:6:14", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "10565:37:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$attached_to$_t_bool_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10565:39:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10548:56:14" + }, + { + "assignments": [ + 2945, + 2947 + ], + "declarations": [ + { + "constant": false, + "id": 2945, + "mutability": "mutable", + "name": "absSuccess", + "nameLocation": "10621:10:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10616:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2944, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10616:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2947, + "mutability": "mutable", + "name": "absValue", + "nameLocation": "10641:8:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10633:16:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2946, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10633:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2955, + "initialValue": { + "arguments": [ + { + "id": 2949, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2881, + "src": "10666:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2950, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "10673:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2951, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "10681:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10673:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2953, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "10689:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2948, + "name": "tryParseUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2658, + 2695 + ], + "referencedDeclaration": 2695, + "src": "10653:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10653:40:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10615:78:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2956, + "name": "absSuccess", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2945, + "src": "10708:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2957, + "name": "absValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2947, + "src": "10722:8:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 2958, + "name": "ABS_MIN_INT256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "10733:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10722:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10708:39:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2976, + "name": "absSuccess", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2945, + "src": "10850:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 2977, + "name": "negativeSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2927, + "src": "10864:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10850:26:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2979, + "name": "absValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2947, + "src": "10880:8:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2980, + "name": "ABS_MIN_INT256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "10892:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10880:26:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10850:56:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 2992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10978:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 2993, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10985:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 2994, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10977:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 2891, + "id": 2995, + "nodeType": "Return", + "src": "10970:17:14" + }, + "id": 2996, + "nodeType": "IfStatement", + "src": "10846:141:14", + "trueBody": { + "id": 2991, + "nodeType": "Block", + "src": "10908:56:14", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "74727565", + "id": 2983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10930:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "expression": { + "arguments": [ + { + "id": 2986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10941:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 2985, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "10941:6:14", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + } + ], + "id": 2984, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "10936:4:14", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10936:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_int256", + "typeString": "type(int256)" + } + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10949:3:14", + "memberName": "min", + "nodeType": "MemberAccess", + "src": "10936:16:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 2989, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10929:24:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "functionReturnParameters": 2891, + "id": 2990, + "nodeType": "Return", + "src": "10922:31:14" + } + ] + } + }, + "id": 2997, + "nodeType": "IfStatement", + "src": "10704:283:14", + "trueBody": { + "id": 2975, + "nodeType": "Block", + "src": "10749:91:14", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "74727565", + "id": 2961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10771:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "condition": { + "id": 2962, + "name": "negativeSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2927, + "src": "10777:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "arguments": [ + { + "id": 2970, + "name": "absValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2947, + "src": "10819:8:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10812:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 2968, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "10812:6:14", + "typeDescriptions": {} + } + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10812:16:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 2972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "10777:51:14", + "trueExpression": { + "id": 2967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10792:17:14", + "subExpression": { + "arguments": [ + { + "id": 2965, + "name": "absValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2947, + "src": "10800:8:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10793:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 2963, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "10793:6:14", + "typeDescriptions": {} + } + }, + "id": 2966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10793:16:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 2973, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10770:59:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "functionReturnParameters": 2891, + "id": 2974, + "nodeType": "Return", + "src": "10763:66:14" + } + ] + } + } + ] + }, + "documentation": { + "id": 2879, + "nodeType": "StructuredDocumentation", + "src": "9788:223:14", + "text": " @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n `begin <= end <= input.length`. Other inputs would result in undefined behavior." + }, + "id": 2999, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_tryParseIntUncheckedBounds", + "nameLocation": "10025:27:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2886, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2881, + "mutability": "mutable", + "name": "input", + "nameLocation": "10076:5:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10062:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2880, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10062:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2883, + "mutability": "mutable", + "name": "begin", + "nameLocation": "10099:5:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10091:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2882, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10091:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2885, + "mutability": "mutable", + "name": "end", + "nameLocation": "10122:3:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10114:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2884, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10114:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10052:79:14" + }, + "returnParameters": { + "id": 2891, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2888, + "mutability": "mutable", + "name": "success", + "nameLocation": "10159:7:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10154:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2887, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10154:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2890, + "mutability": "mutable", + "name": "value", + "nameLocation": "10175:5:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10168:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2889, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "10168:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "10153:28:14" + }, + "scope": 3678, + "src": "10016:978:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3017, + "nodeType": "Block", + "src": "11339:67:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3008, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3002, + "src": "11369:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 3009, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11376:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 3012, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3002, + "src": "11385:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11379:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3010, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "11379:5:14", + "typeDescriptions": {} + } + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11379:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11392:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "11379:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3007, + "name": "parseHexUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3018, + 3049 + ], + "referencedDeclaration": 3049, + "src": "11356:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (uint256)" + } + }, + "id": 3015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11356:43:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3006, + "id": 3016, + "nodeType": "Return", + "src": "11349:50:14" + } + ] + }, + "documentation": { + "id": 3000, + "nodeType": "StructuredDocumentation", + "src": "11000:259:14", + "text": " @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n Requirements:\n - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n - The result must fit in an `uint256` type." + }, + "id": 3018, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseHexUint", + "nameLocation": "11273:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3002, + "mutability": "mutable", + "name": "input", + "nameLocation": "11300:5:14", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "11286:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3001, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11286:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "11285:21:14" + }, + "returnParameters": { + "id": 3006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3005, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "11330:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11330:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11329:9:14" + }, + "scope": 3678, + "src": "11264:142:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3048, + "nodeType": "Block", + "src": "11827:156:14", + "statements": [ + { + "assignments": [ + 3031, + 3033 + ], + "declarations": [ + { + "constant": false, + "id": 3031, + "mutability": "mutable", + "name": "success", + "nameLocation": "11843:7:14", + "nodeType": "VariableDeclaration", + "scope": 3048, + "src": "11838:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3030, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11838:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3033, + "mutability": "mutable", + "name": "value", + "nameLocation": "11860:5:14", + "nodeType": "VariableDeclaration", + "scope": 3048, + "src": "11852:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3032, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11852:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3039, + "initialValue": { + "arguments": [ + { + "id": 3035, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "11885:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3036, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3023, + "src": "11892:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3037, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3025, + "src": "11899:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3034, + "name": "tryParseHexUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3070, + 3107 + ], + "referencedDeclaration": 3107, + "src": "11869:15:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11869:34:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11837:66:14" + }, + { + "condition": { + "id": 3041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "11917:8:14", + "subExpression": { + "id": 3040, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3031, + "src": "11918:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3045, + "nodeType": "IfStatement", + "src": "11913:41:14", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3042, + "name": "StringsInvalidChar", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2210, + "src": "11934:18:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 3043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11934:20:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 3044, + "nodeType": "RevertStatement", + "src": "11927:27:14" + } + }, + { + "expression": { + "id": 3046, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3033, + "src": "11971:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3029, + "id": 3047, + "nodeType": "Return", + "src": "11964:12:14" + } + ] + }, + "documentation": { + "id": 3019, + "nodeType": "StructuredDocumentation", + "src": "11412:307:14", + "text": " @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n `end` (excluded).\n Requirements:\n - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n - The result must fit in an `uint256` type." + }, + "id": 3049, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseHexUint", + "nameLocation": "11733:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3026, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3021, + "mutability": "mutable", + "name": "input", + "nameLocation": "11760:5:14", + "nodeType": "VariableDeclaration", + "scope": 3049, + "src": "11746:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3020, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11746:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3023, + "mutability": "mutable", + "name": "begin", + "nameLocation": "11775:5:14", + "nodeType": "VariableDeclaration", + "scope": 3049, + "src": "11767:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3022, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11767:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3025, + "mutability": "mutable", + "name": "end", + "nameLocation": "11790:3:14", + "nodeType": "VariableDeclaration", + "scope": 3049, + "src": "11782:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3024, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11782:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11745:49:14" + }, + "returnParameters": { + "id": 3029, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3028, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3049, + "src": "11818:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3027, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11818:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11817:9:14" + }, + "scope": 3678, + "src": "11724:259:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3069, + "nodeType": "Block", + "src": "12310:86:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3060, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3052, + "src": "12359:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 3061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12366:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 3064, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3052, + "src": "12375:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12369:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3062, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "12369:5:14", + "typeDescriptions": {} + } + }, + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12369:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12382:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "12369:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3059, + "name": "_tryParseHexUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3210, + "src": "12327:31:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12327:62:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 3058, + "id": 3068, + "nodeType": "Return", + "src": "12320:69:14" + } + ] + }, + "documentation": { + "id": 3050, + "nodeType": "StructuredDocumentation", + "src": "11989:218:14", + "text": " @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n NOTE: This function will revert if the result does not fit in a `uint256`." + }, + "id": 3070, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseHexUint", + "nameLocation": "12221:15:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3052, + "mutability": "mutable", + "name": "input", + "nameLocation": "12251:5:14", + "nodeType": "VariableDeclaration", + "scope": 3070, + "src": "12237:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3051, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12237:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "12236:21:14" + }, + "returnParameters": { + "id": 3058, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3055, + "mutability": "mutable", + "name": "success", + "nameLocation": "12286:7:14", + "nodeType": "VariableDeclaration", + "scope": 3070, + "src": "12281:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12281:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "value", + "nameLocation": "12303:5:14", + "nodeType": "VariableDeclaration", + "scope": 3070, + "src": "12295:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3056, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12295:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12280:29:14" + }, + "scope": 3678, + "src": "12212:184:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3106, + "nodeType": "Block", + "src": "12804:147:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3084, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3077, + "src": "12818:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 3087, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3073, + "src": "12830:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12824:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3085, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "12824:5:14", + "typeDescriptions": {} + } + }, + "id": 3088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12824:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12837:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "12824:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12818:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3091, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3075, + "src": "12847:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 3092, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3077, + "src": "12855:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12847:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12818:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3099, + "nodeType": "IfStatement", + "src": "12814:63:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12868:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 3096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12875:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 3097, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12867:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 3083, + "id": 3098, + "nodeType": "Return", + "src": "12860:17:14" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3101, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3073, + "src": "12926:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3102, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3075, + "src": "12933:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3103, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3077, + "src": "12940:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3100, + "name": "_tryParseHexUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3210, + "src": "12894:31:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12894:50:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 3083, + "id": 3105, + "nodeType": "Return", + "src": "12887:57:14" + } + ] + }, + "documentation": { + "id": 3071, + "nodeType": "StructuredDocumentation", + "src": "12402:241:14", + "text": " @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n invalid character.\n NOTE: This function will revert if the result does not fit in a `uint256`." + }, + "id": 3107, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseHexUint", + "nameLocation": "12657:15:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3073, + "mutability": "mutable", + "name": "input", + "nameLocation": "12696:5:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12682:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3072, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12682:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3075, + "mutability": "mutable", + "name": "begin", + "nameLocation": "12719:5:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12711:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3074, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12711:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3077, + "mutability": "mutable", + "name": "end", + "nameLocation": "12742:3:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12734:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12734:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12672:79:14" + }, + "returnParameters": { + "id": 3083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3080, + "mutability": "mutable", + "name": "success", + "nameLocation": "12780:7:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12775:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3079, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12775:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "value", + "nameLocation": "12797:5:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12789:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12789:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12774:29:14" + }, + "scope": 3678, + "src": "12648:303:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3209, + "nodeType": "Block", + "src": "13360:881:14", + "statements": [ + { + "assignments": [ + 3122 + ], + "declarations": [ + { + "constant": false, + "id": 3122, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "13383:6:14", + "nodeType": "VariableDeclaration", + "scope": 3209, + "src": "13370:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3121, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13370:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 3127, + "initialValue": { + "arguments": [ + { + "id": 3125, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3110, + "src": "13398:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13392:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3123, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13392:5:14", + "typeDescriptions": {} + } + }, + "id": 3126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13392:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13370:34:14" + }, + { + "assignments": [ + 3129 + ], + "declarations": [ + { + "constant": false, + "id": 3129, + "mutability": "mutable", + "name": "hasPrefix", + "nameLocation": "13457:9:14", + "nodeType": "VariableDeclaration", + "scope": 3209, + "src": "13452:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3128, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13452:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 3149, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3130, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "13470:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3131, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13476:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 3132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13484:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "13476:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13470:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3135, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13469:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 3147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 3139, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "13520:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3140, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13528:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3138, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "13497:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 3141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13497:37:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13490:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes2_$", + "typeString": "type(bytes2)" + }, + "typeName": { + "id": 3136, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "13490:6:14", + "typeDescriptions": {} + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13490:45:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "3078", + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13546:4:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39bef1777deb3dfb14f64b9f81ced092c501fee72f90e93d03bb95ee89df9837", + "typeString": "literal_string \"0x\"" + }, + "value": "0x" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_39bef1777deb3dfb14f64b9f81ced092c501fee72f90e93d03bb95ee89df9837", + "typeString": "literal_string \"0x\"" + } + ], + "id": 3144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13539:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes2_$", + "typeString": "type(bytes2)" + }, + "typeName": { + "id": 3143, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "13539:6:14", + "typeDescriptions": {} + } + }, + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13539:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "src": "13490:61:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13469:82:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13452:99:14" + }, + { + "assignments": [ + 3151 + ], + "declarations": [ + { + "constant": false, + "id": 3151, + "mutability": "mutable", + "name": "offset", + "nameLocation": "13640:6:14", + "nodeType": "VariableDeclaration", + "scope": 3209, + "src": "13632:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13632:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3157, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 3152, + "name": "hasPrefix", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "13649:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13659:6:14", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "13649:16:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$attached_to$_t_bool_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 3154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13649:18:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "32", + "id": 3155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13670:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "13649:22:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13632:39:14" + }, + { + "assignments": [ + 3159 + ], + "declarations": [ + { + "constant": false, + "id": 3159, + "mutability": "mutable", + "name": "result", + "nameLocation": "13690:6:14", + "nodeType": "VariableDeclaration", + "scope": 3209, + "src": "13682:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3158, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13682:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3161, + "initialValue": { + "hexValue": "30", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13682:18:14" + }, + { + "body": { + "id": 3203, + "nodeType": "Block", + "src": "13757:447:14", + "statements": [ + { + "assignments": [ + 3175 + ], + "declarations": [ + { + "constant": false, + "id": 3175, + "mutability": "mutable", + "name": "chr", + "nameLocation": "13777:3:14", + "nodeType": "VariableDeclaration", + "scope": 3203, + "src": "13771:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3174, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13771:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3185, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 3180, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "13826:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3181, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3163, + "src": "13834:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3179, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "13803:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 3182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13803:33:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13796:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 3177, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "13796:6:14", + "typeDescriptions": {} + } + }, + "id": 3183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13796:41:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3176, + "name": "_tryParseChr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "13783:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_uint8_$", + "typeString": "function (bytes1) pure returns (uint8)" + } + }, + "id": 3184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13783:55:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13771:67:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3186, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "13856:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3135", + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13862:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "15" + }, + "src": "13856:8:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3193, + "nodeType": "IfStatement", + "src": "13852:31:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 3189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13874:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 3190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13881:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 3191, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13873:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 3120, + "id": 3192, + "nodeType": "Return", + "src": "13866:17:14" + } + }, + { + "expression": { + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3194, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3159, + "src": "13897:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "hexValue": "3136", + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13907:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "13897:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3197, + "nodeType": "ExpressionStatement", + "src": "13897:12:14" + }, + { + "id": 3202, + "nodeType": "UncheckedBlock", + "src": "13923:271:14", + "statements": [ + { + "expression": { + "id": 3200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3198, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3159, + "src": "14166:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 3199, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "14176:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "14166:13:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3201, + "nodeType": "ExpressionStatement", + "src": "14166:13:14" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3168, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3163, + "src": "13743:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 3169, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "13747:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13743:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3204, + "initializationExpression": { + "assignments": [ + 3163 + ], + "declarations": [ + { + "constant": false, + "id": 3163, + "mutability": "mutable", + "name": "i", + "nameLocation": "13723:1:14", + "nodeType": "VariableDeclaration", + "scope": 3204, + "src": "13715:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3162, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13715:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3167, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3164, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13727:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 3165, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3151, + "src": "13735:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13727:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13715:26:14" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "13752:3:14", + "subExpression": { + "id": 3171, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3163, + "src": "13754:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3173, + "nodeType": "ExpressionStatement", + "src": "13752:3:14" + }, + "nodeType": "ForStatement", + "src": "13710:494:14" + }, + { + "expression": { + "components": [ + { + "hexValue": "74727565", + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14221:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "id": 3206, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3159, + "src": "14227:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3207, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14220:14:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 3120, + "id": 3208, + "nodeType": "Return", + "src": "14213:21:14" + } + ] + }, + "documentation": { + "id": 3108, + "nodeType": "StructuredDocumentation", + "src": "12957:227:14", + "text": " @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n `begin <= end <= input.length`. Other inputs would result in undefined behavior." + }, + "id": 3210, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_tryParseHexUintUncheckedBounds", + "nameLocation": "13198:31:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3110, + "mutability": "mutable", + "name": "input", + "nameLocation": "13253:5:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13239:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3109, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "13239:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3112, + "mutability": "mutable", + "name": "begin", + "nameLocation": "13276:5:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13268:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13268:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3114, + "mutability": "mutable", + "name": "end", + "nameLocation": "13299:3:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13291:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3113, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13291:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13229:79:14" + }, + "returnParameters": { + "id": 3120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3117, + "mutability": "mutable", + "name": "success", + "nameLocation": "13336:7:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13331:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3116, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13331:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3119, + "mutability": "mutable", + "name": "value", + "nameLocation": "13353:5:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13345:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13345:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13330:29:14" + }, + "scope": 3678, + "src": "13189:1052:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3228, + "nodeType": "Block", + "src": "14539:67:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3219, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3213, + "src": "14569:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14576:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 3223, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3213, + "src": "14585:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14579:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3221, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "14579:5:14", + "typeDescriptions": {} + } + }, + "id": 3224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14579:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14592:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "14579:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3218, + "name": "parseAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3229, + 3260 + ], + "referencedDeclaration": 3260, + "src": "14556:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_address_$", + "typeString": "function (string memory,uint256,uint256) pure returns (address)" + } + }, + "id": 3226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14556:43:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3217, + "id": 3227, + "nodeType": "Return", + "src": "14549:50:14" + } + ] + }, + "documentation": { + "id": 3211, + "nodeType": "StructuredDocumentation", + "src": "14247:212:14", + "text": " @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n Requirements:\n - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`" + }, + "id": 3229, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseAddress", + "nameLocation": "14473:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3213, + "mutability": "mutable", + "name": "input", + "nameLocation": "14500:5:14", + "nodeType": "VariableDeclaration", + "scope": 3229, + "src": "14486:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3212, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14486:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "14485:21:14" + }, + "returnParameters": { + "id": 3217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3216, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3229, + "src": "14530:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14530:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14529:9:14" + }, + "scope": 3678, + "src": "14464:142:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3259, + "nodeType": "Block", + "src": "14979:165:14", + "statements": [ + { + "assignments": [ + 3242, + 3244 + ], + "declarations": [ + { + "constant": false, + "id": 3242, + "mutability": "mutable", + "name": "success", + "nameLocation": "14995:7:14", + "nodeType": "VariableDeclaration", + "scope": 3259, + "src": "14990:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3241, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14990:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3244, + "mutability": "mutable", + "name": "value", + "nameLocation": "15012:5:14", + "nodeType": "VariableDeclaration", + "scope": 3259, + "src": "15004:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15004:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3250, + "initialValue": { + "arguments": [ + { + "id": 3246, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3232, + "src": "15037:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3247, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3234, + "src": "15044:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3248, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "15051:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3245, + "name": "tryParseAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3281, + 3385 + ], + "referencedDeclaration": 3385, + "src": "15021:15:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_address_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,address)" + } + }, + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15021:34:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14989:66:14" + }, + { + "condition": { + "id": 3252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "15069:8:14", + "subExpression": { + "id": 3251, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3242, + "src": "15070:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3256, + "nodeType": "IfStatement", + "src": "15065:50:14", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3253, + "name": "StringsInvalidAddressFormat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2213, + "src": "15086:27:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15086:29:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 3255, + "nodeType": "RevertStatement", + "src": "15079:36:14" + } + }, + { + "expression": { + "id": 3257, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3244, + "src": "15132:5:14", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3240, + "id": 3258, + "nodeType": "Return", + "src": "15125:12:14" + } + ] + }, + "documentation": { + "id": 3230, + "nodeType": "StructuredDocumentation", + "src": "14612:259:14", + "text": " @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n `end` (excluded).\n Requirements:\n - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`" + }, + "id": 3260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseAddress", + "nameLocation": "14885:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3232, + "mutability": "mutable", + "name": "input", + "nameLocation": "14912:5:14", + "nodeType": "VariableDeclaration", + "scope": 3260, + "src": "14898:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3231, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14898:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3234, + "mutability": "mutable", + "name": "begin", + "nameLocation": "14927:5:14", + "nodeType": "VariableDeclaration", + "scope": 3260, + "src": "14919:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3233, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14919:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3236, + "mutability": "mutable", + "name": "end", + "nameLocation": "14942:3:14", + "nodeType": "VariableDeclaration", + "scope": 3260, + "src": "14934:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14934:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14897:49:14" + }, + "returnParameters": { + "id": 3240, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3239, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3260, + "src": "14970:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14970:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14969:9:14" + }, + "scope": 3678, + "src": "14876:268:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3280, + "nodeType": "Block", + "src": "15451:70:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3271, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3263, + "src": "15484:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 3272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15491:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 3275, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3263, + "src": "15500:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15494:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3273, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "15494:5:14", + "typeDescriptions": {} + } + }, + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15494:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15507:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "15494:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3270, + "name": "tryParseAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3281, + 3385 + ], + "referencedDeclaration": 3385, + "src": "15468:15:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_address_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,address)" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15468:46:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "functionReturnParameters": 3269, + "id": 3279, + "nodeType": "Return", + "src": "15461:53:14" + } + ] + }, + "documentation": { + "id": 3261, + "nodeType": "StructuredDocumentation", + "src": "15150:198:14", + "text": " @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n formatted address. See {parseAddress-string} requirements." + }, + "id": 3281, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseAddress", + "nameLocation": "15362:15:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3263, + "mutability": "mutable", + "name": "input", + "nameLocation": "15392:5:14", + "nodeType": "VariableDeclaration", + "scope": 3281, + "src": "15378:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3262, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "15378:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "15377:21:14" + }, + "returnParameters": { + "id": 3269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3266, + "mutability": "mutable", + "name": "success", + "nameLocation": "15427:7:14", + "nodeType": "VariableDeclaration", + "scope": 3281, + "src": "15422:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3265, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15422:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3268, + "mutability": "mutable", + "name": "value", + "nameLocation": "15444:5:14", + "nodeType": "VariableDeclaration", + "scope": 3281, + "src": "15436:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3267, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15436:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "15421:29:14" + }, + "scope": 3678, + "src": "15353:168:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3384, + "nodeType": "Block", + "src": "15914:733:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3295, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "15928:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 3298, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "15940:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15934:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3296, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "15934:5:14", + "typeDescriptions": {} + } + }, + "id": 3299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15934:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15947:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "15934:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15928:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3302, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "15957:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 3303, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "15965:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15957:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "15928:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3313, + "nodeType": "IfStatement", + "src": "15924:72:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 3306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15978:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15993:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15985:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3307, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15985:7:14", + "typeDescriptions": {} + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15985:10:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 3311, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15977:19:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "functionReturnParameters": 3294, + "id": 3312, + "nodeType": "Return", + "src": "15970:26:14" + } + }, + { + "assignments": [ + 3315 + ], + "declarations": [ + { + "constant": false, + "id": 3315, + "mutability": "mutable", + "name": "hasPrefix", + "nameLocation": "16012:9:14", + "nodeType": "VariableDeclaration", + "scope": 3384, + "src": "16007:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3314, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16007:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 3338, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3316, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "16025:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3317, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16031:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 3318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16039:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "16031:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16025:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3321, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16024:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 3327, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "16081:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16075:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3325, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "16075:5:14", + "typeDescriptions": {} + } + }, + "id": 3328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16075:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3329, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16089:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3324, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "16052:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16052:43:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16045:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes2_$", + "typeString": "type(bytes2)" + }, + "typeName": { + "id": 3322, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "16045:6:14", + "typeDescriptions": {} + } + }, + "id": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16045:51:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "3078", + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16107:4:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39bef1777deb3dfb14f64b9f81ced092c501fee72f90e93d03bb95ee89df9837", + "typeString": "literal_string \"0x\"" + }, + "value": "0x" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_39bef1777deb3dfb14f64b9f81ced092c501fee72f90e93d03bb95ee89df9837", + "typeString": "literal_string \"0x\"" + } + ], + "id": 3333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16100:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes2_$", + "typeString": "type(bytes2)" + }, + "typeName": { + "id": 3332, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "16100:6:14", + "typeDescriptions": {} + } + }, + "id": 3335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16100:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "src": "16045:67:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16024:88:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16007:105:14" + }, + { + "assignments": [ + 3340 + ], + "declarations": [ + { + "constant": false, + "id": 3340, + "mutability": "mutable", + "name": "expectedLength", + "nameLocation": "16201:14:14", + "nodeType": "VariableDeclaration", + "scope": 3384, + "src": "16193:22:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3339, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16193:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3348, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3430", + "id": 3341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16218:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 3342, + "name": "hasPrefix", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3315, + "src": "16223:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16233:6:14", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "16223:16:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$attached_to$_t_bool_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16223:18:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "32", + "id": 3345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16244:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "16223:22:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16218:27:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16193:52:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3349, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "16310:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 3350, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16316:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16310:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3352, + "name": "expectedLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "16325:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16310:29:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3382, + "nodeType": "Block", + "src": "16590:51:14", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 3375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16612:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 3378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16627:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16619:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16619:7:14", + "typeDescriptions": {} + } + }, + "id": 3379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16619:10:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 3380, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16611:19:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "functionReturnParameters": 3294, + "id": 3381, + "nodeType": "Return", + "src": "16604:26:14" + } + ] + }, + "id": 3383, + "nodeType": "IfStatement", + "src": "16306:335:14", + "trueBody": { + "id": 3374, + "nodeType": "Block", + "src": "16341:243:14", + "statements": [ + { + "assignments": [ + 3355, + 3357 + ], + "declarations": [ + { + "constant": false, + "id": 3355, + "mutability": "mutable", + "name": "s", + "nameLocation": "16462:1:14", + "nodeType": "VariableDeclaration", + "scope": 3374, + "src": "16457:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3354, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16457:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3357, + "mutability": "mutable", + "name": "v", + "nameLocation": "16473:1:14", + "nodeType": "VariableDeclaration", + "scope": 3374, + "src": "16465:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16465:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3363, + "initialValue": { + "arguments": [ + { + "id": 3359, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "16510:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3360, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16517:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3361, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "16524:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3358, + "name": "_tryParseHexUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3210, + "src": "16478:31:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 3362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16478:50:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16456:72:14" + }, + { + "expression": { + "components": [ + { + "id": 3364, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3355, + "src": "16550:1:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 3369, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3357, + "src": "16569:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16561:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 3367, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "16561:7:14", + "typeDescriptions": {} + } + }, + "id": 3370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16561:10:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 3366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16553:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16553:7:14", + "typeDescriptions": {} + } + }, + "id": 3371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16553:19:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 3372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16549:24:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "functionReturnParameters": 3294, + "id": 3373, + "nodeType": "Return", + "src": "16542:31:14" + } + ] + } + } + ] + }, + "documentation": { + "id": 3282, + "nodeType": "StructuredDocumentation", + "src": "15527:226:14", + "text": " @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n formatted address. See {parseAddress-string-uint256-uint256} requirements." + }, + "id": 3385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseAddress", + "nameLocation": "15767:15:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3289, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3284, + "mutability": "mutable", + "name": "input", + "nameLocation": "15806:5:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15792:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "15792:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3286, + "mutability": "mutable", + "name": "begin", + "nameLocation": "15829:5:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15821:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3285, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15821:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3288, + "mutability": "mutable", + "name": "end", + "nameLocation": "15852:3:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15844:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15844:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15782:79:14" + }, + "returnParameters": { + "id": 3294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3291, + "mutability": "mutable", + "name": "success", + "nameLocation": "15890:7:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15885:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3290, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15885:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3293, + "mutability": "mutable", + "name": "value", + "nameLocation": "15907:5:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15899:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3292, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15899:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "15884:29:14" + }, + "scope": 3678, + "src": "15758:889:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3444, + "nodeType": "Block", + "src": "16716:461:14", + "statements": [ + { + "assignments": [ + 3393 + ], + "declarations": [ + { + "constant": false, + "id": 3393, + "mutability": "mutable", + "name": "value", + "nameLocation": "16732:5:14", + "nodeType": "VariableDeclaration", + "scope": 3444, + "src": "16726:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3392, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16726:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3398, + "initialValue": { + "arguments": [ + { + "id": 3396, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3387, + "src": "16746:3:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16740:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3394, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16740:5:14", + "typeDescriptions": {} + } + }, + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16740:10:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16726:24:14" + }, + { + "id": 3441, + "nodeType": "UncheckedBlock", + "src": "16910:238:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3399, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "16938:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3437", + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16946:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_47_by_1", + "typeString": "int_const 47" + }, + "value": "47" + }, + "src": "16938:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3402, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "16952:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "3538", + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16960:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_58_by_1", + "typeString": "int_const 58" + }, + "value": "58" + }, + "src": "16952:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16938:24:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3410, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "16998:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3936", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17006:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + "src": "16998:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3413, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17012:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "313033", + "id": 3414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17020:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_103_by_1", + "typeString": "int_const 103" + }, + "value": "103" + }, + "src": "17012:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16998:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3421, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17059:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3634", + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17067:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "17059:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3424, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17073:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "3731", + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17081:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_71_by_1", + "typeString": "int_const 71" + }, + "value": "71" + }, + "src": "17073:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17059:24:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "expression": { + "arguments": [ + { + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17127:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3433, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "17127:5:14", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + } + ], + "id": 3432, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "17122:4:14", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17122:11:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint8", + "typeString": "type(uint8)" + } + }, + "id": 3436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "17134:3:14", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "17122:15:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3391, + "id": 3437, + "nodeType": "Return", + "src": "17115:22:14" + }, + "id": 3438, + "nodeType": "IfStatement", + "src": "17055:82:14", + "trueBody": { + "expression": { + "id": 3430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3428, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17085:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "3535", + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17094:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_55_by_1", + "typeString": "int_const 55" + }, + "value": "55" + }, + "src": "17085:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3431, + "nodeType": "ExpressionStatement", + "src": "17085:11:14" + } + }, + "id": 3439, + "nodeType": "IfStatement", + "src": "16994:143:14", + "trueBody": { + "expression": { + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3417, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17025:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "3837", + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17034:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_87_by_1", + "typeString": "int_const 87" + }, + "value": "87" + }, + "src": "17025:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3420, + "nodeType": "ExpressionStatement", + "src": "17025:11:14" + } + }, + "id": 3440, + "nodeType": "IfStatement", + "src": "16934:203:14", + "trueBody": { + "expression": { + "id": 3408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3406, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "16964:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "3438", + "id": 3407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16973:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "src": "16964:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3409, + "nodeType": "ExpressionStatement", + "src": "16964:11:14" + } + } + ] + }, + { + "expression": { + "id": 3442, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17165:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3391, + "id": 3443, + "nodeType": "Return", + "src": "17158:12:14" + } + ] + }, + "id": 3445, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_tryParseChr", + "nameLocation": "16662:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3388, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3387, + "mutability": "mutable", + "name": "chr", + "nameLocation": "16682:3:14", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "16675:10:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 3386, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "16675:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "16674:12:14" + }, + "returnParameters": { + "id": 3391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3390, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "16709:5:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3389, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16709:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "16708:7:14" + }, + "scope": 3678, + "src": "16653:524:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3652, + "nodeType": "Block", + "src": "17984:2333:14", + "statements": [ + { + "assignments": [ + 3454 + ], + "declarations": [ + { + "constant": false, + "id": 3454, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "18007:6:14", + "nodeType": "VariableDeclaration", + "scope": 3652, + "src": "17994:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3453, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "17994:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 3459, + "initialValue": { + "arguments": [ + { + "id": 3457, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3448, + "src": "18022:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18016:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3455, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18016:5:14", + "typeDescriptions": {} + } + }, + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18016:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17994:34:14" + }, + { + "assignments": [ + 3461 + ], + "declarations": [ + { + "constant": false, + "id": 3461, + "mutability": "mutable", + "name": "output", + "nameLocation": "18318:6:14", + "nodeType": "VariableDeclaration", + "scope": 3652, + "src": "18305:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3460, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18305:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 3462, + "nodeType": "VariableDeclarationStatement", + "src": "18305:19:14" + }, + { + "AST": { + "nativeSrc": "18359:45:14", + "nodeType": "YulBlock", + "src": "18359:45:14", + "statements": [ + { + "nativeSrc": "18373:21:14", + "nodeType": "YulAssignment", + "src": "18373:21:14", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "18389:4:14", + "nodeType": "YulLiteral", + "src": "18389:4:14", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "18383:5:14", + "nodeType": "YulIdentifier", + "src": "18383:5:14" + }, + "nativeSrc": "18383:11:14", + "nodeType": "YulFunctionCall", + "src": "18383:11:14" + }, + "variableNames": [ + { + "name": "output", + "nativeSrc": "18373:6:14", + "nodeType": "YulIdentifier", + "src": "18373:6:14" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3461, + "isOffset": false, + "isSlot": false, + "src": "18373:6:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3463, + "nodeType": "InlineAssembly", + "src": "18334:70:14" + }, + { + "assignments": [ + 3465 + ], + "declarations": [ + { + "constant": false, + "id": 3465, + "mutability": "mutable", + "name": "outputLength", + "nameLocation": "18421:12:14", + "nodeType": "VariableDeclaration", + "scope": 3652, + "src": "18413:20:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3464, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18413:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3467, + "initialValue": { + "hexValue": "30", + "id": 3466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18436:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "18413:24:14" + }, + { + "body": { + "id": 3644, + "nodeType": "Block", + "src": "18492:1584:14", + "statements": [ + { + "assignments": [ + 3480 + ], + "declarations": [ + { + "constant": false, + "id": 3480, + "mutability": "mutable", + "name": "char", + "nameLocation": "18512:4:14", + "nodeType": "VariableDeclaration", + "scope": 3644, + "src": "18506:10:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3479, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "18506:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3491, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 3486, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "18555:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3487, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "18563:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3485, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "18532:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 3488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18532:33:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18525:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 3483, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "18525:6:14", + "typeDescriptions": {} + } + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18525:41:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18519:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3481, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "18519:5:14", + "typeDescriptions": {} + } + }, + "id": 3490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18519:48:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18506:61:14" + }, + { + "condition": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3492, + "name": "SPECIAL_CHARS_LOOKUP", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2200, + "src": "18587:20:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 3493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18611:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "id": 3494, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "18616:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "18611:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3496, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18610:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18587:34:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3498, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18586:36:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 3499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18626:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "18586:41:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3501, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18585:43:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3642, + "nodeType": "Block", + "src": "19972:94:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3633, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "20014:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "20022:14:14", + "subExpression": { + "id": 3634, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "20022:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 3638, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "20045:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20038:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 3636, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "20038:6:14", + "typeDescriptions": {} + } + }, + "id": 3639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20038:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3632, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19990:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19990:61:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3641, + "nodeType": "ExpressionStatement", + "src": "19990:61:14" + } + ] + }, + "id": 3643, + "nodeType": "IfStatement", + "src": "18581:1485:14", + "trueBody": { + "id": 3631, + "nodeType": "Block", + "src": "18630:1336:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3503, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "18672:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18680:14:14", + "subExpression": { + "id": 3504, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "18680:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "5c", + "id": 3506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18696:4:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_731553fa98541ade8b78284229adfe09a819380dee9244baac20dd1e0aa24095", + "typeString": "literal_string \"\\\"" + }, + "value": "\\" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_731553fa98541ade8b78284229adfe09a819380dee9244baac20dd1e0aa24095", + "typeString": "literal_string \"\\\"" + } + ], + "id": 3502, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "18648:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18648:53:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3508, + "nodeType": "ExpressionStatement", + "src": "18648:53:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3509, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "18723:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783038", + "id": 3510, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18731:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "0x08" + }, + "src": "18723:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3519, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "18816:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783039", + "id": 3520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18824:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_9_by_1", + "typeString": "int_const 9" + }, + "value": "0x09" + }, + "src": "18816:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3529, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "18909:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783061", + "id": 3530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18917:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "0x0a" + }, + "src": "18909:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3539, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19002:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783063", + "id": 3540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19010:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_12_by_1", + "typeString": "int_const 12" + }, + "value": "0x0c" + }, + "src": "19002:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3549, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19095:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783064", + "id": 3550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19103:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_13_by_1", + "typeString": "int_const 13" + }, + "value": "0x0d" + }, + "src": "19095:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3559, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19188:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783563", + "id": 3560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19196:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_92_by_1", + "typeString": "int_const 92" + }, + "value": "0x5c" + }, + "src": "19188:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3569, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19282:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783232", + "id": 3570, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19290:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "0x22" + }, + "src": "19282:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3623, + "nodeType": "Block", + "src": "19451:501:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3581, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19571:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19579:14:14", + "subExpression": { + "id": 3582, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19579:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "75", + "id": 3584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19595:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32cefdcd8e794145c9af8dd1f4b1fbd92d6e547ae855553080fc8bd19c4883a0", + "typeString": "literal_string \"u\"" + }, + "value": "u" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_32cefdcd8e794145c9af8dd1f4b1fbd92d6e547ae855553080fc8bd19c4883a0", + "typeString": "literal_string \"u\"" + } + ], + "id": 3580, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19547:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19547:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3586, + "nodeType": "ExpressionStatement", + "src": "19547:52:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3588, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19645:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19653:14:14", + "subExpression": { + "id": 3589, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19653:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 3591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19669:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + } + ], + "id": 3587, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19621:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19621:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3593, + "nodeType": "ExpressionStatement", + "src": "19621:52:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3595, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19719:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19727:14:14", + "subExpression": { + "id": 3596, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19727:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 3598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19743:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + } + ], + "id": 3594, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19695:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19695:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3600, + "nodeType": "ExpressionStatement", + "src": "19695:52:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3602, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19793:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19801:14:14", + "subExpression": { + "id": 3603, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19801:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 3605, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "19817:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 3609, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3606, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19828:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "34", + "id": 3607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19836:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "19828:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19817:21:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3601, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19769:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19769:70:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3611, + "nodeType": "ExpressionStatement", + "src": "19769:70:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3613, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19885:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19893:14:14", + "subExpression": { + "id": 3614, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19893:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 3616, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "19909:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 3620, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3617, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19920:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783066", + "id": 3618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19927:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0x0f" + }, + "src": "19920:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19909:23:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3612, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19861:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19861:72:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3622, + "nodeType": "ExpressionStatement", + "src": "19861:72:14" + } + ] + }, + "id": 3624, + "nodeType": "IfStatement", + "src": "19278:674:14", + "trueBody": { + "id": 3579, + "nodeType": "Block", + "src": "19296:149:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3573, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19398:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19406:14:14", + "subExpression": { + "id": 3574, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19406:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "22", + "id": 3576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19422:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0", + "typeString": "literal_string \"\"\"" + }, + "value": "\"" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0", + "typeString": "literal_string \"\"\"" + } + ], + "id": 3572, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19374:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19374:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3578, + "nodeType": "ExpressionStatement", + "src": "19374:52:14" + } + ] + } + }, + "id": 3625, + "nodeType": "IfStatement", + "src": "19184:768:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3563, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19226:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19234:14:14", + "subExpression": { + "id": 3564, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19234:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "5c", + "id": 3566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19250:4:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_731553fa98541ade8b78284229adfe09a819380dee9244baac20dd1e0aa24095", + "typeString": "literal_string \"\\\"" + }, + "value": "\\" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_731553fa98541ade8b78284229adfe09a819380dee9244baac20dd1e0aa24095", + "typeString": "literal_string \"\\\"" + } + ], + "id": 3562, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19202:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19202:53:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3568, + "nodeType": "ExpressionStatement", + "src": "19202:53:14" + } + }, + "id": 3626, + "nodeType": "IfStatement", + "src": "19091:861:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3553, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19133:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19141:14:14", + "subExpression": { + "id": 3554, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19141:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "72", + "id": 3556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19157:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_414f72a4d550cad29f17d9d99a4af64b3776ec5538cd440cef0f03fef2e9e010", + "typeString": "literal_string \"r\"" + }, + "value": "r" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_414f72a4d550cad29f17d9d99a4af64b3776ec5538cd440cef0f03fef2e9e010", + "typeString": "literal_string \"r\"" + } + ], + "id": 3552, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19109:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19109:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3558, + "nodeType": "ExpressionStatement", + "src": "19109:52:14" + } + }, + "id": 3627, + "nodeType": "IfStatement", + "src": "18998:954:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3543, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19040:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19048:14:14", + "subExpression": { + "id": 3544, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19048:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "66", + "id": 3546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19064:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d1e8aeb79500496ef3dc2e57ba746a8315d048b7a664a2bf948db4fa91960483", + "typeString": "literal_string \"f\"" + }, + "value": "f" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_d1e8aeb79500496ef3dc2e57ba746a8315d048b7a664a2bf948db4fa91960483", + "typeString": "literal_string \"f\"" + } + ], + "id": 3542, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19016:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19016:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3548, + "nodeType": "ExpressionStatement", + "src": "19016:52:14" + } + }, + "id": 3628, + "nodeType": "IfStatement", + "src": "18905:1047:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3533, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "18947:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18955:14:14", + "subExpression": { + "id": 3534, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "18955:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "6e", + "id": 3536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18971:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4b4ecedb4964a40fe416b16c7bd8b46092040ec42ef0aa69e59f09872f105cf3", + "typeString": "literal_string \"n\"" + }, + "value": "n" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_4b4ecedb4964a40fe416b16c7bd8b46092040ec42ef0aa69e59f09872f105cf3", + "typeString": "literal_string \"n\"" + } + ], + "id": 3532, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "18923:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18923:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3538, + "nodeType": "ExpressionStatement", + "src": "18923:52:14" + } + }, + "id": 3629, + "nodeType": "IfStatement", + "src": "18812:1140:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3523, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "18854:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18862:14:14", + "subExpression": { + "id": 3524, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "18862:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "74", + "id": 3526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18878:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cac1bb71f0a97c8ac94ca9546b43178a9ad254c7b757ac07433aa6df35cd8089", + "typeString": "literal_string \"t\"" + }, + "value": "t" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_cac1bb71f0a97c8ac94ca9546b43178a9ad254c7b757ac07433aa6df35cd8089", + "typeString": "literal_string \"t\"" + } + ], + "id": 3522, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "18830:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18830:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3528, + "nodeType": "ExpressionStatement", + "src": "18830:52:14" + } + }, + "id": 3630, + "nodeType": "IfStatement", + "src": "18719:1233:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3513, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "18761:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18769:14:14", + "subExpression": { + "id": 3514, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "18769:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "62", + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18785:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b5553de315e0edf504d9150af82dafa5c4667fa618ed0a6f19c69b41166c5510", + "typeString": "literal_string \"b\"" + }, + "value": "b" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_b5553de315e0edf504d9150af82dafa5c4667fa618ed0a6f19c69b41166c5510", + "typeString": "literal_string \"b\"" + } + ], + "id": 3512, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "18737:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18737:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3518, + "nodeType": "ExpressionStatement", + "src": "18737:52:14" + } + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3472, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "18468:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 3473, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "18472:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "18479:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "18472:13:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18468:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3645, + "initializationExpression": { + "assignments": [ + 3469 + ], + "declarations": [ + { + "constant": false, + "id": 3469, + "mutability": "mutable", + "name": "i", + "nameLocation": "18461:1:14", + "nodeType": "VariableDeclaration", + "scope": 3645, + "src": "18453:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3468, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18453:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3471, + "initialValue": { + "hexValue": "30", + "id": 3470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18465:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "18453:13:14" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 3477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "18487:3:14", + "subExpression": { + "id": 3476, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "18489:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3478, + "nodeType": "ExpressionStatement", + "src": "18487:3:14" + }, + "nodeType": "ForStatement", + "src": "18448:1628:14" + }, + { + "AST": { + "nativeSrc": "20164:115:14", + "nodeType": "YulBlock", + "src": "20164:115:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "output", + "nativeSrc": "20185:6:14", + "nodeType": "YulIdentifier", + "src": "20185:6:14" + }, + { + "name": "outputLength", + "nativeSrc": "20193:12:14", + "nodeType": "YulIdentifier", + "src": "20193:12:14" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "20178:6:14", + "nodeType": "YulIdentifier", + "src": "20178:6:14" + }, + "nativeSrc": "20178:28:14", + "nodeType": "YulFunctionCall", + "src": "20178:28:14" + }, + "nativeSrc": "20178:28:14", + "nodeType": "YulExpressionStatement", + "src": "20178:28:14" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "20226:4:14", + "nodeType": "YulLiteral", + "src": "20226:4:14", + "type": "", + "value": "0x40" + }, + { + "arguments": [ + { + "name": "output", + "nativeSrc": "20236:6:14", + "nodeType": "YulIdentifier", + "src": "20236:6:14" + }, + { + "arguments": [ + { + "name": "outputLength", + "nativeSrc": "20248:12:14", + "nodeType": "YulIdentifier", + "src": "20248:12:14" + }, + { + "kind": "number", + "nativeSrc": "20262:4:14", + "nodeType": "YulLiteral", + "src": "20262:4:14", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20244:3:14", + "nodeType": "YulIdentifier", + "src": "20244:3:14" + }, + "nativeSrc": "20244:23:14", + "nodeType": "YulFunctionCall", + "src": "20244:23:14" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20232:3:14", + "nodeType": "YulIdentifier", + "src": "20232:3:14" + }, + "nativeSrc": "20232:36:14", + "nodeType": "YulFunctionCall", + "src": "20232:36:14" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "20219:6:14", + "nodeType": "YulIdentifier", + "src": "20219:6:14" + }, + "nativeSrc": "20219:50:14", + "nodeType": "YulFunctionCall", + "src": "20219:50:14" + }, + "nativeSrc": "20219:50:14", + "nodeType": "YulExpressionStatement", + "src": "20219:50:14" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3461, + "isOffset": false, + "isSlot": false, + "src": "20185:6:14", + "valueSize": 1 + }, + { + "declaration": 3461, + "isOffset": false, + "isSlot": false, + "src": "20236:6:14", + "valueSize": 1 + }, + { + "declaration": 3465, + "isOffset": false, + "isSlot": false, + "src": "20193:12:14", + "valueSize": 1 + }, + { + "declaration": 3465, + "isOffset": false, + "isSlot": false, + "src": "20248:12:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3646, + "nodeType": "InlineAssembly", + "src": "20139:140:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3649, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "20303:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3648, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20296:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 3647, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "20296:6:14", + "typeDescriptions": {} + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20296:14:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3452, + "id": 3651, + "nodeType": "Return", + "src": "20289:21:14" + } + ] + }, + "documentation": { + "id": 3446, + "nodeType": "StructuredDocumentation", + "src": "17183:717:14", + "text": " @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n NOTE: This function escapes backslashes (including those in \\uXXXX sequences) and the characters in ranges\n defined in section 2.5 of RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). All control characters in U+0000\n to U+001F are escaped (\\b, \\t, \\n, \\f, \\r use short form; others use \\u00XX). ECMAScript's `JSON.parse` does\n recover escaped unicode characters that are not in this range, but other tooling may provide different results." + }, + "id": 3653, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "escapeJSON", + "nameLocation": "17914:10:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3448, + "mutability": "mutable", + "name": "input", + "nameLocation": "17939:5:14", + "nodeType": "VariableDeclaration", + "scope": 3653, + "src": "17925:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3447, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "17925:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "17924:21:14" + }, + "returnParameters": { + "id": 3452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3451, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3653, + "src": "17969:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3450, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "17969:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "17968:15:14" + }, + "scope": 3678, + "src": "17905:2412:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3664, + "nodeType": "Block", + "src": "20702:225:14", + "statements": [ + { + "AST": { + "nativeSrc": "20851:70:14", + "nodeType": "YulBlock", + "src": "20851:70:14", + "statements": [ + { + "nativeSrc": "20865:46:14", + "nodeType": "YulAssignment", + "src": "20865:46:14", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "20888:6:14", + "nodeType": "YulIdentifier", + "src": "20888:6:14" + }, + { + "kind": "number", + "nativeSrc": "20896:4:14", + "nodeType": "YulLiteral", + "src": "20896:4:14", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20884:3:14", + "nodeType": "YulIdentifier", + "src": "20884:3:14" + }, + "nativeSrc": "20884:17:14", + "nodeType": "YulFunctionCall", + "src": "20884:17:14" + }, + { + "name": "offset", + "nativeSrc": "20903:6:14", + "nodeType": "YulIdentifier", + "src": "20903:6:14" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20880:3:14", + "nodeType": "YulIdentifier", + "src": "20880:3:14" + }, + "nativeSrc": "20880:30:14", + "nodeType": "YulFunctionCall", + "src": "20880:30:14" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "20874:5:14", + "nodeType": "YulIdentifier", + "src": "20874:5:14" + }, + "nativeSrc": "20874:37:14", + "nodeType": "YulFunctionCall", + "src": "20874:37:14" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "20865:5:14", + "nodeType": "YulIdentifier", + "src": "20865:5:14" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3656, + "isOffset": false, + "isSlot": false, + "src": "20888:6:14", + "valueSize": 1 + }, + { + "declaration": 3658, + "isOffset": false, + "isSlot": false, + "src": "20903:6:14", + "valueSize": 1 + }, + { + "declaration": 3661, + "isOffset": false, + "isSlot": false, + "src": "20865:5:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3663, + "nodeType": "InlineAssembly", + "src": "20826:95:14" + } + ] + }, + "documentation": { + "id": 3654, + "nodeType": "StructuredDocumentation", + "src": "20323:268:14", + "text": " @dev Reads a bytes32 from a bytes array without bounds checking.\n NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n assembly block as such would prevent some optimizations." + }, + "id": 3665, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_unsafeReadBytesOffset", + "nameLocation": "20605:22:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3659, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3656, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "20641:6:14", + "nodeType": "VariableDeclaration", + "scope": 3665, + "src": "20628:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3655, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "20628:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3658, + "mutability": "mutable", + "name": "offset", + "nameLocation": "20657:6:14", + "nodeType": "VariableDeclaration", + "scope": 3665, + "src": "20649:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3657, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20649:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "20627:37:14" + }, + "returnParameters": { + "id": 3662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3661, + "mutability": "mutable", + "name": "value", + "nameLocation": "20695:5:14", + "nodeType": "VariableDeclaration", + "scope": 3665, + "src": "20687:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3660, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "20687:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "20686:15:14" + }, + "scope": 3678, + "src": "20596:331:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3676, + "nodeType": "Block", + "src": "21300:235:14", + "statements": [ + { + "AST": { + "nativeSrc": "21449:80:14", + "nodeType": "YulBlock", + "src": "21449:80:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "21479:6:14", + "nodeType": "YulIdentifier", + "src": "21479:6:14" + }, + { + "kind": "number", + "nativeSrc": "21487:4:14", + "nodeType": "YulLiteral", + "src": "21487:4:14", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "21475:3:14", + "nodeType": "YulIdentifier", + "src": "21475:3:14" + }, + "nativeSrc": "21475:17:14", + "nodeType": "YulFunctionCall", + "src": "21475:17:14" + }, + { + "name": "offset", + "nativeSrc": "21494:6:14", + "nodeType": "YulIdentifier", + "src": "21494:6:14" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "21471:3:14", + "nodeType": "YulIdentifier", + "src": "21471:3:14" + }, + "nativeSrc": "21471:30:14", + "nodeType": "YulFunctionCall", + "src": "21471:30:14" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "21507:3:14", + "nodeType": "YulLiteral", + "src": "21507:3:14", + "type": "", + "value": "248" + }, + { + "name": "value", + "nativeSrc": "21512:5:14", + "nodeType": "YulIdentifier", + "src": "21512:5:14" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "21503:3:14", + "nodeType": "YulIdentifier", + "src": "21503:3:14" + }, + "nativeSrc": "21503:15:14", + "nodeType": "YulFunctionCall", + "src": "21503:15:14" + } + ], + "functionName": { + "name": "mstore8", + "nativeSrc": "21463:7:14", + "nodeType": "YulIdentifier", + "src": "21463:7:14" + }, + "nativeSrc": "21463:56:14", + "nodeType": "YulFunctionCall", + "src": "21463:56:14" + }, + "nativeSrc": "21463:56:14", + "nodeType": "YulExpressionStatement", + "src": "21463:56:14" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3668, + "isOffset": false, + "isSlot": false, + "src": "21479:6:14", + "valueSize": 1 + }, + { + "declaration": 3670, + "isOffset": false, + "isSlot": false, + "src": "21494:6:14", + "valueSize": 1 + }, + { + "declaration": 3672, + "isOffset": false, + "isSlot": false, + "src": "21512:5:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3675, + "nodeType": "InlineAssembly", + "src": "21424:105:14" + } + ] + }, + "documentation": { + "id": 3666, + "nodeType": "StructuredDocumentation", + "src": "20933:265:14", + "text": " @dev Write a bytes1 to a bytes array without bounds checking.\n NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n assembly block as such would prevent some optimizations." + }, + "id": 3677, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_unsafeWriteBytesOffset", + "nameLocation": "21212:23:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3668, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "21249:6:14", + "nodeType": "VariableDeclaration", + "scope": 3677, + "src": "21236:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3667, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "21236:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3670, + "mutability": "mutable", + "name": "offset", + "nameLocation": "21265:6:14", + "nodeType": "VariableDeclaration", + "scope": 3677, + "src": "21257:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21257:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3672, + "mutability": "mutable", + "name": "value", + "nameLocation": "21280:5:14", + "nodeType": "VariableDeclaration", + "scope": 3677, + "src": "21273:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 3671, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "21273:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "21235:51:14" + }, + "returnParameters": { + "id": 3674, + "nodeType": "ParameterList", + "parameters": [], + "src": "21300:0:14" + }, + "scope": 3678, + "src": "21203:332:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 3679, + "src": "332:21205:14", + "usedErrors": [ + 2207, + 2210, + 2213 + ], + "usedEvents": [] + } + ], + "src": "101:21437:14" + }, + "id": 14 + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", + "exportedSymbols": { + "ECDSA": [ + 4137 + ] + }, + "id": 4138, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3680, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "112:24:15" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ECDSA", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 3681, + "nodeType": "StructuredDocumentation", + "src": "138:205:15", + "text": " @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n These functions can be used to verify that a message was signed by the holder\n of the private keys of a given address." + }, + "fullyImplemented": true, + "id": 4137, + "linearizedBaseContracts": [ + 4137 + ], + "name": "ECDSA", + "nameLocation": "352:5:15", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ECDSA.RecoverError", + "id": 3686, + "members": [ + { + "id": 3682, + "name": "NoError", + "nameLocation": "392:7:15", + "nodeType": "EnumValue", + "src": "392:7:15" + }, + { + "id": 3683, + "name": "InvalidSignature", + "nameLocation": "409:16:15", + "nodeType": "EnumValue", + "src": "409:16:15" + }, + { + "id": 3684, + "name": "InvalidSignatureLength", + "nameLocation": "435:22:15", + "nodeType": "EnumValue", + "src": "435:22:15" + }, + { + "id": 3685, + "name": "InvalidSignatureS", + "nameLocation": "467:17:15", + "nodeType": "EnumValue", + "src": "467:17:15" + } + ], + "name": "RecoverError", + "nameLocation": "369:12:15", + "nodeType": "EnumDefinition", + "src": "364:126:15" + }, + { + "documentation": { + "id": 3687, + "nodeType": "StructuredDocumentation", + "src": "496:49:15", + "text": " @dev The signature is invalid." + }, + "errorSelector": "f645eedf", + "id": 3689, + "name": "ECDSAInvalidSignature", + "nameLocation": "556:21:15", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 3688, + "nodeType": "ParameterList", + "parameters": [], + "src": "577:2:15" + }, + "src": "550:30:15" + }, + { + "documentation": { + "id": 3690, + "nodeType": "StructuredDocumentation", + "src": "586:60:15", + "text": " @dev The signature has an invalid length." + }, + "errorSelector": "fce698f7", + "id": 3694, + "name": "ECDSAInvalidSignatureLength", + "nameLocation": "657:27:15", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 3693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3692, + "mutability": "mutable", + "name": "length", + "nameLocation": "693:6:15", + "nodeType": "VariableDeclaration", + "scope": 3694, + "src": "685:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3691, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "685:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "684:16:15" + }, + "src": "651:50:15" + }, + { + "documentation": { + "id": 3695, + "nodeType": "StructuredDocumentation", + "src": "707:85:15", + "text": " @dev The signature has an S value that is in the upper half order." + }, + "errorSelector": "d78bce0c", + "id": 3699, + "name": "ECDSAInvalidSignatureS", + "nameLocation": "803:22:15", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 3698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3697, + "mutability": "mutable", + "name": "s", + "nameLocation": "834:1:15", + "nodeType": "VariableDeclaration", + "scope": 3699, + "src": "826:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3696, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "826:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "825:11:15" + }, + "src": "797:40:15" + }, + { + "body": { + "id": 3751, + "nodeType": "Block", + "src": "2575:622:15", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3714, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3704, + "src": "2589:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2599:6:15", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2589:16:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "3635", + "id": 3716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2609:2:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "65" + }, + "src": "2589:22:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3749, + "nodeType": "Block", + "src": "3083:108:15", + "statements": [ + { + "expression": { + "components": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 3738, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3105:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3105:7:15", + "typeDescriptions": {} + } + }, + "id": 3739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3105:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3740, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "3117:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3130:22:15", + "memberName": "InvalidSignatureLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 3684, + "src": "3117:35:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "arguments": [ + { + "expression": { + "id": 3744, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3704, + "src": "3162:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3172:6:15", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3162:16:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3154:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 3742, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3154:7:15", + "typeDescriptions": {} + } + }, + "id": 3746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3154:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 3747, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3104:76:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3713, + "id": 3748, + "nodeType": "Return", + "src": "3097:83:15" + } + ] + }, + "id": 3750, + "nodeType": "IfStatement", + "src": "2585:606:15", + "trueBody": { + "id": 3735, + "nodeType": "Block", + "src": "2613:464:15", + "statements": [ + { + "assignments": [ + 3719 + ], + "declarations": [ + { + "constant": false, + "id": 3719, + "mutability": "mutable", + "name": "r", + "nameLocation": "2635:1:15", + "nodeType": "VariableDeclaration", + "scope": 3735, + "src": "2627:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3718, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2627:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3720, + "nodeType": "VariableDeclarationStatement", + "src": "2627:9:15" + }, + { + "assignments": [ + 3722 + ], + "declarations": [ + { + "constant": false, + "id": 3722, + "mutability": "mutable", + "name": "s", + "nameLocation": "2658:1:15", + "nodeType": "VariableDeclaration", + "scope": 3735, + "src": "2650:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3721, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2650:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3723, + "nodeType": "VariableDeclarationStatement", + "src": "2650:9:15" + }, + { + "assignments": [ + 3725 + ], + "declarations": [ + { + "constant": false, + "id": 3725, + "mutability": "mutable", + "name": "v", + "nameLocation": "2679:1:15", + "nodeType": "VariableDeclaration", + "scope": 3735, + "src": "2673:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3724, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2673:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3726, + "nodeType": "VariableDeclarationStatement", + "src": "2673:7:15" + }, + { + "AST": { + "nativeSrc": "2850:171:15", + "nodeType": "YulBlock", + "src": "2850:171:15", + "statements": [ + { + "nativeSrc": "2868:32:15", + "nodeType": "YulAssignment", + "src": "2868:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "2883:9:15", + "nodeType": "YulIdentifier", + "src": "2883:9:15" + }, + { + "kind": "number", + "nativeSrc": "2894:4:15", + "nodeType": "YulLiteral", + "src": "2894:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2879:3:15", + "nodeType": "YulIdentifier", + "src": "2879:3:15" + }, + "nativeSrc": "2879:20:15", + "nodeType": "YulFunctionCall", + "src": "2879:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2873:5:15", + "nodeType": "YulIdentifier", + "src": "2873:5:15" + }, + "nativeSrc": "2873:27:15", + "nodeType": "YulFunctionCall", + "src": "2873:27:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "2868:1:15", + "nodeType": "YulIdentifier", + "src": "2868:1:15" + } + ] + }, + { + "nativeSrc": "2917:32:15", + "nodeType": "YulAssignment", + "src": "2917:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "2932:9:15", + "nodeType": "YulIdentifier", + "src": "2932:9:15" + }, + { + "kind": "number", + "nativeSrc": "2943:4:15", + "nodeType": "YulLiteral", + "src": "2943:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2928:3:15", + "nodeType": "YulIdentifier", + "src": "2928:3:15" + }, + "nativeSrc": "2928:20:15", + "nodeType": "YulFunctionCall", + "src": "2928:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2922:5:15", + "nodeType": "YulIdentifier", + "src": "2922:5:15" + }, + "nativeSrc": "2922:27:15", + "nodeType": "YulFunctionCall", + "src": "2922:27:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "2917:1:15", + "nodeType": "YulIdentifier", + "src": "2917:1:15" + } + ] + }, + { + "nativeSrc": "2966:41:15", + "nodeType": "YulAssignment", + "src": "2966:41:15", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2976:1:15", + "nodeType": "YulLiteral", + "src": "2976:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "2989:9:15", + "nodeType": "YulIdentifier", + "src": "2989:9:15" + }, + { + "kind": "number", + "nativeSrc": "3000:4:15", + "nodeType": "YulLiteral", + "src": "3000:4:15", + "type": "", + "value": "0x60" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2985:3:15", + "nodeType": "YulIdentifier", + "src": "2985:3:15" + }, + "nativeSrc": "2985:20:15", + "nodeType": "YulFunctionCall", + "src": "2985:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2979:5:15", + "nodeType": "YulIdentifier", + "src": "2979:5:15" + }, + "nativeSrc": "2979:27:15", + "nodeType": "YulFunctionCall", + "src": "2979:27:15" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "2971:4:15", + "nodeType": "YulIdentifier", + "src": "2971:4:15" + }, + "nativeSrc": "2971:36:15", + "nodeType": "YulFunctionCall", + "src": "2971:36:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "2966:1:15", + "nodeType": "YulIdentifier", + "src": "2966:1:15" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3719, + "isOffset": false, + "isSlot": false, + "src": "2868:1:15", + "valueSize": 1 + }, + { + "declaration": 3722, + "isOffset": false, + "isSlot": false, + "src": "2917:1:15", + "valueSize": 1 + }, + { + "declaration": 3704, + "isOffset": false, + "isSlot": false, + "src": "2883:9:15", + "valueSize": 1 + }, + { + "declaration": 3704, + "isOffset": false, + "isSlot": false, + "src": "2932:9:15", + "valueSize": 1 + }, + { + "declaration": 3704, + "isOffset": false, + "isSlot": false, + "src": "2989:9:15", + "valueSize": 1 + }, + { + "declaration": 3725, + "isOffset": false, + "isSlot": false, + "src": "2966:1:15", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3727, + "nodeType": "InlineAssembly", + "src": "2825:196:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3729, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3702, + "src": "3052:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3730, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3725, + "src": "3058:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3731, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3719, + "src": "3061:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3732, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3722, + "src": "3064:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3728, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 4023, + "src": "3041:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3041:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3713, + "id": 3734, + "nodeType": "Return", + "src": "3034:32:15" + } + ] + } + } + ] + }, + "documentation": { + "id": 3700, + "nodeType": "StructuredDocumentation", + "src": "843:1571:15", + "text": " @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n return address(0) without also returning an error description. Errors are documented using an enum (error type)\n and a bytes32 providing additional information about the error.\n If no error is returned, then the address can be used for verification purposes.\n The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n this function rejects them by requiring the `s` value to be in the lower\n half order, and the `v` value to be either 27 or 28.\n NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n invalidation or nonces for replay protection.\n IMPORTANT: `hash` _must_ be the result of a hash operation for the\n verification to be secure: it is possible to craft signatures that\n recover to arbitrary addresses for non-hashed data. A safe way to ensure\n this is by receiving a hash of the original message (which may otherwise\n be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n Documentation for signature generation:\n - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]" + }, + "id": 3752, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryRecover", + "nameLocation": "2428:10:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3702, + "mutability": "mutable", + "name": "hash", + "nameLocation": "2456:4:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2448:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3701, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2448:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3704, + "mutability": "mutable", + "name": "signature", + "nameLocation": "2483:9:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2470:22:15", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3703, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2470:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2438:60:15" + }, + "returnParameters": { + "id": 3713, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3707, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "2530:9:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2522:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3706, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2522:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3710, + "mutability": "mutable", + "name": "err", + "nameLocation": "2554:3:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2541:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3709, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3708, + "name": "RecoverError", + "nameLocations": [ + "2541:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "2541:12:15" + }, + "referencedDeclaration": 3686, + "src": "2541:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3712, + "mutability": "mutable", + "name": "errArg", + "nameLocation": "2567:6:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2559:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3711, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2559:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2521:53:15" + }, + "scope": 4137, + "src": "2419:778:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3804, + "nodeType": "Block", + "src": "3456:716:15", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3767, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "3470:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "id": 3768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3480:6:15", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3470:16:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "3635", + "id": 3769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3490:2:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "65" + }, + "src": "3470:22:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3802, + "nodeType": "Block", + "src": "4058:108:15", + "statements": [ + { + "expression": { + "components": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 3791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4088:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4080:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4080:7:15", + "typeDescriptions": {} + } + }, + "id": 3792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4080:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3793, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "4092:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 3794, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4105:22:15", + "memberName": "InvalidSignatureLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 3684, + "src": "4092:35:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "arguments": [ + { + "expression": { + "id": 3797, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "4137:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "id": 3798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4147:6:15", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4137:16:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4129:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 3795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4129:7:15", + "typeDescriptions": {} + } + }, + "id": 3799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4129:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 3800, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4079:76:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3766, + "id": 3801, + "nodeType": "Return", + "src": "4072:83:15" + } + ] + }, + "id": 3803, + "nodeType": "IfStatement", + "src": "3466:700:15", + "trueBody": { + "id": 3788, + "nodeType": "Block", + "src": "3494:558:15", + "statements": [ + { + "assignments": [ + 3772 + ], + "declarations": [ + { + "constant": false, + "id": 3772, + "mutability": "mutable", + "name": "r", + "nameLocation": "3516:1:15", + "nodeType": "VariableDeclaration", + "scope": 3788, + "src": "3508:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3771, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3508:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3773, + "nodeType": "VariableDeclarationStatement", + "src": "3508:9:15" + }, + { + "assignments": [ + 3775 + ], + "declarations": [ + { + "constant": false, + "id": 3775, + "mutability": "mutable", + "name": "s", + "nameLocation": "3539:1:15", + "nodeType": "VariableDeclaration", + "scope": 3788, + "src": "3531:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3774, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3531:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3776, + "nodeType": "VariableDeclarationStatement", + "src": "3531:9:15" + }, + { + "assignments": [ + 3778 + ], + "declarations": [ + { + "constant": false, + "id": 3778, + "mutability": "mutable", + "name": "v", + "nameLocation": "3560:1:15", + "nodeType": "VariableDeclaration", + "scope": 3788, + "src": "3554:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3777, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3554:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3779, + "nodeType": "VariableDeclarationStatement", + "src": "3554:7:15" + }, + { + "AST": { + "nativeSrc": "3794:202:15", + "nodeType": "YulBlock", + "src": "3794:202:15", + "statements": [ + { + "nativeSrc": "3812:35:15", + "nodeType": "YulAssignment", + "src": "3812:35:15", + "value": { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "3830:16:15", + "nodeType": "YulIdentifier", + "src": "3830:16:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3817:12:15", + "nodeType": "YulIdentifier", + "src": "3817:12:15" + }, + "nativeSrc": "3817:30:15", + "nodeType": "YulFunctionCall", + "src": "3817:30:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "3812:1:15", + "nodeType": "YulIdentifier", + "src": "3812:1:15" + } + ] + }, + { + "nativeSrc": "3864:46:15", + "nodeType": "YulAssignment", + "src": "3864:46:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "3886:16:15", + "nodeType": "YulIdentifier", + "src": "3886:16:15" + }, + { + "kind": "number", + "nativeSrc": "3904:4:15", + "nodeType": "YulLiteral", + "src": "3904:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3882:3:15", + "nodeType": "YulIdentifier", + "src": "3882:3:15" + }, + "nativeSrc": "3882:27:15", + "nodeType": "YulFunctionCall", + "src": "3882:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3869:12:15", + "nodeType": "YulIdentifier", + "src": "3869:12:15" + }, + "nativeSrc": "3869:41:15", + "nodeType": "YulFunctionCall", + "src": "3869:41:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "3864:1:15", + "nodeType": "YulIdentifier", + "src": "3864:1:15" + } + ] + }, + { + "nativeSrc": "3927:55:15", + "nodeType": "YulAssignment", + "src": "3927:55:15", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3937:1:15", + "nodeType": "YulLiteral", + "src": "3937:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "3957:16:15", + "nodeType": "YulIdentifier", + "src": "3957:16:15" + }, + { + "kind": "number", + "nativeSrc": "3975:4:15", + "nodeType": "YulLiteral", + "src": "3975:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3953:3:15", + "nodeType": "YulIdentifier", + "src": "3953:3:15" + }, + "nativeSrc": "3953:27:15", + "nodeType": "YulFunctionCall", + "src": "3953:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3940:12:15", + "nodeType": "YulIdentifier", + "src": "3940:12:15" + }, + "nativeSrc": "3940:41:15", + "nodeType": "YulFunctionCall", + "src": "3940:41:15" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "3932:4:15", + "nodeType": "YulIdentifier", + "src": "3932:4:15" + }, + "nativeSrc": "3932:50:15", + "nodeType": "YulFunctionCall", + "src": "3932:50:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "3927:1:15", + "nodeType": "YulIdentifier", + "src": "3927:1:15" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3772, + "isOffset": false, + "isSlot": false, + "src": "3812:1:15", + "valueSize": 1 + }, + { + "declaration": 3775, + "isOffset": false, + "isSlot": false, + "src": "3864:1:15", + "valueSize": 1 + }, + { + "declaration": 3757, + "isOffset": true, + "isSlot": false, + "src": "3830:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 3757, + "isOffset": true, + "isSlot": false, + "src": "3886:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 3757, + "isOffset": true, + "isSlot": false, + "src": "3957:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 3778, + "isOffset": false, + "isSlot": false, + "src": "3927:1:15", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3780, + "nodeType": "InlineAssembly", + "src": "3769:227:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3782, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3755, + "src": "4027:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3783, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3778, + "src": "4033:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3784, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3772, + "src": "4036:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3785, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "4039:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3781, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 4023, + "src": "4016:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4016:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3766, + "id": 3787, + "nodeType": "Return", + "src": "4009:32:15" + } + ] + } + } + ] + }, + "documentation": { + "id": 3753, + "nodeType": "StructuredDocumentation", + "src": "3203:82:15", + "text": " @dev Variant of {tryRecover} that takes a signature in calldata" + }, + "id": 3805, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryRecoverCalldata", + "nameLocation": "3299:18:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3758, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3755, + "mutability": "mutable", + "name": "hash", + "nameLocation": "3335:4:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3327:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3754, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3327:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3757, + "mutability": "mutable", + "name": "signature", + "nameLocation": "3364:9:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3349:24:15", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3756, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3349:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3317:62:15" + }, + "returnParameters": { + "id": 3766, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3760, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "3411:9:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3403:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3759, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3403:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3763, + "mutability": "mutable", + "name": "err", + "nameLocation": "3435:3:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3422:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3762, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3761, + "name": "RecoverError", + "nameLocations": [ + "3422:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "3422:12:15" + }, + "referencedDeclaration": 3686, + "src": "3422:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3765, + "mutability": "mutable", + "name": "errArg", + "nameLocation": "3448:6:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3440:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3764, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3440:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3402:53:15" + }, + "scope": 4137, + "src": "3290:882:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3834, + "nodeType": "Block", + "src": "5363:168:15", + "statements": [ + { + "assignments": [ + 3816, + 3819, + 3821 + ], + "declarations": [ + { + "constant": false, + "id": 3816, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "5382:9:15", + "nodeType": "VariableDeclaration", + "scope": 3834, + "src": "5374:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5374:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3819, + "mutability": "mutable", + "name": "error", + "nameLocation": "5406:5:15", + "nodeType": "VariableDeclaration", + "scope": 3834, + "src": "5393:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3818, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3817, + "name": "RecoverError", + "nameLocations": [ + "5393:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "5393:12:15" + }, + "referencedDeclaration": 3686, + "src": "5393:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3821, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "5421:8:15", + "nodeType": "VariableDeclaration", + "scope": 3834, + "src": "5413:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3820, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5413:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3826, + "initialValue": { + "arguments": [ + { + "id": 3823, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3808, + "src": "5444:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3824, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3810, + "src": "5450:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3822, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 3752, + "src": "5433:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,bytes memory) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5433:27:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5373:87:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3828, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3819, + "src": "5482:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 3829, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3821, + "src": "5489:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3827, + "name": "_throwError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4136, + "src": "5470:11:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_RecoverError_$3686_$_t_bytes32_$returns$__$", + "typeString": "function (enum ECDSA.RecoverError,bytes32) pure" + } + }, + "id": 3830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5470:28:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3831, + "nodeType": "ExpressionStatement", + "src": "5470:28:15" + }, + { + "expression": { + "id": 3832, + "name": "recovered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3816, + "src": "5515:9:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3814, + "id": 3833, + "nodeType": "Return", + "src": "5508:16:15" + } + ] + }, + "documentation": { + "id": 3806, + "nodeType": "StructuredDocumentation", + "src": "4178:1093:15", + "text": " @dev Returns the address that signed a hashed message (`hash`) with\n `signature`. This address can then be used for verification purposes.\n The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n this function rejects them by requiring the `s` value to be in the lower\n half order, and the `v` value to be either 27 or 28.\n NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n invalidation or nonces for replay protection.\n IMPORTANT: `hash` _must_ be the result of a hash operation for the\n verification to be secure: it is possible to craft signatures that\n recover to arbitrary addresses for non-hashed data. A safe way to ensure\n this is by receiving a hash of the original message (which may otherwise\n be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it." + }, + "id": 3835, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recover", + "nameLocation": "5285:7:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3808, + "mutability": "mutable", + "name": "hash", + "nameLocation": "5301:4:15", + "nodeType": "VariableDeclaration", + "scope": 3835, + "src": "5293:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3807, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5293:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3810, + "mutability": "mutable", + "name": "signature", + "nameLocation": "5320:9:15", + "nodeType": "VariableDeclaration", + "scope": 3835, + "src": "5307:22:15", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3809, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5307:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "5292:38:15" + }, + "returnParameters": { + "id": 3814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3813, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3835, + "src": "5354:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3812, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5354:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5353:9:15" + }, + "scope": 4137, + "src": "5276:255:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3864, + "nodeType": "Block", + "src": "5718:176:15", + "statements": [ + { + "assignments": [ + 3846, + 3849, + 3851 + ], + "declarations": [ + { + "constant": false, + "id": 3846, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "5737:9:15", + "nodeType": "VariableDeclaration", + "scope": 3864, + "src": "5729:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5729:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3849, + "mutability": "mutable", + "name": "error", + "nameLocation": "5761:5:15", + "nodeType": "VariableDeclaration", + "scope": 3864, + "src": "5748:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3848, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3847, + "name": "RecoverError", + "nameLocations": [ + "5748:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "5748:12:15" + }, + "referencedDeclaration": 3686, + "src": "5748:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3851, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "5776:8:15", + "nodeType": "VariableDeclaration", + "scope": 3864, + "src": "5768:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3850, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5768:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3856, + "initialValue": { + "arguments": [ + { + "id": 3853, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3838, + "src": "5807:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3854, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3840, + "src": "5813:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "id": 3852, + "name": "tryRecoverCalldata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3805, + "src": "5788:18:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_calldata_ptr_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,bytes calldata) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5788:35:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5728:95:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3858, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3849, + "src": "5845:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 3859, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3851, + "src": "5852:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3857, + "name": "_throwError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4136, + "src": "5833:11:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_RecoverError_$3686_$_t_bytes32_$returns$__$", + "typeString": "function (enum ECDSA.RecoverError,bytes32) pure" + } + }, + "id": 3860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5833:28:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3861, + "nodeType": "ExpressionStatement", + "src": "5833:28:15" + }, + { + "expression": { + "id": 3862, + "name": "recovered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3846, + "src": "5878:9:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3844, + "id": 3863, + "nodeType": "Return", + "src": "5871:16:15" + } + ] + }, + "documentation": { + "id": 3836, + "nodeType": "StructuredDocumentation", + "src": "5537:79:15", + "text": " @dev Variant of {recover} that takes a signature in calldata" + }, + "id": 3865, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recoverCalldata", + "nameLocation": "5630:15:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3838, + "mutability": "mutable", + "name": "hash", + "nameLocation": "5654:4:15", + "nodeType": "VariableDeclaration", + "scope": 3865, + "src": "5646:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3837, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5646:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3840, + "mutability": "mutable", + "name": "signature", + "nameLocation": "5675:9:15", + "nodeType": "VariableDeclaration", + "scope": 3865, + "src": "5660:24:15", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3839, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5660:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "5645:40:15" + }, + "returnParameters": { + "id": 3844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3843, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3865, + "src": "5709:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5709:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5708:9:15" + }, + "scope": 4137, + "src": "5621:273:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3914, + "nodeType": "Block", + "src": "6273:342:15", + "statements": [ + { + "id": 3913, + "nodeType": "UncheckedBlock", + "src": "6283:326:15", + "statements": [ + { + "assignments": [ + 3883 + ], + "declarations": [ + { + "constant": false, + "id": 3883, + "mutability": "mutable", + "name": "s", + "nameLocation": "6315:1:15", + "nodeType": "VariableDeclaration", + "scope": 3913, + "src": "6307:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3882, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6307:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3890, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 3889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3884, + "name": "vs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3872, + "src": "6319:2:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "arguments": [ + { + "hexValue": "307837666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666", + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6332:66:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819967_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9967" + }, + "value": "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819967_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9967" + } + ], + "id": 3886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6324:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 3885, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6324:7:15", + "typeDescriptions": {} + } + }, + "id": 3888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6324:75:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6319:80:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6307:92:15" + }, + { + "assignments": [ + 3892 + ], + "declarations": [ + { + "constant": false, + "id": 3892, + "mutability": "mutable", + "name": "v", + "nameLocation": "6516:1:15", + "nodeType": "VariableDeclaration", + "scope": 3913, + "src": "6510:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3891, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6510:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3905, + "initialValue": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3897, + "name": "vs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3872, + "src": "6535:2:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6527:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3895, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6527:7:15", + "typeDescriptions": {} + } + }, + "id": 3898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6527:11:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "323535", + "id": 3899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6542:3:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "6527:18:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3901, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6526:20:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "3237", + "id": 3902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6549:2:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_27_by_1", + "typeString": "int_const 27" + }, + "value": "27" + }, + "src": "6526:25:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3894, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6520:5:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3893, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6520:5:15", + "typeDescriptions": {} + } + }, + "id": 3904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6520:32:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6510:42:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3907, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3868, + "src": "6584:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3908, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3892, + "src": "6590:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3909, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3870, + "src": "6593:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3910, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3883, + "src": "6596:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3906, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 4023, + "src": "6573:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6573:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3881, + "id": 3912, + "nodeType": "Return", + "src": "6566:32:15" + } + ] + } + ] + }, + "documentation": { + "id": 3866, + "nodeType": "StructuredDocumentation", + "src": "5900:205:15", + "text": " @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]" + }, + "id": 3915, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryRecover", + "nameLocation": "6119:10:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3868, + "mutability": "mutable", + "name": "hash", + "nameLocation": "6147:4:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6139:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3867, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6139:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3870, + "mutability": "mutable", + "name": "r", + "nameLocation": "6169:1:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6161:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3869, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6161:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3872, + "mutability": "mutable", + "name": "vs", + "nameLocation": "6188:2:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6180:10:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3871, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6180:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6129:67:15" + }, + "returnParameters": { + "id": 3881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3875, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "6228:9:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6220:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3874, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6220:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3878, + "mutability": "mutable", + "name": "err", + "nameLocation": "6252:3:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6239:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3877, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3876, + "name": "RecoverError", + "nameLocations": [ + "6239:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "6239:12:15" + }, + "referencedDeclaration": 3686, + "src": "6239:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3880, + "mutability": "mutable", + "name": "errArg", + "nameLocation": "6265:6:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6257:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3879, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6257:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6219:53:15" + }, + "scope": 4137, + "src": "6110:505:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3947, + "nodeType": "Block", + "src": "6829:164:15", + "statements": [ + { + "assignments": [ + 3928, + 3931, + 3933 + ], + "declarations": [ + { + "constant": false, + "id": 3928, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "6848:9:15", + "nodeType": "VariableDeclaration", + "scope": 3947, + "src": "6840:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6840:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3931, + "mutability": "mutable", + "name": "error", + "nameLocation": "6872:5:15", + "nodeType": "VariableDeclaration", + "scope": 3947, + "src": "6859:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3930, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3929, + "name": "RecoverError", + "nameLocations": [ + "6859:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "6859:12:15" + }, + "referencedDeclaration": 3686, + "src": "6859:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3933, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "6887:8:15", + "nodeType": "VariableDeclaration", + "scope": 3947, + "src": "6879:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3932, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6879:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3939, + "initialValue": { + "arguments": [ + { + "id": 3935, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "6910:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3936, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3920, + "src": "6916:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3937, + "name": "vs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3922, + "src": "6919:2:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3934, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 3915, + "src": "6899:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6899:23:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6839:83:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3941, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3931, + "src": "6944:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 3942, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3933, + "src": "6951:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3940, + "name": "_throwError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4136, + "src": "6932:11:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_RecoverError_$3686_$_t_bytes32_$returns$__$", + "typeString": "function (enum ECDSA.RecoverError,bytes32) pure" + } + }, + "id": 3943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6932:28:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3944, + "nodeType": "ExpressionStatement", + "src": "6932:28:15" + }, + { + "expression": { + "id": 3945, + "name": "recovered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3928, + "src": "6977:9:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3926, + "id": 3946, + "nodeType": "Return", + "src": "6970:16:15" + } + ] + }, + "documentation": { + "id": 3916, + "nodeType": "StructuredDocumentation", + "src": "6621:117:15", + "text": " @dev Overload of {ECDSA-recover} that receives the `r` and `vs` short-signature fields separately." + }, + "id": 3948, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recover", + "nameLocation": "6752:7:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3918, + "mutability": "mutable", + "name": "hash", + "nameLocation": "6768:4:15", + "nodeType": "VariableDeclaration", + "scope": 3948, + "src": "6760:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3917, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6760:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3920, + "mutability": "mutable", + "name": "r", + "nameLocation": "6782:1:15", + "nodeType": "VariableDeclaration", + "scope": 3948, + "src": "6774:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3919, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6774:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3922, + "mutability": "mutable", + "name": "vs", + "nameLocation": "6793:2:15", + "nodeType": "VariableDeclaration", + "scope": 3948, + "src": "6785:10:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3921, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6785:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6759:37:15" + }, + "returnParameters": { + "id": 3926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3948, + "src": "6820:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3924, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6820:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6819:9:15" + }, + "scope": 4137, + "src": "6743:250:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4022, + "nodeType": "Block", + "src": "7308:1372:15", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3969, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3957, + "src": "8204:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3968, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8196:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8196:7:15", + "typeDescriptions": {} + } + }, + "id": 3970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8196:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307837464646464646464646464646464646464646464646464646464646464646463544353736453733353741343530314444464539324634363638314232304130", + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8209:66:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926418782139537452191302581570759080747168_by_1", + "typeString": "int_const 5789...(69 digits omitted)...7168" + }, + "value": "0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0" + }, + "src": "8196:79:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3983, + "nodeType": "IfStatement", + "src": "8192:164:15", + "trueBody": { + "id": 3982, + "nodeType": "Block", + "src": "8277:79:15", + "statements": [ + { + "expression": { + "components": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 3975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8307:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3974, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8299:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3973, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8299:7:15", + "typeDescriptions": {} + } + }, + "id": 3976, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8299:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3977, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "8311:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 3978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8324:17:15", + "memberName": "InvalidSignatureS", + "nodeType": "MemberAccess", + "referencedDeclaration": 3685, + "src": "8311:30:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 3979, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3957, + "src": "8343:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 3980, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8298:47:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3966, + "id": 3981, + "nodeType": "Return", + "src": "8291:54:15" + } + ] + } + }, + { + "assignments": [ + 3985 + ], + "declarations": [ + { + "constant": false, + "id": 3985, + "mutability": "mutable", + "name": "signer", + "nameLocation": "8458:6:15", + "nodeType": "VariableDeclaration", + "scope": 4022, + "src": "8450:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8450:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3992, + "initialValue": { + "arguments": [ + { + "id": 3987, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3951, + "src": "8477:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3988, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3953, + "src": "8483:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3989, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3955, + "src": "8486:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3990, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3957, + "src": "8489:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3986, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -6, + "src": "8467:9:15", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 3991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8467:24:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8450:41:15" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3993, + "name": "signer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3985, + "src": "8505:6:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8523:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8515:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3994, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8515:7:15", + "typeDescriptions": {} + } + }, + "id": 3997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8515:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8505:20:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4012, + "nodeType": "IfStatement", + "src": "8501:113:15", + "trueBody": { + "id": 4011, + "nodeType": "Block", + "src": "8527:87:15", + "statements": [ + { + "expression": { + "components": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 4001, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8557:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8549:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3999, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8549:7:15", + "typeDescriptions": {} + } + }, + "id": 4002, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8549:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 4003, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "8561:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4004, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8574:16:15", + "memberName": "InvalidSignature", + "nodeType": "MemberAccess", + "referencedDeclaration": 3683, + "src": "8561:29:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 4007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8600:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8592:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4005, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8592:7:15", + "typeDescriptions": {} + } + }, + "id": 4008, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8592:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 4009, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8548:55:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3966, + "id": 4010, + "nodeType": "Return", + "src": "8541:62:15" + } + ] + } + }, + { + "expression": { + "components": [ + { + "id": 4013, + "name": "signer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3985, + "src": "8632:6:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 4014, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "8640:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8653:7:15", + "memberName": "NoError", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "8640:20:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 4018, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8670:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4017, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8662:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4016, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8662:7:15", + "typeDescriptions": {} + } + }, + "id": 4019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8662:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 4020, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8631:42:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3966, + "id": 4021, + "nodeType": "Return", + "src": "8624:49:15" + } + ] + }, + "documentation": { + "id": 3949, + "nodeType": "StructuredDocumentation", + "src": "6999:125:15", + "text": " @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n `r` and `s` signature fields separately." + }, + "id": 4023, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryRecover", + "nameLocation": "7138:10:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3958, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3951, + "mutability": "mutable", + "name": "hash", + "nameLocation": "7166:4:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7158:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3950, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7158:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3953, + "mutability": "mutable", + "name": "v", + "nameLocation": "7186:1:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7180:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3952, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "7180:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3955, + "mutability": "mutable", + "name": "r", + "nameLocation": "7205:1:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7197:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3954, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7197:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3957, + "mutability": "mutable", + "name": "s", + "nameLocation": "7224:1:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7216:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3956, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7216:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "7148:83:15" + }, + "returnParameters": { + "id": 3966, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3960, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "7263:9:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7255:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3959, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7255:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3963, + "mutability": "mutable", + "name": "err", + "nameLocation": "7287:3:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7274:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3962, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3961, + "name": "RecoverError", + "nameLocations": [ + "7274:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "7274:12:15" + }, + "referencedDeclaration": 3686, + "src": "7274:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3965, + "mutability": "mutable", + "name": "errArg", + "nameLocation": "7300:6:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7292:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3964, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7292:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "7254:53:15" + }, + "scope": 4137, + "src": "7129:1551:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4058, + "nodeType": "Block", + "src": "8907:166:15", + "statements": [ + { + "assignments": [ + 4038, + 4041, + 4043 + ], + "declarations": [ + { + "constant": false, + "id": 4038, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "8926:9:15", + "nodeType": "VariableDeclaration", + "scope": 4058, + "src": "8918:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4037, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8918:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4041, + "mutability": "mutable", + "name": "error", + "nameLocation": "8950:5:15", + "nodeType": "VariableDeclaration", + "scope": 4058, + "src": "8937:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 4040, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4039, + "name": "RecoverError", + "nameLocations": [ + "8937:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "8937:12:15" + }, + "referencedDeclaration": 3686, + "src": "8937:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4043, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "8965:8:15", + "nodeType": "VariableDeclaration", + "scope": 4058, + "src": "8957:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4042, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8957:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 4050, + "initialValue": { + "arguments": [ + { + "id": 4045, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4026, + "src": "8988:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4046, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4028, + "src": "8994:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 4047, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4030, + "src": "8997:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4048, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4032, + "src": "9000:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4044, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 4023, + "src": "8977:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 4049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8977:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8917:85:15" + }, + { + "expression": { + "arguments": [ + { + "id": 4052, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4041, + "src": "9024:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 4053, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4043, + "src": "9031:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4051, + "name": "_throwError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4136, + "src": "9012:11:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_RecoverError_$3686_$_t_bytes32_$returns$__$", + "typeString": "function (enum ECDSA.RecoverError,bytes32) pure" + } + }, + "id": 4054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9012:28:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4055, + "nodeType": "ExpressionStatement", + "src": "9012:28:15" + }, + { + "expression": { + "id": 4056, + "name": "recovered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4038, + "src": "9057:9:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4036, + "id": 4057, + "nodeType": "Return", + "src": "9050:16:15" + } + ] + }, + "documentation": { + "id": 4024, + "nodeType": "StructuredDocumentation", + "src": "8686:122:15", + "text": " @dev Overload of {ECDSA-recover} that receives the `v`,\n `r` and `s` signature fields separately." + }, + "id": 4059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recover", + "nameLocation": "8822:7:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4026, + "mutability": "mutable", + "name": "hash", + "nameLocation": "8838:4:15", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8830:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4025, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8830:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4028, + "mutability": "mutable", + "name": "v", + "nameLocation": "8850:1:15", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8844:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4027, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "8844:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4030, + "mutability": "mutable", + "name": "r", + "nameLocation": "8861:1:15", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8853:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4029, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8853:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4032, + "mutability": "mutable", + "name": "s", + "nameLocation": "8872:1:15", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8864:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4031, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8864:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "8829:45:15" + }, + "returnParameters": { + "id": 4036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4035, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8898:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4034, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8898:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "8897:9:15" + }, + "scope": 4137, + "src": "8813:260:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4072, + "nodeType": "Block", + "src": "9659:793:15", + "statements": [ + { + "AST": { + "nativeSrc": "9694:752:15", + "nodeType": "YulBlock", + "src": "9694:752:15", + "statements": [ + { + "cases": [ + { + "body": { + "nativeSrc": "9847:171:15", + "nodeType": "YulBlock", + "src": "9847:171:15", + "statements": [ + { + "nativeSrc": "9865:32:15", + "nodeType": "YulAssignment", + "src": "9865:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "9880:9:15", + "nodeType": "YulIdentifier", + "src": "9880:9:15" + }, + { + "kind": "number", + "nativeSrc": "9891:4:15", + "nodeType": "YulLiteral", + "src": "9891:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9876:3:15", + "nodeType": "YulIdentifier", + "src": "9876:3:15" + }, + "nativeSrc": "9876:20:15", + "nodeType": "YulFunctionCall", + "src": "9876:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9870:5:15", + "nodeType": "YulIdentifier", + "src": "9870:5:15" + }, + "nativeSrc": "9870:27:15", + "nodeType": "YulFunctionCall", + "src": "9870:27:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "9865:1:15", + "nodeType": "YulIdentifier", + "src": "9865:1:15" + } + ] + }, + { + "nativeSrc": "9914:32:15", + "nodeType": "YulAssignment", + "src": "9914:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "9929:9:15", + "nodeType": "YulIdentifier", + "src": "9929:9:15" + }, + { + "kind": "number", + "nativeSrc": "9940:4:15", + "nodeType": "YulLiteral", + "src": "9940:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9925:3:15", + "nodeType": "YulIdentifier", + "src": "9925:3:15" + }, + "nativeSrc": "9925:20:15", + "nodeType": "YulFunctionCall", + "src": "9925:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9919:5:15", + "nodeType": "YulIdentifier", + "src": "9919:5:15" + }, + "nativeSrc": "9919:27:15", + "nodeType": "YulFunctionCall", + "src": "9919:27:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "9914:1:15", + "nodeType": "YulIdentifier", + "src": "9914:1:15" + } + ] + }, + { + "nativeSrc": "9963:41:15", + "nodeType": "YulAssignment", + "src": "9963:41:15", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9973:1:15", + "nodeType": "YulLiteral", + "src": "9973:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "9986:9:15", + "nodeType": "YulIdentifier", + "src": "9986:9:15" + }, + { + "kind": "number", + "nativeSrc": "9997:4:15", + "nodeType": "YulLiteral", + "src": "9997:4:15", + "type": "", + "value": "0x60" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9982:3:15", + "nodeType": "YulIdentifier", + "src": "9982:3:15" + }, + "nativeSrc": "9982:20:15", + "nodeType": "YulFunctionCall", + "src": "9982:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9976:5:15", + "nodeType": "YulIdentifier", + "src": "9976:5:15" + }, + "nativeSrc": "9976:27:15", + "nodeType": "YulFunctionCall", + "src": "9976:27:15" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "9968:4:15", + "nodeType": "YulIdentifier", + "src": "9968:4:15" + }, + "nativeSrc": "9968:36:15", + "nodeType": "YulFunctionCall", + "src": "9968:36:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "9963:1:15", + "nodeType": "YulIdentifier", + "src": "9963:1:15" + } + ] + } + ] + }, + "nativeSrc": "9839:179:15", + "nodeType": "YulCase", + "src": "9839:179:15", + "value": { + "kind": "number", + "nativeSrc": "9844:2:15", + "nodeType": "YulLiteral", + "src": "9844:2:15", + "type": "", + "value": "65" + } + }, + { + "body": { + "nativeSrc": "10125:206:15", + "nodeType": "YulBlock", + "src": "10125:206:15", + "statements": [ + { + "nativeSrc": "10143:37:15", + "nodeType": "YulVariableDeclaration", + "src": "10143:37:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "10163:9:15", + "nodeType": "YulIdentifier", + "src": "10163:9:15" + }, + { + "kind": "number", + "nativeSrc": "10174:4:15", + "nodeType": "YulLiteral", + "src": "10174:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10159:3:15", + "nodeType": "YulIdentifier", + "src": "10159:3:15" + }, + "nativeSrc": "10159:20:15", + "nodeType": "YulFunctionCall", + "src": "10159:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10153:5:15", + "nodeType": "YulIdentifier", + "src": "10153:5:15" + }, + "nativeSrc": "10153:27:15", + "nodeType": "YulFunctionCall", + "src": "10153:27:15" + }, + "variables": [ + { + "name": "vs", + "nativeSrc": "10147:2:15", + "nodeType": "YulTypedName", + "src": "10147:2:15", + "type": "" + } + ] + }, + { + "nativeSrc": "10197:32:15", + "nodeType": "YulAssignment", + "src": "10197:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "10212:9:15", + "nodeType": "YulIdentifier", + "src": "10212:9:15" + }, + { + "kind": "number", + "nativeSrc": "10223:4:15", + "nodeType": "YulLiteral", + "src": "10223:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10208:3:15", + "nodeType": "YulIdentifier", + "src": "10208:3:15" + }, + "nativeSrc": "10208:20:15", + "nodeType": "YulFunctionCall", + "src": "10208:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10202:5:15", + "nodeType": "YulIdentifier", + "src": "10202:5:15" + }, + "nativeSrc": "10202:27:15", + "nodeType": "YulFunctionCall", + "src": "10202:27:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "10197:1:15", + "nodeType": "YulIdentifier", + "src": "10197:1:15" + } + ] + }, + { + "nativeSrc": "10246:28:15", + "nodeType": "YulAssignment", + "src": "10246:28:15", + "value": { + "arguments": [ + { + "name": "vs", + "nativeSrc": "10255:2:15", + "nodeType": "YulIdentifier", + "src": "10255:2:15" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10263:1:15", + "nodeType": "YulLiteral", + "src": "10263:1:15", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10270:1:15", + "nodeType": "YulLiteral", + "src": "10270:1:15", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "10266:3:15", + "nodeType": "YulIdentifier", + "src": "10266:3:15" + }, + "nativeSrc": "10266:6:15", + "nodeType": "YulFunctionCall", + "src": "10266:6:15" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10259:3:15", + "nodeType": "YulIdentifier", + "src": "10259:3:15" + }, + "nativeSrc": "10259:14:15", + "nodeType": "YulFunctionCall", + "src": "10259:14:15" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10251:3:15", + "nodeType": "YulIdentifier", + "src": "10251:3:15" + }, + "nativeSrc": "10251:23:15", + "nodeType": "YulFunctionCall", + "src": "10251:23:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "10246:1:15", + "nodeType": "YulIdentifier", + "src": "10246:1:15" + } + ] + }, + { + "nativeSrc": "10291:26:15", + "nodeType": "YulAssignment", + "src": "10291:26:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10304:3:15", + "nodeType": "YulLiteral", + "src": "10304:3:15", + "type": "", + "value": "255" + }, + { + "name": "vs", + "nativeSrc": "10309:2:15", + "nodeType": "YulIdentifier", + "src": "10309:2:15" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10300:3:15", + "nodeType": "YulIdentifier", + "src": "10300:3:15" + }, + "nativeSrc": "10300:12:15", + "nodeType": "YulFunctionCall", + "src": "10300:12:15" + }, + { + "kind": "number", + "nativeSrc": "10314:2:15", + "nodeType": "YulLiteral", + "src": "10314:2:15", + "type": "", + "value": "27" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10296:3:15", + "nodeType": "YulIdentifier", + "src": "10296:3:15" + }, + "nativeSrc": "10296:21:15", + "nodeType": "YulFunctionCall", + "src": "10296:21:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "10291:1:15", + "nodeType": "YulIdentifier", + "src": "10291:1:15" + } + ] + } + ] + }, + "nativeSrc": "10117:214:15", + "nodeType": "YulCase", + "src": "10117:214:15", + "value": { + "kind": "number", + "nativeSrc": "10122:2:15", + "nodeType": "YulLiteral", + "src": "10122:2:15", + "type": "", + "value": "64" + } + }, + { + "body": { + "nativeSrc": "10352:84:15", + "nodeType": "YulBlock", + "src": "10352:84:15", + "statements": [ + { + "nativeSrc": "10370:6:15", + "nodeType": "YulAssignment", + "src": "10370:6:15", + "value": { + "kind": "number", + "nativeSrc": "10375:1:15", + "nodeType": "YulLiteral", + "src": "10375:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "10370:1:15", + "nodeType": "YulIdentifier", + "src": "10370:1:15" + } + ] + }, + { + "nativeSrc": "10393:6:15", + "nodeType": "YulAssignment", + "src": "10393:6:15", + "value": { + "kind": "number", + "nativeSrc": "10398:1:15", + "nodeType": "YulLiteral", + "src": "10398:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "10393:1:15", + "nodeType": "YulIdentifier", + "src": "10393:1:15" + } + ] + }, + { + "nativeSrc": "10416:6:15", + "nodeType": "YulAssignment", + "src": "10416:6:15", + "value": { + "kind": "number", + "nativeSrc": "10421:1:15", + "nodeType": "YulLiteral", + "src": "10421:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "10416:1:15", + "nodeType": "YulIdentifier", + "src": "10416:1:15" + } + ] + } + ] + }, + "nativeSrc": "10344:92:15", + "nodeType": "YulCase", + "src": "10344:92:15", + "value": "default" + } + ], + "expression": { + "arguments": [ + { + "name": "signature", + "nativeSrc": "9763:9:15", + "nodeType": "YulIdentifier", + "src": "9763:9:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9757:5:15", + "nodeType": "YulIdentifier", + "src": "9757:5:15" + }, + "nativeSrc": "9757:16:15", + "nodeType": "YulFunctionCall", + "src": "9757:16:15" + }, + "nativeSrc": "9750:686:15", + "nodeType": "YulSwitch", + "src": "9750:686:15" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4067, + "isOffset": false, + "isSlot": false, + "src": "10197:1:15", + "valueSize": 1 + }, + { + "declaration": 4067, + "isOffset": false, + "isSlot": false, + "src": "10370:1:15", + "valueSize": 1 + }, + { + "declaration": 4067, + "isOffset": false, + "isSlot": false, + "src": "9865:1:15", + "valueSize": 1 + }, + { + "declaration": 4069, + "isOffset": false, + "isSlot": false, + "src": "10246:1:15", + "valueSize": 1 + }, + { + "declaration": 4069, + "isOffset": false, + "isSlot": false, + "src": "10393:1:15", + "valueSize": 1 + }, + { + "declaration": 4069, + "isOffset": false, + "isSlot": false, + "src": "9914:1:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "10163:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "10212:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "9763:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "9880:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "9929:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "9986:9:15", + "valueSize": 1 + }, + { + "declaration": 4065, + "isOffset": false, + "isSlot": false, + "src": "10291:1:15", + "valueSize": 1 + }, + { + "declaration": 4065, + "isOffset": false, + "isSlot": false, + "src": "10416:1:15", + "valueSize": 1 + }, + { + "declaration": 4065, + "isOffset": false, + "isSlot": false, + "src": "9963:1:15", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4071, + "nodeType": "InlineAssembly", + "src": "9669:777:15" + } + ] + }, + "documentation": { + "id": 4060, + "nodeType": "StructuredDocumentation", + "src": "9079:482:15", + "text": " @dev Parse a signature into its `v`, `r` and `s` components. Supports 65-byte and 64-byte (ERC-2098)\n formats. Returns (0,0,0) for invalid signatures.\n For 64-byte signatures, `v` is automatically normalized to 27 or 28.\n For 65-byte signatures, `v` is returned as-is and MUST already be 27 or 28 for use with ecrecover.\n Consider validating the result before use, or use {tryRecover}/{recover} which perform full validation." + }, + "id": 4073, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parse", + "nameLocation": "9575:5:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4063, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4062, + "mutability": "mutable", + "name": "signature", + "nameLocation": "9594:9:15", + "nodeType": "VariableDeclaration", + "scope": 4073, + "src": "9581:22:15", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4061, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9581:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "9580:24:15" + }, + "returnParameters": { + "id": 4070, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4065, + "mutability": "mutable", + "name": "v", + "nameLocation": "9634:1:15", + "nodeType": "VariableDeclaration", + "scope": 4073, + "src": "9628:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4064, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "9628:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4067, + "mutability": "mutable", + "name": "r", + "nameLocation": "9645:1:15", + "nodeType": "VariableDeclaration", + "scope": 4073, + "src": "9637:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4066, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9637:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4069, + "mutability": "mutable", + "name": "s", + "nameLocation": "9656:1:15", + "nodeType": "VariableDeclaration", + "scope": 4073, + "src": "9648:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4068, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9648:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "9627:31:15" + }, + "scope": 4137, + "src": "9566:886:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4086, + "nodeType": "Block", + "src": "10643:841:15", + "statements": [ + { + "AST": { + "nativeSrc": "10678:800:15", + "nodeType": "YulBlock", + "src": "10678:800:15", + "statements": [ + { + "cases": [ + { + "body": { + "nativeSrc": "10831:202:15", + "nodeType": "YulBlock", + "src": "10831:202:15", + "statements": [ + { + "nativeSrc": "10849:35:15", + "nodeType": "YulAssignment", + "src": "10849:35:15", + "value": { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "10867:16:15", + "nodeType": "YulIdentifier", + "src": "10867:16:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "10854:12:15", + "nodeType": "YulIdentifier", + "src": "10854:12:15" + }, + "nativeSrc": "10854:30:15", + "nodeType": "YulFunctionCall", + "src": "10854:30:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "10849:1:15", + "nodeType": "YulIdentifier", + "src": "10849:1:15" + } + ] + }, + { + "nativeSrc": "10901:46:15", + "nodeType": "YulAssignment", + "src": "10901:46:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "10923:16:15", + "nodeType": "YulIdentifier", + "src": "10923:16:15" + }, + { + "kind": "number", + "nativeSrc": "10941:4:15", + "nodeType": "YulLiteral", + "src": "10941:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10919:3:15", + "nodeType": "YulIdentifier", + "src": "10919:3:15" + }, + "nativeSrc": "10919:27:15", + "nodeType": "YulFunctionCall", + "src": "10919:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "10906:12:15", + "nodeType": "YulIdentifier", + "src": "10906:12:15" + }, + "nativeSrc": "10906:41:15", + "nodeType": "YulFunctionCall", + "src": "10906:41:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "10901:1:15", + "nodeType": "YulIdentifier", + "src": "10901:1:15" + } + ] + }, + { + "nativeSrc": "10964:55:15", + "nodeType": "YulAssignment", + "src": "10964:55:15", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10974:1:15", + "nodeType": "YulLiteral", + "src": "10974:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "10994:16:15", + "nodeType": "YulIdentifier", + "src": "10994:16:15" + }, + { + "kind": "number", + "nativeSrc": "11012:4:15", + "nodeType": "YulLiteral", + "src": "11012:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10990:3:15", + "nodeType": "YulIdentifier", + "src": "10990:3:15" + }, + "nativeSrc": "10990:27:15", + "nodeType": "YulFunctionCall", + "src": "10990:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "10977:12:15", + "nodeType": "YulIdentifier", + "src": "10977:12:15" + }, + "nativeSrc": "10977:41:15", + "nodeType": "YulFunctionCall", + "src": "10977:41:15" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "10969:4:15", + "nodeType": "YulIdentifier", + "src": "10969:4:15" + }, + "nativeSrc": "10969:50:15", + "nodeType": "YulFunctionCall", + "src": "10969:50:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "10964:1:15", + "nodeType": "YulIdentifier", + "src": "10964:1:15" + } + ] + } + ] + }, + "nativeSrc": "10823:210:15", + "nodeType": "YulCase", + "src": "10823:210:15", + "value": { + "kind": "number", + "nativeSrc": "10828:2:15", + "nodeType": "YulLiteral", + "src": "10828:2:15", + "type": "", + "value": "65" + } + }, + { + "body": { + "nativeSrc": "11140:223:15", + "nodeType": "YulBlock", + "src": "11140:223:15", + "statements": [ + { + "nativeSrc": "11158:51:15", + "nodeType": "YulVariableDeclaration", + "src": "11158:51:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "11185:16:15", + "nodeType": "YulIdentifier", + "src": "11185:16:15" + }, + { + "kind": "number", + "nativeSrc": "11203:4:15", + "nodeType": "YulLiteral", + "src": "11203:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11181:3:15", + "nodeType": "YulIdentifier", + "src": "11181:3:15" + }, + "nativeSrc": "11181:27:15", + "nodeType": "YulFunctionCall", + "src": "11181:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "11168:12:15", + "nodeType": "YulIdentifier", + "src": "11168:12:15" + }, + "nativeSrc": "11168:41:15", + "nodeType": "YulFunctionCall", + "src": "11168:41:15" + }, + "variables": [ + { + "name": "vs", + "nativeSrc": "11162:2:15", + "nodeType": "YulTypedName", + "src": "11162:2:15", + "type": "" + } + ] + }, + { + "nativeSrc": "11226:35:15", + "nodeType": "YulAssignment", + "src": "11226:35:15", + "value": { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "11244:16:15", + "nodeType": "YulIdentifier", + "src": "11244:16:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "11231:12:15", + "nodeType": "YulIdentifier", + "src": "11231:12:15" + }, + "nativeSrc": "11231:30:15", + "nodeType": "YulFunctionCall", + "src": "11231:30:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "11226:1:15", + "nodeType": "YulIdentifier", + "src": "11226:1:15" + } + ] + }, + { + "nativeSrc": "11278:28:15", + "nodeType": "YulAssignment", + "src": "11278:28:15", + "value": { + "arguments": [ + { + "name": "vs", + "nativeSrc": "11287:2:15", + "nodeType": "YulIdentifier", + "src": "11287:2:15" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11295:1:15", + "nodeType": "YulLiteral", + "src": "11295:1:15", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11302:1:15", + "nodeType": "YulLiteral", + "src": "11302:1:15", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "11298:3:15", + "nodeType": "YulIdentifier", + "src": "11298:3:15" + }, + "nativeSrc": "11298:6:15", + "nodeType": "YulFunctionCall", + "src": "11298:6:15" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "11291:3:15", + "nodeType": "YulIdentifier", + "src": "11291:3:15" + }, + "nativeSrc": "11291:14:15", + "nodeType": "YulFunctionCall", + "src": "11291:14:15" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11283:3:15", + "nodeType": "YulIdentifier", + "src": "11283:3:15" + }, + "nativeSrc": "11283:23:15", + "nodeType": "YulFunctionCall", + "src": "11283:23:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "11278:1:15", + "nodeType": "YulIdentifier", + "src": "11278:1:15" + } + ] + }, + { + "nativeSrc": "11323:26:15", + "nodeType": "YulAssignment", + "src": "11323:26:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11336:3:15", + "nodeType": "YulLiteral", + "src": "11336:3:15", + "type": "", + "value": "255" + }, + { + "name": "vs", + "nativeSrc": "11341:2:15", + "nodeType": "YulIdentifier", + "src": "11341:2:15" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "11332:3:15", + "nodeType": "YulIdentifier", + "src": "11332:3:15" + }, + "nativeSrc": "11332:12:15", + "nodeType": "YulFunctionCall", + "src": "11332:12:15" + }, + { + "kind": "number", + "nativeSrc": "11346:2:15", + "nodeType": "YulLiteral", + "src": "11346:2:15", + "type": "", + "value": "27" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11328:3:15", + "nodeType": "YulIdentifier", + "src": "11328:3:15" + }, + "nativeSrc": "11328:21:15", + "nodeType": "YulFunctionCall", + "src": "11328:21:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "11323:1:15", + "nodeType": "YulIdentifier", + "src": "11323:1:15" + } + ] + } + ] + }, + "nativeSrc": "11132:231:15", + "nodeType": "YulCase", + "src": "11132:231:15", + "value": { + "kind": "number", + "nativeSrc": "11137:2:15", + "nodeType": "YulLiteral", + "src": "11137:2:15", + "type": "", + "value": "64" + } + }, + { + "body": { + "nativeSrc": "11384:84:15", + "nodeType": "YulBlock", + "src": "11384:84:15", + "statements": [ + { + "nativeSrc": "11402:6:15", + "nodeType": "YulAssignment", + "src": "11402:6:15", + "value": { + "kind": "number", + "nativeSrc": "11407:1:15", + "nodeType": "YulLiteral", + "src": "11407:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "11402:1:15", + "nodeType": "YulIdentifier", + "src": "11402:1:15" + } + ] + }, + { + "nativeSrc": "11425:6:15", + "nodeType": "YulAssignment", + "src": "11425:6:15", + "value": { + "kind": "number", + "nativeSrc": "11430:1:15", + "nodeType": "YulLiteral", + "src": "11430:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "11425:1:15", + "nodeType": "YulIdentifier", + "src": "11425:1:15" + } + ] + }, + { + "nativeSrc": "11448:6:15", + "nodeType": "YulAssignment", + "src": "11448:6:15", + "value": { + "kind": "number", + "nativeSrc": "11453:1:15", + "nodeType": "YulLiteral", + "src": "11453:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "11448:1:15", + "nodeType": "YulIdentifier", + "src": "11448:1:15" + } + ] + } + ] + }, + "nativeSrc": "11376:92:15", + "nodeType": "YulCase", + "src": "11376:92:15", + "value": "default" + } + ], + "expression": { + "name": "signature.length", + "nativeSrc": "10741:16:15", + "nodeType": "YulIdentifier", + "src": "10741:16:15" + }, + "nativeSrc": "10734:734:15", + "nodeType": "YulSwitch", + "src": "10734:734:15" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4081, + "isOffset": false, + "isSlot": false, + "src": "10849:1:15", + "valueSize": 1 + }, + { + "declaration": 4081, + "isOffset": false, + "isSlot": false, + "src": "11226:1:15", + "valueSize": 1 + }, + { + "declaration": 4081, + "isOffset": false, + "isSlot": false, + "src": "11402:1:15", + "valueSize": 1 + }, + { + "declaration": 4083, + "isOffset": false, + "isSlot": false, + "src": "10901:1:15", + "valueSize": 1 + }, + { + "declaration": 4083, + "isOffset": false, + "isSlot": false, + "src": "11278:1:15", + "valueSize": 1 + }, + { + "declaration": 4083, + "isOffset": false, + "isSlot": false, + "src": "11425:1:15", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": false, + "isSlot": false, + "src": "10741:16:15", + "suffix": "length", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "10867:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "10923:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "10994:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "11185:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "11244:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4079, + "isOffset": false, + "isSlot": false, + "src": "10964:1:15", + "valueSize": 1 + }, + { + "declaration": 4079, + "isOffset": false, + "isSlot": false, + "src": "11323:1:15", + "valueSize": 1 + }, + { + "declaration": 4079, + "isOffset": false, + "isSlot": false, + "src": "11448:1:15", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4085, + "nodeType": "InlineAssembly", + "src": "10653:825:15" + } + ] + }, + "documentation": { + "id": 4074, + "nodeType": "StructuredDocumentation", + "src": "10458:77:15", + "text": " @dev Variant of {parse} that takes a signature in calldata" + }, + "id": 4087, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseCalldata", + "nameLocation": "10549:13:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4076, + "mutability": "mutable", + "name": "signature", + "nameLocation": "10578:9:15", + "nodeType": "VariableDeclaration", + "scope": 4087, + "src": "10563:24:15", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4075, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10563:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "10562:26:15" + }, + "returnParameters": { + "id": 4084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4079, + "mutability": "mutable", + "name": "v", + "nameLocation": "10618:1:15", + "nodeType": "VariableDeclaration", + "scope": 4087, + "src": "10612:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4078, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10612:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4081, + "mutability": "mutable", + "name": "r", + "nameLocation": "10629:1:15", + "nodeType": "VariableDeclaration", + "scope": 4087, + "src": "10621:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4080, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10621:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4083, + "mutability": "mutable", + "name": "s", + "nameLocation": "10640:1:15", + "nodeType": "VariableDeclaration", + "scope": 4087, + "src": "10632:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4082, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10632:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "10611:31:15" + }, + "scope": 4137, + "src": "10540:944:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4135, + "nodeType": "Block", + "src": "11689:460:15", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "id": 4099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4096, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "11703:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4097, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "11712:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11725:7:15", + "memberName": "NoError", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "11712:20:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "src": "11703:29:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "id": 4105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4102, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "11799:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4103, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "11808:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11821:16:15", + "memberName": "InvalidSignature", + "nodeType": "MemberAccess", + "referencedDeclaration": 3683, + "src": "11808:29:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "src": "11799:38:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "id": 4113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4110, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "11904:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4111, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "11913:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11926:22:15", + "memberName": "InvalidSignatureLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 3684, + "src": "11913:35:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "src": "11904:44:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "id": 4125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4122, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "12038:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4123, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "12047:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12060:17:15", + "memberName": "InvalidSignatureS", + "nodeType": "MemberAccess", + "referencedDeclaration": 3685, + "src": "12047:30:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "src": "12038:39:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4131, + "nodeType": "IfStatement", + "src": "12034:109:15", + "trueBody": { + "id": 4130, + "nodeType": "Block", + "src": "12079:64:15", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 4127, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4093, + "src": "12123:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4126, + "name": "ECDSAInvalidSignatureS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3699, + "src": "12100:22:15", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_bytes32_$returns$_t_error_$", + "typeString": "function (bytes32) pure returns (error)" + } + }, + "id": 4128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12100:32:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 4129, + "nodeType": "RevertStatement", + "src": "12093:39:15" + } + ] + } + }, + "id": 4132, + "nodeType": "IfStatement", + "src": "11900:243:15", + "trueBody": { + "id": 4121, + "nodeType": "Block", + "src": "11950:78:15", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 4117, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4093, + "src": "12007:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11999:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 4115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11999:7:15", + "typeDescriptions": {} + } + }, + "id": 4118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11999:17:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4114, + "name": "ECDSAInvalidSignatureLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3694, + "src": "11971:27:15", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint256) pure returns (error)" + } + }, + "id": 4119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11971:46:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 4120, + "nodeType": "RevertStatement", + "src": "11964:53:15" + } + ] + } + }, + "id": 4133, + "nodeType": "IfStatement", + "src": "11795:348:15", + "trueBody": { + "id": 4109, + "nodeType": "Block", + "src": "11839:55:15", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4106, + "name": "ECDSAInvalidSignature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3689, + "src": "11860:21:15", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 4107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11860:23:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 4108, + "nodeType": "RevertStatement", + "src": "11853:30:15" + } + ] + } + }, + "id": 4134, + "nodeType": "IfStatement", + "src": "11699:444:15", + "trueBody": { + "id": 4101, + "nodeType": "Block", + "src": "11734:55:15", + "statements": [ + { + "functionReturnParameters": 4095, + "id": 4100, + "nodeType": "Return", + "src": "11748:7:15" + } + ] + } + } + ] + }, + "documentation": { + "id": 4088, + "nodeType": "StructuredDocumentation", + "src": "11490:122:15", + "text": " @dev Optionally reverts with the corresponding custom error according to the `error` argument provided." + }, + "id": 4136, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_throwError", + "nameLocation": "11626:11:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4094, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4091, + "mutability": "mutable", + "name": "error", + "nameLocation": "11651:5:15", + "nodeType": "VariableDeclaration", + "scope": 4136, + "src": "11638:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 4090, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4089, + "name": "RecoverError", + "nameLocations": [ + "11638:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "11638:12:15" + }, + "referencedDeclaration": 3686, + "src": "11638:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4093, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "11666:8:15", + "nodeType": "VariableDeclaration", + "scope": 4136, + "src": "11658:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4092, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11658:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "11637:38:15" + }, + "returnParameters": { + "id": 4095, + "nodeType": "ParameterList", + "parameters": [], + "src": "11689:0:15" + }, + "scope": 4137, + "src": "11617:532:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 4138, + "src": "344:11807:15", + "usedErrors": [ + 3689, + 3694, + 3699 + ], + "usedEvents": [] + } + ], + "src": "112:12040:15" + }, + "id": 15 + }, + "@openzeppelin/contracts/utils/cryptography/EIP712.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/EIP712.sol", + "exportedSymbols": { + "EIP712": [ + 4364 + ], + "IERC5267": [ + 262 + ], + "MessageHashUtils": [ + 4535 + ], + "ShortString": [ + 1833 + ], + "ShortStrings": [ + 2044 + ] + }, + "id": 4365, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4139, + "literals": [ + "solidity", + "^", + "0.8", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "113:24:16" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol", + "file": "./MessageHashUtils.sol", + "id": 4141, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4365, + "sourceUnit": 4536, + "src": "139:56:16", + "symbolAliases": [ + { + "foreign": { + "id": 4140, + "name": "MessageHashUtils", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4535, + "src": "147:16:16", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/ShortStrings.sol", + "file": "../ShortStrings.sol", + "id": 4144, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4365, + "sourceUnit": 2045, + "src": "196:62:16", + "symbolAliases": [ + { + "foreign": { + "id": 4142, + "name": "ShortStrings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2044, + "src": "204:12:16", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 4143, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "218:11:16", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC5267.sol", + "file": "../../interfaces/IERC5267.sol", + "id": 4146, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4365, + "sourceUnit": 263, + "src": "259:55:16", + "symbolAliases": [ + { + "foreign": { + "id": 4145, + "name": "IERC5267", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "267:8:16", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "baseName": { + "id": 4148, + "name": "IERC5267", + "nameLocations": [ + "1988:8:16" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 262, + "src": "1988:8:16" + }, + "id": 4149, + "nodeType": "InheritanceSpecifier", + "src": "1988:8:16" + } + ], + "canonicalName": "EIP712", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4147, + "nodeType": "StructuredDocumentation", + "src": "316:1643:16", + "text": " @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n ({_hashTypedDataV4}).\n The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n the chain id to protect against replay attacks on an eventual fork of the chain.\n NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n @custom:oz-upgrades-unsafe-allow state-variable-immutable" + }, + "fullyImplemented": true, + "id": 4364, + "linearizedBaseContracts": [ + 4364, + 262 + ], + "name": "EIP712", + "nameLocation": "1978:6:16", + "nodeType": "ContractDefinition", + "nodes": [ + { + "global": false, + "id": 4151, + "libraryName": { + "id": 4150, + "name": "ShortStrings", + "nameLocations": [ + "2009:12:16" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2044, + "src": "2009:12:16" + }, + "nodeType": "UsingForDirective", + "src": "2003:25:16" + }, + { + "constant": true, + "id": 4156, + "mutability": "constant", + "name": "TYPE_HASH", + "nameLocation": "2059:9:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2034:140:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4152, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2034:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", + "id": 4154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2089:84:16", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f", + "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"" + }, + "value": "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f", + "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"" + } + ], + "id": 4153, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2079:9:16", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2079:95:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4158, + "mutability": "immutable", + "name": "_cachedDomainSeparator", + "nameLocation": "2399:22:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2373:48:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4157, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2373:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4160, + "mutability": "immutable", + "name": "_cachedChainId", + "nameLocation": "2453:14:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2427:40:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2427:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4162, + "mutability": "immutable", + "name": "_cachedThis", + "nameLocation": "2499:11:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2473:37:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2473:7:16", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4164, + "mutability": "immutable", + "name": "_hashedName", + "nameLocation": "2543:11:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2517:37:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4163, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2517:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4166, + "mutability": "immutable", + "name": "_hashedVersion", + "nameLocation": "2586:14:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2560:40:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4165, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2560:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4169, + "mutability": "immutable", + "name": "_name", + "nameLocation": "2637:5:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2607:35:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 4168, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4167, + "name": "ShortString", + "nameLocations": [ + "2607:11:16" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2607:11:16" + }, + "referencedDeclaration": 1833, + "src": "2607:11:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4172, + "mutability": "immutable", + "name": "_version", + "nameLocation": "2678:8:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2648:38:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 4171, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4170, + "name": "ShortString", + "nameLocations": [ + "2648:11:16" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2648:11:16" + }, + "referencedDeclaration": 1833, + "src": "2648:11:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4174, + "mutability": "mutable", + "name": "_nameFallback", + "nameLocation": "2757:13:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2742:28:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4173, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2742:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4176, + "mutability": "mutable", + "name": "_versionFallback", + "nameLocation": "2841:16:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2826:31:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4175, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2826:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 4233, + "nodeType": "Block", + "src": "3483:376:16", + "statements": [ + { + "expression": { + "id": 4189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4169, + "src": "3493:5:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4187, + "name": "_nameFallback", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4174, + "src": "3532:13:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 4185, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4179, + "src": "3501:4:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 4186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3506:25:16", + "memberName": "toShortStringWithFallback", + "nodeType": "MemberAccess", + "referencedDeclaration": 1985, + "src": "3501:30:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_storage_ptr_$returns$_t_userDefinedValueType$_ShortString_$1833_$attached_to$_t_string_memory_ptr_$", + "typeString": "function (string memory,string storage pointer) returns (ShortString)" + } + }, + "id": 4188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3501:45:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "src": "3493:53:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "id": 4190, + "nodeType": "ExpressionStatement", + "src": "3493:53:16" + }, + { + "expression": { + "id": 4196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4191, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4172, + "src": "3556:8:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4194, + "name": "_versionFallback", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4176, + "src": "3601:16:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 4192, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4181, + "src": "3567:7:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 4193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3575:25:16", + "memberName": "toShortStringWithFallback", + "nodeType": "MemberAccess", + "referencedDeclaration": 1985, + "src": "3567:33:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_storage_ptr_$returns$_t_userDefinedValueType$_ShortString_$1833_$attached_to$_t_string_memory_ptr_$", + "typeString": "function (string memory,string storage pointer) returns (ShortString)" + } + }, + "id": 4195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3567:51:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "src": "3556:62:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "id": 4197, + "nodeType": "ExpressionStatement", + "src": "3556:62:16" + }, + { + "expression": { + "id": 4205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4198, + "name": "_hashedName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4164, + "src": "3628:11:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 4202, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4179, + "src": "3658:4:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3652:5:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4200, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3652:5:16", + "typeDescriptions": {} + } + }, + "id": 4203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3652:11:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4199, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "3642:9:16", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3642:22:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3628:36:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4206, + "nodeType": "ExpressionStatement", + "src": "3628:36:16" + }, + { + "expression": { + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4207, + "name": "_hashedVersion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4166, + "src": "3674:14:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 4211, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4181, + "src": "3707:7:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3701:5:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4209, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3701:5:16", + "typeDescriptions": {} + } + }, + "id": 4212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3701:14:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4208, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "3691:9:16", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3691:25:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3674:42:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4215, + "nodeType": "ExpressionStatement", + "src": "3674:42:16" + }, + { + "expression": { + "id": 4219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4216, + "name": "_cachedChainId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4160, + "src": "3727:14:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 4217, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "3744:5:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3750:7:16", + "memberName": "chainid", + "nodeType": "MemberAccess", + "src": "3744:13:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3727:30:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4220, + "nodeType": "ExpressionStatement", + "src": "3727:30:16" + }, + { + "expression": { + "id": 4224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4221, + "name": "_cachedDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4158, + "src": "3767:22:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4222, + "name": "_buildDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4281, + "src": "3792:21:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 4223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3792:23:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3767:48:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4225, + "nodeType": "ExpressionStatement", + "src": "3767:48:16" + }, + { + "expression": { + "id": 4231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4226, + "name": "_cachedThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4162, + "src": "3825:11:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4229, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3847:4:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + ], + "id": 4228, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3839:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4227, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3839:7:16", + "typeDescriptions": {} + } + }, + "id": 4230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3839:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3825:27:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4232, + "nodeType": "ExpressionStatement", + "src": "3825:27:16" + } + ] + }, + "documentation": { + "id": 4177, + "nodeType": "StructuredDocumentation", + "src": "2864:559:16", + "text": " @dev Initializes the domain separator and parameter caches.\n The meaning of `name` and `version` is specified in\n https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n - `version`: the current major version of the signing domain.\n NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n contract upgrade]." + }, + "id": 4234, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4179, + "mutability": "mutable", + "name": "name", + "nameLocation": "3454:4:16", + "nodeType": "VariableDeclaration", + "scope": 4234, + "src": "3440:18:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4178, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3440:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4181, + "mutability": "mutable", + "name": "version", + "nameLocation": "3474:7:16", + "nodeType": "VariableDeclaration", + "scope": 4234, + "src": "3460:21:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4180, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3460:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3439:43:16" + }, + "returnParameters": { + "id": 4183, + "nodeType": "ParameterList", + "parameters": [], + "src": "3483:0:16" + }, + "scope": 4364, + "src": "3428:431:16", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4259, + "nodeType": "Block", + "src": "4007:200:16", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4242, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4029:4:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + ], + "id": 4241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4021:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4240, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4021:7:16", + "typeDescriptions": {} + } + }, + "id": 4243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4021:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4244, + "name": "_cachedThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4162, + "src": "4038:11:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4021:28:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4246, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "4053:5:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4059:7:16", + "memberName": "chainid", + "nodeType": "MemberAccess", + "src": "4053:13:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4248, + "name": "_cachedChainId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4160, + "src": "4070:14:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4053:31:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4021:63:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4257, + "nodeType": "Block", + "src": "4146:55:16", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4254, + "name": "_buildDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4281, + "src": "4167:21:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4167:23:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4239, + "id": 4256, + "nodeType": "Return", + "src": "4160:30:16" + } + ] + }, + "id": 4258, + "nodeType": "IfStatement", + "src": "4017:184:16", + "trueBody": { + "id": 4253, + "nodeType": "Block", + "src": "4086:54:16", + "statements": [ + { + "expression": { + "id": 4251, + "name": "_cachedDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4158, + "src": "4107:22:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4239, + "id": 4252, + "nodeType": "Return", + "src": "4100:29:16" + } + ] + } + } + ] + }, + "documentation": { + "id": 4235, + "nodeType": "StructuredDocumentation", + "src": "3865:75:16", + "text": " @dev Returns the domain separator for the current chain." + }, + "id": 4260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_domainSeparatorV4", + "nameLocation": "3954:18:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4236, + "nodeType": "ParameterList", + "parameters": [], + "src": "3972:2:16" + }, + "returnParameters": { + "id": 4239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4238, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4260, + "src": "3998:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4237, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3998:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3997:9:16" + }, + "scope": 4364, + "src": "3945:262:16", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4280, + "nodeType": "Block", + "src": "4277:115:16", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4268, + "name": "TYPE_HASH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4156, + "src": "4315:9:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4269, + "name": "_hashedName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4164, + "src": "4326:11:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4270, + "name": "_hashedVersion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4166, + "src": "4339:14:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 4271, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "4355:5:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4361:7:16", + "memberName": "chainid", + "nodeType": "MemberAccess", + "src": "4355:13:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 4275, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4378:4:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + ], + "id": 4274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4370:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4273, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4370:7:16", + "typeDescriptions": {} + } + }, + "id": 4276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4370:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4266, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "4304:3:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4308:6:16", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "4304:10:16", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4304:80:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4265, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "4294:9:16", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4294:91:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4264, + "id": 4279, + "nodeType": "Return", + "src": "4287:98:16" + } + ] + }, + "id": 4281, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_buildDomainSeparator", + "nameLocation": "4222:21:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4261, + "nodeType": "ParameterList", + "parameters": [], + "src": "4243:2:16" + }, + "returnParameters": { + "id": 4264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4263, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4281, + "src": "4268:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4262, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4268:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4267:9:16" + }, + "scope": 4364, + "src": "4213:179:16", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 4296, + "nodeType": "Block", + "src": "5103:90:16", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4291, + "name": "_domainSeparatorV4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4260, + "src": "5153:18:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 4292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5153:20:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4293, + "name": "structHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4284, + "src": "5175:10:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 4289, + "name": "MessageHashUtils", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4535, + "src": "5120:16:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MessageHashUtils_$4535_$", + "typeString": "type(library MessageHashUtils)" + } + }, + "id": 4290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5137:15:16", + "memberName": "toTypedDataHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 4451, + "src": "5120:32:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 4294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5120:66:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4288, + "id": 4295, + "nodeType": "Return", + "src": "5113:73:16" + } + ] + }, + "documentation": { + "id": 4282, + "nodeType": "StructuredDocumentation", + "src": "4398:614:16", + "text": " @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n function returns the hash of the fully encoded EIP712 message for this domain.\n This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n ```solidity\n bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n keccak256(\"Mail(address to,string contents)\"),\n mailTo,\n keccak256(bytes(mailContents))\n )));\n address signer = ECDSA.recover(digest, signature);\n ```" + }, + "id": 4297, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_hashTypedDataV4", + "nameLocation": "5026:16:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4284, + "mutability": "mutable", + "name": "structHash", + "nameLocation": "5051:10:16", + "nodeType": "VariableDeclaration", + "scope": 4297, + "src": "5043:18:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4283, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5043:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5042:20:16" + }, + "returnParameters": { + "id": 4288, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4287, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4297, + "src": "5094:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4286, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5094:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5093:9:16" + }, + "scope": 4364, + "src": "5017:176:16", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 261 + ], + "body": { + "id": 4338, + "nodeType": "Block", + "src": "5556:229:16", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "0f", + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "hexString", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5587:7:16", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3d725c5ee53025f027da36bea8d3af3b6a3e9d2d1542d47c162631de48e66c1c", + "typeString": "literal_string hex\"0f\"" + }, + "value": "\u000f" + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4317, + "name": "_EIP712Name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4351, + "src": "5617:11:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_string_memory_ptr_$", + "typeString": "function () view returns (string memory)" + } + }, + "id": 4318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5617:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4319, + "name": "_EIP712Version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4363, + "src": "5644:14:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_string_memory_ptr_$", + "typeString": "function () view returns (string memory)" + } + }, + "id": 4320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5644:16:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "expression": { + "id": 4321, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "5674:5:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5680:7:16", + "memberName": "chainid", + "nodeType": "MemberAccess", + "src": "5674:13:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 4325, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5709:4:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + ], + "id": 4324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5701:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4323, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5701:7:16", + "typeDescriptions": {} + } + }, + "id": 4326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5701:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 4329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5736:1:16", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5728:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4327, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5728:7:16", + "typeDescriptions": {} + } + }, + "id": 4330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5728:10:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 4334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5766:1:16", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "5752:13:16", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint256[] memory)" + }, + "typeName": { + "baseType": { + "id": 4331, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5756:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4332, + "nodeType": "ArrayTypeName", + "src": "5756:9:16", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 4335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5752:16:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "id": 4336, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5573:205:16", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_stringliteral_3d725c5ee53025f027da36bea8d3af3b6a3e9d2d1542d47c162631de48e66c1c_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_address_$_t_bytes32_$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "tuple(literal_string hex\"0f\",string memory,string memory,uint256,address,bytes32,uint256[] memory)" + } + }, + "functionReturnParameters": 4315, + "id": 4337, + "nodeType": "Return", + "src": "5566:212:16" + } + ] + }, + "documentation": { + "id": 4298, + "nodeType": "StructuredDocumentation", + "src": "5199:24:16", + "text": "@inheritdoc IERC5267" + }, + "functionSelector": "84b0196e", + "id": 4339, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "eip712Domain", + "nameLocation": "5237:12:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4299, + "nodeType": "ParameterList", + "parameters": [], + "src": "5249:2:16" + }, + "returnParameters": { + "id": 4315, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4301, + "mutability": "mutable", + "name": "fields", + "nameLocation": "5333:6:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5326:13:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 4300, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "5326:6:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4303, + "mutability": "mutable", + "name": "name", + "nameLocation": "5367:4:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5353:18:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4302, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5353:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4305, + "mutability": "mutable", + "name": "version", + "nameLocation": "5399:7:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5385:21:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4304, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5385:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4307, + "mutability": "mutable", + "name": "chainId", + "nameLocation": "5428:7:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5420:15:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5420:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4309, + "mutability": "mutable", + "name": "verifyingContract", + "nameLocation": "5457:17:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5449:25:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5449:7:16", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4311, + "mutability": "mutable", + "name": "salt", + "nameLocation": "5496:4:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5488:12:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4310, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5488:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4314, + "mutability": "mutable", + "name": "extensions", + "nameLocation": "5531:10:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5514:27:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5514:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4313, + "nodeType": "ArrayTypeName", + "src": "5514:9:16", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "5312:239:16" + }, + "scope": 4364, + "src": "5228:557:16", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 4350, + "nodeType": "Block", + "src": "6166:65:16", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4347, + "name": "_nameFallback", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4174, + "src": "6210:13:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 4345, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4169, + "src": "6183:5:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "id": 4346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6189:20:16", + "memberName": "toStringWithFallback", + "nodeType": "MemberAccess", + "referencedDeclaration": 2012, + "src": "6183:26:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$_t_string_storage_ptr_$returns$_t_string_memory_ptr_$attached_to$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (ShortString,string storage pointer) pure returns (string memory)" + } + }, + "id": 4348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6183:41:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 4344, + "id": 4349, + "nodeType": "Return", + "src": "6176:48:16" + } + ] + }, + "documentation": { + "id": 4340, + "nodeType": "StructuredDocumentation", + "src": "5791:256:16", + "text": " @dev The name parameter for the EIP712 domain.\n NOTE: By default this function reads _name which is an immutable value.\n It only reads from storage if necessary (in case the value is too large to fit in a ShortString)." + }, + "id": 4351, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_EIP712Name", + "nameLocation": "6114:11:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4341, + "nodeType": "ParameterList", + "parameters": [], + "src": "6125:2:16" + }, + "returnParameters": { + "id": 4344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4343, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4351, + "src": "6151:13:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4342, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6151:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "6150:15:16" + }, + "scope": 4364, + "src": "6105:126:16", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4362, + "nodeType": "Block", + "src": "6621:71:16", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4359, + "name": "_versionFallback", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4176, + "src": "6668:16:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 4357, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4172, + "src": "6638:8:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "id": 4358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6647:20:16", + "memberName": "toStringWithFallback", + "nodeType": "MemberAccess", + "referencedDeclaration": 2012, + "src": "6638:29:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$_t_string_storage_ptr_$returns$_t_string_memory_ptr_$attached_to$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (ShortString,string storage pointer) pure returns (string memory)" + } + }, + "id": 4360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6638:47:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 4356, + "id": 4361, + "nodeType": "Return", + "src": "6631:54:16" + } + ] + }, + "documentation": { + "id": 4352, + "nodeType": "StructuredDocumentation", + "src": "6237:262:16", + "text": " @dev The version parameter for the EIP712 domain.\n NOTE: By default this function reads _version which is an immutable value.\n It only reads from storage if necessary (in case the value is too large to fit in a ShortString)." + }, + "id": 4363, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_EIP712Version", + "nameLocation": "6566:14:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4353, + "nodeType": "ParameterList", + "parameters": [], + "src": "6580:2:16" + }, + "returnParameters": { + "id": 4356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4355, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4363, + "src": "6606:13:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4354, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6606:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "6605:15:16" + }, + "scope": 4364, + "src": "6557:135:16", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4365, + "src": "1960:4734:16", + "usedErrors": [ + 1841, + 1843 + ], + "usedEvents": [ + 242 + ] + } + ], + "src": "113:6582:16" + }, + "id": 16 + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol", + "exportedSymbols": { + "MessageHashUtils": [ + 4535 + ], + "Strings": [ + 3678 + ] + }, + "id": 4536, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4366, + "literals": [ + "solidity", + "^", + "0.8", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "123:24:17" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Strings.sol", + "file": "../Strings.sol", + "id": 4368, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4536, + "sourceUnit": 3679, + "src": "149:39:17", + "symbolAliases": [ + { + "foreign": { + "id": 4367, + "name": "Strings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3678, + "src": "157:7:17", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MessageHashUtils", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 4369, + "nodeType": "StructuredDocumentation", + "src": "190:330:17", + "text": " @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n The library provides methods for generating a hash of a message that conforms to the\n https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n specifications." + }, + "fullyImplemented": true, + "id": 4535, + "linearizedBaseContracts": [ + 4535 + ], + "name": "MessageHashUtils", + "nameLocation": "529:16:17", + "nodeType": "ContractDefinition", + "nodes": [ + { + "errorSelector": "db00f904", + "id": 4371, + "name": "ERC5267ExtensionsNotSupported", + "nameLocation": "558:29:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4370, + "nodeType": "ParameterList", + "parameters": [], + "src": "587:2:17" + }, + "src": "552:38:17" + }, + { + "body": { + "id": 4380, + "nodeType": "Block", + "src": "1383:341:17", + "statements": [ + { + "AST": { + "nativeSrc": "1418:300:17", + "nodeType": "YulBlock", + "src": "1418:300:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1439:4:17", + "nodeType": "YulLiteral", + "src": "1439:4:17", + "type": "", + "value": "0x00" + }, + { + "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332", + "kind": "string", + "nativeSrc": "1445:34:17", + "nodeType": "YulLiteral", + "src": "1445:34:17", + "type": "", + "value": "\u0019Ethereum Signed Message:\n32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1432:6:17", + "nodeType": "YulIdentifier", + "src": "1432:6:17" + }, + "nativeSrc": "1432:48:17", + "nodeType": "YulFunctionCall", + "src": "1432:48:17" + }, + "nativeSrc": "1432:48:17", + "nodeType": "YulExpressionStatement", + "src": "1432:48:17" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1541:4:17", + "nodeType": "YulLiteral", + "src": "1541:4:17", + "type": "", + "value": "0x1c" + }, + { + "name": "messageHash", + "nativeSrc": "1547:11:17", + "nodeType": "YulIdentifier", + "src": "1547:11:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1534:6:17", + "nodeType": "YulIdentifier", + "src": "1534:6:17" + }, + "nativeSrc": "1534:25:17", + "nodeType": "YulFunctionCall", + "src": "1534:25:17" + }, + "nativeSrc": "1534:25:17", + "nodeType": "YulExpressionStatement", + "src": "1534:25:17" + }, + { + "nativeSrc": "1613:31:17", + "nodeType": "YulAssignment", + "src": "1613:31:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1633:4:17", + "nodeType": "YulLiteral", + "src": "1633:4:17", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "1639:4:17", + "nodeType": "YulLiteral", + "src": "1639:4:17", + "type": "", + "value": "0x3c" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "1623:9:17", + "nodeType": "YulIdentifier", + "src": "1623:9:17" + }, + "nativeSrc": "1623:21:17", + "nodeType": "YulFunctionCall", + "src": "1623:21:17" + }, + "variableNames": [ + { + "name": "digest", + "nativeSrc": "1613:6:17", + "nodeType": "YulIdentifier", + "src": "1613:6:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4377, + "isOffset": false, + "isSlot": false, + "src": "1613:6:17", + "valueSize": 1 + }, + { + "declaration": 4374, + "isOffset": false, + "isSlot": false, + "src": "1547:11:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4379, + "nodeType": "InlineAssembly", + "src": "1393:325:17" + } + ] + }, + "documentation": { + "id": 4372, + "nodeType": "StructuredDocumentation", + "src": "596:690:17", + "text": " @dev Returns the keccak256 digest of an ERC-191 signed data with version\n `0x45` (`personal_sign` messages).\n The digest is calculated by prefixing a bytes32 `messageHash` with\n `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n keccak256, although any bytes32 value can be safely used because the final digest will\n be re-hashed.\n See {ECDSA-recover}." + }, + "id": 4381, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toEthSignedMessageHash", + "nameLocation": "1300:22:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4375, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4374, + "mutability": "mutable", + "name": "messageHash", + "nameLocation": "1331:11:17", + "nodeType": "VariableDeclaration", + "scope": 4381, + "src": "1323:19:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4373, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1323:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1322:21:17" + }, + "returnParameters": { + "id": 4378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4377, + "mutability": "mutable", + "name": "digest", + "nameLocation": "1375:6:17", + "nodeType": "VariableDeclaration", + "scope": 4381, + "src": "1367:14:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4376, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1367:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1366:16:17" + }, + "scope": 4535, + "src": "1291:433:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4406, + "nodeType": "Block", + "src": "2301:143:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a", + "id": 4393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2353:32:17", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9af2d9c228f6cfddaa6d1e5b94e0bce4ab16bd9a472a2b7fbfd74ebff4c720b4", + "typeString": "literal_string hex\"19457468657265756d205369676e6564204d6573736167653a0a\"" + }, + "value": "\u0019Ethereum Signed Message:\n" + }, + { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 4398, + "name": "message", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "2410:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 4399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2418:6:17", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2410:14:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4396, + "name": "Strings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3678, + "src": "2393:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Strings_$3678_$", + "typeString": "type(library Strings)" + } + }, + "id": 4397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2401:8:17", + "memberName": "toString", + "nodeType": "MemberAccess", + "referencedDeclaration": 2261, + "src": "2393:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 4400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2393:32:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2387:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4394, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2387:5:17", + "typeDescriptions": {} + } + }, + "id": 4401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2387:39:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 4402, + "name": "message", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "2428:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_9af2d9c228f6cfddaa6d1e5b94e0bce4ab16bd9a472a2b7fbfd74ebff4c720b4", + "typeString": "literal_string hex\"19457468657265756d205369676e6564204d6573736167653a0a\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2340:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4390, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2340:5:17", + "typeDescriptions": {} + } + }, + "id": 4392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2346:6:17", + "memberName": "concat", + "nodeType": "MemberAccess", + "src": "2340:12:17", + "typeDescriptions": { + "typeIdentifier": "t_function_bytesconcat_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2340:96:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4389, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2330:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2330:107:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4388, + "id": 4405, + "nodeType": "Return", + "src": "2311:126:17" + } + ] + }, + "documentation": { + "id": 4382, + "nodeType": "StructuredDocumentation", + "src": "1730:480:17", + "text": " @dev Returns the keccak256 digest of an ERC-191 signed data with version\n `0x45` (`personal_sign` messages).\n The digest is calculated by prefixing an arbitrary `message` with\n `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n See {ECDSA-recover}." + }, + "id": 4407, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toEthSignedMessageHash", + "nameLocation": "2224:22:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4385, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4384, + "mutability": "mutable", + "name": "message", + "nameLocation": "2260:7:17", + "nodeType": "VariableDeclaration", + "scope": 4407, + "src": "2247:20:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4383, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2247:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2246:22:17" + }, + "returnParameters": { + "id": 4388, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4387, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4407, + "src": "2292:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4386, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2292:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2291:9:17" + }, + "scope": 4535, + "src": "2215:229:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4426, + "nodeType": "Block", + "src": "2898:80:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "1900", + "id": 4420, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "hexString", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2942:10:17", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73fd5d154550a4a103564cb191928cd38898034de1b952dc21b290898b4b697a", + "typeString": "literal_string hex\"1900\"" + }, + "value": "\u0019\u0000" + }, + { + "id": 4421, + "name": "validator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4410, + "src": "2954:9:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4422, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4412, + "src": "2965:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_73fd5d154550a4a103564cb191928cd38898034de1b952dc21b290898b4b697a", + "typeString": "literal_string hex\"1900\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4418, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2925:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2929:12:17", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2925:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2925:45:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4417, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2915:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2915:56:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4416, + "id": 4425, + "nodeType": "Return", + "src": "2908:63:17" + } + ] + }, + "documentation": { + "id": 4408, + "nodeType": "StructuredDocumentation", + "src": "2450:332:17", + "text": " @dev Returns the keccak256 digest of an ERC-191 signed data with version\n `0x00` (data with intended validator).\n The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n `validator` address. Then hashing the result.\n See {ECDSA-recover}." + }, + "id": 4427, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDataWithIntendedValidatorHash", + "nameLocation": "2796:31:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4410, + "mutability": "mutable", + "name": "validator", + "nameLocation": "2836:9:17", + "nodeType": "VariableDeclaration", + "scope": 4427, + "src": "2828:17:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4409, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2828:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4412, + "mutability": "mutable", + "name": "data", + "nameLocation": "2860:4:17", + "nodeType": "VariableDeclaration", + "scope": 4427, + "src": "2847:17:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4411, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2847:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2827:38:17" + }, + "returnParameters": { + "id": 4416, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4415, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4427, + "src": "2889:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4414, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2889:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2888:9:17" + }, + "scope": 4535, + "src": "2787:191:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4438, + "nodeType": "Block", + "src": "3260:216:17", + "statements": [ + { + "AST": { + "nativeSrc": "3295:175:17", + "nodeType": "YulBlock", + "src": "3295:175:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3316:4:17", + "nodeType": "YulLiteral", + "src": "3316:4:17", + "type": "", + "value": "0x00" + }, + { + "hexValue": "1900", + "kind": "string", + "nativeSrc": "3322:10:17", + "nodeType": "YulLiteral", + "src": "3322:10:17", + "type": "", + "value": "\u0019\u0000" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3309:6:17", + "nodeType": "YulIdentifier", + "src": "3309:6:17" + }, + "nativeSrc": "3309:24:17", + "nodeType": "YulFunctionCall", + "src": "3309:24:17" + }, + "nativeSrc": "3309:24:17", + "nodeType": "YulExpressionStatement", + "src": "3309:24:17" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3353:4:17", + "nodeType": "YulLiteral", + "src": "3353:4:17", + "type": "", + "value": "0x02" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3363:2:17", + "nodeType": "YulLiteral", + "src": "3363:2:17", + "type": "", + "value": "96" + }, + { + "name": "validator", + "nativeSrc": "3367:9:17", + "nodeType": "YulIdentifier", + "src": "3367:9:17" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3359:3:17", + "nodeType": "YulIdentifier", + "src": "3359:3:17" + }, + "nativeSrc": "3359:18:17", + "nodeType": "YulFunctionCall", + "src": "3359:18:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3346:6:17", + "nodeType": "YulIdentifier", + "src": "3346:6:17" + }, + "nativeSrc": "3346:32:17", + "nodeType": "YulFunctionCall", + "src": "3346:32:17" + }, + "nativeSrc": "3346:32:17", + "nodeType": "YulExpressionStatement", + "src": "3346:32:17" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3398:4:17", + "nodeType": "YulLiteral", + "src": "3398:4:17", + "type": "", + "value": "0x16" + }, + { + "name": "messageHash", + "nativeSrc": "3404:11:17", + "nodeType": "YulIdentifier", + "src": "3404:11:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3391:6:17", + "nodeType": "YulIdentifier", + "src": "3391:6:17" + }, + "nativeSrc": "3391:25:17", + "nodeType": "YulFunctionCall", + "src": "3391:25:17" + }, + "nativeSrc": "3391:25:17", + "nodeType": "YulExpressionStatement", + "src": "3391:25:17" + }, + { + "nativeSrc": "3429:31:17", + "nodeType": "YulAssignment", + "src": "3429:31:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3449:4:17", + "nodeType": "YulLiteral", + "src": "3449:4:17", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "3455:4:17", + "nodeType": "YulLiteral", + "src": "3455:4:17", + "type": "", + "value": "0x36" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "3439:9:17", + "nodeType": "YulIdentifier", + "src": "3439:9:17" + }, + "nativeSrc": "3439:21:17", + "nodeType": "YulFunctionCall", + "src": "3439:21:17" + }, + "variableNames": [ + { + "name": "digest", + "nativeSrc": "3429:6:17", + "nodeType": "YulIdentifier", + "src": "3429:6:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4435, + "isOffset": false, + "isSlot": false, + "src": "3429:6:17", + "valueSize": 1 + }, + { + "declaration": 4432, + "isOffset": false, + "isSlot": false, + "src": "3404:11:17", + "valueSize": 1 + }, + { + "declaration": 4430, + "isOffset": false, + "isSlot": false, + "src": "3367:9:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4437, + "nodeType": "InlineAssembly", + "src": "3270:200:17" + } + ] + }, + "documentation": { + "id": 4428, + "nodeType": "StructuredDocumentation", + "src": "2984:129:17", + "text": " @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32." + }, + "id": 4439, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDataWithIntendedValidatorHash", + "nameLocation": "3127:31:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4430, + "mutability": "mutable", + "name": "validator", + "nameLocation": "3176:9:17", + "nodeType": "VariableDeclaration", + "scope": 4439, + "src": "3168:17:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3168:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4432, + "mutability": "mutable", + "name": "messageHash", + "nameLocation": "3203:11:17", + "nodeType": "VariableDeclaration", + "scope": 4439, + "src": "3195:19:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4431, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3195:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3158:62:17" + }, + "returnParameters": { + "id": 4436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4435, + "mutability": "mutable", + "name": "digest", + "nameLocation": "3252:6:17", + "nodeType": "VariableDeclaration", + "scope": 4439, + "src": "3244:14:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4434, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3244:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3243:16:17" + }, + "scope": 4535, + "src": "3118:358:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4450, + "nodeType": "Block", + "src": "4027:265:17", + "statements": [ + { + "AST": { + "nativeSrc": "4062:224:17", + "nodeType": "YulBlock", + "src": "4062:224:17", + "statements": [ + { + "nativeSrc": "4076:22:17", + "nodeType": "YulVariableDeclaration", + "src": "4076:22:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4093:4:17", + "nodeType": "YulLiteral", + "src": "4093:4:17", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4087:5:17", + "nodeType": "YulIdentifier", + "src": "4087:5:17" + }, + "nativeSrc": "4087:11:17", + "nodeType": "YulFunctionCall", + "src": "4087:11:17" + }, + "variables": [ + { + "name": "ptr", + "nativeSrc": "4080:3:17", + "nodeType": "YulTypedName", + "src": "4080:3:17", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "4118:3:17", + "nodeType": "YulIdentifier", + "src": "4118:3:17" + }, + { + "hexValue": "1901", + "kind": "string", + "nativeSrc": "4123:10:17", + "nodeType": "YulLiteral", + "src": "4123:10:17", + "type": "", + "value": "\u0019\u0001" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4111:6:17", + "nodeType": "YulIdentifier", + "src": "4111:6:17" + }, + "nativeSrc": "4111:23:17", + "nodeType": "YulFunctionCall", + "src": "4111:23:17" + }, + "nativeSrc": "4111:23:17", + "nodeType": "YulExpressionStatement", + "src": "4111:23:17" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "4158:3:17", + "nodeType": "YulIdentifier", + "src": "4158:3:17" + }, + { + "kind": "number", + "nativeSrc": "4163:4:17", + "nodeType": "YulLiteral", + "src": "4163:4:17", + "type": "", + "value": "0x02" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4154:3:17", + "nodeType": "YulIdentifier", + "src": "4154:3:17" + }, + "nativeSrc": "4154:14:17", + "nodeType": "YulFunctionCall", + "src": "4154:14:17" + }, + { + "name": "domainSeparator", + "nativeSrc": "4170:15:17", + "nodeType": "YulIdentifier", + "src": "4170:15:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4147:6:17", + "nodeType": "YulIdentifier", + "src": "4147:6:17" + }, + "nativeSrc": "4147:39:17", + "nodeType": "YulFunctionCall", + "src": "4147:39:17" + }, + "nativeSrc": "4147:39:17", + "nodeType": "YulExpressionStatement", + "src": "4147:39:17" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "4210:3:17", + "nodeType": "YulIdentifier", + "src": "4210:3:17" + }, + { + "kind": "number", + "nativeSrc": "4215:4:17", + "nodeType": "YulLiteral", + "src": "4215:4:17", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4206:3:17", + "nodeType": "YulIdentifier", + "src": "4206:3:17" + }, + "nativeSrc": "4206:14:17", + "nodeType": "YulFunctionCall", + "src": "4206:14:17" + }, + { + "name": "structHash", + "nativeSrc": "4222:10:17", + "nodeType": "YulIdentifier", + "src": "4222:10:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4199:6:17", + "nodeType": "YulIdentifier", + "src": "4199:6:17" + }, + "nativeSrc": "4199:34:17", + "nodeType": "YulFunctionCall", + "src": "4199:34:17" + }, + "nativeSrc": "4199:34:17", + "nodeType": "YulExpressionStatement", + "src": "4199:34:17" + }, + { + "nativeSrc": "4246:30:17", + "nodeType": "YulAssignment", + "src": "4246:30:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "4266:3:17", + "nodeType": "YulIdentifier", + "src": "4266:3:17" + }, + { + "kind": "number", + "nativeSrc": "4271:4:17", + "nodeType": "YulLiteral", + "src": "4271:4:17", + "type": "", + "value": "0x42" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "4256:9:17", + "nodeType": "YulIdentifier", + "src": "4256:9:17" + }, + "nativeSrc": "4256:20:17", + "nodeType": "YulFunctionCall", + "src": "4256:20:17" + }, + "variableNames": [ + { + "name": "digest", + "nativeSrc": "4246:6:17", + "nodeType": "YulIdentifier", + "src": "4246:6:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4447, + "isOffset": false, + "isSlot": false, + "src": "4246:6:17", + "valueSize": 1 + }, + { + "declaration": 4442, + "isOffset": false, + "isSlot": false, + "src": "4170:15:17", + "valueSize": 1 + }, + { + "declaration": 4444, + "isOffset": false, + "isSlot": false, + "src": "4222:10:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4449, + "nodeType": "InlineAssembly", + "src": "4037:249:17" + } + ] + }, + "documentation": { + "id": 4440, + "nodeType": "StructuredDocumentation", + "src": "3482:431:17", + "text": " @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n See {ECDSA-recover}." + }, + "id": 4451, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toTypedDataHash", + "nameLocation": "3927:15:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4445, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4442, + "mutability": "mutable", + "name": "domainSeparator", + "nameLocation": "3951:15:17", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "3943:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4441, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3943:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4444, + "mutability": "mutable", + "name": "structHash", + "nameLocation": "3976:10:17", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "3968:18:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4443, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3968:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3942:45:17" + }, + "returnParameters": { + "id": 4448, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4447, + "mutability": "mutable", + "name": "digest", + "nameLocation": "4019:6:17", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "4011:14:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4446, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4011:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4010:16:17" + }, + "scope": 4535, + "src": "3918:374:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4488, + "nodeType": "Block", + "src": "5222:256:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4470, + "name": "fields", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "5286:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 4474, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4456, + "src": "5326:4:17", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5320:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4472, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5320:5:17", + "typeDescriptions": {} + } + }, + "id": 4475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5320:11:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4471, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "5310:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5310:22:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 4480, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4458, + "src": "5366:7:17", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5360:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4478, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5360:5:17", + "typeDescriptions": {} + } + }, + "id": 4481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5360:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4477, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "5350:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5350:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4483, + "name": "chainId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "5393:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4484, + "name": "verifyingContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4462, + "src": "5418:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4485, + "name": "salt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4464, + "src": "5453:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4469, + "name": "toDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4489, + 4515 + ], + "referencedDeclaration": 4515, + "src": "5251:17:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes1_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_address_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes1,bytes32,bytes32,uint256,address,bytes32) pure returns (bytes32)" + } + }, + "id": 4486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5251:220:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4468, + "id": 4487, + "nodeType": "Return", + "src": "5232:239:17" + } + ] + }, + "documentation": { + "id": 4452, + "nodeType": "StructuredDocumentation", + "src": "4298:685:17", + "text": " @dev Returns the EIP-712 domain separator constructed from an `eip712Domain`. See {IERC5267-eip712Domain}\n This function dynamically constructs the domain separator based on which fields are present in the\n `fields` parameter. It contains flags that indicate which domain fields are present:\n * Bit 0 (0x01): name\n * Bit 1 (0x02): version\n * Bit 2 (0x04): chainId\n * Bit 3 (0x08): verifyingContract\n * Bit 4 (0x10): salt\n Arguments that correspond to fields which are not present in `fields` are ignored. For example, if `fields` is\n `0x0f` (`0b01111`), then the `salt` parameter is ignored." + }, + "id": 4489, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDomainSeparator", + "nameLocation": "4997:17:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4454, + "mutability": "mutable", + "name": "fields", + "nameLocation": "5031:6:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5024:13:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 4453, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "5024:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4456, + "mutability": "mutable", + "name": "name", + "nameLocation": "5061:4:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5047:18:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4455, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5047:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4458, + "mutability": "mutable", + "name": "version", + "nameLocation": "5089:7:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5075:21:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4457, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5075:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4460, + "mutability": "mutable", + "name": "chainId", + "nameLocation": "5114:7:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5106:15:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4459, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5106:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4462, + "mutability": "mutable", + "name": "verifyingContract", + "nameLocation": "5139:17:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5131:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5131:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4464, + "mutability": "mutable", + "name": "salt", + "nameLocation": "5174:4:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5166:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4463, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5166:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5014:170:17" + }, + "returnParameters": { + "id": 4468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4467, + "mutability": "mutable", + "name": "hash", + "nameLocation": "5216:4:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5208:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4466, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5208:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5207:14:17" + }, + "scope": 4535, + "src": "4988:490:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4514, + "nodeType": "Block", + "src": "5838:1051:17", + "statements": [ + { + "assignments": [ + 4508 + ], + "declarations": [ + { + "constant": false, + "id": 4508, + "mutability": "mutable", + "name": "domainTypeHash", + "nameLocation": "5856:14:17", + "nodeType": "VariableDeclaration", + "scope": 4514, + "src": "5848:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4507, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5848:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 4512, + "initialValue": { + "arguments": [ + { + "id": 4510, + "name": "fields", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4492, + "src": "5890:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 4509, + "name": "toDomainTypeHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4534, + "src": "5873:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_bytes32_$", + "typeString": "function (bytes1) pure returns (bytes32)" + } + }, + "id": 4511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5873:24:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5848:49:17" + }, + { + "AST": { + "nativeSrc": "5933:950:17", + "nodeType": "YulBlock", + "src": "5933:950:17", + "statements": [ + { + "nativeSrc": "6008:26:17", + "nodeType": "YulAssignment", + "src": "6008:26:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6022:3:17", + "nodeType": "YulLiteral", + "src": "6022:3:17", + "type": "", + "value": "248" + }, + { + "name": "fields", + "nativeSrc": "6027:6:17", + "nodeType": "YulIdentifier", + "src": "6027:6:17" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "6018:3:17", + "nodeType": "YulIdentifier", + "src": "6018:3:17" + }, + "nativeSrc": "6018:16:17", + "nodeType": "YulFunctionCall", + "src": "6018:16:17" + }, + "variableNames": [ + { + "name": "fields", + "nativeSrc": "6008:6:17", + "nodeType": "YulIdentifier", + "src": "6008:6:17" + } + ] + }, + { + "nativeSrc": "6089:22:17", + "nodeType": "YulVariableDeclaration", + "src": "6089:22:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6106:4:17", + "nodeType": "YulLiteral", + "src": "6106:4:17", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6100:5:17", + "nodeType": "YulIdentifier", + "src": "6100:5:17" + }, + "nativeSrc": "6100:11:17", + "nodeType": "YulFunctionCall", + "src": "6100:11:17" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "6093:3:17", + "nodeType": "YulTypedName", + "src": "6093:3:17", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "6131:3:17", + "nodeType": "YulIdentifier", + "src": "6131:3:17" + }, + { + "name": "domainTypeHash", + "nativeSrc": "6136:14:17", + "nodeType": "YulIdentifier", + "src": "6136:14:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6124:6:17", + "nodeType": "YulIdentifier", + "src": "6124:6:17" + }, + "nativeSrc": "6124:27:17", + "nodeType": "YulFunctionCall", + "src": "6124:27:17" + }, + "nativeSrc": "6124:27:17", + "nodeType": "YulExpressionStatement", + "src": "6124:27:17" + }, + { + "nativeSrc": "6165:25:17", + "nodeType": "YulVariableDeclaration", + "src": "6165:25:17", + "value": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "6180:3:17", + "nodeType": "YulIdentifier", + "src": "6180:3:17" + }, + { + "kind": "number", + "nativeSrc": "6185:4:17", + "nodeType": "YulLiteral", + "src": "6185:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6176:3:17", + "nodeType": "YulIdentifier", + "src": "6176:3:17" + }, + "nativeSrc": "6176:14:17", + "nodeType": "YulFunctionCall", + "src": "6176:14:17" + }, + "variables": [ + { + "name": "ptr", + "nativeSrc": "6169:3:17", + "nodeType": "YulTypedName", + "src": "6169:3:17", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "6224:91:17", + "nodeType": "YulBlock", + "src": "6224:91:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6249:3:17", + "nodeType": "YulIdentifier", + "src": "6249:3:17" + }, + { + "name": "nameHash", + "nativeSrc": "6254:8:17", + "nodeType": "YulIdentifier", + "src": "6254:8:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6242:6:17", + "nodeType": "YulIdentifier", + "src": "6242:6:17" + }, + "nativeSrc": "6242:21:17", + "nodeType": "YulFunctionCall", + "src": "6242:21:17" + }, + "nativeSrc": "6242:21:17", + "nodeType": "YulExpressionStatement", + "src": "6242:21:17" + }, + { + "nativeSrc": "6280:21:17", + "nodeType": "YulAssignment", + "src": "6280:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6291:3:17", + "nodeType": "YulIdentifier", + "src": "6291:3:17" + }, + { + "kind": "number", + "nativeSrc": "6296:4:17", + "nodeType": "YulLiteral", + "src": "6296:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6287:3:17", + "nodeType": "YulIdentifier", + "src": "6287:3:17" + }, + "nativeSrc": "6287:14:17", + "nodeType": "YulFunctionCall", + "src": "6287:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6280:3:17", + "nodeType": "YulIdentifier", + "src": "6280:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6210:6:17", + "nodeType": "YulIdentifier", + "src": "6210:6:17" + }, + { + "kind": "number", + "nativeSrc": "6218:4:17", + "nodeType": "YulLiteral", + "src": "6218:4:17", + "type": "", + "value": "0x01" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6206:3:17", + "nodeType": "YulIdentifier", + "src": "6206:3:17" + }, + "nativeSrc": "6206:17:17", + "nodeType": "YulFunctionCall", + "src": "6206:17:17" + }, + "nativeSrc": "6203:112:17", + "nodeType": "YulIf", + "src": "6203:112:17" + }, + { + "body": { + "nativeSrc": "6349:94:17", + "nodeType": "YulBlock", + "src": "6349:94:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6374:3:17", + "nodeType": "YulIdentifier", + "src": "6374:3:17" + }, + { + "name": "versionHash", + "nativeSrc": "6379:11:17", + "nodeType": "YulIdentifier", + "src": "6379:11:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6367:6:17", + "nodeType": "YulIdentifier", + "src": "6367:6:17" + }, + "nativeSrc": "6367:24:17", + "nodeType": "YulFunctionCall", + "src": "6367:24:17" + }, + "nativeSrc": "6367:24:17", + "nodeType": "YulExpressionStatement", + "src": "6367:24:17" + }, + { + "nativeSrc": "6408:21:17", + "nodeType": "YulAssignment", + "src": "6408:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6419:3:17", + "nodeType": "YulIdentifier", + "src": "6419:3:17" + }, + { + "kind": "number", + "nativeSrc": "6424:4:17", + "nodeType": "YulLiteral", + "src": "6424:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6415:3:17", + "nodeType": "YulIdentifier", + "src": "6415:3:17" + }, + "nativeSrc": "6415:14:17", + "nodeType": "YulFunctionCall", + "src": "6415:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6408:3:17", + "nodeType": "YulIdentifier", + "src": "6408:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6335:6:17", + "nodeType": "YulIdentifier", + "src": "6335:6:17" + }, + { + "kind": "number", + "nativeSrc": "6343:4:17", + "nodeType": "YulLiteral", + "src": "6343:4:17", + "type": "", + "value": "0x02" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6331:3:17", + "nodeType": "YulIdentifier", + "src": "6331:3:17" + }, + "nativeSrc": "6331:17:17", + "nodeType": "YulFunctionCall", + "src": "6331:17:17" + }, + "nativeSrc": "6328:115:17", + "nodeType": "YulIf", + "src": "6328:115:17" + }, + { + "body": { + "nativeSrc": "6477:90:17", + "nodeType": "YulBlock", + "src": "6477:90:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6502:3:17", + "nodeType": "YulIdentifier", + "src": "6502:3:17" + }, + { + "name": "chainId", + "nativeSrc": "6507:7:17", + "nodeType": "YulIdentifier", + "src": "6507:7:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6495:6:17", + "nodeType": "YulIdentifier", + "src": "6495:6:17" + }, + "nativeSrc": "6495:20:17", + "nodeType": "YulFunctionCall", + "src": "6495:20:17" + }, + "nativeSrc": "6495:20:17", + "nodeType": "YulExpressionStatement", + "src": "6495:20:17" + }, + { + "nativeSrc": "6532:21:17", + "nodeType": "YulAssignment", + "src": "6532:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6543:3:17", + "nodeType": "YulIdentifier", + "src": "6543:3:17" + }, + { + "kind": "number", + "nativeSrc": "6548:4:17", + "nodeType": "YulLiteral", + "src": "6548:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6539:3:17", + "nodeType": "YulIdentifier", + "src": "6539:3:17" + }, + "nativeSrc": "6539:14:17", + "nodeType": "YulFunctionCall", + "src": "6539:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6532:3:17", + "nodeType": "YulIdentifier", + "src": "6532:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6463:6:17", + "nodeType": "YulIdentifier", + "src": "6463:6:17" + }, + { + "kind": "number", + "nativeSrc": "6471:4:17", + "nodeType": "YulLiteral", + "src": "6471:4:17", + "type": "", + "value": "0x04" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6459:3:17", + "nodeType": "YulIdentifier", + "src": "6459:3:17" + }, + "nativeSrc": "6459:17:17", + "nodeType": "YulFunctionCall", + "src": "6459:17:17" + }, + "nativeSrc": "6456:111:17", + "nodeType": "YulIf", + "src": "6456:111:17" + }, + { + "body": { + "nativeSrc": "6601:100:17", + "nodeType": "YulBlock", + "src": "6601:100:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6626:3:17", + "nodeType": "YulIdentifier", + "src": "6626:3:17" + }, + { + "name": "verifyingContract", + "nativeSrc": "6631:17:17", + "nodeType": "YulIdentifier", + "src": "6631:17:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6619:6:17", + "nodeType": "YulIdentifier", + "src": "6619:6:17" + }, + "nativeSrc": "6619:30:17", + "nodeType": "YulFunctionCall", + "src": "6619:30:17" + }, + "nativeSrc": "6619:30:17", + "nodeType": "YulExpressionStatement", + "src": "6619:30:17" + }, + { + "nativeSrc": "6666:21:17", + "nodeType": "YulAssignment", + "src": "6666:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6677:3:17", + "nodeType": "YulIdentifier", + "src": "6677:3:17" + }, + { + "kind": "number", + "nativeSrc": "6682:4:17", + "nodeType": "YulLiteral", + "src": "6682:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6673:3:17", + "nodeType": "YulIdentifier", + "src": "6673:3:17" + }, + "nativeSrc": "6673:14:17", + "nodeType": "YulFunctionCall", + "src": "6673:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6666:3:17", + "nodeType": "YulIdentifier", + "src": "6666:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6587:6:17", + "nodeType": "YulIdentifier", + "src": "6587:6:17" + }, + { + "kind": "number", + "nativeSrc": "6595:4:17", + "nodeType": "YulLiteral", + "src": "6595:4:17", + "type": "", + "value": "0x08" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6583:3:17", + "nodeType": "YulIdentifier", + "src": "6583:3:17" + }, + "nativeSrc": "6583:17:17", + "nodeType": "YulFunctionCall", + "src": "6583:17:17" + }, + "nativeSrc": "6580:121:17", + "nodeType": "YulIf", + "src": "6580:121:17" + }, + { + "body": { + "nativeSrc": "6735:87:17", + "nodeType": "YulBlock", + "src": "6735:87:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6760:3:17", + "nodeType": "YulIdentifier", + "src": "6760:3:17" + }, + { + "name": "salt", + "nativeSrc": "6765:4:17", + "nodeType": "YulIdentifier", + "src": "6765:4:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6753:6:17", + "nodeType": "YulIdentifier", + "src": "6753:6:17" + }, + "nativeSrc": "6753:17:17", + "nodeType": "YulFunctionCall", + "src": "6753:17:17" + }, + "nativeSrc": "6753:17:17", + "nodeType": "YulExpressionStatement", + "src": "6753:17:17" + }, + { + "nativeSrc": "6787:21:17", + "nodeType": "YulAssignment", + "src": "6787:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6798:3:17", + "nodeType": "YulIdentifier", + "src": "6798:3:17" + }, + { + "kind": "number", + "nativeSrc": "6803:4:17", + "nodeType": "YulLiteral", + "src": "6803:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6794:3:17", + "nodeType": "YulIdentifier", + "src": "6794:3:17" + }, + "nativeSrc": "6794:14:17", + "nodeType": "YulFunctionCall", + "src": "6794:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6787:3:17", + "nodeType": "YulIdentifier", + "src": "6787:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6721:6:17", + "nodeType": "YulIdentifier", + "src": "6721:6:17" + }, + { + "kind": "number", + "nativeSrc": "6729:4:17", + "nodeType": "YulLiteral", + "src": "6729:4:17", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6717:3:17", + "nodeType": "YulIdentifier", + "src": "6717:3:17" + }, + "nativeSrc": "6717:17:17", + "nodeType": "YulFunctionCall", + "src": "6717:17:17" + }, + "nativeSrc": "6714:108:17", + "nodeType": "YulIf", + "src": "6714:108:17" + }, + { + "nativeSrc": "6836:37:17", + "nodeType": "YulAssignment", + "src": "6836:37:17", + "value": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "6854:3:17", + "nodeType": "YulIdentifier", + "src": "6854:3:17" + }, + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6863:3:17", + "nodeType": "YulIdentifier", + "src": "6863:3:17" + }, + { + "name": "fmp", + "nativeSrc": "6868:3:17", + "nodeType": "YulIdentifier", + "src": "6868:3:17" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "6859:3:17", + "nodeType": "YulIdentifier", + "src": "6859:3:17" + }, + "nativeSrc": "6859:13:17", + "nodeType": "YulFunctionCall", + "src": "6859:13:17" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "6844:9:17", + "nodeType": "YulIdentifier", + "src": "6844:9:17" + }, + "nativeSrc": "6844:29:17", + "nodeType": "YulFunctionCall", + "src": "6844:29:17" + }, + "variableNames": [ + { + "name": "hash", + "nativeSrc": "6836:4:17", + "nodeType": "YulIdentifier", + "src": "6836:4:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4498, + "isOffset": false, + "isSlot": false, + "src": "6507:7:17", + "valueSize": 1 + }, + { + "declaration": 4508, + "isOffset": false, + "isSlot": false, + "src": "6136:14:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6008:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6027:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6210:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6335:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6463:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6587:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6721:6:17", + "valueSize": 1 + }, + { + "declaration": 4505, + "isOffset": false, + "isSlot": false, + "src": "6836:4:17", + "valueSize": 1 + }, + { + "declaration": 4494, + "isOffset": false, + "isSlot": false, + "src": "6254:8:17", + "valueSize": 1 + }, + { + "declaration": 4502, + "isOffset": false, + "isSlot": false, + "src": "6765:4:17", + "valueSize": 1 + }, + { + "declaration": 4500, + "isOffset": false, + "isSlot": false, + "src": "6631:17:17", + "valueSize": 1 + }, + { + "declaration": 4496, + "isOffset": false, + "isSlot": false, + "src": "6379:11:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4513, + "nodeType": "InlineAssembly", + "src": "5908:975:17" + } + ] + }, + "documentation": { + "id": 4490, + "nodeType": "StructuredDocumentation", + "src": "5484:119:17", + "text": "@dev Variant of {toDomainSeparator-bytes1-string-string-uint256-address-bytes32} that uses hashed name and version." + }, + "id": 4515, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDomainSeparator", + "nameLocation": "5617:17:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4503, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4492, + "mutability": "mutable", + "name": "fields", + "nameLocation": "5651:6:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5644:13:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 4491, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "5644:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4494, + "mutability": "mutable", + "name": "nameHash", + "nameLocation": "5675:8:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5667:16:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4493, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5667:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4496, + "mutability": "mutable", + "name": "versionHash", + "nameLocation": "5701:11:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5693:19:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4495, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5693:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4498, + "mutability": "mutable", + "name": "chainId", + "nameLocation": "5730:7:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5722:15:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4497, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5722:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4500, + "mutability": "mutable", + "name": "verifyingContract", + "nameLocation": "5755:17:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5747:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4499, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5747:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4502, + "mutability": "mutable", + "name": "salt", + "nameLocation": "5790:4:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5782:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5782:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5634:166:17" + }, + "returnParameters": { + "id": 4506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4505, + "mutability": "mutable", + "name": "hash", + "nameLocation": "5832:4:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5824:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4504, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5824:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5823:14:17" + }, + "scope": 4535, + "src": "5608:1281:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4533, + "nodeType": "Block", + "src": "7117:1511:17", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 4527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 4525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4523, + "name": "fields", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4518, + "src": "7131:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783230", + "id": 4524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7140:4:17", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "7131:13:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783230", + "id": 4526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7148:4:17", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "7131:21:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4531, + "nodeType": "IfStatement", + "src": "7127:65:17", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4528, + "name": "ERC5267ExtensionsNotSupported", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4371, + "src": "7161:29:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 4529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7161:31:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 4530, + "nodeType": "RevertStatement", + "src": "7154:38:17" + } + }, + { + "AST": { + "nativeSrc": "7228:1394:17", + "nodeType": "YulBlock", + "src": "7228:1394:17", + "statements": [ + { + "nativeSrc": "7303:26:17", + "nodeType": "YulAssignment", + "src": "7303:26:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7317:3:17", + "nodeType": "YulLiteral", + "src": "7317:3:17", + "type": "", + "value": "248" + }, + { + "name": "fields", + "nativeSrc": "7322:6:17", + "nodeType": "YulIdentifier", + "src": "7322:6:17" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "7313:3:17", + "nodeType": "YulIdentifier", + "src": "7313:3:17" + }, + "nativeSrc": "7313:16:17", + "nodeType": "YulFunctionCall", + "src": "7313:16:17" + }, + "variableNames": [ + { + "name": "fields", + "nativeSrc": "7303:6:17", + "nodeType": "YulIdentifier", + "src": "7303:6:17" + } + ] + }, + { + "nativeSrc": "7384:22:17", + "nodeType": "YulVariableDeclaration", + "src": "7384:22:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7401:4:17", + "nodeType": "YulLiteral", + "src": "7401:4:17", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "7395:5:17", + "nodeType": "YulIdentifier", + "src": "7395:5:17" + }, + "nativeSrc": "7395:11:17", + "nodeType": "YulFunctionCall", + "src": "7395:11:17" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "7388:3:17", + "nodeType": "YulTypedName", + "src": "7388:3:17", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "7426:3:17", + "nodeType": "YulIdentifier", + "src": "7426:3:17" + }, + { + "hexValue": "454950373132446f6d61696e28", + "kind": "string", + "nativeSrc": "7431:15:17", + "nodeType": "YulLiteral", + "src": "7431:15:17", + "type": "", + "value": "EIP712Domain(" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7419:6:17", + "nodeType": "YulIdentifier", + "src": "7419:6:17" + }, + "nativeSrc": "7419:28:17", + "nodeType": "YulFunctionCall", + "src": "7419:28:17" + }, + "nativeSrc": "7419:28:17", + "nodeType": "YulExpressionStatement", + "src": "7419:28:17" + }, + { + "nativeSrc": "7461:25:17", + "nodeType": "YulVariableDeclaration", + "src": "7461:25:17", + "value": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "7476:3:17", + "nodeType": "YulIdentifier", + "src": "7476:3:17" + }, + { + "kind": "number", + "nativeSrc": "7481:4:17", + "nodeType": "YulLiteral", + "src": "7481:4:17", + "type": "", + "value": "0x0d" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7472:3:17", + "nodeType": "YulIdentifier", + "src": "7472:3:17" + }, + "nativeSrc": "7472:14:17", + "nodeType": "YulFunctionCall", + "src": "7472:14:17" + }, + "variables": [ + { + "name": "ptr", + "nativeSrc": "7465:3:17", + "nodeType": "YulTypedName", + "src": "7465:3:17", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "7546:97:17", + "nodeType": "YulBlock", + "src": "7546:97:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7571:3:17", + "nodeType": "YulIdentifier", + "src": "7571:3:17" + }, + { + "hexValue": "737472696e67206e616d652c", + "kind": "string", + "nativeSrc": "7576:14:17", + "nodeType": "YulLiteral", + "src": "7576:14:17", + "type": "", + "value": "string name," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7564:6:17", + "nodeType": "YulIdentifier", + "src": "7564:6:17" + }, + "nativeSrc": "7564:27:17", + "nodeType": "YulFunctionCall", + "src": "7564:27:17" + }, + "nativeSrc": "7564:27:17", + "nodeType": "YulExpressionStatement", + "src": "7564:27:17" + }, + { + "nativeSrc": "7608:21:17", + "nodeType": "YulAssignment", + "src": "7608:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7619:3:17", + "nodeType": "YulIdentifier", + "src": "7619:3:17" + }, + { + "kind": "number", + "nativeSrc": "7624:4:17", + "nodeType": "YulLiteral", + "src": "7624:4:17", + "type": "", + "value": "0x0c" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7615:3:17", + "nodeType": "YulIdentifier", + "src": "7615:3:17" + }, + "nativeSrc": "7615:14:17", + "nodeType": "YulFunctionCall", + "src": "7615:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "7608:3:17", + "nodeType": "YulIdentifier", + "src": "7608:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "7532:6:17", + "nodeType": "YulIdentifier", + "src": "7532:6:17" + }, + { + "kind": "number", + "nativeSrc": "7540:4:17", + "nodeType": "YulLiteral", + "src": "7540:4:17", + "type": "", + "value": "0x01" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7528:3:17", + "nodeType": "YulIdentifier", + "src": "7528:3:17" + }, + "nativeSrc": "7528:17:17", + "nodeType": "YulFunctionCall", + "src": "7528:17:17" + }, + "nativeSrc": "7525:118:17", + "nodeType": "YulIf", + "src": "7525:118:17" + }, + { + "body": { + "nativeSrc": "7706:100:17", + "nodeType": "YulBlock", + "src": "7706:100:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7731:3:17", + "nodeType": "YulIdentifier", + "src": "7731:3:17" + }, + { + "hexValue": "737472696e672076657273696f6e2c", + "kind": "string", + "nativeSrc": "7736:17:17", + "nodeType": "YulLiteral", + "src": "7736:17:17", + "type": "", + "value": "string version," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7724:6:17", + "nodeType": "YulIdentifier", + "src": "7724:6:17" + }, + "nativeSrc": "7724:30:17", + "nodeType": "YulFunctionCall", + "src": "7724:30:17" + }, + "nativeSrc": "7724:30:17", + "nodeType": "YulExpressionStatement", + "src": "7724:30:17" + }, + { + "nativeSrc": "7771:21:17", + "nodeType": "YulAssignment", + "src": "7771:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7782:3:17", + "nodeType": "YulIdentifier", + "src": "7782:3:17" + }, + { + "kind": "number", + "nativeSrc": "7787:4:17", + "nodeType": "YulLiteral", + "src": "7787:4:17", + "type": "", + "value": "0x0f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7778:3:17", + "nodeType": "YulIdentifier", + "src": "7778:3:17" + }, + "nativeSrc": "7778:14:17", + "nodeType": "YulFunctionCall", + "src": "7778:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "7771:3:17", + "nodeType": "YulIdentifier", + "src": "7771:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "7692:6:17", + "nodeType": "YulIdentifier", + "src": "7692:6:17" + }, + { + "kind": "number", + "nativeSrc": "7700:4:17", + "nodeType": "YulLiteral", + "src": "7700:4:17", + "type": "", + "value": "0x02" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7688:3:17", + "nodeType": "YulIdentifier", + "src": "7688:3:17" + }, + "nativeSrc": "7688:17:17", + "nodeType": "YulFunctionCall", + "src": "7688:17:17" + }, + "nativeSrc": "7685:121:17", + "nodeType": "YulIf", + "src": "7685:121:17" + }, + { + "body": { + "nativeSrc": "7869:101:17", + "nodeType": "YulBlock", + "src": "7869:101:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7894:3:17", + "nodeType": "YulIdentifier", + "src": "7894:3:17" + }, + { + "hexValue": "75696e7432353620636861696e49642c", + "kind": "string", + "nativeSrc": "7899:18:17", + "nodeType": "YulLiteral", + "src": "7899:18:17", + "type": "", + "value": "uint256 chainId," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7887:6:17", + "nodeType": "YulIdentifier", + "src": "7887:6:17" + }, + "nativeSrc": "7887:31:17", + "nodeType": "YulFunctionCall", + "src": "7887:31:17" + }, + "nativeSrc": "7887:31:17", + "nodeType": "YulExpressionStatement", + "src": "7887:31:17" + }, + { + "nativeSrc": "7935:21:17", + "nodeType": "YulAssignment", + "src": "7935:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7946:3:17", + "nodeType": "YulIdentifier", + "src": "7946:3:17" + }, + { + "kind": "number", + "nativeSrc": "7951:4:17", + "nodeType": "YulLiteral", + "src": "7951:4:17", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7942:3:17", + "nodeType": "YulIdentifier", + "src": "7942:3:17" + }, + "nativeSrc": "7942:14:17", + "nodeType": "YulFunctionCall", + "src": "7942:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "7935:3:17", + "nodeType": "YulIdentifier", + "src": "7935:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "7855:6:17", + "nodeType": "YulIdentifier", + "src": "7855:6:17" + }, + { + "kind": "number", + "nativeSrc": "7863:4:17", + "nodeType": "YulLiteral", + "src": "7863:4:17", + "type": "", + "value": "0x04" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7851:3:17", + "nodeType": "YulIdentifier", + "src": "7851:3:17" + }, + "nativeSrc": "7851:17:17", + "nodeType": "YulFunctionCall", + "src": "7851:17:17" + }, + "nativeSrc": "7848:122:17", + "nodeType": "YulIf", + "src": "7848:122:17" + }, + { + "body": { + "nativeSrc": "8043:111:17", + "nodeType": "YulBlock", + "src": "8043:111:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8068:3:17", + "nodeType": "YulIdentifier", + "src": "8068:3:17" + }, + { + "hexValue": "6164647265737320766572696679696e67436f6e74726163742c", + "kind": "string", + "nativeSrc": "8073:28:17", + "nodeType": "YulLiteral", + "src": "8073:28:17", + "type": "", + "value": "address verifyingContract," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8061:6:17", + "nodeType": "YulIdentifier", + "src": "8061:6:17" + }, + "nativeSrc": "8061:41:17", + "nodeType": "YulFunctionCall", + "src": "8061:41:17" + }, + "nativeSrc": "8061:41:17", + "nodeType": "YulExpressionStatement", + "src": "8061:41:17" + }, + { + "nativeSrc": "8119:21:17", + "nodeType": "YulAssignment", + "src": "8119:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8130:3:17", + "nodeType": "YulIdentifier", + "src": "8130:3:17" + }, + { + "kind": "number", + "nativeSrc": "8135:4:17", + "nodeType": "YulLiteral", + "src": "8135:4:17", + "type": "", + "value": "0x1a" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8126:3:17", + "nodeType": "YulIdentifier", + "src": "8126:3:17" + }, + "nativeSrc": "8126:14:17", + "nodeType": "YulFunctionCall", + "src": "8126:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "8119:3:17", + "nodeType": "YulIdentifier", + "src": "8119:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "8029:6:17", + "nodeType": "YulIdentifier", + "src": "8029:6:17" + }, + { + "kind": "number", + "nativeSrc": "8037:4:17", + "nodeType": "YulLiteral", + "src": "8037:4:17", + "type": "", + "value": "0x08" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8025:3:17", + "nodeType": "YulIdentifier", + "src": "8025:3:17" + }, + "nativeSrc": "8025:17:17", + "nodeType": "YulFunctionCall", + "src": "8025:17:17" + }, + "nativeSrc": "8022:132:17", + "nodeType": "YulIf", + "src": "8022:132:17" + }, + { + "body": { + "nativeSrc": "8214:98:17", + "nodeType": "YulBlock", + "src": "8214:98:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8239:3:17", + "nodeType": "YulIdentifier", + "src": "8239:3:17" + }, + { + "hexValue": "627974657333322073616c742c", + "kind": "string", + "nativeSrc": "8244:15:17", + "nodeType": "YulLiteral", + "src": "8244:15:17", + "type": "", + "value": "bytes32 salt," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8232:6:17", + "nodeType": "YulIdentifier", + "src": "8232:6:17" + }, + "nativeSrc": "8232:28:17", + "nodeType": "YulFunctionCall", + "src": "8232:28:17" + }, + "nativeSrc": "8232:28:17", + "nodeType": "YulExpressionStatement", + "src": "8232:28:17" + }, + { + "nativeSrc": "8277:21:17", + "nodeType": "YulAssignment", + "src": "8277:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8288:3:17", + "nodeType": "YulIdentifier", + "src": "8288:3:17" + }, + { + "kind": "number", + "nativeSrc": "8293:4:17", + "nodeType": "YulLiteral", + "src": "8293:4:17", + "type": "", + "value": "0x0d" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8284:3:17", + "nodeType": "YulIdentifier", + "src": "8284:3:17" + }, + "nativeSrc": "8284:14:17", + "nodeType": "YulFunctionCall", + "src": "8284:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "8277:3:17", + "nodeType": "YulIdentifier", + "src": "8277:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "8200:6:17", + "nodeType": "YulIdentifier", + "src": "8200:6:17" + }, + { + "kind": "number", + "nativeSrc": "8208:4:17", + "nodeType": "YulLiteral", + "src": "8208:4:17", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8196:3:17", + "nodeType": "YulIdentifier", + "src": "8196:3:17" + }, + "nativeSrc": "8196:17:17", + "nodeType": "YulFunctionCall", + "src": "8196:17:17" + }, + "nativeSrc": "8193:119:17", + "nodeType": "YulIf", + "src": "8193:119:17" + }, + { + "nativeSrc": "8391:50:17", + "nodeType": "YulAssignment", + "src": "8391:50:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8402:3:17", + "nodeType": "YulIdentifier", + "src": "8402:3:17" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "fields", + "nativeSrc": "8425:6:17", + "nodeType": "YulIdentifier", + "src": "8425:6:17" + }, + { + "kind": "number", + "nativeSrc": "8433:4:17", + "nodeType": "YulLiteral", + "src": "8433:4:17", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8421:3:17", + "nodeType": "YulIdentifier", + "src": "8421:3:17" + }, + "nativeSrc": "8421:17:17", + "nodeType": "YulFunctionCall", + "src": "8421:17:17" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "8414:6:17", + "nodeType": "YulIdentifier", + "src": "8414:6:17" + }, + "nativeSrc": "8414:25:17", + "nodeType": "YulFunctionCall", + "src": "8414:25:17" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "8407:6:17", + "nodeType": "YulIdentifier", + "src": "8407:6:17" + }, + "nativeSrc": "8407:33:17", + "nodeType": "YulFunctionCall", + "src": "8407:33:17" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8398:3:17", + "nodeType": "YulIdentifier", + "src": "8398:3:17" + }, + "nativeSrc": "8398:43:17", + "nodeType": "YulFunctionCall", + "src": "8398:43:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "8391:3:17", + "nodeType": "YulIdentifier", + "src": "8391:3:17" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8499:3:17", + "nodeType": "YulIdentifier", + "src": "8499:3:17" + }, + { + "kind": "number", + "nativeSrc": "8504:4:17", + "nodeType": "YulLiteral", + "src": "8504:4:17", + "type": "", + "value": "0x29" + } + ], + "functionName": { + "name": "mstore8", + "nativeSrc": "8491:7:17", + "nodeType": "YulIdentifier", + "src": "8491:7:17" + }, + "nativeSrc": "8491:18:17", + "nodeType": "YulFunctionCall", + "src": "8491:18:17" + }, + "nativeSrc": "8491:18:17", + "nodeType": "YulExpressionStatement", + "src": "8491:18:17" + }, + { + "nativeSrc": "8543:18:17", + "nodeType": "YulAssignment", + "src": "8543:18:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8554:3:17", + "nodeType": "YulIdentifier", + "src": "8554:3:17" + }, + { + "kind": "number", + "nativeSrc": "8559:1:17", + "nodeType": "YulLiteral", + "src": "8559:1:17", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8550:3:17", + "nodeType": "YulIdentifier", + "src": "8550:3:17" + }, + "nativeSrc": "8550:11:17", + "nodeType": "YulFunctionCall", + "src": "8550:11:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "8543:3:17", + "nodeType": "YulIdentifier", + "src": "8543:3:17" + } + ] + }, + { + "nativeSrc": "8575:37:17", + "nodeType": "YulAssignment", + "src": "8575:37:17", + "value": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "8593:3:17", + "nodeType": "YulIdentifier", + "src": "8593:3:17" + }, + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8602:3:17", + "nodeType": "YulIdentifier", + "src": "8602:3:17" + }, + { + "name": "fmp", + "nativeSrc": "8607:3:17", + "nodeType": "YulIdentifier", + "src": "8607:3:17" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8598:3:17", + "nodeType": "YulIdentifier", + "src": "8598:3:17" + }, + "nativeSrc": "8598:13:17", + "nodeType": "YulFunctionCall", + "src": "8598:13:17" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "8583:9:17", + "nodeType": "YulIdentifier", + "src": "8583:9:17" + }, + "nativeSrc": "8583:29:17", + "nodeType": "YulFunctionCall", + "src": "8583:29:17" + }, + "variableNames": [ + { + "name": "hash", + "nativeSrc": "8575:4:17", + "nodeType": "YulIdentifier", + "src": "8575:4:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7303:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7322:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7532:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7692:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7855:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "8029:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "8200:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "8425:6:17", + "valueSize": 1 + }, + { + "declaration": 4521, + "isOffset": false, + "isSlot": false, + "src": "8575:4:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4532, + "nodeType": "InlineAssembly", + "src": "7203:1419:17" + } + ] + }, + "documentation": { + "id": 4516, + "nodeType": "StructuredDocumentation", + "src": "6895:139:17", + "text": "@dev Builds an EIP-712 domain type hash depending on the `fields` provided, following https://eips.ethereum.org/EIPS/eip-5267[ERC-5267]" + }, + "id": 4534, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDomainTypeHash", + "nameLocation": "7048:16:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4519, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4518, + "mutability": "mutable", + "name": "fields", + "nameLocation": "7072:6:17", + "nodeType": "VariableDeclaration", + "scope": 4534, + "src": "7065:13:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 4517, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "7065:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "7064:15:17" + }, + "returnParameters": { + "id": 4522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4521, + "mutability": "mutable", + "name": "hash", + "nameLocation": "7111:4:17", + "nodeType": "VariableDeclaration", + "scope": 4534, + "src": "7103:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4520, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7103:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "7102:14:17" + }, + "scope": 4535, + "src": "7039:1589:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4536, + "src": "521:8109:17", + "usedErrors": [ + 4371 + ], + "usedEvents": [] + } + ], + "src": "123:8508:17" + }, + "id": 17 + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol", + "exportedSymbols": { + "IERC165": [ + 4547 + ] + }, + "id": 4548, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4537, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "115:25:18" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC165", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 4538, + "nodeType": "StructuredDocumentation", + "src": "142:280:18", + "text": " @dev Interface of the ERC-165 standard, as defined in the\n https://eips.ethereum.org/EIPS/eip-165[ERC].\n Implementers can declare support of contract interfaces, which can then be\n queried by others ({ERC165Checker}).\n For an implementation, see {ERC165}." + }, + "fullyImplemented": false, + "id": 4547, + "linearizedBaseContracts": [ + 4547 + ], + "name": "IERC165", + "nameLocation": "433:7:18", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 4539, + "nodeType": "StructuredDocumentation", + "src": "447:340:18", + "text": " @dev Returns true if this contract implements the interface defined by\n `interfaceId`. See the corresponding\n https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n to learn more about how these ids are created.\n This function call must use less than 30 000 gas." + }, + "functionSelector": "01ffc9a7", + "id": 4546, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "801:17:18", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4541, + "mutability": "mutable", + "name": "interfaceId", + "nameLocation": "826:11:18", + "nodeType": "VariableDeclaration", + "scope": 4546, + "src": "819:18:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 4540, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "819:6:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "818:20:18" + }, + "returnParameters": { + "id": 4545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4546, + "src": "862:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4543, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "862:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "861:6:18" + }, + "scope": 4547, + "src": "792:76:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4548, + "src": "423:447:18", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "115:756:18" + }, + "id": 18 + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/math/Math.sol", + "exportedSymbols": { + "Math": [ + 6204 + ], + "Panic": [ + 1714 + ], + "SafeCast": [ + 7969 + ] + }, + "id": 6205, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4549, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "103:24:19" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Panic.sol", + "file": "../Panic.sol", + "id": 4551, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6205, + "sourceUnit": 1715, + "src": "129:35:19", + "symbolAliases": [ + { + "foreign": { + "id": 4550, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "137:5:19", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol", + "file": "./SafeCast.sol", + "id": 4553, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6205, + "sourceUnit": 7970, + "src": "165:40:19", + "symbolAliases": [ + { + "foreign": { + "id": 4552, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "173:8:19", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Math", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 4554, + "nodeType": "StructuredDocumentation", + "src": "207:73:19", + "text": " @dev Standard math utilities missing in the Solidity language." + }, + "fullyImplemented": true, + "id": 6204, + "linearizedBaseContracts": [ + 6204 + ], + "name": "Math", + "nameLocation": "289:4:19", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Math.Rounding", + "id": 4559, + "members": [ + { + "id": 4555, + "name": "Floor", + "nameLocation": "324:5:19", + "nodeType": "EnumValue", + "src": "324:5:19" + }, + { + "id": 4556, + "name": "Ceil", + "nameLocation": "367:4:19", + "nodeType": "EnumValue", + "src": "367:4:19" + }, + { + "id": 4557, + "name": "Trunc", + "nameLocation": "409:5:19", + "nodeType": "EnumValue", + "src": "409:5:19" + }, + { + "id": 4558, + "name": "Expand", + "nameLocation": "439:6:19", + "nodeType": "EnumValue", + "src": "439:6:19" + } + ], + "name": "Rounding", + "nameLocation": "305:8:19", + "nodeType": "EnumDefinition", + "src": "300:169:19" + }, + { + "body": { + "id": 4572, + "nodeType": "Block", + "src": "731:112:19", + "statements": [ + { + "AST": { + "nativeSrc": "766:71:19", + "nodeType": "YulBlock", + "src": "766:71:19", + "statements": [ + { + "nativeSrc": "780:16:19", + "nodeType": "YulAssignment", + "src": "780:16:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "791:1:19", + "nodeType": "YulIdentifier", + "src": "791:1:19" + }, + { + "name": "b", + "nativeSrc": "794:1:19", + "nodeType": "YulIdentifier", + "src": "794:1:19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "787:3:19", + "nodeType": "YulIdentifier", + "src": "787:3:19" + }, + "nativeSrc": "787:9:19", + "nodeType": "YulFunctionCall", + "src": "787:9:19" + }, + "variableNames": [ + { + "name": "low", + "nativeSrc": "780:3:19", + "nodeType": "YulIdentifier", + "src": "780:3:19" + } + ] + }, + { + "nativeSrc": "809:18:19", + "nodeType": "YulAssignment", + "src": "809:18:19", + "value": { + "arguments": [ + { + "name": "low", + "nativeSrc": "820:3:19", + "nodeType": "YulIdentifier", + "src": "820:3:19" + }, + { + "name": "a", + "nativeSrc": "825:1:19", + "nodeType": "YulIdentifier", + "src": "825:1:19" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "817:2:19", + "nodeType": "YulIdentifier", + "src": "817:2:19" + }, + "nativeSrc": "817:10:19", + "nodeType": "YulFunctionCall", + "src": "817:10:19" + }, + "variableNames": [ + { + "name": "high", + "nativeSrc": "809:4:19", + "nodeType": "YulIdentifier", + "src": "809:4:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4562, + "isOffset": false, + "isSlot": false, + "src": "791:1:19", + "valueSize": 1 + }, + { + "declaration": 4562, + "isOffset": false, + "isSlot": false, + "src": "825:1:19", + "valueSize": 1 + }, + { + "declaration": 4564, + "isOffset": false, + "isSlot": false, + "src": "794:1:19", + "valueSize": 1 + }, + { + "declaration": 4567, + "isOffset": false, + "isSlot": false, + "src": "809:4:19", + "valueSize": 1 + }, + { + "declaration": 4569, + "isOffset": false, + "isSlot": false, + "src": "780:3:19", + "valueSize": 1 + }, + { + "declaration": 4569, + "isOffset": false, + "isSlot": false, + "src": "820:3:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4571, + "nodeType": "InlineAssembly", + "src": "741:96:19" + } + ] + }, + "documentation": { + "id": 4560, + "nodeType": "StructuredDocumentation", + "src": "475:163:19", + "text": " @dev Return the 512-bit addition of two uint256.\n The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low." + }, + "id": 4573, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add512", + "nameLocation": "652:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4565, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4562, + "mutability": "mutable", + "name": "a", + "nameLocation": "667:1:19", + "nodeType": "VariableDeclaration", + "scope": 4573, + "src": "659:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4561, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "659:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4564, + "mutability": "mutable", + "name": "b", + "nameLocation": "678:1:19", + "nodeType": "VariableDeclaration", + "scope": 4573, + "src": "670:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4563, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "670:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "658:22:19" + }, + "returnParameters": { + "id": 4570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4567, + "mutability": "mutable", + "name": "high", + "nameLocation": "712:4:19", + "nodeType": "VariableDeclaration", + "scope": 4573, + "src": "704:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4566, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "704:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4569, + "mutability": "mutable", + "name": "low", + "nameLocation": "726:3:19", + "nodeType": "VariableDeclaration", + "scope": 4573, + "src": "718:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4568, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "703:27:19" + }, + "scope": 6204, + "src": "643:200:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4586, + "nodeType": "Block", + "src": "1115:462:19", + "statements": [ + { + "AST": { + "nativeSrc": "1437:134:19", + "nodeType": "YulBlock", + "src": "1437:134:19", + "statements": [ + { + "nativeSrc": "1451:30:19", + "nodeType": "YulVariableDeclaration", + "src": "1451:30:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "1468:1:19", + "nodeType": "YulIdentifier", + "src": "1468:1:19" + }, + { + "name": "b", + "nativeSrc": "1471:1:19", + "nodeType": "YulIdentifier", + "src": "1471:1:19" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1478:1:19", + "nodeType": "YulLiteral", + "src": "1478:1:19", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "1474:3:19", + "nodeType": "YulIdentifier", + "src": "1474:3:19" + }, + "nativeSrc": "1474:6:19", + "nodeType": "YulFunctionCall", + "src": "1474:6:19" + } + ], + "functionName": { + "name": "mulmod", + "nativeSrc": "1461:6:19", + "nodeType": "YulIdentifier", + "src": "1461:6:19" + }, + "nativeSrc": "1461:20:19", + "nodeType": "YulFunctionCall", + "src": "1461:20:19" + }, + "variables": [ + { + "name": "mm", + "nativeSrc": "1455:2:19", + "nodeType": "YulTypedName", + "src": "1455:2:19", + "type": "" + } + ] + }, + { + "nativeSrc": "1494:16:19", + "nodeType": "YulAssignment", + "src": "1494:16:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "1505:1:19", + "nodeType": "YulIdentifier", + "src": "1505:1:19" + }, + { + "name": "b", + "nativeSrc": "1508:1:19", + "nodeType": "YulIdentifier", + "src": "1508:1:19" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "1501:3:19", + "nodeType": "YulIdentifier", + "src": "1501:3:19" + }, + "nativeSrc": "1501:9:19", + "nodeType": "YulFunctionCall", + "src": "1501:9:19" + }, + "variableNames": [ + { + "name": "low", + "nativeSrc": "1494:3:19", + "nodeType": "YulIdentifier", + "src": "1494:3:19" + } + ] + }, + { + "nativeSrc": "1523:38:19", + "nodeType": "YulAssignment", + "src": "1523:38:19", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "mm", + "nativeSrc": "1539:2:19", + "nodeType": "YulIdentifier", + "src": "1539:2:19" + }, + { + "name": "low", + "nativeSrc": "1543:3:19", + "nodeType": "YulIdentifier", + "src": "1543:3:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1535:3:19", + "nodeType": "YulIdentifier", + "src": "1535:3:19" + }, + "nativeSrc": "1535:12:19", + "nodeType": "YulFunctionCall", + "src": "1535:12:19" + }, + { + "arguments": [ + { + "name": "mm", + "nativeSrc": "1552:2:19", + "nodeType": "YulIdentifier", + "src": "1552:2:19" + }, + { + "name": "low", + "nativeSrc": "1556:3:19", + "nodeType": "YulIdentifier", + "src": "1556:3:19" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1549:2:19", + "nodeType": "YulIdentifier", + "src": "1549:2:19" + }, + "nativeSrc": "1549:11:19", + "nodeType": "YulFunctionCall", + "src": "1549:11:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1531:3:19", + "nodeType": "YulIdentifier", + "src": "1531:3:19" + }, + "nativeSrc": "1531:30:19", + "nodeType": "YulFunctionCall", + "src": "1531:30:19" + }, + "variableNames": [ + { + "name": "high", + "nativeSrc": "1523:4:19", + "nodeType": "YulIdentifier", + "src": "1523:4:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4576, + "isOffset": false, + "isSlot": false, + "src": "1468:1:19", + "valueSize": 1 + }, + { + "declaration": 4576, + "isOffset": false, + "isSlot": false, + "src": "1505:1:19", + "valueSize": 1 + }, + { + "declaration": 4578, + "isOffset": false, + "isSlot": false, + "src": "1471:1:19", + "valueSize": 1 + }, + { + "declaration": 4578, + "isOffset": false, + "isSlot": false, + "src": "1508:1:19", + "valueSize": 1 + }, + { + "declaration": 4581, + "isOffset": false, + "isSlot": false, + "src": "1523:4:19", + "valueSize": 1 + }, + { + "declaration": 4583, + "isOffset": false, + "isSlot": false, + "src": "1494:3:19", + "valueSize": 1 + }, + { + "declaration": 4583, + "isOffset": false, + "isSlot": false, + "src": "1543:3:19", + "valueSize": 1 + }, + { + "declaration": 4583, + "isOffset": false, + "isSlot": false, + "src": "1556:3:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4585, + "nodeType": "InlineAssembly", + "src": "1412:159:19" + } + ] + }, + "documentation": { + "id": 4574, + "nodeType": "StructuredDocumentation", + "src": "849:173:19", + "text": " @dev Return the 512-bit multiplication of two uint256.\n The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low." + }, + "id": 4587, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul512", + "nameLocation": "1036:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4579, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4576, + "mutability": "mutable", + "name": "a", + "nameLocation": "1051:1:19", + "nodeType": "VariableDeclaration", + "scope": 4587, + "src": "1043:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4575, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1043:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4578, + "mutability": "mutable", + "name": "b", + "nameLocation": "1062:1:19", + "nodeType": "VariableDeclaration", + "scope": 4587, + "src": "1054:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4577, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1054:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1042:22:19" + }, + "returnParameters": { + "id": 4584, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4581, + "mutability": "mutable", + "name": "high", + "nameLocation": "1096:4:19", + "nodeType": "VariableDeclaration", + "scope": 4587, + "src": "1088:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4580, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1088:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4583, + "mutability": "mutable", + "name": "low", + "nameLocation": "1110:3:19", + "nodeType": "VariableDeclaration", + "scope": 4587, + "src": "1102:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4582, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1102:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1087:27:19" + }, + "scope": 6204, + "src": "1027:550:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4621, + "nodeType": "Block", + "src": "1784:149:19", + "statements": [ + { + "id": 4620, + "nodeType": "UncheckedBlock", + "src": "1794:133:19", + "statements": [ + { + "assignments": [ + 4600 + ], + "declarations": [ + { + "constant": false, + "id": 4600, + "mutability": "mutable", + "name": "c", + "nameLocation": "1826:1:19", + "nodeType": "VariableDeclaration", + "scope": 4620, + "src": "1818:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4599, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1818:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4604, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4601, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4590, + "src": "1830:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 4602, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4592, + "src": "1834:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1830:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1818:17:19" + }, + { + "expression": { + "id": 4609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4605, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4595, + "src": "1849:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4606, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4600, + "src": "1859:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 4607, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4590, + "src": "1864:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1859:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1849:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4610, + "nodeType": "ExpressionStatement", + "src": "1849:16:19" + }, + { + "expression": { + "id": 4618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4611, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4597, + "src": "1879:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4612, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4600, + "src": "1888:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 4615, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4595, + "src": "1908:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4613, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "1892:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1901:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "1892:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1892:24:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1888:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1879:37:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4619, + "nodeType": "ExpressionStatement", + "src": "1879:37:19" + } + ] + } + ] + }, + "documentation": { + "id": 4588, + "nodeType": "StructuredDocumentation", + "src": "1583:105:19", + "text": " @dev Returns the addition of two unsigned integers, with a success flag (no overflow)." + }, + "id": 4622, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryAdd", + "nameLocation": "1702:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4590, + "mutability": "mutable", + "name": "a", + "nameLocation": "1717:1:19", + "nodeType": "VariableDeclaration", + "scope": 4622, + "src": "1709:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4589, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1709:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4592, + "mutability": "mutable", + "name": "b", + "nameLocation": "1728:1:19", + "nodeType": "VariableDeclaration", + "scope": 4622, + "src": "1720:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4591, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1720:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1708:22:19" + }, + "returnParameters": { + "id": 4598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4595, + "mutability": "mutable", + "name": "success", + "nameLocation": "1759:7:19", + "nodeType": "VariableDeclaration", + "scope": 4622, + "src": "1754:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4594, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1754:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4597, + "mutability": "mutable", + "name": "result", + "nameLocation": "1776:6:19", + "nodeType": "VariableDeclaration", + "scope": 4622, + "src": "1768:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1768:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1753:30:19" + }, + "scope": 6204, + "src": "1693:240:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4656, + "nodeType": "Block", + "src": "2143:149:19", + "statements": [ + { + "id": 4655, + "nodeType": "UncheckedBlock", + "src": "2153:133:19", + "statements": [ + { + "assignments": [ + 4635 + ], + "declarations": [ + { + "constant": false, + "id": 4635, + "mutability": "mutable", + "name": "c", + "nameLocation": "2185:1:19", + "nodeType": "VariableDeclaration", + "scope": 4655, + "src": "2177:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4634, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2177:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4639, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4636, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4625, + "src": "2189:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 4637, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4627, + "src": "2193:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2189:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2177:17:19" + }, + { + "expression": { + "id": 4644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4640, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4630, + "src": "2208:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4641, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4635, + "src": "2218:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 4642, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4625, + "src": "2223:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2218:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2208:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4645, + "nodeType": "ExpressionStatement", + "src": "2208:16:19" + }, + { + "expression": { + "id": 4653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4646, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4632, + "src": "2238:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4647, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4635, + "src": "2247:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 4650, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4630, + "src": "2267:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4648, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "2251:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2260:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "2251:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2251:24:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2247:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2238:37:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4654, + "nodeType": "ExpressionStatement", + "src": "2238:37:19" + } + ] + } + ] + }, + "documentation": { + "id": 4623, + "nodeType": "StructuredDocumentation", + "src": "1939:108:19", + "text": " @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow)." + }, + "id": 4657, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "trySub", + "nameLocation": "2061:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4625, + "mutability": "mutable", + "name": "a", + "nameLocation": "2076:1:19", + "nodeType": "VariableDeclaration", + "scope": 4657, + "src": "2068:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2068:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4627, + "mutability": "mutable", + "name": "b", + "nameLocation": "2087:1:19", + "nodeType": "VariableDeclaration", + "scope": 4657, + "src": "2079:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2079:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2067:22:19" + }, + "returnParameters": { + "id": 4633, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4630, + "mutability": "mutable", + "name": "success", + "nameLocation": "2118:7:19", + "nodeType": "VariableDeclaration", + "scope": 4657, + "src": "2113:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4629, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2113:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4632, + "mutability": "mutable", + "name": "result", + "nameLocation": "2135:6:19", + "nodeType": "VariableDeclaration", + "scope": 4657, + "src": "2127:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4631, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2127:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2112:30:19" + }, + "scope": 6204, + "src": "2052:240:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4686, + "nodeType": "Block", + "src": "2505:391:19", + "statements": [ + { + "id": 4685, + "nodeType": "UncheckedBlock", + "src": "2515:375:19", + "statements": [ + { + "assignments": [ + 4670 + ], + "declarations": [ + { + "constant": false, + "id": 4670, + "mutability": "mutable", + "name": "c", + "nameLocation": "2547:1:19", + "nodeType": "VariableDeclaration", + "scope": 4685, + "src": "2539:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2539:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4674, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4671, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4660, + "src": "2551:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 4672, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4662, + "src": "2555:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2551:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2539:17:19" + }, + { + "AST": { + "nativeSrc": "2595:188:19", + "nodeType": "YulBlock", + "src": "2595:188:19", + "statements": [ + { + "nativeSrc": "2727:42:19", + "nodeType": "YulAssignment", + "src": "2727:42:19", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "c", + "nativeSrc": "2748:1:19", + "nodeType": "YulIdentifier", + "src": "2748:1:19" + }, + { + "name": "a", + "nativeSrc": "2751:1:19", + "nodeType": "YulIdentifier", + "src": "2751:1:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "2744:3:19", + "nodeType": "YulIdentifier", + "src": "2744:3:19" + }, + "nativeSrc": "2744:9:19", + "nodeType": "YulFunctionCall", + "src": "2744:9:19" + }, + { + "name": "b", + "nativeSrc": "2755:1:19", + "nodeType": "YulIdentifier", + "src": "2755:1:19" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "2741:2:19", + "nodeType": "YulIdentifier", + "src": "2741:2:19" + }, + "nativeSrc": "2741:16:19", + "nodeType": "YulFunctionCall", + "src": "2741:16:19" + }, + { + "arguments": [ + { + "name": "a", + "nativeSrc": "2766:1:19", + "nodeType": "YulIdentifier", + "src": "2766:1:19" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2759:6:19", + "nodeType": "YulIdentifier", + "src": "2759:6:19" + }, + "nativeSrc": "2759:9:19", + "nodeType": "YulFunctionCall", + "src": "2759:9:19" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "2738:2:19", + "nodeType": "YulIdentifier", + "src": "2738:2:19" + }, + "nativeSrc": "2738:31:19", + "nodeType": "YulFunctionCall", + "src": "2738:31:19" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "2727:7:19", + "nodeType": "YulIdentifier", + "src": "2727:7:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4660, + "isOffset": false, + "isSlot": false, + "src": "2751:1:19", + "valueSize": 1 + }, + { + "declaration": 4660, + "isOffset": false, + "isSlot": false, + "src": "2766:1:19", + "valueSize": 1 + }, + { + "declaration": 4662, + "isOffset": false, + "isSlot": false, + "src": "2755:1:19", + "valueSize": 1 + }, + { + "declaration": 4670, + "isOffset": false, + "isSlot": false, + "src": "2748:1:19", + "valueSize": 1 + }, + { + "declaration": 4665, + "isOffset": false, + "isSlot": false, + "src": "2727:7:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4675, + "nodeType": "InlineAssembly", + "src": "2570:213:19" + }, + { + "expression": { + "id": 4683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4676, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4667, + "src": "2842:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4677, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4670, + "src": "2851:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 4680, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4665, + "src": "2871:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4678, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "2855:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2864:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "2855:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2855:24:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2851:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2842:37:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4684, + "nodeType": "ExpressionStatement", + "src": "2842:37:19" + } + ] + } + ] + }, + "documentation": { + "id": 4658, + "nodeType": "StructuredDocumentation", + "src": "2298:111:19", + "text": " @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow)." + }, + "id": 4687, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryMul", + "nameLocation": "2423:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4660, + "mutability": "mutable", + "name": "a", + "nameLocation": "2438:1:19", + "nodeType": "VariableDeclaration", + "scope": 4687, + "src": "2430:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2430:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4662, + "mutability": "mutable", + "name": "b", + "nameLocation": "2449:1:19", + "nodeType": "VariableDeclaration", + "scope": 4687, + "src": "2441:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4661, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2441:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2429:22:19" + }, + "returnParameters": { + "id": 4668, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4665, + "mutability": "mutable", + "name": "success", + "nameLocation": "2480:7:19", + "nodeType": "VariableDeclaration", + "scope": 4687, + "src": "2475:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4664, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2475:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4667, + "mutability": "mutable", + "name": "result", + "nameLocation": "2497:6:19", + "nodeType": "VariableDeclaration", + "scope": 4687, + "src": "2489:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4666, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2489:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2474:30:19" + }, + "scope": 6204, + "src": "2414:482:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4707, + "nodeType": "Block", + "src": "3111:231:19", + "statements": [ + { + "id": 4706, + "nodeType": "UncheckedBlock", + "src": "3121:215:19", + "statements": [ + { + "expression": { + "id": 4703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4699, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4695, + "src": "3145:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4700, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4692, + "src": "3155:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 4701, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3159:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3155:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3145:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4704, + "nodeType": "ExpressionStatement", + "src": "3145:15:19" + }, + { + "AST": { + "nativeSrc": "3199:127:19", + "nodeType": "YulBlock", + "src": "3199:127:19", + "statements": [ + { + "nativeSrc": "3293:19:19", + "nodeType": "YulAssignment", + "src": "3293:19:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "3307:1:19", + "nodeType": "YulIdentifier", + "src": "3307:1:19" + }, + { + "name": "b", + "nativeSrc": "3310:1:19", + "nodeType": "YulIdentifier", + "src": "3310:1:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "3303:3:19", + "nodeType": "YulIdentifier", + "src": "3303:3:19" + }, + "nativeSrc": "3303:9:19", + "nodeType": "YulFunctionCall", + "src": "3303:9:19" + }, + "variableNames": [ + { + "name": "result", + "nativeSrc": "3293:6:19", + "nodeType": "YulIdentifier", + "src": "3293:6:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4690, + "isOffset": false, + "isSlot": false, + "src": "3307:1:19", + "valueSize": 1 + }, + { + "declaration": 4692, + "isOffset": false, + "isSlot": false, + "src": "3310:1:19", + "valueSize": 1 + }, + { + "declaration": 4697, + "isOffset": false, + "isSlot": false, + "src": "3293:6:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4705, + "nodeType": "InlineAssembly", + "src": "3174:152:19" + } + ] + } + ] + }, + "documentation": { + "id": 4688, + "nodeType": "StructuredDocumentation", + "src": "2902:113:19", + "text": " @dev Returns the division of two unsigned integers, with a success flag (no division by zero)." + }, + "id": 4708, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryDiv", + "nameLocation": "3029:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4690, + "mutability": "mutable", + "name": "a", + "nameLocation": "3044:1:19", + "nodeType": "VariableDeclaration", + "scope": 4708, + "src": "3036:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4689, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3036:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4692, + "mutability": "mutable", + "name": "b", + "nameLocation": "3055:1:19", + "nodeType": "VariableDeclaration", + "scope": 4708, + "src": "3047:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4691, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3047:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3035:22:19" + }, + "returnParameters": { + "id": 4698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4695, + "mutability": "mutable", + "name": "success", + "nameLocation": "3086:7:19", + "nodeType": "VariableDeclaration", + "scope": 4708, + "src": "3081:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4694, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3081:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4697, + "mutability": "mutable", + "name": "result", + "nameLocation": "3103:6:19", + "nodeType": "VariableDeclaration", + "scope": 4708, + "src": "3095:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4696, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3095:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3080:30:19" + }, + "scope": 6204, + "src": "3020:322:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4728, + "nodeType": "Block", + "src": "3567:231:19", + "statements": [ + { + "id": 4727, + "nodeType": "UncheckedBlock", + "src": "3577:215:19", + "statements": [ + { + "expression": { + "id": 4724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4720, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4716, + "src": "3601:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4721, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "3611:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 4722, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3615:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3611:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3601:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4725, + "nodeType": "ExpressionStatement", + "src": "3601:15:19" + }, + { + "AST": { + "nativeSrc": "3655:127:19", + "nodeType": "YulBlock", + "src": "3655:127:19", + "statements": [ + { + "nativeSrc": "3749:19:19", + "nodeType": "YulAssignment", + "src": "3749:19:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "3763:1:19", + "nodeType": "YulIdentifier", + "src": "3763:1:19" + }, + { + "name": "b", + "nativeSrc": "3766:1:19", + "nodeType": "YulIdentifier", + "src": "3766:1:19" + } + ], + "functionName": { + "name": "mod", + "nativeSrc": "3759:3:19", + "nodeType": "YulIdentifier", + "src": "3759:3:19" + }, + "nativeSrc": "3759:9:19", + "nodeType": "YulFunctionCall", + "src": "3759:9:19" + }, + "variableNames": [ + { + "name": "result", + "nativeSrc": "3749:6:19", + "nodeType": "YulIdentifier", + "src": "3749:6:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4711, + "isOffset": false, + "isSlot": false, + "src": "3763:1:19", + "valueSize": 1 + }, + { + "declaration": 4713, + "isOffset": false, + "isSlot": false, + "src": "3766:1:19", + "valueSize": 1 + }, + { + "declaration": 4718, + "isOffset": false, + "isSlot": false, + "src": "3749:6:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4726, + "nodeType": "InlineAssembly", + "src": "3630:152:19" + } + ] + } + ] + }, + "documentation": { + "id": 4709, + "nodeType": "StructuredDocumentation", + "src": "3348:123:19", + "text": " @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero)." + }, + "id": 4729, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryMod", + "nameLocation": "3485:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4714, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4711, + "mutability": "mutable", + "name": "a", + "nameLocation": "3500:1:19", + "nodeType": "VariableDeclaration", + "scope": 4729, + "src": "3492:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4710, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3492:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4713, + "mutability": "mutable", + "name": "b", + "nameLocation": "3511:1:19", + "nodeType": "VariableDeclaration", + "scope": 4729, + "src": "3503:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4712, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3503:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3491:22:19" + }, + "returnParameters": { + "id": 4719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4716, + "mutability": "mutable", + "name": "success", + "nameLocation": "3542:7:19", + "nodeType": "VariableDeclaration", + "scope": 4729, + "src": "3537:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4715, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3537:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4718, + "mutability": "mutable", + "name": "result", + "nameLocation": "3559:6:19", + "nodeType": "VariableDeclaration", + "scope": 4729, + "src": "3551:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3551:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3536:30:19" + }, + "scope": 6204, + "src": "3476:322:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4758, + "nodeType": "Block", + "src": "3989:122:19", + "statements": [ + { + "assignments": [ + 4740, + 4742 + ], + "declarations": [ + { + "constant": false, + "id": 4740, + "mutability": "mutable", + "name": "success", + "nameLocation": "4005:7:19", + "nodeType": "VariableDeclaration", + "scope": 4758, + "src": "4000:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4739, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4000:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4742, + "mutability": "mutable", + "name": "result", + "nameLocation": "4022:6:19", + "nodeType": "VariableDeclaration", + "scope": 4758, + "src": "4014:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4014:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4747, + "initialValue": { + "arguments": [ + { + "id": 4744, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4732, + "src": "4039:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4745, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4734, + "src": "4042:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4743, + "name": "tryAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4622, + "src": "4032:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 4746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4032:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3999:45:19" + }, + { + "expression": { + "arguments": [ + { + "id": 4749, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4740, + "src": "4069:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 4750, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4742, + "src": "4078:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [ + { + "id": 4753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4091:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 4752, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4091:7:19", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 4751, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4086:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4086:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 4755, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4100:3:19", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4086:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4748, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "4061:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4061:43:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4738, + "id": 4757, + "nodeType": "Return", + "src": "4054:50:19" + } + ] + }, + "documentation": { + "id": 4730, + "nodeType": "StructuredDocumentation", + "src": "3804:103:19", + "text": " @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing." + }, + "id": 4759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saturatingAdd", + "nameLocation": "3921:13:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4735, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4732, + "mutability": "mutable", + "name": "a", + "nameLocation": "3943:1:19", + "nodeType": "VariableDeclaration", + "scope": 4759, + "src": "3935:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4731, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3935:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4734, + "mutability": "mutable", + "name": "b", + "nameLocation": "3954:1:19", + "nodeType": "VariableDeclaration", + "scope": 4759, + "src": "3946:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4733, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3946:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3934:22:19" + }, + "returnParameters": { + "id": 4738, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4737, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4759, + "src": "3980:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4736, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3980:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3979:9:19" + }, + "scope": 6204, + "src": "3912:199:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4778, + "nodeType": "Block", + "src": "4294:73:19", + "statements": [ + { + "assignments": [ + null, + 4770 + ], + "declarations": [ + null, + { + "constant": false, + "id": 4770, + "mutability": "mutable", + "name": "result", + "nameLocation": "4315:6:19", + "nodeType": "VariableDeclaration", + "scope": 4778, + "src": "4307:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4769, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4307:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4775, + "initialValue": { + "arguments": [ + { + "id": 4772, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4762, + "src": "4332:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4773, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4764, + "src": "4335:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4771, + "name": "trySub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "4325:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 4774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4325:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4304:33:19" + }, + { + "expression": { + "id": 4776, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4770, + "src": "4354:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4768, + "id": 4777, + "nodeType": "Return", + "src": "4347:13:19" + } + ] + }, + "documentation": { + "id": 4760, + "nodeType": "StructuredDocumentation", + "src": "4117:95:19", + "text": " @dev Unsigned saturating subtraction, bounds to zero instead of overflowing." + }, + "id": 4779, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saturatingSub", + "nameLocation": "4226:13:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4765, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4762, + "mutability": "mutable", + "name": "a", + "nameLocation": "4248:1:19", + "nodeType": "VariableDeclaration", + "scope": 4779, + "src": "4240:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4761, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4240:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4764, + "mutability": "mutable", + "name": "b", + "nameLocation": "4259:1:19", + "nodeType": "VariableDeclaration", + "scope": 4779, + "src": "4251:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4763, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4251:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4239:22:19" + }, + "returnParameters": { + "id": 4768, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4767, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4779, + "src": "4285:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4766, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4284:9:19" + }, + "scope": 6204, + "src": "4217:150:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4808, + "nodeType": "Block", + "src": "4564:122:19", + "statements": [ + { + "assignments": [ + 4790, + 4792 + ], + "declarations": [ + { + "constant": false, + "id": 4790, + "mutability": "mutable", + "name": "success", + "nameLocation": "4580:7:19", + "nodeType": "VariableDeclaration", + "scope": 4808, + "src": "4575:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4789, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4575:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4792, + "mutability": "mutable", + "name": "result", + "nameLocation": "4597:6:19", + "nodeType": "VariableDeclaration", + "scope": 4808, + "src": "4589:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4589:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4797, + "initialValue": { + "arguments": [ + { + "id": 4794, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4782, + "src": "4614:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4795, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "4617:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4793, + "name": "tryMul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4687, + "src": "4607:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 4796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4607:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4574:45:19" + }, + { + "expression": { + "arguments": [ + { + "id": 4799, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4790, + "src": "4644:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 4800, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4792, + "src": "4653:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [ + { + "id": 4803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4666:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 4802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4666:7:19", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 4801, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4661:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4661:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 4805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4675:3:19", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4661:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4798, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "4636:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4636:43:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4788, + "id": 4807, + "nodeType": "Return", + "src": "4629:50:19" + } + ] + }, + "documentation": { + "id": 4780, + "nodeType": "StructuredDocumentation", + "src": "4373:109:19", + "text": " @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing." + }, + "id": 4809, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saturatingMul", + "nameLocation": "4496:13:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4782, + "mutability": "mutable", + "name": "a", + "nameLocation": "4518:1:19", + "nodeType": "VariableDeclaration", + "scope": 4809, + "src": "4510:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4781, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4510:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4784, + "mutability": "mutable", + "name": "b", + "nameLocation": "4529:1:19", + "nodeType": "VariableDeclaration", + "scope": 4809, + "src": "4521:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4521:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4509:22:19" + }, + "returnParameters": { + "id": 4788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4787, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4809, + "src": "4555:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4786, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4555:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4554:9:19" + }, + "scope": 6204, + "src": "4487:199:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4835, + "nodeType": "Block", + "src": "5174:207:19", + "statements": [ + { + "id": 4834, + "nodeType": "UncheckedBlock", + "src": "5184:191:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4821, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4816, + "src": "5322:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4822, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4814, + "src": "5328:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 4823, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4816, + "src": "5332:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5328:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4825, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5327:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 4828, + "name": "condition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "5353:9:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4826, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "5337:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5346:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "5337:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5337:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5327:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4831, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5326:38:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5322:42:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4820, + "id": 4833, + "nodeType": "Return", + "src": "5315:49:19" + } + ] + } + ] + }, + "documentation": { + "id": 4810, + "nodeType": "StructuredDocumentation", + "src": "4692:390:19", + "text": " @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.\n IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute\n one branch when needed, making this function more expensive." + }, + "id": 4836, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ternary", + "nameLocation": "5096:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4817, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4812, + "mutability": "mutable", + "name": "condition", + "nameLocation": "5109:9:19", + "nodeType": "VariableDeclaration", + "scope": 4836, + "src": "5104:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4811, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5104:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4814, + "mutability": "mutable", + "name": "a", + "nameLocation": "5128:1:19", + "nodeType": "VariableDeclaration", + "scope": 4836, + "src": "5120:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4813, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5120:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4816, + "mutability": "mutable", + "name": "b", + "nameLocation": "5139:1:19", + "nodeType": "VariableDeclaration", + "scope": 4836, + "src": "5131:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4815, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5131:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5103:38:19" + }, + "returnParameters": { + "id": 4820, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4819, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4836, + "src": "5165:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4818, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5165:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5164:9:19" + }, + "scope": 6204, + "src": "5087:294:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4854, + "nodeType": "Block", + "src": "5518:44:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4847, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "5543:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 4848, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4841, + "src": "5547:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5543:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 4850, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "5550:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4851, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4841, + "src": "5553:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4846, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "5535:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5535:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4845, + "id": 4853, + "nodeType": "Return", + "src": "5528:27:19" + } + ] + }, + "documentation": { + "id": 4837, + "nodeType": "StructuredDocumentation", + "src": "5387:59:19", + "text": " @dev Returns the largest of two numbers." + }, + "id": 4855, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "max", + "nameLocation": "5460:3:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4839, + "mutability": "mutable", + "name": "a", + "nameLocation": "5472:1:19", + "nodeType": "VariableDeclaration", + "scope": 4855, + "src": "5464:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4838, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5464:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4841, + "mutability": "mutable", + "name": "b", + "nameLocation": "5483:1:19", + "nodeType": "VariableDeclaration", + "scope": 4855, + "src": "5475:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5475:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5463:22:19" + }, + "returnParameters": { + "id": 4845, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4844, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4855, + "src": "5509:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5509:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5508:9:19" + }, + "scope": 6204, + "src": "5451:111:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4873, + "nodeType": "Block", + "src": "5700:44:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4866, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "5725:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4867, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4860, + "src": "5729:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5725:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 4869, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "5732:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4870, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4860, + "src": "5735:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4865, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "5717:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5717:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4864, + "id": 4872, + "nodeType": "Return", + "src": "5710:27:19" + } + ] + }, + "documentation": { + "id": 4856, + "nodeType": "StructuredDocumentation", + "src": "5568:60:19", + "text": " @dev Returns the smallest of two numbers." + }, + "id": 4874, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "min", + "nameLocation": "5642:3:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4861, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4858, + "mutability": "mutable", + "name": "a", + "nameLocation": "5654:1:19", + "nodeType": "VariableDeclaration", + "scope": 4874, + "src": "5646:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5646:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4860, + "mutability": "mutable", + "name": "b", + "nameLocation": "5665:1:19", + "nodeType": "VariableDeclaration", + "scope": 4874, + "src": "5657:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5657:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5645:22:19" + }, + "returnParameters": { + "id": 4864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4863, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4874, + "src": "5691:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4862, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5691:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5690:9:19" + }, + "scope": 6204, + "src": "5633:111:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4897, + "nodeType": "Block", + "src": "5928:120:19", + "statements": [ + { + "id": 4896, + "nodeType": "UncheckedBlock", + "src": "5938:104:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4884, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4877, + "src": "6011:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 4885, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4879, + "src": "6015:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6011:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4887, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6010:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4888, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4877, + "src": "6021:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 4889, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4879, + "src": "6025:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6021:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4891, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6020:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "32", + "id": 4892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6030:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6020:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6010:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4883, + "id": 4895, + "nodeType": "Return", + "src": "6003:28:19" + } + ] + } + ] + }, + "documentation": { + "id": 4875, + "nodeType": "StructuredDocumentation", + "src": "5750:102:19", + "text": " @dev Returns the average of two numbers. The result is rounded towards\n zero." + }, + "id": 4898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "average", + "nameLocation": "5866:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4877, + "mutability": "mutable", + "name": "a", + "nameLocation": "5882:1:19", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "5874:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4876, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5874:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4879, + "mutability": "mutable", + "name": "b", + "nameLocation": "5893:1:19", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "5885:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4878, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5885:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5873:22:19" + }, + "returnParameters": { + "id": 4883, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4882, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "5919:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5919:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5918:9:19" + }, + "scope": 6204, + "src": "5857:191:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4938, + "nodeType": "Block", + "src": "6340:633:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4908, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "6354:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6359:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6354:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4919, + "nodeType": "IfStatement", + "src": "6350:150:19", + "trueBody": { + "id": 4918, + "nodeType": "Block", + "src": "6362:138:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 4914, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "6466:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6472:16:19", + "memberName": "DIVISION_BY_ZERO", + "nodeType": "MemberAccess", + "referencedDeclaration": 1681, + "src": "6466:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4911, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "6454:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6460:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "6454:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 4916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6454:35:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4917, + "nodeType": "ExpressionStatement", + "src": "6454:35:19" + } + ] + } + }, + { + "id": 4937, + "nodeType": "UncheckedBlock", + "src": "6883:84:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4922, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4901, + "src": "6930:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 4923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6934:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6930:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4920, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "6914:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6923:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "6914:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6914:22:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4926, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4901, + "src": "6941:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6945:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6941:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4929, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6940:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 4930, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "6950:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6940:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 4932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6954:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6940:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4934, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6939:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6914:42:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4907, + "id": 4936, + "nodeType": "Return", + "src": "6907:49:19" + } + ] + } + ] + }, + "documentation": { + "id": 4899, + "nodeType": "StructuredDocumentation", + "src": "6054:210:19", + "text": " @dev Returns the ceiling of the division of two numbers.\n This differs from standard division with `/` in that it rounds towards infinity instead\n of rounding towards zero." + }, + "id": 4939, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ceilDiv", + "nameLocation": "6278:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4901, + "mutability": "mutable", + "name": "a", + "nameLocation": "6294:1:19", + "nodeType": "VariableDeclaration", + "scope": 4939, + "src": "6286:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4900, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6286:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4903, + "mutability": "mutable", + "name": "b", + "nameLocation": "6305:1:19", + "nodeType": "VariableDeclaration", + "scope": 4939, + "src": "6297:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6297:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6285:22:19" + }, + "returnParameters": { + "id": 4907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4906, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4939, + "src": "6331:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4905, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6331:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6330:9:19" + }, + "scope": 6204, + "src": "6269:704:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5074, + "nodeType": "Block", + "src": "7394:3585:19", + "statements": [ + { + "id": 5073, + "nodeType": "UncheckedBlock", + "src": "7404:3569:19", + "statements": [ + { + "assignments": [ + 4952, + 4954 + ], + "declarations": [ + { + "constant": false, + "id": 4952, + "mutability": "mutable", + "name": "high", + "nameLocation": "7437:4:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "7429:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4951, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7429:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4954, + "mutability": "mutable", + "name": "low", + "nameLocation": "7451:3:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "7443:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7443:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4959, + "initialValue": { + "arguments": [ + { + "id": 4956, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4942, + "src": "7465:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4957, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "7468:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4955, + "name": "mul512", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4587, + "src": "7458:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 4958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7458:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7428:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4960, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "7552:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7560:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7552:9:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4968, + "nodeType": "IfStatement", + "src": "7548:365:19", + "trueBody": { + "id": 4967, + "nodeType": "Block", + "src": "7563:350:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4963, + "name": "low", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4954, + "src": "7881:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 4964, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "7887:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7881:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4950, + "id": 4966, + "nodeType": "Return", + "src": "7874:24:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4969, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8023:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 4970, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "8038:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8023:19:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4987, + "nodeType": "IfStatement", + "src": "8019:142:19", + "trueBody": { + "id": 4986, + "nodeType": "Block", + "src": "8044:117:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4976, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8082:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4977, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8097:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8082:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "id": 4979, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "8100:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8106:16:19", + "memberName": "DIVISION_BY_ZERO", + "nodeType": "MemberAccess", + "referencedDeclaration": 1681, + "src": "8100:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 4981, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "8124:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4982, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8130:14:19", + "memberName": "UNDER_OVERFLOW", + "nodeType": "MemberAccess", + "referencedDeclaration": 1677, + "src": "8124:20:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4975, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "8074:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8074:71:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4972, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "8062:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8068:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "8062:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 4984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8062:84:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4985, + "nodeType": "ExpressionStatement", + "src": "8062:84:19" + } + ] + } + }, + { + "assignments": [ + 4989 + ], + "declarations": [ + { + "constant": false, + "id": 4989, + "mutability": "mutable", + "name": "remainder", + "nameLocation": "8421:9:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "8413:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4988, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8413:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4990, + "nodeType": "VariableDeclarationStatement", + "src": "8413:17:19" + }, + { + "AST": { + "nativeSrc": "8469:283:19", + "nodeType": "YulBlock", + "src": "8469:283:19", + "statements": [ + { + "nativeSrc": "8538:38:19", + "nodeType": "YulAssignment", + "src": "8538:38:19", + "value": { + "arguments": [ + { + "name": "x", + "nativeSrc": "8558:1:19", + "nodeType": "YulIdentifier", + "src": "8558:1:19" + }, + { + "name": "y", + "nativeSrc": "8561:1:19", + "nodeType": "YulIdentifier", + "src": "8561:1:19" + }, + { + "name": "denominator", + "nativeSrc": "8564:11:19", + "nodeType": "YulIdentifier", + "src": "8564:11:19" + } + ], + "functionName": { + "name": "mulmod", + "nativeSrc": "8551:6:19", + "nodeType": "YulIdentifier", + "src": "8551:6:19" + }, + "nativeSrc": "8551:25:19", + "nodeType": "YulFunctionCall", + "src": "8551:25:19" + }, + "variableNames": [ + { + "name": "remainder", + "nativeSrc": "8538:9:19", + "nodeType": "YulIdentifier", + "src": "8538:9:19" + } + ] + }, + { + "nativeSrc": "8658:37:19", + "nodeType": "YulAssignment", + "src": "8658:37:19", + "value": { + "arguments": [ + { + "name": "high", + "nativeSrc": "8670:4:19", + "nodeType": "YulIdentifier", + "src": "8670:4:19" + }, + { + "arguments": [ + { + "name": "remainder", + "nativeSrc": "8679:9:19", + "nodeType": "YulIdentifier", + "src": "8679:9:19" + }, + { + "name": "low", + "nativeSrc": "8690:3:19", + "nodeType": "YulIdentifier", + "src": "8690:3:19" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "8676:2:19", + "nodeType": "YulIdentifier", + "src": "8676:2:19" + }, + "nativeSrc": "8676:18:19", + "nodeType": "YulFunctionCall", + "src": "8676:18:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8666:3:19", + "nodeType": "YulIdentifier", + "src": "8666:3:19" + }, + "nativeSrc": "8666:29:19", + "nodeType": "YulFunctionCall", + "src": "8666:29:19" + }, + "variableNames": [ + { + "name": "high", + "nativeSrc": "8658:4:19", + "nodeType": "YulIdentifier", + "src": "8658:4:19" + } + ] + }, + { + "nativeSrc": "8712:26:19", + "nodeType": "YulAssignment", + "src": "8712:26:19", + "value": { + "arguments": [ + { + "name": "low", + "nativeSrc": "8723:3:19", + "nodeType": "YulIdentifier", + "src": "8723:3:19" + }, + { + "name": "remainder", + "nativeSrc": "8728:9:19", + "nodeType": "YulIdentifier", + "src": "8728:9:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8719:3:19", + "nodeType": "YulIdentifier", + "src": "8719:3:19" + }, + "nativeSrc": "8719:19:19", + "nodeType": "YulFunctionCall", + "src": "8719:19:19" + }, + "variableNames": [ + { + "name": "low", + "nativeSrc": "8712:3:19", + "nodeType": "YulIdentifier", + "src": "8712:3:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4946, + "isOffset": false, + "isSlot": false, + "src": "8564:11:19", + "valueSize": 1 + }, + { + "declaration": 4952, + "isOffset": false, + "isSlot": false, + "src": "8658:4:19", + "valueSize": 1 + }, + { + "declaration": 4952, + "isOffset": false, + "isSlot": false, + "src": "8670:4:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "8690:3:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "8712:3:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "8723:3:19", + "valueSize": 1 + }, + { + "declaration": 4989, + "isOffset": false, + "isSlot": false, + "src": "8538:9:19", + "valueSize": 1 + }, + { + "declaration": 4989, + "isOffset": false, + "isSlot": false, + "src": "8679:9:19", + "valueSize": 1 + }, + { + "declaration": 4989, + "isOffset": false, + "isSlot": false, + "src": "8728:9:19", + "valueSize": 1 + }, + { + "declaration": 4942, + "isOffset": false, + "isSlot": false, + "src": "8558:1:19", + "valueSize": 1 + }, + { + "declaration": 4944, + "isOffset": false, + "isSlot": false, + "src": "8561:1:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4991, + "nodeType": "InlineAssembly", + "src": "8444:308:19" + }, + { + "assignments": [ + 4993 + ], + "declarations": [ + { + "constant": false, + "id": 4993, + "mutability": "mutable", + "name": "twos", + "nameLocation": "8964:4:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "8956:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4992, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8956:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5000, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4994, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8971:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "30", + "id": 4995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8986:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 4996, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8990:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8986:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4998, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8985:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8971:31:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8956:46:19" + }, + { + "AST": { + "nativeSrc": "9041:359:19", + "nodeType": "YulBlock", + "src": "9041:359:19", + "statements": [ + { + "nativeSrc": "9106:37:19", + "nodeType": "YulAssignment", + "src": "9106:37:19", + "value": { + "arguments": [ + { + "name": "denominator", + "nativeSrc": "9125:11:19", + "nodeType": "YulIdentifier", + "src": "9125:11:19" + }, + { + "name": "twos", + "nativeSrc": "9138:4:19", + "nodeType": "YulIdentifier", + "src": "9138:4:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "9121:3:19", + "nodeType": "YulIdentifier", + "src": "9121:3:19" + }, + "nativeSrc": "9121:22:19", + "nodeType": "YulFunctionCall", + "src": "9121:22:19" + }, + "variableNames": [ + { + "name": "denominator", + "nativeSrc": "9106:11:19", + "nodeType": "YulIdentifier", + "src": "9106:11:19" + } + ] + }, + { + "nativeSrc": "9207:21:19", + "nodeType": "YulAssignment", + "src": "9207:21:19", + "value": { + "arguments": [ + { + "name": "low", + "nativeSrc": "9218:3:19", + "nodeType": "YulIdentifier", + "src": "9218:3:19" + }, + { + "name": "twos", + "nativeSrc": "9223:4:19", + "nodeType": "YulIdentifier", + "src": "9223:4:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "9214:3:19", + "nodeType": "YulIdentifier", + "src": "9214:3:19" + }, + "nativeSrc": "9214:14:19", + "nodeType": "YulFunctionCall", + "src": "9214:14:19" + }, + "variableNames": [ + { + "name": "low", + "nativeSrc": "9207:3:19", + "nodeType": "YulIdentifier", + "src": "9207:3:19" + } + ] + }, + { + "nativeSrc": "9347:39:19", + "nodeType": "YulAssignment", + "src": "9347:39:19", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9367:1:19", + "nodeType": "YulLiteral", + "src": "9367:1:19", + "type": "", + "value": "0" + }, + { + "name": "twos", + "nativeSrc": "9370:4:19", + "nodeType": "YulIdentifier", + "src": "9370:4:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9363:3:19", + "nodeType": "YulIdentifier", + "src": "9363:3:19" + }, + "nativeSrc": "9363:12:19", + "nodeType": "YulFunctionCall", + "src": "9363:12:19" + }, + { + "name": "twos", + "nativeSrc": "9377:4:19", + "nodeType": "YulIdentifier", + "src": "9377:4:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "9359:3:19", + "nodeType": "YulIdentifier", + "src": "9359:3:19" + }, + "nativeSrc": "9359:23:19", + "nodeType": "YulFunctionCall", + "src": "9359:23:19" + }, + { + "kind": "number", + "nativeSrc": "9384:1:19", + "nodeType": "YulLiteral", + "src": "9384:1:19", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9355:3:19", + "nodeType": "YulIdentifier", + "src": "9355:3:19" + }, + "nativeSrc": "9355:31:19", + "nodeType": "YulFunctionCall", + "src": "9355:31:19" + }, + "variableNames": [ + { + "name": "twos", + "nativeSrc": "9347:4:19", + "nodeType": "YulIdentifier", + "src": "9347:4:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4946, + "isOffset": false, + "isSlot": false, + "src": "9106:11:19", + "valueSize": 1 + }, + { + "declaration": 4946, + "isOffset": false, + "isSlot": false, + "src": "9125:11:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "9207:3:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "9218:3:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9138:4:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9223:4:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9347:4:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9370:4:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9377:4:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5001, + "nodeType": "InlineAssembly", + "src": "9016:384:19" + }, + { + "expression": { + "id": 5006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5002, + "name": "low", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4954, + "src": "9463:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5003, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "9470:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5004, + "name": "twos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "9477:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9470:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9463:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5007, + "nodeType": "ExpressionStatement", + "src": "9463:18:19" + }, + { + "assignments": [ + 5009 + ], + "declarations": [ + { + "constant": false, + "id": 5009, + "mutability": "mutable", + "name": "inverse", + "nameLocation": "9824:7:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "9816:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9816:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5016, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 5010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9835:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5011, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "9839:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9835:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5013, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "9834:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "hexValue": "32", + "id": 5014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9854:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "9834:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9816:39:19" + }, + { + "expression": { + "id": 5023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5017, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10072:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5018, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10083:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5019, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10087:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5020, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10101:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10087:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10083:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10072:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5024, + "nodeType": "ExpressionStatement", + "src": "10072:36:19" + }, + { + "expression": { + "id": 5031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5025, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10142:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10153:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5027, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10157:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5028, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10171:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10157:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10153:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10142:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5032, + "nodeType": "ExpressionStatement", + "src": "10142:36:19" + }, + { + "expression": { + "id": 5039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5033, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10214:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5034, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10225:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5035, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10229:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5036, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10243:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10229:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10225:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10214:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5040, + "nodeType": "ExpressionStatement", + "src": "10214:36:19" + }, + { + "expression": { + "id": 5047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5041, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10285:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5042, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10296:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5043, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10300:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5044, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10314:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10300:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10296:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10285:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5048, + "nodeType": "ExpressionStatement", + "src": "10285:36:19" + }, + { + "expression": { + "id": 5055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5049, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10358:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10369:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5051, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10373:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5052, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10387:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10373:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10369:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10358:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5056, + "nodeType": "ExpressionStatement", + "src": "10358:36:19" + }, + { + "expression": { + "id": 5063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5057, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10432:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10443:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5059, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10447:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5060, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10461:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10447:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10443:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10432:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5064, + "nodeType": "ExpressionStatement", + "src": "10432:36:19" + }, + { + "expression": { + "id": 5069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5065, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4949, + "src": "10913:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5066, + "name": "low", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4954, + "src": "10922:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5067, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10928:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10922:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10913:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5070, + "nodeType": "ExpressionStatement", + "src": "10913:22:19" + }, + { + "expression": { + "id": 5071, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4949, + "src": "10956:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4950, + "id": 5072, + "nodeType": "Return", + "src": "10949:13:19" + } + ] + } + ] + }, + "documentation": { + "id": 4940, + "nodeType": "StructuredDocumentation", + "src": "6979:312:19", + "text": " @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n denominator == 0.\n Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n Uniswap Labs also under MIT license." + }, + "id": 5075, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mulDiv", + "nameLocation": "7305:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4942, + "mutability": "mutable", + "name": "x", + "nameLocation": "7320:1:19", + "nodeType": "VariableDeclaration", + "scope": 5075, + "src": "7312:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4941, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7312:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4944, + "mutability": "mutable", + "name": "y", + "nameLocation": "7331:1:19", + "nodeType": "VariableDeclaration", + "scope": 5075, + "src": "7323:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7323:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4946, + "mutability": "mutable", + "name": "denominator", + "nameLocation": "7342:11:19", + "nodeType": "VariableDeclaration", + "scope": 5075, + "src": "7334:19:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4945, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7334:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7311:43:19" + }, + "returnParameters": { + "id": 4950, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4949, + "mutability": "mutable", + "name": "result", + "nameLocation": "7386:6:19", + "nodeType": "VariableDeclaration", + "scope": 5075, + "src": "7378:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4948, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7378:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7377:16:19" + }, + "scope": 6204, + "src": "7296:3683:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5111, + "nodeType": "Block", + "src": "11218:128:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5091, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5078, + "src": "11242:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5092, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5080, + "src": "11245:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5093, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5082, + "src": "11248:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5090, + "name": "mulDiv", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5075, + 5112 + ], + "referencedDeclaration": 5075, + "src": "11235:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 5094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11235:25:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5098, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "11296:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 5097, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "11279:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 5099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11279:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5101, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5078, + "src": "11316:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5102, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5080, + "src": "11319:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5103, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5082, + "src": "11322:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5100, + "name": "mulmod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -16, + "src": "11309:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 5104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11309:25:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 5105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11337:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11309:29:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11279:59:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5095, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "11263:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11272:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "11263:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11263:76:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11235:104:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5089, + "id": 5110, + "nodeType": "Return", + "src": "11228:111:19" + } + ] + }, + "documentation": { + "id": 5076, + "nodeType": "StructuredDocumentation", + "src": "10985:118:19", + "text": " @dev Calculates x * y / denominator with full precision, following the selected rounding direction." + }, + "id": 5112, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mulDiv", + "nameLocation": "11117:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5086, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5078, + "mutability": "mutable", + "name": "x", + "nameLocation": "11132:1:19", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11124:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5077, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11124:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5080, + "mutability": "mutable", + "name": "y", + "nameLocation": "11143:1:19", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11135:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5079, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11135:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5082, + "mutability": "mutable", + "name": "denominator", + "nameLocation": "11154:11:19", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11146:19:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11146:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5085, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "11176:8:19", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11167:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 5084, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5083, + "name": "Rounding", + "nameLocations": [ + "11167:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "11167:8:19" + }, + "referencedDeclaration": 4559, + "src": "11167:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "11123:62:19" + }, + "returnParameters": { + "id": 5089, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5088, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11209:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5087, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11209:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11208:9:19" + }, + "scope": 6204, + "src": "11108:238:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5161, + "nodeType": "Block", + "src": "11554:245:19", + "statements": [ + { + "id": 5160, + "nodeType": "UncheckedBlock", + "src": "11564:229:19", + "statements": [ + { + "assignments": [ + 5125, + 5127 + ], + "declarations": [ + { + "constant": false, + "id": 5125, + "mutability": "mutable", + "name": "high", + "nameLocation": "11597:4:19", + "nodeType": "VariableDeclaration", + "scope": 5160, + "src": "11589:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11589:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5127, + "mutability": "mutable", + "name": "low", + "nameLocation": "11611:3:19", + "nodeType": "VariableDeclaration", + "scope": 5160, + "src": "11603:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5126, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11603:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5132, + "initialValue": { + "arguments": [ + { + "id": 5129, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5115, + "src": "11625:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5130, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5117, + "src": "11628:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5128, + "name": "mul512", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4587, + "src": "11618:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 5131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11618:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11588:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5133, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5125, + "src": "11648:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11656:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "id": 5135, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "11661:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11656:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11648:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5146, + "nodeType": "IfStatement", + "src": "11644:86:19", + "trueBody": { + "id": 5145, + "nodeType": "Block", + "src": "11664:66:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5141, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "11694:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11700:14:19", + "memberName": "UNDER_OVERFLOW", + "nodeType": "MemberAccess", + "referencedDeclaration": 1677, + "src": "11694:20:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 5138, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "11682:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11688:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "11682:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 5143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11682:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5144, + "nodeType": "ExpressionStatement", + "src": "11682:33:19" + } + ] + } + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5147, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5125, + "src": "11751:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 5150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "323536", + "id": 5148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11760:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5149, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "11766:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11760:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 5151, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11759:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "11751:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5153, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11750:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5154, + "name": "low", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "11773:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5155, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "11780:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11773:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5157, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11772:10:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11750:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5123, + "id": 5159, + "nodeType": "Return", + "src": "11743:39:19" + } + ] + } + ] + }, + "documentation": { + "id": 5113, + "nodeType": "StructuredDocumentation", + "src": "11352:111:19", + "text": " @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256." + }, + "id": 5162, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mulShr", + "nameLocation": "11477:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5115, + "mutability": "mutable", + "name": "x", + "nameLocation": "11492:1:19", + "nodeType": "VariableDeclaration", + "scope": 5162, + "src": "11484:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5114, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11484:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5117, + "mutability": "mutable", + "name": "y", + "nameLocation": "11503:1:19", + "nodeType": "VariableDeclaration", + "scope": 5162, + "src": "11495:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5116, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11495:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5119, + "mutability": "mutable", + "name": "n", + "nameLocation": "11512:1:19", + "nodeType": "VariableDeclaration", + "scope": 5162, + "src": "11506:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5118, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11506:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11483:31:19" + }, + "returnParameters": { + "id": 5123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5122, + "mutability": "mutable", + "name": "result", + "nameLocation": "11546:6:19", + "nodeType": "VariableDeclaration", + "scope": 5162, + "src": "11538:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5121, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11538:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11537:16:19" + }, + "scope": 6204, + "src": "11468:331:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5200, + "nodeType": "Block", + "src": "12017:113:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5178, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5165, + "src": "12041:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5179, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5167, + "src": "12044:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5180, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "12047:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 5177, + "name": "mulShr", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5162, + 5201 + ], + "referencedDeclaration": 5162, + "src": "12034:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint8_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint8) pure returns (uint256)" + } + }, + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12034:15:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5185, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5172, + "src": "12085:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 5184, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "12068:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 5186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12068:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5188, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5165, + "src": "12105:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5189, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5167, + "src": "12108:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12111:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "id": 5191, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "12116:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "12111:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5187, + "name": "mulmod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -16, + "src": "12098:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 5193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12098:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 5194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12121:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12098:24:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12068:54:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5182, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "12052:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12061:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "12052:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12052:71:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12034:89:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5176, + "id": 5199, + "nodeType": "Return", + "src": "12027:96:19" + } + ] + }, + "documentation": { + "id": 5163, + "nodeType": "StructuredDocumentation", + "src": "11805:109:19", + "text": " @dev Calculates x * y >> n with full precision, following the selected rounding direction." + }, + "id": 5201, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mulShr", + "nameLocation": "11928:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5173, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5165, + "mutability": "mutable", + "name": "x", + "nameLocation": "11943:1:19", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "11935:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5164, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11935:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5167, + "mutability": "mutable", + "name": "y", + "nameLocation": "11954:1:19", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "11946:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11946:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5169, + "mutability": "mutable", + "name": "n", + "nameLocation": "11963:1:19", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "11957:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5168, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11957:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5172, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "11975:8:19", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "11966:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 5171, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5170, + "name": "Rounding", + "nameLocations": [ + "11966:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "11966:8:19" + }, + "referencedDeclaration": 4559, + "src": "11966:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "11934:50:19" + }, + "returnParameters": { + "id": 5176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5175, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "12008:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12008:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12007:9:19" + }, + "scope": 6204, + "src": "11919:211:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5297, + "nodeType": "Block", + "src": "12764:1849:19", + "statements": [ + { + "id": 5296, + "nodeType": "UncheckedBlock", + "src": "12774:1833:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5211, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "12802:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12807:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12802:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5216, + "nodeType": "IfStatement", + "src": "12798:20:19", + "trueBody": { + "expression": { + "hexValue": "30", + "id": 5214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12817:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5210, + "id": 5215, + "nodeType": "Return", + "src": "12810:8:19" + } + }, + { + "assignments": [ + 5218 + ], + "declarations": [ + { + "constant": false, + "id": 5218, + "mutability": "mutable", + "name": "remainder", + "nameLocation": "13297:9:19", + "nodeType": "VariableDeclaration", + "scope": 5296, + "src": "13289:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13289:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5222, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5219, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "13309:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "id": 5220, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "13313:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13309:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13289:25:19" + }, + { + "assignments": [ + 5224 + ], + "declarations": [ + { + "constant": false, + "id": 5224, + "mutability": "mutable", + "name": "gcd", + "nameLocation": "13336:3:19", + "nodeType": "VariableDeclaration", + "scope": 5296, + "src": "13328:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13328:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5226, + "initialValue": { + "id": 5225, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "13342:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13328:15:19" + }, + { + "assignments": [ + 5228 + ], + "declarations": [ + { + "constant": false, + "id": 5228, + "mutability": "mutable", + "name": "x", + "nameLocation": "13486:1:19", + "nodeType": "VariableDeclaration", + "scope": 5296, + "src": "13479:8:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5227, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "13479:6:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 5230, + "initialValue": { + "hexValue": "30", + "id": 5229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13490:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13479:12:19" + }, + { + "assignments": [ + 5232 + ], + "declarations": [ + { + "constant": false, + "id": 5232, + "mutability": "mutable", + "name": "y", + "nameLocation": "13512:1:19", + "nodeType": "VariableDeclaration", + "scope": 5296, + "src": "13505:8:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5231, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "13505:6:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 5234, + "initialValue": { + "hexValue": "31", + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13516:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13505:12:19" + }, + { + "body": { + "id": 5271, + "nodeType": "Block", + "src": "13555:882:19", + "statements": [ + { + "assignments": [ + 5239 + ], + "declarations": [ + { + "constant": false, + "id": 5239, + "mutability": "mutable", + "name": "quotient", + "nameLocation": "13581:8:19", + "nodeType": "VariableDeclaration", + "scope": 5271, + "src": "13573:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5238, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13573:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5243, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5240, + "name": "gcd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5224, + "src": "13592:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5241, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13598:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13592:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13573:34:19" + }, + { + "expression": { + "id": 5254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "components": [ + { + "id": 5244, + "name": "gcd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5224, + "src": "13627:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5245, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13632:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5246, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "13626:16:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "components": [ + { + "id": 5247, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13732:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5248, + "name": "gcd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5224, + "src": "13977:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5249, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13983:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5250, + "name": "quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5239, + "src": "13995:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13983:20:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13977:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13645:376:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "13626:395:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5255, + "nodeType": "ExpressionStatement", + "src": "13626:395:19" + }, + { + "expression": { + "id": 5269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "components": [ + { + "id": 5256, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14041:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 5257, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5232, + "src": "14044:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 5258, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "14040:6:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$", + "typeString": "tuple(int256,int256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "components": [ + { + "id": 5259, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5232, + "src": "14126:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 5267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5260, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14380:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 5266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5261, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5232, + "src": "14384:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 5264, + "name": "quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5239, + "src": "14395:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5263, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14388:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 5262, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "14388:6:19", + "typeDescriptions": {} + } + }, + "id": 5265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14388:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "14384:20:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "14380:24:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 5268, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14049:373:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$", + "typeString": "tuple(int256,int256)" + } + }, + "src": "14040:382:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5270, + "nodeType": "ExpressionStatement", + "src": "14040:382:19" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5235, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13539:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 5236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13552:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13539:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5272, + "nodeType": "WhileStatement", + "src": "13532:905:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5273, + "name": "gcd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5224, + "src": "14455:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "31", + "id": 5274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14462:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14455:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5278, + "nodeType": "IfStatement", + "src": "14451:22:19", + "trueBody": { + "expression": { + "hexValue": "30", + "id": 5276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14472:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5210, + "id": 5277, + "nodeType": "Return", + "src": "14465:8:19" + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 5282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5280, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14524:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "30", + "id": 5281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14528:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14524:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5283, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "14531:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "14543:2:19", + "subExpression": { + "id": 5286, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14544:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 5285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14535:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5284, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14535:7:19", + "typeDescriptions": {} + } + }, + "id": 5288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14535:11:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14531:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 5292, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14556:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 5291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14548:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5290, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14548:7:19", + "typeDescriptions": {} + } + }, + "id": 5293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14548:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5279, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "14516:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 5294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14516:43:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5210, + "id": 5295, + "nodeType": "Return", + "src": "14509:50:19" + } + ] + } + ] + }, + "documentation": { + "id": 5202, + "nodeType": "StructuredDocumentation", + "src": "12136:553:19", + "text": " @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n If the input value is not inversible, 0 is returned.\n NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}." + }, + "id": 5298, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invMod", + "nameLocation": "12703:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5204, + "mutability": "mutable", + "name": "a", + "nameLocation": "12718:1:19", + "nodeType": "VariableDeclaration", + "scope": 5298, + "src": "12710:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12710:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5206, + "mutability": "mutable", + "name": "n", + "nameLocation": "12729:1:19", + "nodeType": "VariableDeclaration", + "scope": 5298, + "src": "12721:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12721:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12709:22:19" + }, + "returnParameters": { + "id": 5210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5209, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5298, + "src": "12755:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5208, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12755:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12754:9:19" + }, + "scope": 6204, + "src": "12694:1919:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5318, + "nodeType": "Block", + "src": "15213:82:19", + "statements": [ + { + "id": 5317, + "nodeType": "UncheckedBlock", + "src": "15223:66:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5310, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5301, + "src": "15266:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5311, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5303, + "src": "15269:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "32", + "id": 5312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15273:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "15269:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5314, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5303, + "src": "15276:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 5308, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15254:4:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 5309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15259:6:19", + "memberName": "modExp", + "nodeType": "MemberAccess", + "referencedDeclaration": 5355, + "src": "15254:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 5315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15254:24:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5307, + "id": 5316, + "nodeType": "Return", + "src": "15247:31:19" + } + ] + } + ] + }, + "documentation": { + "id": 5299, + "nodeType": "StructuredDocumentation", + "src": "14619:514:19", + "text": " @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n NOTE: this function does NOT check that `p` is a prime greater than `2`." + }, + "id": 5319, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invModPrime", + "nameLocation": "15147:11:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5301, + "mutability": "mutable", + "name": "a", + "nameLocation": "15167:1:19", + "nodeType": "VariableDeclaration", + "scope": 5319, + "src": "15159:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15159:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5303, + "mutability": "mutable", + "name": "p", + "nameLocation": "15178:1:19", + "nodeType": "VariableDeclaration", + "scope": 5319, + "src": "15170:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15170:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15158:22:19" + }, + "returnParameters": { + "id": 5307, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5306, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5319, + "src": "15204:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5305, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15204:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15203:9:19" + }, + "scope": 6204, + "src": "15138:157:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5354, + "nodeType": "Block", + "src": "16065:174:19", + "statements": [ + { + "assignments": [ + 5332, + 5334 + ], + "declarations": [ + { + "constant": false, + "id": 5332, + "mutability": "mutable", + "name": "success", + "nameLocation": "16081:7:19", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "16076:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5331, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16076:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5334, + "mutability": "mutable", + "name": "result", + "nameLocation": "16098:6:19", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "16090:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5333, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16090:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5340, + "initialValue": { + "arguments": [ + { + "id": 5336, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5322, + "src": "16118:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5337, + "name": "e", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5324, + "src": "16121:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5338, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5326, + "src": "16124:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5335, + "name": "tryModExp", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5379, + 5461 + ], + "referencedDeclaration": 5379, + "src": "16108:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (bool,uint256)" + } + }, + "id": 5339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16108:18:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16075:51:19" + }, + { + "condition": { + "id": 5342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "16140:8:19", + "subExpression": { + "id": 5341, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "16141:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5351, + "nodeType": "IfStatement", + "src": "16136:74:19", + "trueBody": { + "id": 5350, + "nodeType": "Block", + "src": "16150:60:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5346, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "16176:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "16182:16:19", + "memberName": "DIVISION_BY_ZERO", + "nodeType": "MemberAccess", + "referencedDeclaration": 1681, + "src": "16176:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 5343, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "16164:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16170:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "16164:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 5348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16164:35:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5349, + "nodeType": "ExpressionStatement", + "src": "16164:35:19" + } + ] + } + }, + { + "expression": { + "id": 5352, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "16226:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5330, + "id": 5353, + "nodeType": "Return", + "src": "16219:13:19" + } + ] + }, + "documentation": { + "id": 5320, + "nodeType": "StructuredDocumentation", + "src": "15301:678:19", + "text": " @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n Requirements:\n - modulus can't be zero\n - underlying staticcall to precompile must succeed\n IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n sure the chain you're using it on supports the precompiled contract for modular exponentiation\n at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n interpreted as 0." + }, + "id": 5355, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "modExp", + "nameLocation": "15993:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5322, + "mutability": "mutable", + "name": "b", + "nameLocation": "16008:1:19", + "nodeType": "VariableDeclaration", + "scope": 5355, + "src": "16000:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5321, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16000:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5324, + "mutability": "mutable", + "name": "e", + "nameLocation": "16019:1:19", + "nodeType": "VariableDeclaration", + "scope": 5355, + "src": "16011:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5323, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16011:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5326, + "mutability": "mutable", + "name": "m", + "nameLocation": "16030:1:19", + "nodeType": "VariableDeclaration", + "scope": 5355, + "src": "16022:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5325, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16022:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15999:33:19" + }, + "returnParameters": { + "id": 5330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5329, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5355, + "src": "16056:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5328, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16056:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16055:9:19" + }, + "scope": 6204, + "src": "15984:255:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5378, + "nodeType": "Block", + "src": "17093:1493:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5369, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5362, + "src": "17107:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17112:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17107:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5376, + "nodeType": "IfStatement", + "src": "17103:29:19", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 5372, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17123:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 5373, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17130:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 5374, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "17122:10:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 5368, + "id": 5375, + "nodeType": "Return", + "src": "17115:17:19" + } + }, + { + "AST": { + "nativeSrc": "17167:1413:19", + "nodeType": "YulBlock", + "src": "17167:1413:19", + "statements": [ + { + "nativeSrc": "17181:22:19", + "nodeType": "YulVariableDeclaration", + "src": "17181:22:19", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "17198:4:19", + "nodeType": "YulLiteral", + "src": "17198:4:19", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "17192:5:19", + "nodeType": "YulIdentifier", + "src": "17192:5:19" + }, + "nativeSrc": "17192:11:19", + "nodeType": "YulFunctionCall", + "src": "17192:11:19" + }, + "variables": [ + { + "name": "ptr", + "nativeSrc": "17185:3:19", + "nodeType": "YulTypedName", + "src": "17185:3:19", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18111:3:19", + "nodeType": "YulIdentifier", + "src": "18111:3:19" + }, + { + "kind": "number", + "nativeSrc": "18116:4:19", + "nodeType": "YulLiteral", + "src": "18116:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18104:6:19", + "nodeType": "YulIdentifier", + "src": "18104:6:19" + }, + "nativeSrc": "18104:17:19", + "nodeType": "YulFunctionCall", + "src": "18104:17:19" + }, + "nativeSrc": "18104:17:19", + "nodeType": "YulExpressionStatement", + "src": "18104:17:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18145:3:19", + "nodeType": "YulIdentifier", + "src": "18145:3:19" + }, + { + "kind": "number", + "nativeSrc": "18150:4:19", + "nodeType": "YulLiteral", + "src": "18150:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18141:3:19", + "nodeType": "YulIdentifier", + "src": "18141:3:19" + }, + "nativeSrc": "18141:14:19", + "nodeType": "YulFunctionCall", + "src": "18141:14:19" + }, + { + "kind": "number", + "nativeSrc": "18157:4:19", + "nodeType": "YulLiteral", + "src": "18157:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18134:6:19", + "nodeType": "YulIdentifier", + "src": "18134:6:19" + }, + "nativeSrc": "18134:28:19", + "nodeType": "YulFunctionCall", + "src": "18134:28:19" + }, + "nativeSrc": "18134:28:19", + "nodeType": "YulExpressionStatement", + "src": "18134:28:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18186:3:19", + "nodeType": "YulIdentifier", + "src": "18186:3:19" + }, + { + "kind": "number", + "nativeSrc": "18191:4:19", + "nodeType": "YulLiteral", + "src": "18191:4:19", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18182:3:19", + "nodeType": "YulIdentifier", + "src": "18182:3:19" + }, + "nativeSrc": "18182:14:19", + "nodeType": "YulFunctionCall", + "src": "18182:14:19" + }, + { + "kind": "number", + "nativeSrc": "18198:4:19", + "nodeType": "YulLiteral", + "src": "18198:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18175:6:19", + "nodeType": "YulIdentifier", + "src": "18175:6:19" + }, + "nativeSrc": "18175:28:19", + "nodeType": "YulFunctionCall", + "src": "18175:28:19" + }, + "nativeSrc": "18175:28:19", + "nodeType": "YulExpressionStatement", + "src": "18175:28:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18227:3:19", + "nodeType": "YulIdentifier", + "src": "18227:3:19" + }, + { + "kind": "number", + "nativeSrc": "18232:4:19", + "nodeType": "YulLiteral", + "src": "18232:4:19", + "type": "", + "value": "0x60" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18223:3:19", + "nodeType": "YulIdentifier", + "src": "18223:3:19" + }, + "nativeSrc": "18223:14:19", + "nodeType": "YulFunctionCall", + "src": "18223:14:19" + }, + { + "name": "b", + "nativeSrc": "18239:1:19", + "nodeType": "YulIdentifier", + "src": "18239:1:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18216:6:19", + "nodeType": "YulIdentifier", + "src": "18216:6:19" + }, + "nativeSrc": "18216:25:19", + "nodeType": "YulFunctionCall", + "src": "18216:25:19" + }, + "nativeSrc": "18216:25:19", + "nodeType": "YulExpressionStatement", + "src": "18216:25:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18265:3:19", + "nodeType": "YulIdentifier", + "src": "18265:3:19" + }, + { + "kind": "number", + "nativeSrc": "18270:4:19", + "nodeType": "YulLiteral", + "src": "18270:4:19", + "type": "", + "value": "0x80" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18261:3:19", + "nodeType": "YulIdentifier", + "src": "18261:3:19" + }, + "nativeSrc": "18261:14:19", + "nodeType": "YulFunctionCall", + "src": "18261:14:19" + }, + { + "name": "e", + "nativeSrc": "18277:1:19", + "nodeType": "YulIdentifier", + "src": "18277:1:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18254:6:19", + "nodeType": "YulIdentifier", + "src": "18254:6:19" + }, + "nativeSrc": "18254:25:19", + "nodeType": "YulFunctionCall", + "src": "18254:25:19" + }, + "nativeSrc": "18254:25:19", + "nodeType": "YulExpressionStatement", + "src": "18254:25:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18303:3:19", + "nodeType": "YulIdentifier", + "src": "18303:3:19" + }, + { + "kind": "number", + "nativeSrc": "18308:4:19", + "nodeType": "YulLiteral", + "src": "18308:4:19", + "type": "", + "value": "0xa0" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18299:3:19", + "nodeType": "YulIdentifier", + "src": "18299:3:19" + }, + "nativeSrc": "18299:14:19", + "nodeType": "YulFunctionCall", + "src": "18299:14:19" + }, + { + "name": "m", + "nativeSrc": "18315:1:19", + "nodeType": "YulIdentifier", + "src": "18315:1:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18292:6:19", + "nodeType": "YulIdentifier", + "src": "18292:6:19" + }, + "nativeSrc": "18292:25:19", + "nodeType": "YulFunctionCall", + "src": "18292:25:19" + }, + "nativeSrc": "18292:25:19", + "nodeType": "YulExpressionStatement", + "src": "18292:25:19" + }, + { + "nativeSrc": "18479:57:19", + "nodeType": "YulAssignment", + "src": "18479:57:19", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "18501:3:19", + "nodeType": "YulIdentifier", + "src": "18501:3:19" + }, + "nativeSrc": "18501:5:19", + "nodeType": "YulFunctionCall", + "src": "18501:5:19" + }, + { + "kind": "number", + "nativeSrc": "18508:4:19", + "nodeType": "YulLiteral", + "src": "18508:4:19", + "type": "", + "value": "0x05" + }, + { + "name": "ptr", + "nativeSrc": "18514:3:19", + "nodeType": "YulIdentifier", + "src": "18514:3:19" + }, + { + "kind": "number", + "nativeSrc": "18519:4:19", + "nodeType": "YulLiteral", + "src": "18519:4:19", + "type": "", + "value": "0xc0" + }, + { + "kind": "number", + "nativeSrc": "18525:4:19", + "nodeType": "YulLiteral", + "src": "18525:4:19", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "18531:4:19", + "nodeType": "YulLiteral", + "src": "18531:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "staticcall", + "nativeSrc": "18490:10:19", + "nodeType": "YulIdentifier", + "src": "18490:10:19" + }, + "nativeSrc": "18490:46:19", + "nodeType": "YulFunctionCall", + "src": "18490:46:19" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "18479:7:19", + "nodeType": "YulIdentifier", + "src": "18479:7:19" + } + ] + }, + { + "nativeSrc": "18549:21:19", + "nodeType": "YulAssignment", + "src": "18549:21:19", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "18565:4:19", + "nodeType": "YulLiteral", + "src": "18565:4:19", + "type": "", + "value": "0x00" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "18559:5:19", + "nodeType": "YulIdentifier", + "src": "18559:5:19" + }, + "nativeSrc": "18559:11:19", + "nodeType": "YulFunctionCall", + "src": "18559:11:19" + }, + "variableNames": [ + { + "name": "result", + "nativeSrc": "18549:6:19", + "nodeType": "YulIdentifier", + "src": "18549:6:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 5358, + "isOffset": false, + "isSlot": false, + "src": "18239:1:19", + "valueSize": 1 + }, + { + "declaration": 5360, + "isOffset": false, + "isSlot": false, + "src": "18277:1:19", + "valueSize": 1 + }, + { + "declaration": 5362, + "isOffset": false, + "isSlot": false, + "src": "18315:1:19", + "valueSize": 1 + }, + { + "declaration": 5367, + "isOffset": false, + "isSlot": false, + "src": "18549:6:19", + "valueSize": 1 + }, + { + "declaration": 5365, + "isOffset": false, + "isSlot": false, + "src": "18479:7:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5377, + "nodeType": "InlineAssembly", + "src": "17142:1438:19" + } + ] + }, + "documentation": { + "id": 5356, + "nodeType": "StructuredDocumentation", + "src": "16245:738:19", + "text": " @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n to operate modulo 0 or if the underlying precompile reverted.\n IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n of a revert, but the result may be incorrectly interpreted as 0." + }, + "id": 5379, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryModExp", + "nameLocation": "16997:9:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5358, + "mutability": "mutable", + "name": "b", + "nameLocation": "17015:1:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17007:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5357, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17007:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5360, + "mutability": "mutable", + "name": "e", + "nameLocation": "17026:1:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17018:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5359, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17018:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5362, + "mutability": "mutable", + "name": "m", + "nameLocation": "17037:1:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17029:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17029:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17006:33:19" + }, + "returnParameters": { + "id": 5368, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5365, + "mutability": "mutable", + "name": "success", + "nameLocation": "17068:7:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17063:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5364, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17063:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5367, + "mutability": "mutable", + "name": "result", + "nameLocation": "17085:6:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17077:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5366, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17077:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17062:30:19" + }, + "scope": 6204, + "src": "16988:1598:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5414, + "nodeType": "Block", + "src": "18783:179:19", + "statements": [ + { + "assignments": [ + 5392, + 5394 + ], + "declarations": [ + { + "constant": false, + "id": 5392, + "mutability": "mutable", + "name": "success", + "nameLocation": "18799:7:19", + "nodeType": "VariableDeclaration", + "scope": 5414, + "src": "18794:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5391, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18794:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5394, + "mutability": "mutable", + "name": "result", + "nameLocation": "18821:6:19", + "nodeType": "VariableDeclaration", + "scope": 5414, + "src": "18808:19:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5393, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18808:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 5400, + "initialValue": { + "arguments": [ + { + "id": 5396, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5382, + "src": "18841:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 5397, + "name": "e", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5384, + "src": "18844:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 5398, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5386, + "src": "18847:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5395, + "name": "tryModExp", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5379, + 5461 + ], + "referencedDeclaration": 5461, + "src": "18831:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory,bytes memory,bytes memory) view returns (bool,bytes memory)" + } + }, + "id": 5399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18831:18:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18793:56:19" + }, + { + "condition": { + "id": 5402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "18863:8:19", + "subExpression": { + "id": 5401, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5392, + "src": "18864:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5411, + "nodeType": "IfStatement", + "src": "18859:74:19", + "trueBody": { + "id": 5410, + "nodeType": "Block", + "src": "18873:60:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5406, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "18899:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "18905:16:19", + "memberName": "DIVISION_BY_ZERO", + "nodeType": "MemberAccess", + "referencedDeclaration": 1681, + "src": "18899:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 5403, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "18887:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "18893:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "18887:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 5408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18887:35:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5409, + "nodeType": "ExpressionStatement", + "src": "18887:35:19" + } + ] + } + }, + { + "expression": { + "id": 5412, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5394, + "src": "18949:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 5390, + "id": 5413, + "nodeType": "Return", + "src": "18942:13:19" + } + ] + }, + "documentation": { + "id": 5380, + "nodeType": "StructuredDocumentation", + "src": "18592:85:19", + "text": " @dev Variant of {modExp} that supports inputs of arbitrary length." + }, + "id": 5415, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "modExp", + "nameLocation": "18691:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5382, + "mutability": "mutable", + "name": "b", + "nameLocation": "18711:1:19", + "nodeType": "VariableDeclaration", + "scope": 5415, + "src": "18698:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5381, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18698:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5384, + "mutability": "mutable", + "name": "e", + "nameLocation": "18727:1:19", + "nodeType": "VariableDeclaration", + "scope": 5415, + "src": "18714:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5383, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18714:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5386, + "mutability": "mutable", + "name": "m", + "nameLocation": "18743:1:19", + "nodeType": "VariableDeclaration", + "scope": 5415, + "src": "18730:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5385, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18730:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "18697:48:19" + }, + "returnParameters": { + "id": 5390, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5389, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5415, + "src": "18769:12:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5388, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18769:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "18768:14:19" + }, + "scope": 6204, + "src": "18682:280:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5460, + "nodeType": "Block", + "src": "19216:771:19", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 5430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "19241:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5429, + "name": "_zeroBytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5508, + "src": "19230:10:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes memory) pure returns (bool)" + } + }, + "id": 5431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19230:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5439, + "nodeType": "IfStatement", + "src": "19226:47:19", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 5432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19253:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19270:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "19260:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 5433, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19264:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 5436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19260:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "id": 5437, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "19252:21:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "functionReturnParameters": 5428, + "id": 5438, + "nodeType": "Return", + "src": "19245:28:19" + } + }, + { + "assignments": [ + 5441 + ], + "declarations": [ + { + "constant": false, + "id": 5441, + "mutability": "mutable", + "name": "mLen", + "nameLocation": "19292:4:19", + "nodeType": "VariableDeclaration", + "scope": 5460, + "src": "19284:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5440, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19284:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5444, + "initialValue": { + "expression": { + "id": 5442, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "19299:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "19301:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "19299:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19284:23:19" + }, + { + "expression": { + "id": 5457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5445, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5427, + "src": "19389:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 5448, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "19415:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "19417:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "19415:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 5450, + "name": "e", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "19425:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "19427:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "19425:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5452, + "name": "mLen", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5441, + "src": "19435:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5453, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "19441:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 5454, + "name": "e", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "19444:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 5455, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "19447:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 5446, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "19398:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "19402:12:19", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "19398:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 5456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19398:51:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "src": "19389:60:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5458, + "nodeType": "ExpressionStatement", + "src": "19389:60:19" + }, + { + "AST": { + "nativeSrc": "19485:496:19", + "nodeType": "YulBlock", + "src": "19485:496:19", + "statements": [ + { + "nativeSrc": "19499:32:19", + "nodeType": "YulVariableDeclaration", + "src": "19499:32:19", + "value": { + "arguments": [ + { + "name": "result", + "nativeSrc": "19518:6:19", + "nodeType": "YulIdentifier", + "src": "19518:6:19" + }, + { + "kind": "number", + "nativeSrc": "19526:4:19", + "nodeType": "YulLiteral", + "src": "19526:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "19514:3:19", + "nodeType": "YulIdentifier", + "src": "19514:3:19" + }, + "nativeSrc": "19514:17:19", + "nodeType": "YulFunctionCall", + "src": "19514:17:19" + }, + "variables": [ + { + "name": "dataPtr", + "nativeSrc": "19503:7:19", + "nodeType": "YulTypedName", + "src": "19503:7:19", + "type": "" + } + ] + }, + { + "nativeSrc": "19621:73:19", + "nodeType": "YulAssignment", + "src": "19621:73:19", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "19643:3:19", + "nodeType": "YulIdentifier", + "src": "19643:3:19" + }, + "nativeSrc": "19643:5:19", + "nodeType": "YulFunctionCall", + "src": "19643:5:19" + }, + { + "kind": "number", + "nativeSrc": "19650:4:19", + "nodeType": "YulLiteral", + "src": "19650:4:19", + "type": "", + "value": "0x05" + }, + { + "name": "dataPtr", + "nativeSrc": "19656:7:19", + "nodeType": "YulIdentifier", + "src": "19656:7:19" + }, + { + "arguments": [ + { + "name": "result", + "nativeSrc": "19671:6:19", + "nodeType": "YulIdentifier", + "src": "19671:6:19" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "19665:5:19", + "nodeType": "YulIdentifier", + "src": "19665:5:19" + }, + "nativeSrc": "19665:13:19", + "nodeType": "YulFunctionCall", + "src": "19665:13:19" + }, + { + "name": "dataPtr", + "nativeSrc": "19680:7:19", + "nodeType": "YulIdentifier", + "src": "19680:7:19" + }, + { + "name": "mLen", + "nativeSrc": "19689:4:19", + "nodeType": "YulIdentifier", + "src": "19689:4:19" + } + ], + "functionName": { + "name": "staticcall", + "nativeSrc": "19632:10:19", + "nodeType": "YulIdentifier", + "src": "19632:10:19" + }, + "nativeSrc": "19632:62:19", + "nodeType": "YulFunctionCall", + "src": "19632:62:19" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "19621:7:19", + "nodeType": "YulIdentifier", + "src": "19621:7:19" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "result", + "nativeSrc": "19850:6:19", + "nodeType": "YulIdentifier", + "src": "19850:6:19" + }, + { + "name": "mLen", + "nativeSrc": "19858:4:19", + "nodeType": "YulIdentifier", + "src": "19858:4:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "19843:6:19", + "nodeType": "YulIdentifier", + "src": "19843:6:19" + }, + "nativeSrc": "19843:20:19", + "nodeType": "YulFunctionCall", + "src": "19843:20:19" + }, + "nativeSrc": "19843:20:19", + "nodeType": "YulExpressionStatement", + "src": "19843:20:19" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "19946:4:19", + "nodeType": "YulLiteral", + "src": "19946:4:19", + "type": "", + "value": "0x40" + }, + { + "arguments": [ + { + "name": "dataPtr", + "nativeSrc": "19956:7:19", + "nodeType": "YulIdentifier", + "src": "19956:7:19" + }, + { + "name": "mLen", + "nativeSrc": "19965:4:19", + "nodeType": "YulIdentifier", + "src": "19965:4:19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "19952:3:19", + "nodeType": "YulIdentifier", + "src": "19952:3:19" + }, + "nativeSrc": "19952:18:19", + "nodeType": "YulFunctionCall", + "src": "19952:18:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "19939:6:19", + "nodeType": "YulIdentifier", + "src": "19939:6:19" + }, + "nativeSrc": "19939:32:19", + "nodeType": "YulFunctionCall", + "src": "19939:32:19" + }, + "nativeSrc": "19939:32:19", + "nodeType": "YulExpressionStatement", + "src": "19939:32:19" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 5441, + "isOffset": false, + "isSlot": false, + "src": "19689:4:19", + "valueSize": 1 + }, + { + "declaration": 5441, + "isOffset": false, + "isSlot": false, + "src": "19858:4:19", + "valueSize": 1 + }, + { + "declaration": 5441, + "isOffset": false, + "isSlot": false, + "src": "19965:4:19", + "valueSize": 1 + }, + { + "declaration": 5427, + "isOffset": false, + "isSlot": false, + "src": "19518:6:19", + "valueSize": 1 + }, + { + "declaration": 5427, + "isOffset": false, + "isSlot": false, + "src": "19671:6:19", + "valueSize": 1 + }, + { + "declaration": 5427, + "isOffset": false, + "isSlot": false, + "src": "19850:6:19", + "valueSize": 1 + }, + { + "declaration": 5425, + "isOffset": false, + "isSlot": false, + "src": "19621:7:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5459, + "nodeType": "InlineAssembly", + "src": "19460:521:19" + } + ] + }, + "documentation": { + "id": 5416, + "nodeType": "StructuredDocumentation", + "src": "18968:88:19", + "text": " @dev Variant of {tryModExp} that supports inputs of arbitrary length." + }, + "id": 5461, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryModExp", + "nameLocation": "19070:9:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5418, + "mutability": "mutable", + "name": "b", + "nameLocation": "19102:1:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19089:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5417, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19089:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5420, + "mutability": "mutable", + "name": "e", + "nameLocation": "19126:1:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19113:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5419, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19113:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5422, + "mutability": "mutable", + "name": "m", + "nameLocation": "19150:1:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19137:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5421, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19137:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "19079:78:19" + }, + "returnParameters": { + "id": 5428, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5425, + "mutability": "mutable", + "name": "success", + "nameLocation": "19186:7:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19181:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5424, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19181:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5427, + "mutability": "mutable", + "name": "result", + "nameLocation": "19208:6:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19195:19:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5426, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19195:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "19180:35:19" + }, + "scope": 6204, + "src": "19061:926:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5507, + "nodeType": "Block", + "src": "20139:417:19", + "statements": [ + { + "assignments": [ + 5470 + ], + "declarations": [ + { + "constant": false, + "id": 5470, + "mutability": "mutable", + "name": "chunk", + "nameLocation": "20157:5:19", + "nodeType": "VariableDeclaration", + "scope": 5507, + "src": "20149:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20149:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5471, + "nodeType": "VariableDeclarationStatement", + "src": "20149:13:19" + }, + { + "body": { + "id": 5503, + "nodeType": "Block", + "src": "20222:307:19", + "statements": [ + { + "AST": { + "nativeSrc": "20324:73:19", + "nodeType": "YulBlock", + "src": "20324:73:19", + "statements": [ + { + "nativeSrc": "20342:41:19", + "nodeType": "YulAssignment", + "src": "20342:41:19", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "20365:6:19", + "nodeType": "YulIdentifier", + "src": "20365:6:19" + }, + { + "kind": "number", + "nativeSrc": "20373:4:19", + "nodeType": "YulLiteral", + "src": "20373:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20361:3:19", + "nodeType": "YulIdentifier", + "src": "20361:3:19" + }, + "nativeSrc": "20361:17:19", + "nodeType": "YulFunctionCall", + "src": "20361:17:19" + }, + { + "name": "i", + "nativeSrc": "20380:1:19", + "nodeType": "YulIdentifier", + "src": "20380:1:19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20357:3:19", + "nodeType": "YulIdentifier", + "src": "20357:3:19" + }, + "nativeSrc": "20357:25:19", + "nodeType": "YulFunctionCall", + "src": "20357:25:19" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "20351:5:19", + "nodeType": "YulIdentifier", + "src": "20351:5:19" + }, + "nativeSrc": "20351:32:19", + "nodeType": "YulFunctionCall", + "src": "20351:32:19" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "20342:5:19", + "nodeType": "YulIdentifier", + "src": "20342:5:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 5464, + "isOffset": false, + "isSlot": false, + "src": "20365:6:19", + "valueSize": 1 + }, + { + "declaration": 5470, + "isOffset": false, + "isSlot": false, + "src": "20342:5:19", + "valueSize": 1 + }, + { + "declaration": 5473, + "isOffset": false, + "isSlot": false, + "src": "20380:1:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5484, + "nodeType": "InlineAssembly", + "src": "20299:98:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5485, + "name": "chunk", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5470, + "src": "20414:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "38", + "id": 5486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20424:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5488, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "20442:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "30783230", + "id": 5489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20446:4:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "20442:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 5491, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5464, + "src": "20452:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20459:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "20452:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5487, + "name": "saturatingSub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4779, + "src": "20428:13:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20428:38:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20424:42:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5495, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "20423:44:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20414:53:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 5497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20471:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20414:58:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5502, + "nodeType": "IfStatement", + "src": "20410:109:19", + "trueBody": { + "id": 5501, + "nodeType": "Block", + "src": "20474:45:19", + "statements": [ + { + "expression": { + "hexValue": "66616c7365", + "id": 5499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20499:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 5468, + "id": 5500, + "nodeType": "Return", + "src": "20492:12:19" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5476, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "20192:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5477, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5464, + "src": "20196:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20203:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "20196:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20192:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5504, + "initializationExpression": { + "assignments": [ + 5473 + ], + "declarations": [ + { + "constant": false, + "id": 5473, + "mutability": "mutable", + "name": "i", + "nameLocation": "20185:1:19", + "nodeType": "VariableDeclaration", + "scope": 5504, + "src": "20177:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5472, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20177:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5475, + "initialValue": { + "hexValue": "30", + "id": 5474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20189:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20177:13:19" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 5482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5480, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "20211:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "30783230", + "id": 5481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20216:4:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "20211:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5483, + "nodeType": "ExpressionStatement", + "src": "20211:9:19" + }, + "nodeType": "ForStatement", + "src": "20172:357:19" + }, + { + "expression": { + "hexValue": "74727565", + "id": 5505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20545:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5468, + "id": 5506, + "nodeType": "Return", + "src": "20538:11:19" + } + ] + }, + "documentation": { + "id": 5462, + "nodeType": "StructuredDocumentation", + "src": "19993:72:19", + "text": " @dev Returns whether the provided byte array is zero." + }, + "id": 5508, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_zeroBytes", + "nameLocation": "20079:10:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5464, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "20103:6:19", + "nodeType": "VariableDeclaration", + "scope": 5508, + "src": "20090:19:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5463, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "20090:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "20089:21:19" + }, + "returnParameters": { + "id": 5468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5467, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5508, + "src": "20133:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5466, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20133:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "20132:6:19" + }, + "scope": 6204, + "src": "20070:486:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5726, + "nodeType": "Block", + "src": "20916:5124:19", + "statements": [ + { + "id": 5725, + "nodeType": "UncheckedBlock", + "src": "20926:5108:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5516, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "21020:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "31", + "id": 5517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21025:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "21020:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5522, + "nodeType": "IfStatement", + "src": "21016:53:19", + "trueBody": { + "id": 5521, + "nodeType": "Block", + "src": "21028:41:19", + "statements": [ + { + "expression": { + "id": 5519, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "21053:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5515, + "id": 5520, + "nodeType": "Return", + "src": "21046:8:19" + } + ] + } + }, + { + "assignments": [ + 5524 + ], + "declarations": [ + { + "constant": false, + "id": 5524, + "mutability": "mutable", + "name": "aa", + "nameLocation": "22004:2:19", + "nodeType": "VariableDeclaration", + "scope": 5725, + "src": "21996:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5523, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21996:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5526, + "initialValue": { + "id": 5525, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "22009:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21996:14:19" + }, + { + "assignments": [ + 5528 + ], + "declarations": [ + { + "constant": false, + "id": 5528, + "mutability": "mutable", + "name": "xn", + "nameLocation": "22032:2:19", + "nodeType": "VariableDeclaration", + "scope": 5725, + "src": "22024:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5527, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22024:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5530, + "initialValue": { + "hexValue": "31", + "id": 5529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22037:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "22024:14:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5531, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22057:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "id": 5534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22064:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 5533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22069:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "22064:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + } + } + ], + "id": 5535, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22063:10:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + } + }, + "src": "22057:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5546, + "nodeType": "IfStatement", + "src": "22053:92:19", + "trueBody": { + "id": 5545, + "nodeType": "Block", + "src": "22075:70:19", + "statements": [ + { + "expression": { + "id": 5539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5537, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22093:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "313238", + "id": 5538, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22100:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "22093:10:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5540, + "nodeType": "ExpressionStatement", + "src": "22093:10:19" + }, + { + "expression": { + "id": 5543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5541, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22121:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "3634", + "id": 5542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22128:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "22121:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5544, + "nodeType": "ExpressionStatement", + "src": "22121:9:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5547, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22162:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_18446744073709551616_by_1", + "typeString": "int_const 18446744073709551616" + }, + "id": 5550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22169:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3634", + "id": 5549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22174:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "22169:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551616_by_1", + "typeString": "int_const 18446744073709551616" + } + } + ], + "id": 5551, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22168:9:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551616_by_1", + "typeString": "int_const 18446744073709551616" + } + }, + "src": "22162:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5562, + "nodeType": "IfStatement", + "src": "22158:90:19", + "trueBody": { + "id": 5561, + "nodeType": "Block", + "src": "22179:69:19", + "statements": [ + { + "expression": { + "id": 5555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5553, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22197:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "3634", + "id": 5554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22204:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "22197:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5556, + "nodeType": "ExpressionStatement", + "src": "22197:9:19" + }, + { + "expression": { + "id": 5559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5557, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22224:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "3332", + "id": 5558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22231:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "22224:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5560, + "nodeType": "ExpressionStatement", + "src": "22224:9:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5563, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22265:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_4294967296_by_1", + "typeString": "int_const 4294967296" + }, + "id": 5566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5564, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22272:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3332", + "id": 5565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22277:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "22272:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967296_by_1", + "typeString": "int_const 4294967296" + } + } + ], + "id": 5567, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22271:9:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967296_by_1", + "typeString": "int_const 4294967296" + } + }, + "src": "22265:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5578, + "nodeType": "IfStatement", + "src": "22261:90:19", + "trueBody": { + "id": 5577, + "nodeType": "Block", + "src": "22282:69:19", + "statements": [ + { + "expression": { + "id": 5571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5569, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22300:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "3332", + "id": 5570, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22307:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "22300:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5572, + "nodeType": "ExpressionStatement", + "src": "22300:9:19" + }, + { + "expression": { + "id": 5575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5573, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22327:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "3136", + "id": 5574, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22334:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "22327:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5576, + "nodeType": "ExpressionStatement", + "src": "22327:9:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5579, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22368:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_65536_by_1", + "typeString": "int_const 65536" + }, + "id": 5582, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5580, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22375:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 5581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22380:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "22375:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_65536_by_1", + "typeString": "int_const 65536" + } + } + ], + "id": 5583, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22374:9:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_65536_by_1", + "typeString": "int_const 65536" + } + }, + "src": "22368:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5594, + "nodeType": "IfStatement", + "src": "22364:89:19", + "trueBody": { + "id": 5593, + "nodeType": "Block", + "src": "22385:68:19", + "statements": [ + { + "expression": { + "id": 5587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5585, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22403:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "3136", + "id": 5586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22410:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "22403:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5588, + "nodeType": "ExpressionStatement", + "src": "22403:9:19" + }, + { + "expression": { + "id": 5591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5589, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22430:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "38", + "id": 5590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22437:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "22430:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5592, + "nodeType": "ExpressionStatement", + "src": "22430:8:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5595, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22470:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "id": 5598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22477:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 5597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22482:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "22477:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + } + } + ], + "id": 5599, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22476:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + } + }, + "src": "22470:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5610, + "nodeType": "IfStatement", + "src": "22466:87:19", + "trueBody": { + "id": 5609, + "nodeType": "Block", + "src": "22486:67:19", + "statements": [ + { + "expression": { + "id": 5603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5601, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22504:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "38", + "id": 5602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22511:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "22504:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5604, + "nodeType": "ExpressionStatement", + "src": "22504:8:19" + }, + { + "expression": { + "id": 5607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5605, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22530:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "34", + "id": 5606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22537:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "22530:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5608, + "nodeType": "ExpressionStatement", + "src": "22530:8:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5611, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22570:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "id": 5614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22577:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "34", + "id": 5613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22582:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "22577:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + } + } + ], + "id": 5615, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22576:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + } + }, + "src": "22570:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5626, + "nodeType": "IfStatement", + "src": "22566:87:19", + "trueBody": { + "id": 5625, + "nodeType": "Block", + "src": "22586:67:19", + "statements": [ + { + "expression": { + "id": 5619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5617, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22604:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "34", + "id": 5618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22611:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "22604:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5620, + "nodeType": "ExpressionStatement", + "src": "22604:8:19" + }, + { + "expression": { + "id": 5623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5621, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22630:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "32", + "id": 5622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22637:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "22630:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5624, + "nodeType": "ExpressionStatement", + "src": "22630:8:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5627, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22670:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "id": 5630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22677:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "32", + "id": 5629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22682:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "22677:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + } + } + ], + "id": 5631, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22676:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + } + }, + "src": "22670:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5638, + "nodeType": "IfStatement", + "src": "22666:61:19", + "trueBody": { + "id": 5637, + "nodeType": "Block", + "src": "22686:41:19", + "statements": [ + { + "expression": { + "id": 5635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5633, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22704:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "31", + "id": 5634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22711:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "22704:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5636, + "nodeType": "ExpressionStatement", + "src": "22704:8:19" + } + ] + } + }, + { + "expression": { + "id": 5646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5639, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "23147:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 5640, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23153:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5641, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "23157:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23153:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5643, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "23152:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23164:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "23152:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23147:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5647, + "nodeType": "ExpressionStatement", + "src": "23147:18:19" + }, + { + "expression": { + "id": 5657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5648, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25052:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5649, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25058:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5650, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25063:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5651, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25067:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25063:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25058:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5654, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25057:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25074:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25057:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25052:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5658, + "nodeType": "ExpressionStatement", + "src": "25052:23:19" + }, + { + "expression": { + "id": 5668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5659, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25161:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5660, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25167:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5661, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25172:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5662, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25176:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25172:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25167:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5665, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25166:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25183:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25166:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25161:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5669, + "nodeType": "ExpressionStatement", + "src": "25161:23:19" + }, + { + "expression": { + "id": 5679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5670, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25272:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5671, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25278:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5672, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25283:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5673, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25287:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25283:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25278:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5676, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25277:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5677, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25294:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25277:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25272:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5680, + "nodeType": "ExpressionStatement", + "src": "25272:23:19" + }, + { + "expression": { + "id": 5690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5681, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25381:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5682, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25387:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5683, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25392:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5684, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25396:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25392:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25387:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5687, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25386:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25403:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25386:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25381:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5691, + "nodeType": "ExpressionStatement", + "src": "25381:23:19" + }, + { + "expression": { + "id": 5701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5692, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25491:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5693, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25497:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5694, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25502:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5695, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25506:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25502:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25497:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5698, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25496:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25513:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25496:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25491:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5702, + "nodeType": "ExpressionStatement", + "src": "25491:23:19" + }, + { + "expression": { + "id": 5712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5703, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25601:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5704, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25607:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5705, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25612:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5706, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25616:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25612:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25607:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5709, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25606:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5710, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25623:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25606:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25601:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5713, + "nodeType": "ExpressionStatement", + "src": "25601:23:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5714, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25990:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5717, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "26011:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5718, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "26016:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5719, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "26020:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26016:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26011:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5715, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "25995:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26004:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "25995:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "25995:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25990:33:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5515, + "id": 5724, + "nodeType": "Return", + "src": "25983:40:19" + } + ] + } + ] + }, + "documentation": { + "id": 5509, + "nodeType": "StructuredDocumentation", + "src": "20562:292:19", + "text": " @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n towards zero.\n This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n using integer operations." + }, + "id": 5727, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sqrt", + "nameLocation": "20868:4:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5512, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5511, + "mutability": "mutable", + "name": "a", + "nameLocation": "20881:1:19", + "nodeType": "VariableDeclaration", + "scope": 5727, + "src": "20873:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5510, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20873:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "20872:11:19" + }, + "returnParameters": { + "id": 5515, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5514, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5727, + "src": "20907:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5513, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20907:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "20906:9:19" + }, + "scope": 6204, + "src": "20859:5181:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5760, + "nodeType": "Block", + "src": "26213:171:19", + "statements": [ + { + "id": 5759, + "nodeType": "UncheckedBlock", + "src": "26223:155:19", + "statements": [ + { + "assignments": [ + 5739 + ], + "declarations": [ + { + "constant": false, + "id": 5739, + "mutability": "mutable", + "name": "result", + "nameLocation": "26255:6:19", + "nodeType": "VariableDeclaration", + "scope": 5759, + "src": "26247:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5738, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26247:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5743, + "initialValue": { + "arguments": [ + { + "id": 5741, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5730, + "src": "26269:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5740, + "name": "sqrt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5727, + 5761 + ], + "referencedDeclaration": 5727, + "src": "26264:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26264:7:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26247:24:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5744, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5739, + "src": "26292:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5748, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5733, + "src": "26334:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 5747, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "26317:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 5749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26317:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5750, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5739, + "src": "26347:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5751, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5739, + "src": "26356:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26347:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5753, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5730, + "src": "26365:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26347:19:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26317:49:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5745, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "26301:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26310:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "26301:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26301:66:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26292:75:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5737, + "id": 5758, + "nodeType": "Return", + "src": "26285:82:19" + } + ] + } + ] + }, + "documentation": { + "id": 5728, + "nodeType": "StructuredDocumentation", + "src": "26046:86:19", + "text": " @dev Calculates sqrt(a), following the selected rounding direction." + }, + "id": 5761, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sqrt", + "nameLocation": "26146:4:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5734, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5730, + "mutability": "mutable", + "name": "a", + "nameLocation": "26159:1:19", + "nodeType": "VariableDeclaration", + "scope": 5761, + "src": "26151:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5729, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26151:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5733, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "26171:8:19", + "nodeType": "VariableDeclaration", + "scope": 5761, + "src": "26162:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 5732, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5731, + "name": "Rounding", + "nameLocations": [ + "26162:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "26162:8:19" + }, + "referencedDeclaration": 4559, + "src": "26162:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "26150:30:19" + }, + "returnParameters": { + "id": 5737, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5736, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5761, + "src": "26204:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26204:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "26203:9:19" + }, + "scope": 6204, + "src": "26137:247:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5851, + "nodeType": "Block", + "src": "26573:2359:19", + "statements": [ + { + "expression": { + "id": 5778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5769, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26655:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5772, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "26675:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666666666666666666666666666666666666666666666666666666666666666", + "id": 5773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26679:34:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211455_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1455" + }, + "value": "0xffffffffffffffffffffffffffffffff" + }, + "src": "26675:38:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5770, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "26659:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26668:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "26659:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26659:55:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "37", + "id": 5776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26718:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "src": "26659:60:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26655:64:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5779, + "nodeType": "ExpressionStatement", + "src": "26655:64:19" + }, + { + "expression": { + "id": 5792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5780, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26795:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5783, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "26817:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5784, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26822:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26817:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5786, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26816:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866666666666666666666666666666666", + "id": 5787, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26827:18:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551615_by_1", + "typeString": "int_const 18446744073709551615" + }, + "value": "0xffffffffffffffff" + }, + "src": "26816:29:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5781, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "26800:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26809:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "26800:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26800:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "36", + "id": 5790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26850:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_6_by_1", + "typeString": "int_const 6" + }, + "value": "6" + }, + "src": "26800:51:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26795:56:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5793, + "nodeType": "ExpressionStatement", + "src": "26795:56:19" + }, + { + "expression": { + "id": 5806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5794, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26926:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5797, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "26948:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5798, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26953:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26948:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5800, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26947:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666666666666666", + "id": 5801, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26958:10:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967295_by_1", + "typeString": "int_const 4294967295" + }, + "value": "0xffffffff" + }, + "src": "26947:21:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5795, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "26931:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26940:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "26931:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26931:38:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "35", + "id": 5804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26973:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "26931:43:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26926:48:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5807, + "nodeType": "ExpressionStatement", + "src": "26926:48:19" + }, + { + "expression": { + "id": 5820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5808, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27049:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5811, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "27071:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5812, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27076:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27071:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5814, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "27070:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866666666", + "id": 5815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27081:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_65535_by_1", + "typeString": "int_const 65535" + }, + "value": "0xffff" + }, + "src": "27070:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5809, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "27054:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "27063:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "27054:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27054:34:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "34", + "id": 5818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27092:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "27054:39:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27049:44:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5821, + "nodeType": "ExpressionStatement", + "src": "27049:44:19" + }, + { + "expression": { + "id": 5834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5822, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27166:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5825, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "27188:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5826, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27193:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27188:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5828, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "27187:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666", + "id": 5829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27198:4:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0xff" + }, + "src": "27187:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5823, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "27171:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "27180:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "27171:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27171:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "33", + "id": 5832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27207:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "27171:37:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27166:42:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5835, + "nodeType": "ExpressionStatement", + "src": "27166:42:19" + }, + { + "expression": { + "id": 5848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5836, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27280:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5839, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "27302:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5840, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27307:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27302:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5842, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "27301:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866", + "id": 5843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27312:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0xf" + }, + "src": "27301:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5837, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "27285:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "27294:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "27285:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27285:31:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "32", + "id": 5846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27320:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "27285:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27280:41:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5849, + "nodeType": "ExpressionStatement", + "src": "27280:41:19" + }, + { + "AST": { + "nativeSrc": "28807:119:19", + "nodeType": "YulBlock", + "src": "28807:119:19", + "statements": [ + { + "nativeSrc": "28821:95:19", + "nodeType": "YulAssignment", + "src": "28821:95:19", + "value": { + "arguments": [ + { + "name": "r", + "nativeSrc": "28829:1:19", + "nodeType": "YulIdentifier", + "src": "28829:1:19" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "r", + "nativeSrc": "28841:1:19", + "nodeType": "YulIdentifier", + "src": "28841:1:19" + }, + { + "name": "x", + "nativeSrc": "28844:1:19", + "nodeType": "YulIdentifier", + "src": "28844:1:19" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "28837:3:19", + "nodeType": "YulIdentifier", + "src": "28837:3:19" + }, + "nativeSrc": "28837:9:19", + "nodeType": "YulFunctionCall", + "src": "28837:9:19" + }, + { + "kind": "number", + "nativeSrc": "28848:66:19", + "nodeType": "YulLiteral", + "src": "28848:66:19", + "type": "", + "value": "0x0000010102020202030303030303030300000000000000000000000000000000" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "28832:4:19", + "nodeType": "YulIdentifier", + "src": "28832:4:19" + }, + "nativeSrc": "28832:83:19", + "nodeType": "YulFunctionCall", + "src": "28832:83:19" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "28826:2:19", + "nodeType": "YulIdentifier", + "src": "28826:2:19" + }, + "nativeSrc": "28826:90:19", + "nodeType": "YulFunctionCall", + "src": "28826:90:19" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "28821:1:19", + "nodeType": "YulIdentifier", + "src": "28821:1:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 5767, + "isOffset": false, + "isSlot": false, + "src": "28821:1:19", + "valueSize": 1 + }, + { + "declaration": 5767, + "isOffset": false, + "isSlot": false, + "src": "28829:1:19", + "valueSize": 1 + }, + { + "declaration": 5767, + "isOffset": false, + "isSlot": false, + "src": "28841:1:19", + "valueSize": 1 + }, + { + "declaration": 5764, + "isOffset": false, + "isSlot": false, + "src": "28844:1:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5850, + "nodeType": "InlineAssembly", + "src": "28782:144:19" + } + ] + }, + "documentation": { + "id": 5762, + "nodeType": "StructuredDocumentation", + "src": "26390:119:19", + "text": " @dev Return the log in base 2 of a positive value rounded towards zero.\n Returns 0 if given 0." + }, + "id": 5852, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log2", + "nameLocation": "26523:4:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5765, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5764, + "mutability": "mutable", + "name": "x", + "nameLocation": "26536:1:19", + "nodeType": "VariableDeclaration", + "scope": 5852, + "src": "26528:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5763, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26528:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "26527:11:19" + }, + "returnParameters": { + "id": 5768, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5767, + "mutability": "mutable", + "name": "r", + "nameLocation": "26570:1:19", + "nodeType": "VariableDeclaration", + "scope": 5852, + "src": "26562:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5766, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26562:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "26561:11:19" + }, + "scope": 6204, + "src": "26514:2418:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5885, + "nodeType": "Block", + "src": "29165:175:19", + "statements": [ + { + "id": 5884, + "nodeType": "UncheckedBlock", + "src": "29175:159:19", + "statements": [ + { + "assignments": [ + 5864 + ], + "declarations": [ + { + "constant": false, + "id": 5864, + "mutability": "mutable", + "name": "result", + "nameLocation": "29207:6:19", + "nodeType": "VariableDeclaration", + "scope": 5884, + "src": "29199:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29199:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5868, + "initialValue": { + "arguments": [ + { + "id": 5866, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5855, + "src": "29221:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5865, + "name": "log2", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5852, + 5886 + ], + "referencedDeclaration": 5852, + "src": "29216:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29216:11:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "29199:28:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5869, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5864, + "src": "29248:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5873, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5858, + "src": "29290:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 5872, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "29273:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 5874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29273:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29303:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "id": 5876, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5864, + "src": "29308:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29303:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5878, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5855, + "src": "29317:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29303:19:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "29273:49:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5870, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "29257:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "29266:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "29257:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29257:66:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29248:75:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5862, + "id": 5883, + "nodeType": "Return", + "src": "29241:82:19" + } + ] + } + ] + }, + "documentation": { + "id": 5853, + "nodeType": "StructuredDocumentation", + "src": "28938:142:19", + "text": " @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n Returns 0 if given 0." + }, + "id": 5886, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log2", + "nameLocation": "29094:4:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5855, + "mutability": "mutable", + "name": "value", + "nameLocation": "29107:5:19", + "nodeType": "VariableDeclaration", + "scope": 5886, + "src": "29099:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5854, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29099:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5858, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "29123:8:19", + "nodeType": "VariableDeclaration", + "scope": 5886, + "src": "29114:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 5857, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5856, + "name": "Rounding", + "nameLocations": [ + "29114:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "29114:8:19" + }, + "referencedDeclaration": 4559, + "src": "29114:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "29098:34:19" + }, + "returnParameters": { + "id": 5862, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5861, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5886, + "src": "29156:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5860, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29156:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29155:9:19" + }, + "scope": 6204, + "src": "29085:255:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6014, + "nodeType": "Block", + "src": "29533:854:19", + "statements": [ + { + "assignments": [ + 5895 + ], + "declarations": [ + { + "constant": false, + "id": 5895, + "mutability": "mutable", + "name": "result", + "nameLocation": "29551:6:19", + "nodeType": "VariableDeclaration", + "scope": 6014, + "src": "29543:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5894, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29543:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5897, + "initialValue": { + "hexValue": "30", + "id": 5896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29560:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "29543:18:19" + }, + { + "id": 6011, + "nodeType": "UncheckedBlock", + "src": "29571:787:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5898, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29599:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(57 digits omitted)...0000" + }, + "id": 5901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29608:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3634", + "id": 5900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29614:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "29608:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(57 digits omitted)...0000" + } + }, + "src": "29599:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5914, + "nodeType": "IfStatement", + "src": "29595:103:19", + "trueBody": { + "id": 5913, + "nodeType": "Block", + "src": "29618:80:19", + "statements": [ + { + "expression": { + "id": 5907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5903, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29636:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(57 digits omitted)...0000" + }, + "id": 5906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29645:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3634", + "id": 5905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29651:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "29645:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(57 digits omitted)...0000" + } + }, + "src": "29636:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5908, + "nodeType": "ExpressionStatement", + "src": "29636:17:19" + }, + { + "expression": { + "id": 5911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5909, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "29671:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "3634", + "id": 5910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29681:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "29671:12:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5912, + "nodeType": "ExpressionStatement", + "src": "29671:12:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5915, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29715:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(25 digits omitted)...0000" + }, + "id": 5918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29724:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3332", + "id": 5917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29730:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "29724:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(25 digits omitted)...0000" + } + }, + "src": "29715:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5931, + "nodeType": "IfStatement", + "src": "29711:103:19", + "trueBody": { + "id": 5930, + "nodeType": "Block", + "src": "29734:80:19", + "statements": [ + { + "expression": { + "id": 5924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5920, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29752:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(25 digits omitted)...0000" + }, + "id": 5923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29761:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3332", + "id": 5922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29767:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "29761:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(25 digits omitted)...0000" + } + }, + "src": "29752:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5925, + "nodeType": "ExpressionStatement", + "src": "29752:17:19" + }, + { + "expression": { + "id": 5928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5926, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "29787:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "3332", + "id": 5927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29797:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "29787:12:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5929, + "nodeType": "ExpressionStatement", + "src": "29787:12:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5932, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29831:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_10000000000000000_by_1", + "typeString": "int_const 10000000000000000" + }, + "id": 5935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5933, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29840:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3136", + "id": 5934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29846:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "29840:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000000000_by_1", + "typeString": "int_const 10000000000000000" + } + }, + "src": "29831:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5948, + "nodeType": "IfStatement", + "src": "29827:103:19", + "trueBody": { + "id": 5947, + "nodeType": "Block", + "src": "29850:80:19", + "statements": [ + { + "expression": { + "id": 5941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5937, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29868:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_10000000000000000_by_1", + "typeString": "int_const 10000000000000000" + }, + "id": 5940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29877:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3136", + "id": 5939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29883:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "29877:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000000000_by_1", + "typeString": "int_const 10000000000000000" + } + }, + "src": "29868:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5942, + "nodeType": "ExpressionStatement", + "src": "29868:17:19" + }, + { + "expression": { + "id": 5945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5943, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "29903:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "3136", + "id": 5944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29913:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "29903:12:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5946, + "nodeType": "ExpressionStatement", + "src": "29903:12:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5949, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29947:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "id": 5952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5950, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29956:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "38", + "id": 5951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29962:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "29956:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + } + }, + "src": "29947:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5965, + "nodeType": "IfStatement", + "src": "29943:100:19", + "trueBody": { + "id": 5964, + "nodeType": "Block", + "src": "29965:78:19", + "statements": [ + { + "expression": { + "id": 5958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5954, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29983:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "id": 5957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29992:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "38", + "id": 5956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29998:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "29992:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + } + }, + "src": "29983:16:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5959, + "nodeType": "ExpressionStatement", + "src": "29983:16:19" + }, + { + "expression": { + "id": 5962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5960, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30017:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "38", + "id": 5961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30027:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "30017:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5963, + "nodeType": "ExpressionStatement", + "src": "30017:11:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5966, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30060:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "id": 5969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30069:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "34", + "id": 5968, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30075:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "30069:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + }, + "src": "30060:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5982, + "nodeType": "IfStatement", + "src": "30056:100:19", + "trueBody": { + "id": 5981, + "nodeType": "Block", + "src": "30078:78:19", + "statements": [ + { + "expression": { + "id": 5975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5971, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30096:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "id": 5974, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30105:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "34", + "id": 5973, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30111:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "30105:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + }, + "src": "30096:16:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5976, + "nodeType": "ExpressionStatement", + "src": "30096:16:19" + }, + { + "expression": { + "id": 5979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5977, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30130:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "34", + "id": 5978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30140:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "30130:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5980, + "nodeType": "ExpressionStatement", + "src": "30130:11:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5983, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30173:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "id": 5986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5984, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30182:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "32", + "id": 5985, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30188:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "30182:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + } + }, + "src": "30173:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5999, + "nodeType": "IfStatement", + "src": "30169:100:19", + "trueBody": { + "id": 5998, + "nodeType": "Block", + "src": "30191:78:19", + "statements": [ + { + "expression": { + "id": 5992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5988, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30209:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "id": 5991, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30218:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "32", + "id": 5990, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30224:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "30218:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + } + }, + "src": "30209:16:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5993, + "nodeType": "ExpressionStatement", + "src": "30209:16:19" + }, + { + "expression": { + "id": 5996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5994, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30243:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "32", + "id": 5995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30253:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "30243:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5997, + "nodeType": "ExpressionStatement", + "src": "30243:11:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6000, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30286:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "id": 6003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 6001, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30295:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "31", + "id": 6002, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30301:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "30295:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + } + }, + "src": "30286:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6010, + "nodeType": "IfStatement", + "src": "30282:66:19", + "trueBody": { + "id": 6009, + "nodeType": "Block", + "src": "30304:44:19", + "statements": [ + { + "expression": { + "id": 6007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6005, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30322:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 6006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30332:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "30322:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6008, + "nodeType": "ExpressionStatement", + "src": "30322:11:19" + } + ] + } + } + ] + }, + { + "expression": { + "id": 6012, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30374:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5893, + "id": 6013, + "nodeType": "Return", + "src": "30367:13:19" + } + ] + }, + "documentation": { + "id": 5887, + "nodeType": "StructuredDocumentation", + "src": "29346:120:19", + "text": " @dev Return the log in base 10 of a positive value rounded towards zero.\n Returns 0 if given 0." + }, + "id": 6015, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log10", + "nameLocation": "29480:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5889, + "mutability": "mutable", + "name": "value", + "nameLocation": "29494:5:19", + "nodeType": "VariableDeclaration", + "scope": 6015, + "src": "29486:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29486:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29485:15:19" + }, + "returnParameters": { + "id": 5893, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5892, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6015, + "src": "29524:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5891, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29524:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29523:9:19" + }, + "scope": 6204, + "src": "29471:916:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6048, + "nodeType": "Block", + "src": "30622:177:19", + "statements": [ + { + "id": 6047, + "nodeType": "UncheckedBlock", + "src": "30632:161:19", + "statements": [ + { + "assignments": [ + 6027 + ], + "declarations": [ + { + "constant": false, + "id": 6027, + "mutability": "mutable", + "name": "result", + "nameLocation": "30664:6:19", + "nodeType": "VariableDeclaration", + "scope": 6047, + "src": "30656:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30656:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6031, + "initialValue": { + "arguments": [ + { + "id": 6029, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6018, + "src": "30679:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6028, + "name": "log10", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6015, + 6049 + ], + "referencedDeclaration": 6015, + "src": "30673:5:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30673:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30656:29:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6032, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6027, + "src": "30706:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6036, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6021, + "src": "30748:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 6035, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "30731:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 6037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30731:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 6038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30761:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "id": 6039, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6027, + "src": "30767:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30761:12:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6041, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6018, + "src": "30776:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30761:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "30731:50:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6033, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "30715:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "30724:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "30715:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30715:67:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30706:76:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6025, + "id": 6046, + "nodeType": "Return", + "src": "30699:83:19" + } + ] + } + ] + }, + "documentation": { + "id": 6016, + "nodeType": "StructuredDocumentation", + "src": "30393:143:19", + "text": " @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n Returns 0 if given 0." + }, + "id": 6049, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log10", + "nameLocation": "30550:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6018, + "mutability": "mutable", + "name": "value", + "nameLocation": "30564:5:19", + "nodeType": "VariableDeclaration", + "scope": 6049, + "src": "30556:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30556:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6021, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "30580:8:19", + "nodeType": "VariableDeclaration", + "scope": 6049, + "src": "30571:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 6020, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6019, + "name": "Rounding", + "nameLocations": [ + "30571:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "30571:8:19" + }, + "referencedDeclaration": 4559, + "src": "30571:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "30555:34:19" + }, + "returnParameters": { + "id": 6025, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6024, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6049, + "src": "30613:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30613:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30612:9:19" + }, + "scope": 6204, + "src": "30541:258:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6125, + "nodeType": "Block", + "src": "31117:675:19", + "statements": [ + { + "expression": { + "id": 6066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6057, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31199:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6060, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31219:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666666666666666666666666666666666666666666666666666666666666666", + "id": 6061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31223:34:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211455_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1455" + }, + "value": "0xffffffffffffffffffffffffffffffff" + }, + "src": "31219:38:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6058, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31203:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31212:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31203:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31203:55:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "37", + "id": 6064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31262:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "src": "31203:60:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31199:64:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6067, + "nodeType": "ExpressionStatement", + "src": "31199:64:19" + }, + { + "expression": { + "id": 6080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6068, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31339:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6071, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31361:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 6072, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31366:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31361:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6074, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31360:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866666666666666666666666666666666", + "id": 6075, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31371:18:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551615_by_1", + "typeString": "int_const 18446744073709551615" + }, + "value": "0xffffffffffffffff" + }, + "src": "31360:29:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6069, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31344:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31353:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31344:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31344:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "36", + "id": 6078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31394:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_6_by_1", + "typeString": "int_const 6" + }, + "value": "6" + }, + "src": "31344:51:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31339:56:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6081, + "nodeType": "ExpressionStatement", + "src": "31339:56:19" + }, + { + "expression": { + "id": 6094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6082, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31470:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6085, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31492:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 6086, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31497:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31492:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6088, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31491:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666666666666666", + "id": 6089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31502:10:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967295_by_1", + "typeString": "int_const 4294967295" + }, + "value": "0xffffffff" + }, + "src": "31491:21:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6083, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31475:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31484:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31475:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31475:38:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "35", + "id": 6092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31517:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "31475:43:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31470:48:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6095, + "nodeType": "ExpressionStatement", + "src": "31470:48:19" + }, + { + "expression": { + "id": 6108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6096, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31593:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6099, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31615:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 6100, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31620:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31615:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6102, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31614:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866666666", + "id": 6103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31625:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_65535_by_1", + "typeString": "int_const 65535" + }, + "value": "0xffff" + }, + "src": "31614:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6097, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31598:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31607:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31598:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31598:34:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "34", + "id": 6106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31636:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "31598:39:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31593:44:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6109, + "nodeType": "ExpressionStatement", + "src": "31593:44:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6110, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31743:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "33", + "id": 6111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31748:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "31743:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6113, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31742:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6116, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31770:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 6117, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31775:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31770:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6119, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31769:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666", + "id": 6120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31780:4:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0xff" + }, + "src": "31769:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6114, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31753:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31762:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31753:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31753:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31742:43:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6056, + "id": 6124, + "nodeType": "Return", + "src": "31735:50:19" + } + ] + }, + "documentation": { + "id": 6050, + "nodeType": "StructuredDocumentation", + "src": "30805:246:19", + "text": " @dev Return the log in base 256 of a positive value rounded towards zero.\n Returns 0 if given 0.\n Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string." + }, + "id": 6126, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log256", + "nameLocation": "31065:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6052, + "mutability": "mutable", + "name": "x", + "nameLocation": "31080:1:19", + "nodeType": "VariableDeclaration", + "scope": 6126, + "src": "31072:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31072:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31071:11:19" + }, + "returnParameters": { + "id": 6056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6055, + "mutability": "mutable", + "name": "r", + "nameLocation": "31114:1:19", + "nodeType": "VariableDeclaration", + "scope": 6126, + "src": "31106:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6054, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31106:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31105:11:19" + }, + "scope": 6204, + "src": "31056:736:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6162, + "nodeType": "Block", + "src": "32029:184:19", + "statements": [ + { + "id": 6161, + "nodeType": "UncheckedBlock", + "src": "32039:168:19", + "statements": [ + { + "assignments": [ + 6138 + ], + "declarations": [ + { + "constant": false, + "id": 6138, + "mutability": "mutable", + "name": "result", + "nameLocation": "32071:6:19", + "nodeType": "VariableDeclaration", + "scope": 6161, + "src": "32063:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6137, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32063:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6142, + "initialValue": { + "arguments": [ + { + "id": 6140, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "32087:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6139, + "name": "log256", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6126, + 6163 + ], + "referencedDeclaration": 6126, + "src": "32080:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32080:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32063:30:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6143, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6138, + "src": "32114:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6147, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6132, + "src": "32156:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 6146, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "32139:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 6148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32139:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 6149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32169:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6150, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6138, + "src": "32175:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "33", + "id": 6151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32185:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "32175:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6153, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "32174:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32169:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "32190:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32169:26:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "32139:56:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6144, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "32123:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "32132:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "32123:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32123:73:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32114:82:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6136, + "id": 6160, + "nodeType": "Return", + "src": "32107:89:19" + } + ] + } + ] + }, + "documentation": { + "id": 6127, + "nodeType": "StructuredDocumentation", + "src": "31798:144:19", + "text": " @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n Returns 0 if given 0." + }, + "id": 6163, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log256", + "nameLocation": "31956:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6129, + "mutability": "mutable", + "name": "value", + "nameLocation": "31971:5:19", + "nodeType": "VariableDeclaration", + "scope": 6163, + "src": "31963:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6128, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31963:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6132, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "31987:8:19", + "nodeType": "VariableDeclaration", + "scope": 6163, + "src": "31978:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 6131, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6130, + "name": "Rounding", + "nameLocations": [ + "31978:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "31978:8:19" + }, + "referencedDeclaration": 4559, + "src": "31978:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "31962:34:19" + }, + "returnParameters": { + "id": 6136, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6135, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6163, + "src": "32020:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32020:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32019:9:19" + }, + "scope": 6204, + "src": "31947:266:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6181, + "nodeType": "Block", + "src": "32411:48:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6174, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6167, + "src": "32434:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 6173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32428:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 6172, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "32428:5:19", + "typeDescriptions": {} + } + }, + "id": 6175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32428:15:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "hexValue": "32", + "id": 6176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32446:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "32428:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "31", + "id": 6178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32451:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "32428:24:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 6171, + "id": 6180, + "nodeType": "Return", + "src": "32421:31:19" + } + ] + }, + "documentation": { + "id": 6164, + "nodeType": "StructuredDocumentation", + "src": "32219:113:19", + "text": " @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers." + }, + "id": 6182, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unsignedRoundsUp", + "nameLocation": "32346:16:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6167, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "32372:8:19", + "nodeType": "VariableDeclaration", + "scope": 6182, + "src": "32363:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 6166, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6165, + "name": "Rounding", + "nameLocations": [ + "32363:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "32363:8:19" + }, + "referencedDeclaration": 4559, + "src": "32363:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "32362:19:19" + }, + "returnParameters": { + "id": 6171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6170, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6182, + "src": "32405:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6169, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "32405:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "32404:6:19" + }, + "scope": 6204, + "src": "32337:122:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6202, + "nodeType": "Block", + "src": "32602:59:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6191, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6185, + "src": "32627:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32632:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "32627:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "323536", + "id": 6194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32635:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "323535", + "id": 6195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32640:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 6197, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6185, + "src": "32651:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6196, + "name": "log2", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5852, + 5886 + ], + "referencedDeclaration": 5852, + "src": "32646:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32646:7:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32640:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6190, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "32619:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 6200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32619:35:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6189, + "id": 6201, + "nodeType": "Return", + "src": "32612:42:19" + } + ] + }, + "documentation": { + "id": 6183, + "nodeType": "StructuredDocumentation", + "src": "32465:76:19", + "text": " @dev Counts the number of leading zero bits in a uint256." + }, + "id": 6203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "clz", + "nameLocation": "32555:3:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6186, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6185, + "mutability": "mutable", + "name": "x", + "nameLocation": "32567:1:19", + "nodeType": "VariableDeclaration", + "scope": 6203, + "src": "32559:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6184, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32559:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32558:11:19" + }, + "returnParameters": { + "id": 6189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6188, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6203, + "src": "32593:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32593:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32592:9:19" + }, + "scope": 6204, + "src": "32546:115:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 6205, + "src": "281:32382:19", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "103:32561:19" + }, + "id": 19 + }, + "@openzeppelin/contracts/utils/math/SafeCast.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol", + "exportedSymbols": { + "SafeCast": [ + 7969 + ] + }, + "id": 7970, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6206, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "192:24:20" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SafeCast", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 6207, + "nodeType": "StructuredDocumentation", + "src": "218:550:20", + "text": " @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n checks.\n Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n easily result in undesired exploitation or bugs, since developers usually\n assume that overflows raise errors. `SafeCast` restores this intuition by\n reverting the transaction when such an operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always." + }, + "fullyImplemented": true, + "id": 7969, + "linearizedBaseContracts": [ + 7969 + ], + "name": "SafeCast", + "nameLocation": "777:8:20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 6208, + "nodeType": "StructuredDocumentation", + "src": "792:67:20", + "text": " @dev Value doesn't fit in a uint of `bits` size." + }, + "errorSelector": "6dfcc650", + "id": 6214, + "name": "SafeCastOverflowedUintDowncast", + "nameLocation": "870:30:20", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6210, + "mutability": "mutable", + "name": "bits", + "nameLocation": "907:4:20", + "nodeType": "VariableDeclaration", + "scope": 6214, + "src": "901:10:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6209, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "901:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "value", + "nameLocation": "921:5:20", + "nodeType": "VariableDeclaration", + "scope": 6214, + "src": "913:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6211, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "913:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "900:27:20" + }, + "src": "864:64:20" + }, + { + "documentation": { + "id": 6215, + "nodeType": "StructuredDocumentation", + "src": "934:74:20", + "text": " @dev An int value doesn't fit in a uint of `bits` size." + }, + "errorSelector": "a8ce4432", + "id": 6219, + "name": "SafeCastOverflowedIntToUint", + "nameLocation": "1019:27:20", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6217, + "mutability": "mutable", + "name": "value", + "nameLocation": "1054:5:20", + "nodeType": "VariableDeclaration", + "scope": 6219, + "src": "1047:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 6216, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1047:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1046:14:20" + }, + "src": "1013:48:20" + }, + { + "documentation": { + "id": 6220, + "nodeType": "StructuredDocumentation", + "src": "1067:67:20", + "text": " @dev Value doesn't fit in an int of `bits` size." + }, + "errorSelector": "327269a7", + "id": 6226, + "name": "SafeCastOverflowedIntDowncast", + "nameLocation": "1145:29:20", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6222, + "mutability": "mutable", + "name": "bits", + "nameLocation": "1181:4:20", + "nodeType": "VariableDeclaration", + "scope": 6226, + "src": "1175:10:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6221, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1175:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6224, + "mutability": "mutable", + "name": "value", + "nameLocation": "1194:5:20", + "nodeType": "VariableDeclaration", + "scope": 6226, + "src": "1187:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 6223, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1187:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1174:26:20" + }, + "src": "1139:62:20" + }, + { + "documentation": { + "id": 6227, + "nodeType": "StructuredDocumentation", + "src": "1207:74:20", + "text": " @dev A uint value doesn't fit in an int of `bits` size." + }, + "errorSelector": "24775e06", + "id": 6231, + "name": "SafeCastOverflowedUintToInt", + "nameLocation": "1292:27:20", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6229, + "mutability": "mutable", + "name": "value", + "nameLocation": "1328:5:20", + "nodeType": "VariableDeclaration", + "scope": 6231, + "src": "1320:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1320:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1319:15:20" + }, + "src": "1286:49:20" + }, + { + "body": { + "id": 6258, + "nodeType": "Block", + "src": "1692:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6239, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6234, + "src": "1706:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1719:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint248_$", + "typeString": "type(uint248)" + }, + "typeName": { + "id": 6241, + "name": "uint248", + "nodeType": "ElementaryTypeName", + "src": "1719:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint248_$", + "typeString": "type(uint248)" + } + ], + "id": 6240, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1714:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1714:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint248", + "typeString": "type(uint248)" + } + }, + "id": 6244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1728:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "1714:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint248", + "typeString": "uint248" + } + }, + "src": "1706:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6252, + "nodeType": "IfStatement", + "src": "1702:105:20", + "trueBody": { + "id": 6251, + "nodeType": "Block", + "src": "1733:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323438", + "id": 6247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1785:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_248_by_1", + "typeString": "int_const 248" + }, + "value": "248" + }, + { + "id": 6248, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6234, + "src": "1790:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_248_by_1", + "typeString": "int_const 248" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6246, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "1754:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1754:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6250, + "nodeType": "RevertStatement", + "src": "1747:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6255, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6234, + "src": "1831:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1823:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint248_$", + "typeString": "type(uint248)" + }, + "typeName": { + "id": 6253, + "name": "uint248", + "nodeType": "ElementaryTypeName", + "src": "1823:7:20", + "typeDescriptions": {} + } + }, + "id": 6256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1823:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint248", + "typeString": "uint248" + } + }, + "functionReturnParameters": 6238, + "id": 6257, + "nodeType": "Return", + "src": "1816:21:20" + } + ] + }, + "documentation": { + "id": 6232, + "nodeType": "StructuredDocumentation", + "src": "1341:280:20", + "text": " @dev Returns the downcasted uint248 from uint256, reverting on\n overflow (when the input is greater than largest uint248).\n Counterpart to Solidity's `uint248` operator.\n Requirements:\n - input must fit into 248 bits" + }, + "id": 6259, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint248", + "nameLocation": "1635:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6235, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6234, + "mutability": "mutable", + "name": "value", + "nameLocation": "1653:5:20", + "nodeType": "VariableDeclaration", + "scope": 6259, + "src": "1645:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6233, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1645:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1644:15:20" + }, + "returnParameters": { + "id": 6238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6237, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6259, + "src": "1683:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint248", + "typeString": "uint248" + }, + "typeName": { + "id": 6236, + "name": "uint248", + "nodeType": "ElementaryTypeName", + "src": "1683:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint248", + "typeString": "uint248" + } + }, + "visibility": "internal" + } + ], + "src": "1682:9:20" + }, + "scope": 7969, + "src": "1626:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6286, + "nodeType": "Block", + "src": "2201:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6267, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6262, + "src": "2215:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2228:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint240_$", + "typeString": "type(uint240)" + }, + "typeName": { + "id": 6269, + "name": "uint240", + "nodeType": "ElementaryTypeName", + "src": "2228:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint240_$", + "typeString": "type(uint240)" + } + ], + "id": 6268, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "2223:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2223:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint240", + "typeString": "type(uint240)" + } + }, + "id": 6272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2237:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "2223:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint240", + "typeString": "uint240" + } + }, + "src": "2215:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6280, + "nodeType": "IfStatement", + "src": "2211:105:20", + "trueBody": { + "id": 6279, + "nodeType": "Block", + "src": "2242:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323430", + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2294:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_240_by_1", + "typeString": "int_const 240" + }, + "value": "240" + }, + { + "id": 6276, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6262, + "src": "2299:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_240_by_1", + "typeString": "int_const 240" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6274, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "2263:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2263:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6278, + "nodeType": "RevertStatement", + "src": "2256:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6283, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6262, + "src": "2340:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2332:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint240_$", + "typeString": "type(uint240)" + }, + "typeName": { + "id": 6281, + "name": "uint240", + "nodeType": "ElementaryTypeName", + "src": "2332:7:20", + "typeDescriptions": {} + } + }, + "id": 6284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2332:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint240", + "typeString": "uint240" + } + }, + "functionReturnParameters": 6266, + "id": 6285, + "nodeType": "Return", + "src": "2325:21:20" + } + ] + }, + "documentation": { + "id": 6260, + "nodeType": "StructuredDocumentation", + "src": "1850:280:20", + "text": " @dev Returns the downcasted uint240 from uint256, reverting on\n overflow (when the input is greater than largest uint240).\n Counterpart to Solidity's `uint240` operator.\n Requirements:\n - input must fit into 240 bits" + }, + "id": 6287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint240", + "nameLocation": "2144:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6262, + "mutability": "mutable", + "name": "value", + "nameLocation": "2162:5:20", + "nodeType": "VariableDeclaration", + "scope": 6287, + "src": "2154:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2154:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2153:15:20" + }, + "returnParameters": { + "id": 6266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6265, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6287, + "src": "2192:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint240", + "typeString": "uint240" + }, + "typeName": { + "id": 6264, + "name": "uint240", + "nodeType": "ElementaryTypeName", + "src": "2192:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint240", + "typeString": "uint240" + } + }, + "visibility": "internal" + } + ], + "src": "2191:9:20" + }, + "scope": 7969, + "src": "2135:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6314, + "nodeType": "Block", + "src": "2710:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6295, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6290, + "src": "2724:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2737:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint232_$", + "typeString": "type(uint232)" + }, + "typeName": { + "id": 6297, + "name": "uint232", + "nodeType": "ElementaryTypeName", + "src": "2737:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint232_$", + "typeString": "type(uint232)" + } + ], + "id": 6296, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "2732:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6299, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2732:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint232", + "typeString": "type(uint232)" + } + }, + "id": 6300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2746:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "2732:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint232", + "typeString": "uint232" + } + }, + "src": "2724:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6308, + "nodeType": "IfStatement", + "src": "2720:105:20", + "trueBody": { + "id": 6307, + "nodeType": "Block", + "src": "2751:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323332", + "id": 6303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2803:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_232_by_1", + "typeString": "int_const 232" + }, + "value": "232" + }, + { + "id": 6304, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6290, + "src": "2808:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_232_by_1", + "typeString": "int_const 232" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6302, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "2772:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2772:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6306, + "nodeType": "RevertStatement", + "src": "2765:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6311, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6290, + "src": "2849:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2841:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint232_$", + "typeString": "type(uint232)" + }, + "typeName": { + "id": 6309, + "name": "uint232", + "nodeType": "ElementaryTypeName", + "src": "2841:7:20", + "typeDescriptions": {} + } + }, + "id": 6312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2841:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint232", + "typeString": "uint232" + } + }, + "functionReturnParameters": 6294, + "id": 6313, + "nodeType": "Return", + "src": "2834:21:20" + } + ] + }, + "documentation": { + "id": 6288, + "nodeType": "StructuredDocumentation", + "src": "2359:280:20", + "text": " @dev Returns the downcasted uint232 from uint256, reverting on\n overflow (when the input is greater than largest uint232).\n Counterpart to Solidity's `uint232` operator.\n Requirements:\n - input must fit into 232 bits" + }, + "id": 6315, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint232", + "nameLocation": "2653:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6291, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6290, + "mutability": "mutable", + "name": "value", + "nameLocation": "2671:5:20", + "nodeType": "VariableDeclaration", + "scope": 6315, + "src": "2663:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2663:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2662:15:20" + }, + "returnParameters": { + "id": 6294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6293, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6315, + "src": "2701:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint232", + "typeString": "uint232" + }, + "typeName": { + "id": 6292, + "name": "uint232", + "nodeType": "ElementaryTypeName", + "src": "2701:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint232", + "typeString": "uint232" + } + }, + "visibility": "internal" + } + ], + "src": "2700:9:20" + }, + "scope": 7969, + "src": "2644:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6342, + "nodeType": "Block", + "src": "3219:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6323, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6318, + "src": "3233:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3246:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint224_$", + "typeString": "type(uint224)" + }, + "typeName": { + "id": 6325, + "name": "uint224", + "nodeType": "ElementaryTypeName", + "src": "3246:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint224_$", + "typeString": "type(uint224)" + } + ], + "id": 6324, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3241:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6327, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3241:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint224", + "typeString": "type(uint224)" + } + }, + "id": 6328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3255:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3241:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint224", + "typeString": "uint224" + } + }, + "src": "3233:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6336, + "nodeType": "IfStatement", + "src": "3229:105:20", + "trueBody": { + "id": 6335, + "nodeType": "Block", + "src": "3260:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323234", + "id": 6331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3312:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_224_by_1", + "typeString": "int_const 224" + }, + "value": "224" + }, + { + "id": 6332, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6318, + "src": "3317:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_224_by_1", + "typeString": "int_const 224" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6330, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "3281:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3281:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6334, + "nodeType": "RevertStatement", + "src": "3274:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6339, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6318, + "src": "3358:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3350:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint224_$", + "typeString": "type(uint224)" + }, + "typeName": { + "id": 6337, + "name": "uint224", + "nodeType": "ElementaryTypeName", + "src": "3350:7:20", + "typeDescriptions": {} + } + }, + "id": 6340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3350:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint224", + "typeString": "uint224" + } + }, + "functionReturnParameters": 6322, + "id": 6341, + "nodeType": "Return", + "src": "3343:21:20" + } + ] + }, + "documentation": { + "id": 6316, + "nodeType": "StructuredDocumentation", + "src": "2868:280:20", + "text": " @dev Returns the downcasted uint224 from uint256, reverting on\n overflow (when the input is greater than largest uint224).\n Counterpart to Solidity's `uint224` operator.\n Requirements:\n - input must fit into 224 bits" + }, + "id": 6343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint224", + "nameLocation": "3162:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6319, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6318, + "mutability": "mutable", + "name": "value", + "nameLocation": "3180:5:20", + "nodeType": "VariableDeclaration", + "scope": 6343, + "src": "3172:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6317, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3172:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3171:15:20" + }, + "returnParameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6321, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6343, + "src": "3210:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint224", + "typeString": "uint224" + }, + "typeName": { + "id": 6320, + "name": "uint224", + "nodeType": "ElementaryTypeName", + "src": "3210:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint224", + "typeString": "uint224" + } + }, + "visibility": "internal" + } + ], + "src": "3209:9:20" + }, + "scope": 7969, + "src": "3153:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6370, + "nodeType": "Block", + "src": "3728:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6351, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6346, + "src": "3742:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3755:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint216_$", + "typeString": "type(uint216)" + }, + "typeName": { + "id": 6353, + "name": "uint216", + "nodeType": "ElementaryTypeName", + "src": "3755:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint216_$", + "typeString": "type(uint216)" + } + ], + "id": 6352, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3750:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3750:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint216", + "typeString": "type(uint216)" + } + }, + "id": 6356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3764:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3750:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + "src": "3742:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6364, + "nodeType": "IfStatement", + "src": "3738:105:20", + "trueBody": { + "id": 6363, + "nodeType": "Block", + "src": "3769:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323136", + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3821:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_216_by_1", + "typeString": "int_const 216" + }, + "value": "216" + }, + { + "id": 6360, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6346, + "src": "3826:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_216_by_1", + "typeString": "int_const 216" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6358, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "3790:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3790:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6362, + "nodeType": "RevertStatement", + "src": "3783:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6367, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6346, + "src": "3867:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3859:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint216_$", + "typeString": "type(uint216)" + }, + "typeName": { + "id": 6365, + "name": "uint216", + "nodeType": "ElementaryTypeName", + "src": "3859:7:20", + "typeDescriptions": {} + } + }, + "id": 6368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3859:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + "functionReturnParameters": 6350, + "id": 6369, + "nodeType": "Return", + "src": "3852:21:20" + } + ] + }, + "documentation": { + "id": 6344, + "nodeType": "StructuredDocumentation", + "src": "3377:280:20", + "text": " @dev Returns the downcasted uint216 from uint256, reverting on\n overflow (when the input is greater than largest uint216).\n Counterpart to Solidity's `uint216` operator.\n Requirements:\n - input must fit into 216 bits" + }, + "id": 6371, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint216", + "nameLocation": "3671:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6346, + "mutability": "mutable", + "name": "value", + "nameLocation": "3689:5:20", + "nodeType": "VariableDeclaration", + "scope": 6371, + "src": "3681:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3681:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3680:15:20" + }, + "returnParameters": { + "id": 6350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6349, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6371, + "src": "3719:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + }, + "typeName": { + "id": 6348, + "name": "uint216", + "nodeType": "ElementaryTypeName", + "src": "3719:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + "visibility": "internal" + } + ], + "src": "3718:9:20" + }, + "scope": 7969, + "src": "3662:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6398, + "nodeType": "Block", + "src": "4237:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6379, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6374, + "src": "4251:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4264:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint208_$", + "typeString": "type(uint208)" + }, + "typeName": { + "id": 6381, + "name": "uint208", + "nodeType": "ElementaryTypeName", + "src": "4264:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint208_$", + "typeString": "type(uint208)" + } + ], + "id": 6380, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4259:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4259:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint208", + "typeString": "type(uint208)" + } + }, + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4273:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4259:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint208", + "typeString": "uint208" + } + }, + "src": "4251:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6392, + "nodeType": "IfStatement", + "src": "4247:105:20", + "trueBody": { + "id": 6391, + "nodeType": "Block", + "src": "4278:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323038", + "id": 6387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4330:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_208_by_1", + "typeString": "int_const 208" + }, + "value": "208" + }, + { + "id": 6388, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6374, + "src": "4335:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_208_by_1", + "typeString": "int_const 208" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6386, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "4299:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4299:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6390, + "nodeType": "RevertStatement", + "src": "4292:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6395, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6374, + "src": "4376:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4368:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint208_$", + "typeString": "type(uint208)" + }, + "typeName": { + "id": 6393, + "name": "uint208", + "nodeType": "ElementaryTypeName", + "src": "4368:7:20", + "typeDescriptions": {} + } + }, + "id": 6396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4368:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint208", + "typeString": "uint208" + } + }, + "functionReturnParameters": 6378, + "id": 6397, + "nodeType": "Return", + "src": "4361:21:20" + } + ] + }, + "documentation": { + "id": 6372, + "nodeType": "StructuredDocumentation", + "src": "3886:280:20", + "text": " @dev Returns the downcasted uint208 from uint256, reverting on\n overflow (when the input is greater than largest uint208).\n Counterpart to Solidity's `uint208` operator.\n Requirements:\n - input must fit into 208 bits" + }, + "id": 6399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint208", + "nameLocation": "4180:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6375, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6374, + "mutability": "mutable", + "name": "value", + "nameLocation": "4198:5:20", + "nodeType": "VariableDeclaration", + "scope": 6399, + "src": "4190:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6373, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4190:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4189:15:20" + }, + "returnParameters": { + "id": 6378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6377, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6399, + "src": "4228:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint208", + "typeString": "uint208" + }, + "typeName": { + "id": 6376, + "name": "uint208", + "nodeType": "ElementaryTypeName", + "src": "4228:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint208", + "typeString": "uint208" + } + }, + "visibility": "internal" + } + ], + "src": "4227:9:20" + }, + "scope": 7969, + "src": "4171:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6426, + "nodeType": "Block", + "src": "4746:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6407, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "4760:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4773:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint200_$", + "typeString": "type(uint200)" + }, + "typeName": { + "id": 6409, + "name": "uint200", + "nodeType": "ElementaryTypeName", + "src": "4773:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint200_$", + "typeString": "type(uint200)" + } + ], + "id": 6408, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4768:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4768:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint200", + "typeString": "type(uint200)" + } + }, + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4782:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4768:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint200", + "typeString": "uint200" + } + }, + "src": "4760:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6420, + "nodeType": "IfStatement", + "src": "4756:105:20", + "trueBody": { + "id": 6419, + "nodeType": "Block", + "src": "4787:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323030", + "id": 6415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4839:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_200_by_1", + "typeString": "int_const 200" + }, + "value": "200" + }, + { + "id": 6416, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "4844:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_200_by_1", + "typeString": "int_const 200" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6414, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "4808:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4808:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6418, + "nodeType": "RevertStatement", + "src": "4801:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6423, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "4885:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4877:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint200_$", + "typeString": "type(uint200)" + }, + "typeName": { + "id": 6421, + "name": "uint200", + "nodeType": "ElementaryTypeName", + "src": "4877:7:20", + "typeDescriptions": {} + } + }, + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4877:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint200", + "typeString": "uint200" + } + }, + "functionReturnParameters": 6406, + "id": 6425, + "nodeType": "Return", + "src": "4870:21:20" + } + ] + }, + "documentation": { + "id": 6400, + "nodeType": "StructuredDocumentation", + "src": "4395:280:20", + "text": " @dev Returns the downcasted uint200 from uint256, reverting on\n overflow (when the input is greater than largest uint200).\n Counterpart to Solidity's `uint200` operator.\n Requirements:\n - input must fit into 200 bits" + }, + "id": 6427, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint200", + "nameLocation": "4689:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6403, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6402, + "mutability": "mutable", + "name": "value", + "nameLocation": "4707:5:20", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4699:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6401, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4699:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4698:15:20" + }, + "returnParameters": { + "id": 6406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6405, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4737:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint200", + "typeString": "uint200" + }, + "typeName": { + "id": 6404, + "name": "uint200", + "nodeType": "ElementaryTypeName", + "src": "4737:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint200", + "typeString": "uint200" + } + }, + "visibility": "internal" + } + ], + "src": "4736:9:20" + }, + "scope": 7969, + "src": "4680:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6454, + "nodeType": "Block", + "src": "5255:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6435, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5269:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5282:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint192_$", + "typeString": "type(uint192)" + }, + "typeName": { + "id": 6437, + "name": "uint192", + "nodeType": "ElementaryTypeName", + "src": "5282:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint192_$", + "typeString": "type(uint192)" + } + ], + "id": 6436, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "5277:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5277:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint192", + "typeString": "type(uint192)" + } + }, + "id": 6440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5291:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "5277:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + } + }, + "src": "5269:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6448, + "nodeType": "IfStatement", + "src": "5265:105:20", + "trueBody": { + "id": 6447, + "nodeType": "Block", + "src": "5296:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313932", + "id": 6443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5348:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_192_by_1", + "typeString": "int_const 192" + }, + "value": "192" + }, + { + "id": 6444, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5353:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_192_by_1", + "typeString": "int_const 192" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6442, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "5317:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5317:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6446, + "nodeType": "RevertStatement", + "src": "5310:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6451, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5394:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5386:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint192_$", + "typeString": "type(uint192)" + }, + "typeName": { + "id": 6449, + "name": "uint192", + "nodeType": "ElementaryTypeName", + "src": "5386:7:20", + "typeDescriptions": {} + } + }, + "id": 6452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5386:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + } + }, + "functionReturnParameters": 6434, + "id": 6453, + "nodeType": "Return", + "src": "5379:21:20" + } + ] + }, + "documentation": { + "id": 6428, + "nodeType": "StructuredDocumentation", + "src": "4904:280:20", + "text": " @dev Returns the downcasted uint192 from uint256, reverting on\n overflow (when the input is greater than largest uint192).\n Counterpart to Solidity's `uint192` operator.\n Requirements:\n - input must fit into 192 bits" + }, + "id": 6455, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint192", + "nameLocation": "5198:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6430, + "mutability": "mutable", + "name": "value", + "nameLocation": "5216:5:20", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "5208:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6429, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5208:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5207:15:20" + }, + "returnParameters": { + "id": 6434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6433, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "5246:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + }, + "typeName": { + "id": 6432, + "name": "uint192", + "nodeType": "ElementaryTypeName", + "src": "5246:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + } + }, + "visibility": "internal" + } + ], + "src": "5245:9:20" + }, + "scope": 7969, + "src": "5189:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6482, + "nodeType": "Block", + "src": "5764:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6463, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6458, + "src": "5778:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5791:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint184_$", + "typeString": "type(uint184)" + }, + "typeName": { + "id": 6465, + "name": "uint184", + "nodeType": "ElementaryTypeName", + "src": "5791:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint184_$", + "typeString": "type(uint184)" + } + ], + "id": 6464, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "5786:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6467, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5786:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint184", + "typeString": "type(uint184)" + } + }, + "id": 6468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5800:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "5786:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint184", + "typeString": "uint184" + } + }, + "src": "5778:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6476, + "nodeType": "IfStatement", + "src": "5774:105:20", + "trueBody": { + "id": 6475, + "nodeType": "Block", + "src": "5805:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313834", + "id": 6471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5857:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_184_by_1", + "typeString": "int_const 184" + }, + "value": "184" + }, + { + "id": 6472, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6458, + "src": "5862:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_184_by_1", + "typeString": "int_const 184" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6470, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "5826:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5826:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6474, + "nodeType": "RevertStatement", + "src": "5819:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6479, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6458, + "src": "5903:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6478, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5895:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint184_$", + "typeString": "type(uint184)" + }, + "typeName": { + "id": 6477, + "name": "uint184", + "nodeType": "ElementaryTypeName", + "src": "5895:7:20", + "typeDescriptions": {} + } + }, + "id": 6480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5895:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint184", + "typeString": "uint184" + } + }, + "functionReturnParameters": 6462, + "id": 6481, + "nodeType": "Return", + "src": "5888:21:20" + } + ] + }, + "documentation": { + "id": 6456, + "nodeType": "StructuredDocumentation", + "src": "5413:280:20", + "text": " @dev Returns the downcasted uint184 from uint256, reverting on\n overflow (when the input is greater than largest uint184).\n Counterpart to Solidity's `uint184` operator.\n Requirements:\n - input must fit into 184 bits" + }, + "id": 6483, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint184", + "nameLocation": "5707:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6458, + "mutability": "mutable", + "name": "value", + "nameLocation": "5725:5:20", + "nodeType": "VariableDeclaration", + "scope": 6483, + "src": "5717:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6457, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5717:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5716:15:20" + }, + "returnParameters": { + "id": 6462, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6461, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6483, + "src": "5755:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint184", + "typeString": "uint184" + }, + "typeName": { + "id": 6460, + "name": "uint184", + "nodeType": "ElementaryTypeName", + "src": "5755:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint184", + "typeString": "uint184" + } + }, + "visibility": "internal" + } + ], + "src": "5754:9:20" + }, + "scope": 7969, + "src": "5698:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6510, + "nodeType": "Block", + "src": "6273:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6491, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6486, + "src": "6287:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6300:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint176_$", + "typeString": "type(uint176)" + }, + "typeName": { + "id": 6493, + "name": "uint176", + "nodeType": "ElementaryTypeName", + "src": "6300:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint176_$", + "typeString": "type(uint176)" + } + ], + "id": 6492, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "6295:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6295:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint176", + "typeString": "type(uint176)" + } + }, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6309:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "6295:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint176", + "typeString": "uint176" + } + }, + "src": "6287:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6504, + "nodeType": "IfStatement", + "src": "6283:105:20", + "trueBody": { + "id": 6503, + "nodeType": "Block", + "src": "6314:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313736", + "id": 6499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6366:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_176_by_1", + "typeString": "int_const 176" + }, + "value": "176" + }, + { + "id": 6500, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6486, + "src": "6371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_176_by_1", + "typeString": "int_const 176" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6498, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "6335:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6335:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6502, + "nodeType": "RevertStatement", + "src": "6328:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6507, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6486, + "src": "6412:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6404:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint176_$", + "typeString": "type(uint176)" + }, + "typeName": { + "id": 6505, + "name": "uint176", + "nodeType": "ElementaryTypeName", + "src": "6404:7:20", + "typeDescriptions": {} + } + }, + "id": 6508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6404:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint176", + "typeString": "uint176" + } + }, + "functionReturnParameters": 6490, + "id": 6509, + "nodeType": "Return", + "src": "6397:21:20" + } + ] + }, + "documentation": { + "id": 6484, + "nodeType": "StructuredDocumentation", + "src": "5922:280:20", + "text": " @dev Returns the downcasted uint176 from uint256, reverting on\n overflow (when the input is greater than largest uint176).\n Counterpart to Solidity's `uint176` operator.\n Requirements:\n - input must fit into 176 bits" + }, + "id": 6511, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint176", + "nameLocation": "6216:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6487, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6486, + "mutability": "mutable", + "name": "value", + "nameLocation": "6234:5:20", + "nodeType": "VariableDeclaration", + "scope": 6511, + "src": "6226:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6485, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6226:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6225:15:20" + }, + "returnParameters": { + "id": 6490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6489, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6511, + "src": "6264:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint176", + "typeString": "uint176" + }, + "typeName": { + "id": 6488, + "name": "uint176", + "nodeType": "ElementaryTypeName", + "src": "6264:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint176", + "typeString": "uint176" + } + }, + "visibility": "internal" + } + ], + "src": "6263:9:20" + }, + "scope": 7969, + "src": "6207:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6538, + "nodeType": "Block", + "src": "6782:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6519, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6514, + "src": "6796:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6809:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint168_$", + "typeString": "type(uint168)" + }, + "typeName": { + "id": 6521, + "name": "uint168", + "nodeType": "ElementaryTypeName", + "src": "6809:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint168_$", + "typeString": "type(uint168)" + } + ], + "id": 6520, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "6804:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6523, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6804:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint168", + "typeString": "type(uint168)" + } + }, + "id": 6524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6818:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "6804:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint168", + "typeString": "uint168" + } + }, + "src": "6796:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6532, + "nodeType": "IfStatement", + "src": "6792:105:20", + "trueBody": { + "id": 6531, + "nodeType": "Block", + "src": "6823:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313638", + "id": 6527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6875:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_168_by_1", + "typeString": "int_const 168" + }, + "value": "168" + }, + { + "id": 6528, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6514, + "src": "6880:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_168_by_1", + "typeString": "int_const 168" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6526, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "6844:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6844:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6530, + "nodeType": "RevertStatement", + "src": "6837:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6535, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6514, + "src": "6921:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6913:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint168_$", + "typeString": "type(uint168)" + }, + "typeName": { + "id": 6533, + "name": "uint168", + "nodeType": "ElementaryTypeName", + "src": "6913:7:20", + "typeDescriptions": {} + } + }, + "id": 6536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6913:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint168", + "typeString": "uint168" + } + }, + "functionReturnParameters": 6518, + "id": 6537, + "nodeType": "Return", + "src": "6906:21:20" + } + ] + }, + "documentation": { + "id": 6512, + "nodeType": "StructuredDocumentation", + "src": "6431:280:20", + "text": " @dev Returns the downcasted uint168 from uint256, reverting on\n overflow (when the input is greater than largest uint168).\n Counterpart to Solidity's `uint168` operator.\n Requirements:\n - input must fit into 168 bits" + }, + "id": 6539, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint168", + "nameLocation": "6725:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6515, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6514, + "mutability": "mutable", + "name": "value", + "nameLocation": "6743:5:20", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6735:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6513, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6735:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6734:15:20" + }, + "returnParameters": { + "id": 6518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6517, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6773:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint168", + "typeString": "uint168" + }, + "typeName": { + "id": 6516, + "name": "uint168", + "nodeType": "ElementaryTypeName", + "src": "6773:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint168", + "typeString": "uint168" + } + }, + "visibility": "internal" + } + ], + "src": "6772:9:20" + }, + "scope": 7969, + "src": "6716:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6566, + "nodeType": "Block", + "src": "7291:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6547, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "7305:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7318:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 6549, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "7318:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + } + ], + "id": 6548, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "7313:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7313:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint160", + "typeString": "type(uint160)" + } + }, + "id": 6552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "7327:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "7313:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "src": "7305:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6560, + "nodeType": "IfStatement", + "src": "7301:105:20", + "trueBody": { + "id": 6559, + "nodeType": "Block", + "src": "7332:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313630", + "id": 6555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7384:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_160_by_1", + "typeString": "int_const 160" + }, + "value": "160" + }, + { + "id": 6556, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "7389:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_160_by_1", + "typeString": "int_const 160" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6554, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "7353:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7353:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6558, + "nodeType": "RevertStatement", + "src": "7346:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6563, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "7430:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7422:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 6561, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "7422:7:20", + "typeDescriptions": {} + } + }, + "id": 6564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7422:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "functionReturnParameters": 6546, + "id": 6565, + "nodeType": "Return", + "src": "7415:21:20" + } + ] + }, + "documentation": { + "id": 6540, + "nodeType": "StructuredDocumentation", + "src": "6940:280:20", + "text": " @dev Returns the downcasted uint160 from uint256, reverting on\n overflow (when the input is greater than largest uint160).\n Counterpart to Solidity's `uint160` operator.\n Requirements:\n - input must fit into 160 bits" + }, + "id": 6567, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint160", + "nameLocation": "7234:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6543, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6542, + "mutability": "mutable", + "name": "value", + "nameLocation": "7252:5:20", + "nodeType": "VariableDeclaration", + "scope": 6567, + "src": "7244:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6541, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7244:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7243:15:20" + }, + "returnParameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6545, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6567, + "src": "7282:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + }, + "typeName": { + "id": 6544, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "7282:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "visibility": "internal" + } + ], + "src": "7281:9:20" + }, + "scope": 7969, + "src": "7225:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6594, + "nodeType": "Block", + "src": "7800:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6575, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6570, + "src": "7814:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7827:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint152_$", + "typeString": "type(uint152)" + }, + "typeName": { + "id": 6577, + "name": "uint152", + "nodeType": "ElementaryTypeName", + "src": "7827:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint152_$", + "typeString": "type(uint152)" + } + ], + "id": 6576, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "7822:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6579, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7822:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint152", + "typeString": "type(uint152)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "7836:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "7822:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint152", + "typeString": "uint152" + } + }, + "src": "7814:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6588, + "nodeType": "IfStatement", + "src": "7810:105:20", + "trueBody": { + "id": 6587, + "nodeType": "Block", + "src": "7841:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313532", + "id": 6583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7893:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_152_by_1", + "typeString": "int_const 152" + }, + "value": "152" + }, + { + "id": 6584, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6570, + "src": "7898:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_152_by_1", + "typeString": "int_const 152" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6582, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "7862:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7862:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6586, + "nodeType": "RevertStatement", + "src": "7855:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6591, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6570, + "src": "7939:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7931:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint152_$", + "typeString": "type(uint152)" + }, + "typeName": { + "id": 6589, + "name": "uint152", + "nodeType": "ElementaryTypeName", + "src": "7931:7:20", + "typeDescriptions": {} + } + }, + "id": 6592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7931:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint152", + "typeString": "uint152" + } + }, + "functionReturnParameters": 6574, + "id": 6593, + "nodeType": "Return", + "src": "7924:21:20" + } + ] + }, + "documentation": { + "id": 6568, + "nodeType": "StructuredDocumentation", + "src": "7449:280:20", + "text": " @dev Returns the downcasted uint152 from uint256, reverting on\n overflow (when the input is greater than largest uint152).\n Counterpart to Solidity's `uint152` operator.\n Requirements:\n - input must fit into 152 bits" + }, + "id": 6595, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint152", + "nameLocation": "7743:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6570, + "mutability": "mutable", + "name": "value", + "nameLocation": "7761:5:20", + "nodeType": "VariableDeclaration", + "scope": 6595, + "src": "7753:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7753:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7752:15:20" + }, + "returnParameters": { + "id": 6574, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6573, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6595, + "src": "7791:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint152", + "typeString": "uint152" + }, + "typeName": { + "id": 6572, + "name": "uint152", + "nodeType": "ElementaryTypeName", + "src": "7791:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint152", + "typeString": "uint152" + } + }, + "visibility": "internal" + } + ], + "src": "7790:9:20" + }, + "scope": 7969, + "src": "7734:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6622, + "nodeType": "Block", + "src": "8309:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6603, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6598, + "src": "8323:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8336:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint144_$", + "typeString": "type(uint144)" + }, + "typeName": { + "id": 6605, + "name": "uint144", + "nodeType": "ElementaryTypeName", + "src": "8336:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint144_$", + "typeString": "type(uint144)" + } + ], + "id": 6604, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "8331:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8331:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint144", + "typeString": "type(uint144)" + } + }, + "id": 6608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8345:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "8331:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint144", + "typeString": "uint144" + } + }, + "src": "8323:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6616, + "nodeType": "IfStatement", + "src": "8319:105:20", + "trueBody": { + "id": 6615, + "nodeType": "Block", + "src": "8350:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313434", + "id": 6611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8402:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_144_by_1", + "typeString": "int_const 144" + }, + "value": "144" + }, + { + "id": 6612, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6598, + "src": "8407:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_144_by_1", + "typeString": "int_const 144" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6610, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "8371:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8371:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6614, + "nodeType": "RevertStatement", + "src": "8364:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6619, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6598, + "src": "8448:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8440:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint144_$", + "typeString": "type(uint144)" + }, + "typeName": { + "id": 6617, + "name": "uint144", + "nodeType": "ElementaryTypeName", + "src": "8440:7:20", + "typeDescriptions": {} + } + }, + "id": 6620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8440:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint144", + "typeString": "uint144" + } + }, + "functionReturnParameters": 6602, + "id": 6621, + "nodeType": "Return", + "src": "8433:21:20" + } + ] + }, + "documentation": { + "id": 6596, + "nodeType": "StructuredDocumentation", + "src": "7958:280:20", + "text": " @dev Returns the downcasted uint144 from uint256, reverting on\n overflow (when the input is greater than largest uint144).\n Counterpart to Solidity's `uint144` operator.\n Requirements:\n - input must fit into 144 bits" + }, + "id": 6623, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint144", + "nameLocation": "8252:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6599, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6598, + "mutability": "mutable", + "name": "value", + "nameLocation": "8270:5:20", + "nodeType": "VariableDeclaration", + "scope": 6623, + "src": "8262:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8262:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8261:15:20" + }, + "returnParameters": { + "id": 6602, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6601, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6623, + "src": "8300:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint144", + "typeString": "uint144" + }, + "typeName": { + "id": 6600, + "name": "uint144", + "nodeType": "ElementaryTypeName", + "src": "8300:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint144", + "typeString": "uint144" + } + }, + "visibility": "internal" + } + ], + "src": "8299:9:20" + }, + "scope": 7969, + "src": "8243:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6650, + "nodeType": "Block", + "src": "8818:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6631, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "8832:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8845:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint136_$", + "typeString": "type(uint136)" + }, + "typeName": { + "id": 6633, + "name": "uint136", + "nodeType": "ElementaryTypeName", + "src": "8845:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint136_$", + "typeString": "type(uint136)" + } + ], + "id": 6632, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "8840:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8840:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint136", + "typeString": "type(uint136)" + } + }, + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8854:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "8840:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint136", + "typeString": "uint136" + } + }, + "src": "8832:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6644, + "nodeType": "IfStatement", + "src": "8828:105:20", + "trueBody": { + "id": 6643, + "nodeType": "Block", + "src": "8859:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313336", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8911:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_136_by_1", + "typeString": "int_const 136" + }, + "value": "136" + }, + { + "id": 6640, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "8916:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_136_by_1", + "typeString": "int_const 136" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6638, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "8880:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8880:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6642, + "nodeType": "RevertStatement", + "src": "8873:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6647, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "8957:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8949:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint136_$", + "typeString": "type(uint136)" + }, + "typeName": { + "id": 6645, + "name": "uint136", + "nodeType": "ElementaryTypeName", + "src": "8949:7:20", + "typeDescriptions": {} + } + }, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8949:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint136", + "typeString": "uint136" + } + }, + "functionReturnParameters": 6630, + "id": 6649, + "nodeType": "Return", + "src": "8942:21:20" + } + ] + }, + "documentation": { + "id": 6624, + "nodeType": "StructuredDocumentation", + "src": "8467:280:20", + "text": " @dev Returns the downcasted uint136 from uint256, reverting on\n overflow (when the input is greater than largest uint136).\n Counterpart to Solidity's `uint136` operator.\n Requirements:\n - input must fit into 136 bits" + }, + "id": 6651, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint136", + "nameLocation": "8761:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6627, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6626, + "mutability": "mutable", + "name": "value", + "nameLocation": "8779:5:20", + "nodeType": "VariableDeclaration", + "scope": 6651, + "src": "8771:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6625, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8771:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8770:15:20" + }, + "returnParameters": { + "id": 6630, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6629, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6651, + "src": "8809:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint136", + "typeString": "uint136" + }, + "typeName": { + "id": 6628, + "name": "uint136", + "nodeType": "ElementaryTypeName", + "src": "8809:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint136", + "typeString": "uint136" + } + }, + "visibility": "internal" + } + ], + "src": "8808:9:20" + }, + "scope": 7969, + "src": "8752:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6678, + "nodeType": "Block", + "src": "9327:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6659, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "9341:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9354:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6661, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9354:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + } + ], + "id": 6660, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "9349:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9349:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint128", + "typeString": "type(uint128)" + } + }, + "id": 6664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "9363:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "9349:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "9341:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6672, + "nodeType": "IfStatement", + "src": "9337:105:20", + "trueBody": { + "id": 6671, + "nodeType": "Block", + "src": "9368:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313238", + "id": 6667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9420:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + { + "id": 6668, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "9425:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6666, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "9389:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9389:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6670, + "nodeType": "RevertStatement", + "src": "9382:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6675, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "9466:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9458:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6673, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9458:7:20", + "typeDescriptions": {} + } + }, + "id": 6676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9458:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "functionReturnParameters": 6658, + "id": 6677, + "nodeType": "Return", + "src": "9451:21:20" + } + ] + }, + "documentation": { + "id": 6652, + "nodeType": "StructuredDocumentation", + "src": "8976:280:20", + "text": " @dev Returns the downcasted uint128 from uint256, reverting on\n overflow (when the input is greater than largest uint128).\n Counterpart to Solidity's `uint128` operator.\n Requirements:\n - input must fit into 128 bits" + }, + "id": 6679, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint128", + "nameLocation": "9270:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6655, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6654, + "mutability": "mutable", + "name": "value", + "nameLocation": "9288:5:20", + "nodeType": "VariableDeclaration", + "scope": 6679, + "src": "9280:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6653, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9280:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9279:15:20" + }, + "returnParameters": { + "id": 6658, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6657, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6679, + "src": "9318:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 6656, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9318:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "9317:9:20" + }, + "scope": 7969, + "src": "9261:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6706, + "nodeType": "Block", + "src": "9836:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6687, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6682, + "src": "9850:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9863:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint120_$", + "typeString": "type(uint120)" + }, + "typeName": { + "id": 6689, + "name": "uint120", + "nodeType": "ElementaryTypeName", + "src": "9863:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint120_$", + "typeString": "type(uint120)" + } + ], + "id": 6688, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "9858:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9858:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint120", + "typeString": "type(uint120)" + } + }, + "id": 6692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "9872:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "9858:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint120", + "typeString": "uint120" + } + }, + "src": "9850:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6700, + "nodeType": "IfStatement", + "src": "9846:105:20", + "trueBody": { + "id": 6699, + "nodeType": "Block", + "src": "9877:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313230", + "id": 6695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9929:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + "value": "120" + }, + { + "id": 6696, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6682, + "src": "9934:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6694, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "9898:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9898:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6698, + "nodeType": "RevertStatement", + "src": "9891:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6703, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6682, + "src": "9975:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9967:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint120_$", + "typeString": "type(uint120)" + }, + "typeName": { + "id": 6701, + "name": "uint120", + "nodeType": "ElementaryTypeName", + "src": "9967:7:20", + "typeDescriptions": {} + } + }, + "id": 6704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9967:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint120", + "typeString": "uint120" + } + }, + "functionReturnParameters": 6686, + "id": 6705, + "nodeType": "Return", + "src": "9960:21:20" + } + ] + }, + "documentation": { + "id": 6680, + "nodeType": "StructuredDocumentation", + "src": "9485:280:20", + "text": " @dev Returns the downcasted uint120 from uint256, reverting on\n overflow (when the input is greater than largest uint120).\n Counterpart to Solidity's `uint120` operator.\n Requirements:\n - input must fit into 120 bits" + }, + "id": 6707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint120", + "nameLocation": "9779:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6683, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6682, + "mutability": "mutable", + "name": "value", + "nameLocation": "9797:5:20", + "nodeType": "VariableDeclaration", + "scope": 6707, + "src": "9789:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6681, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9789:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9788:15:20" + }, + "returnParameters": { + "id": 6686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6685, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6707, + "src": "9827:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint120", + "typeString": "uint120" + }, + "typeName": { + "id": 6684, + "name": "uint120", + "nodeType": "ElementaryTypeName", + "src": "9827:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint120", + "typeString": "uint120" + } + }, + "visibility": "internal" + } + ], + "src": "9826:9:20" + }, + "scope": 7969, + "src": "9770:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6734, + "nodeType": "Block", + "src": "10345:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6715, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6710, + "src": "10359:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10372:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint112_$", + "typeString": "type(uint112)" + }, + "typeName": { + "id": 6717, + "name": "uint112", + "nodeType": "ElementaryTypeName", + "src": "10372:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint112_$", + "typeString": "type(uint112)" + } + ], + "id": 6716, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "10367:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6719, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10367:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint112", + "typeString": "type(uint112)" + } + }, + "id": 6720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10381:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "10367:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint112", + "typeString": "uint112" + } + }, + "src": "10359:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6728, + "nodeType": "IfStatement", + "src": "10355:105:20", + "trueBody": { + "id": 6727, + "nodeType": "Block", + "src": "10386:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313132", + "id": 6723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10438:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + "value": "112" + }, + { + "id": 6724, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6710, + "src": "10443:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6722, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "10407:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10407:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6726, + "nodeType": "RevertStatement", + "src": "10400:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6731, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6710, + "src": "10484:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10476:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint112_$", + "typeString": "type(uint112)" + }, + "typeName": { + "id": 6729, + "name": "uint112", + "nodeType": "ElementaryTypeName", + "src": "10476:7:20", + "typeDescriptions": {} + } + }, + "id": 6732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10476:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint112", + "typeString": "uint112" + } + }, + "functionReturnParameters": 6714, + "id": 6733, + "nodeType": "Return", + "src": "10469:21:20" + } + ] + }, + "documentation": { + "id": 6708, + "nodeType": "StructuredDocumentation", + "src": "9994:280:20", + "text": " @dev Returns the downcasted uint112 from uint256, reverting on\n overflow (when the input is greater than largest uint112).\n Counterpart to Solidity's `uint112` operator.\n Requirements:\n - input must fit into 112 bits" + }, + "id": 6735, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint112", + "nameLocation": "10288:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6710, + "mutability": "mutable", + "name": "value", + "nameLocation": "10306:5:20", + "nodeType": "VariableDeclaration", + "scope": 6735, + "src": "10298:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10298:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10297:15:20" + }, + "returnParameters": { + "id": 6714, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6713, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6735, + "src": "10336:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint112", + "typeString": "uint112" + }, + "typeName": { + "id": 6712, + "name": "uint112", + "nodeType": "ElementaryTypeName", + "src": "10336:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint112", + "typeString": "uint112" + } + }, + "visibility": "internal" + } + ], + "src": "10335:9:20" + }, + "scope": 7969, + "src": "10279:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6762, + "nodeType": "Block", + "src": "10854:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6743, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6738, + "src": "10868:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10881:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint104_$", + "typeString": "type(uint104)" + }, + "typeName": { + "id": 6745, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "10881:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint104_$", + "typeString": "type(uint104)" + } + ], + "id": 6744, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "10876:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10876:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint104", + "typeString": "type(uint104)" + } + }, + "id": 6748, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10890:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "10876:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "src": "10868:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6756, + "nodeType": "IfStatement", + "src": "10864:105:20", + "trueBody": { + "id": 6755, + "nodeType": "Block", + "src": "10895:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313034", + "id": 6751, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10947:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + "value": "104" + }, + { + "id": 6752, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6738, + "src": "10952:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6750, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "10916:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10916:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6754, + "nodeType": "RevertStatement", + "src": "10909:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6759, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6738, + "src": "10993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10985:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint104_$", + "typeString": "type(uint104)" + }, + "typeName": { + "id": 6757, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "10985:7:20", + "typeDescriptions": {} + } + }, + "id": 6760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10985:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "functionReturnParameters": 6742, + "id": 6761, + "nodeType": "Return", + "src": "10978:21:20" + } + ] + }, + "documentation": { + "id": 6736, + "nodeType": "StructuredDocumentation", + "src": "10503:280:20", + "text": " @dev Returns the downcasted uint104 from uint256, reverting on\n overflow (when the input is greater than largest uint104).\n Counterpart to Solidity's `uint104` operator.\n Requirements:\n - input must fit into 104 bits" + }, + "id": 6763, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint104", + "nameLocation": "10797:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6738, + "mutability": "mutable", + "name": "value", + "nameLocation": "10815:5:20", + "nodeType": "VariableDeclaration", + "scope": 6763, + "src": "10807:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6737, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10807:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10806:15:20" + }, + "returnParameters": { + "id": 6742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6741, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6763, + "src": "10845:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 6740, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "10845:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "visibility": "internal" + } + ], + "src": "10844:9:20" + }, + "scope": 7969, + "src": "10788:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6790, + "nodeType": "Block", + "src": "11357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6771, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6766, + "src": "11371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint96_$", + "typeString": "type(uint96)" + }, + "typeName": { + "id": 6773, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "11384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint96_$", + "typeString": "type(uint96)" + } + ], + "id": 6772, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "11379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint96", + "typeString": "type(uint96)" + } + }, + "id": 6776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "11379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "src": "11371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6784, + "nodeType": "IfStatement", + "src": "11367:103:20", + "trueBody": { + "id": 6783, + "nodeType": "Block", + "src": "11397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3936", + "id": 6779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + { + "id": 6780, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6766, + "src": "11453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6778, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "11418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6782, + "nodeType": "RevertStatement", + "src": "11411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6787, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6766, + "src": "11493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint96_$", + "typeString": "type(uint96)" + }, + "typeName": { + "id": 6785, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "11486:6:20", + "typeDescriptions": {} + } + }, + "id": 6788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "functionReturnParameters": 6770, + "id": 6789, + "nodeType": "Return", + "src": "11479:20:20" + } + ] + }, + "documentation": { + "id": 6764, + "nodeType": "StructuredDocumentation", + "src": "11012:276:20", + "text": " @dev Returns the downcasted uint96 from uint256, reverting on\n overflow (when the input is greater than largest uint96).\n Counterpart to Solidity's `uint96` operator.\n Requirements:\n - input must fit into 96 bits" + }, + "id": 6791, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint96", + "nameLocation": "11302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6766, + "mutability": "mutable", + "name": "value", + "nameLocation": "11319:5:20", + "nodeType": "VariableDeclaration", + "scope": 6791, + "src": "11311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6765, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11310:15:20" + }, + "returnParameters": { + "id": 6770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6769, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6791, + "src": "11349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + }, + "typeName": { + "id": 6768, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "11349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "visibility": "internal" + } + ], + "src": "11348:8:20" + }, + "scope": 7969, + "src": "11293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6818, + "nodeType": "Block", + "src": "11857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6799, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "11871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint88_$", + "typeString": "type(uint88)" + }, + "typeName": { + "id": 6801, + "name": "uint88", + "nodeType": "ElementaryTypeName", + "src": "11884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint88_$", + "typeString": "type(uint88)" + } + ], + "id": 6800, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "11879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint88", + "typeString": "type(uint88)" + } + }, + "id": 6804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "11879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint88", + "typeString": "uint88" + } + }, + "src": "11871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6812, + "nodeType": "IfStatement", + "src": "11867:103:20", + "trueBody": { + "id": 6811, + "nodeType": "Block", + "src": "11897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3838", + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + "value": "88" + }, + { + "id": 6808, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "11953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6806, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "11918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6810, + "nodeType": "RevertStatement", + "src": "11911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6815, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "11993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint88_$", + "typeString": "type(uint88)" + }, + "typeName": { + "id": 6813, + "name": "uint88", + "nodeType": "ElementaryTypeName", + "src": "11986:6:20", + "typeDescriptions": {} + } + }, + "id": 6816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint88", + "typeString": "uint88" + } + }, + "functionReturnParameters": 6798, + "id": 6817, + "nodeType": "Return", + "src": "11979:20:20" + } + ] + }, + "documentation": { + "id": 6792, + "nodeType": "StructuredDocumentation", + "src": "11512:276:20", + "text": " @dev Returns the downcasted uint88 from uint256, reverting on\n overflow (when the input is greater than largest uint88).\n Counterpart to Solidity's `uint88` operator.\n Requirements:\n - input must fit into 88 bits" + }, + "id": 6819, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint88", + "nameLocation": "11802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6795, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6794, + "mutability": "mutable", + "name": "value", + "nameLocation": "11819:5:20", + "nodeType": "VariableDeclaration", + "scope": 6819, + "src": "11811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6793, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11810:15:20" + }, + "returnParameters": { + "id": 6798, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6797, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6819, + "src": "11849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint88", + "typeString": "uint88" + }, + "typeName": { + "id": 6796, + "name": "uint88", + "nodeType": "ElementaryTypeName", + "src": "11849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint88", + "typeString": "uint88" + } + }, + "visibility": "internal" + } + ], + "src": "11848:8:20" + }, + "scope": 7969, + "src": "11793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6846, + "nodeType": "Block", + "src": "12357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6827, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6822, + "src": "12371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6830, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint80_$", + "typeString": "type(uint80)" + }, + "typeName": { + "id": 6829, + "name": "uint80", + "nodeType": "ElementaryTypeName", + "src": "12384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint80_$", + "typeString": "type(uint80)" + } + ], + "id": 6828, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "12379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint80", + "typeString": "type(uint80)" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "12379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint80", + "typeString": "uint80" + } + }, + "src": "12371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6840, + "nodeType": "IfStatement", + "src": "12367:103:20", + "trueBody": { + "id": 6839, + "nodeType": "Block", + "src": "12397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3830", + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + "value": "80" + }, + { + "id": 6836, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6822, + "src": "12453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6834, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "12418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6838, + "nodeType": "RevertStatement", + "src": "12411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6843, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6822, + "src": "12493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint80_$", + "typeString": "type(uint80)" + }, + "typeName": { + "id": 6841, + "name": "uint80", + "nodeType": "ElementaryTypeName", + "src": "12486:6:20", + "typeDescriptions": {} + } + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint80", + "typeString": "uint80" + } + }, + "functionReturnParameters": 6826, + "id": 6845, + "nodeType": "Return", + "src": "12479:20:20" + } + ] + }, + "documentation": { + "id": 6820, + "nodeType": "StructuredDocumentation", + "src": "12012:276:20", + "text": " @dev Returns the downcasted uint80 from uint256, reverting on\n overflow (when the input is greater than largest uint80).\n Counterpart to Solidity's `uint80` operator.\n Requirements:\n - input must fit into 80 bits" + }, + "id": 6847, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint80", + "nameLocation": "12302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6823, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6822, + "mutability": "mutable", + "name": "value", + "nameLocation": "12319:5:20", + "nodeType": "VariableDeclaration", + "scope": 6847, + "src": "12311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6821, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12310:15:20" + }, + "returnParameters": { + "id": 6826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6825, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6847, + "src": "12349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint80", + "typeString": "uint80" + }, + "typeName": { + "id": 6824, + "name": "uint80", + "nodeType": "ElementaryTypeName", + "src": "12349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint80", + "typeString": "uint80" + } + }, + "visibility": "internal" + } + ], + "src": "12348:8:20" + }, + "scope": 7969, + "src": "12293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6874, + "nodeType": "Block", + "src": "12857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6855, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6850, + "src": "12871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 6857, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "12884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + } + ], + "id": 6856, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "12879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint72", + "typeString": "type(uint72)" + } + }, + "id": 6860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "12879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "src": "12871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6868, + "nodeType": "IfStatement", + "src": "12867:103:20", + "trueBody": { + "id": 6867, + "nodeType": "Block", + "src": "12897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3732", + "id": 6863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + "value": "72" + }, + { + "id": 6864, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6850, + "src": "12953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6862, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "12918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6866, + "nodeType": "RevertStatement", + "src": "12911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6871, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6850, + "src": "12993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 6869, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "12986:6:20", + "typeDescriptions": {} + } + }, + "id": 6872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "functionReturnParameters": 6854, + "id": 6873, + "nodeType": "Return", + "src": "12979:20:20" + } + ] + }, + "documentation": { + "id": 6848, + "nodeType": "StructuredDocumentation", + "src": "12512:276:20", + "text": " @dev Returns the downcasted uint72 from uint256, reverting on\n overflow (when the input is greater than largest uint72).\n Counterpart to Solidity's `uint72` operator.\n Requirements:\n - input must fit into 72 bits" + }, + "id": 6875, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint72", + "nameLocation": "12802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6851, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6850, + "mutability": "mutable", + "name": "value", + "nameLocation": "12819:5:20", + "nodeType": "VariableDeclaration", + "scope": 6875, + "src": "12811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6849, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12810:15:20" + }, + "returnParameters": { + "id": 6854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6853, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6875, + "src": "12849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "typeName": { + "id": 6852, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "12849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "visibility": "internal" + } + ], + "src": "12848:8:20" + }, + "scope": 7969, + "src": "12793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6902, + "nodeType": "Block", + "src": "13357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6883, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6878, + "src": "13371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 6885, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "13384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + } + ], + "id": 6884, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "13379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint64", + "typeString": "type(uint64)" + } + }, + "id": 6888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "13392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "13379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "13371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6896, + "nodeType": "IfStatement", + "src": "13367:103:20", + "trueBody": { + "id": 6895, + "nodeType": "Block", + "src": "13397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3634", + "id": 6891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + { + "id": 6892, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6878, + "src": "13453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6890, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "13418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6894, + "nodeType": "RevertStatement", + "src": "13411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6899, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6878, + "src": "13493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 6897, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "13486:6:20", + "typeDescriptions": {} + } + }, + "id": 6900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 6882, + "id": 6901, + "nodeType": "Return", + "src": "13479:20:20" + } + ] + }, + "documentation": { + "id": 6876, + "nodeType": "StructuredDocumentation", + "src": "13012:276:20", + "text": " @dev Returns the downcasted uint64 from uint256, reverting on\n overflow (when the input is greater than largest uint64).\n Counterpart to Solidity's `uint64` operator.\n Requirements:\n - input must fit into 64 bits" + }, + "id": 6903, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint64", + "nameLocation": "13302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6878, + "mutability": "mutable", + "name": "value", + "nameLocation": "13319:5:20", + "nodeType": "VariableDeclaration", + "scope": 6903, + "src": "13311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6877, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13310:15:20" + }, + "returnParameters": { + "id": 6882, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6881, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6903, + "src": "13349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6880, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "13349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "13348:8:20" + }, + "scope": 7969, + "src": "13293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6930, + "nodeType": "Block", + "src": "13857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6911, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6914, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint56_$", + "typeString": "type(uint56)" + }, + "typeName": { + "id": 6913, + "name": "uint56", + "nodeType": "ElementaryTypeName", + "src": "13884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint56_$", + "typeString": "type(uint56)" + } + ], + "id": 6912, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "13879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint56", + "typeString": "type(uint56)" + } + }, + "id": 6916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "13892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "13879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint56", + "typeString": "uint56" + } + }, + "src": "13871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6924, + "nodeType": "IfStatement", + "src": "13867:103:20", + "trueBody": { + "id": 6923, + "nodeType": "Block", + "src": "13897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3536", + "id": 6919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + "value": "56" + }, + { + "id": 6920, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6918, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "13918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6922, + "nodeType": "RevertStatement", + "src": "13911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6927, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint56_$", + "typeString": "type(uint56)" + }, + "typeName": { + "id": 6925, + "name": "uint56", + "nodeType": "ElementaryTypeName", + "src": "13986:6:20", + "typeDescriptions": {} + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint56", + "typeString": "uint56" + } + }, + "functionReturnParameters": 6910, + "id": 6929, + "nodeType": "Return", + "src": "13979:20:20" + } + ] + }, + "documentation": { + "id": 6904, + "nodeType": "StructuredDocumentation", + "src": "13512:276:20", + "text": " @dev Returns the downcasted uint56 from uint256, reverting on\n overflow (when the input is greater than largest uint56).\n Counterpart to Solidity's `uint56` operator.\n Requirements:\n - input must fit into 56 bits" + }, + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint56", + "nameLocation": "13802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6906, + "mutability": "mutable", + "name": "value", + "nameLocation": "13819:5:20", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "13811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6905, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13810:15:20" + }, + "returnParameters": { + "id": 6910, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "13849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint56", + "typeString": "uint56" + }, + "typeName": { + "id": 6908, + "name": "uint56", + "nodeType": "ElementaryTypeName", + "src": "13849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint56", + "typeString": "uint56" + } + }, + "visibility": "internal" + } + ], + "src": "13848:8:20" + }, + "scope": 7969, + "src": "13793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6958, + "nodeType": "Block", + "src": "14357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6939, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "14371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + }, + "typeName": { + "id": 6941, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "14384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + } + ], + "id": 6940, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "14379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint48", + "typeString": "type(uint48)" + } + }, + "id": 6944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "14392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "14379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "src": "14371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6952, + "nodeType": "IfStatement", + "src": "14367:103:20", + "trueBody": { + "id": 6951, + "nodeType": "Block", + "src": "14397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3438", + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + { + "id": 6948, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "14453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6946, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "14418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6950, + "nodeType": "RevertStatement", + "src": "14411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6955, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "14493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + }, + "typeName": { + "id": 6953, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "14486:6:20", + "typeDescriptions": {} + } + }, + "id": 6956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "functionReturnParameters": 6938, + "id": 6957, + "nodeType": "Return", + "src": "14479:20:20" + } + ] + }, + "documentation": { + "id": 6932, + "nodeType": "StructuredDocumentation", + "src": "14012:276:20", + "text": " @dev Returns the downcasted uint48 from uint256, reverting on\n overflow (when the input is greater than largest uint48).\n Counterpart to Solidity's `uint48` operator.\n Requirements:\n - input must fit into 48 bits" + }, + "id": 6959, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint48", + "nameLocation": "14302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6934, + "mutability": "mutable", + "name": "value", + "nameLocation": "14319:5:20", + "nodeType": "VariableDeclaration", + "scope": 6959, + "src": "14311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6933, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14310:15:20" + }, + "returnParameters": { + "id": 6938, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6937, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6959, + "src": "14349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + }, + "typeName": { + "id": 6936, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "14349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "visibility": "internal" + } + ], + "src": "14348:8:20" + }, + "scope": 7969, + "src": "14293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6986, + "nodeType": "Block", + "src": "14857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6967, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6962, + "src": "14871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6970, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint40_$", + "typeString": "type(uint40)" + }, + "typeName": { + "id": 6969, + "name": "uint40", + "nodeType": "ElementaryTypeName", + "src": "14884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint40_$", + "typeString": "type(uint40)" + } + ], + "id": 6968, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "14879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint40", + "typeString": "type(uint40)" + } + }, + "id": 6972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "14892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "14879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + }, + "src": "14871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6980, + "nodeType": "IfStatement", + "src": "14867:103:20", + "trueBody": { + "id": 6979, + "nodeType": "Block", + "src": "14897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3430", + "id": 6975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + { + "id": 6976, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6962, + "src": "14953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6974, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "14918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6978, + "nodeType": "RevertStatement", + "src": "14911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6983, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6962, + "src": "14993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6982, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint40_$", + "typeString": "type(uint40)" + }, + "typeName": { + "id": 6981, + "name": "uint40", + "nodeType": "ElementaryTypeName", + "src": "14986:6:20", + "typeDescriptions": {} + } + }, + "id": 6984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + }, + "functionReturnParameters": 6966, + "id": 6985, + "nodeType": "Return", + "src": "14979:20:20" + } + ] + }, + "documentation": { + "id": 6960, + "nodeType": "StructuredDocumentation", + "src": "14512:276:20", + "text": " @dev Returns the downcasted uint40 from uint256, reverting on\n overflow (when the input is greater than largest uint40).\n Counterpart to Solidity's `uint40` operator.\n Requirements:\n - input must fit into 40 bits" + }, + "id": 6987, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint40", + "nameLocation": "14802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6963, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6962, + "mutability": "mutable", + "name": "value", + "nameLocation": "14819:5:20", + "nodeType": "VariableDeclaration", + "scope": 6987, + "src": "14811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6961, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14810:15:20" + }, + "returnParameters": { + "id": 6966, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6965, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6987, + "src": "14849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + }, + "typeName": { + "id": 6964, + "name": "uint40", + "nodeType": "ElementaryTypeName", + "src": "14849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + }, + "visibility": "internal" + } + ], + "src": "14848:8:20" + }, + "scope": 7969, + "src": "14793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7014, + "nodeType": "Block", + "src": "15357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6995, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6990, + "src": "15371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 6997, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + } + ], + "id": 6996, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "15379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint32", + "typeString": "type(uint32)" + } + }, + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "15392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "15379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "15371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7008, + "nodeType": "IfStatement", + "src": "15367:103:20", + "trueBody": { + "id": 7007, + "nodeType": "Block", + "src": "15397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3332", + "id": 7003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + { + "id": 7004, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6990, + "src": "15453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7002, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "15418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 7005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7006, + "nodeType": "RevertStatement", + "src": "15411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7011, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6990, + "src": "15493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 7009, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15486:6:20", + "typeDescriptions": {} + } + }, + "id": 7012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "functionReturnParameters": 6994, + "id": 7013, + "nodeType": "Return", + "src": "15479:20:20" + } + ] + }, + "documentation": { + "id": 6988, + "nodeType": "StructuredDocumentation", + "src": "15012:276:20", + "text": " @dev Returns the downcasted uint32 from uint256, reverting on\n overflow (when the input is greater than largest uint32).\n Counterpart to Solidity's `uint32` operator.\n Requirements:\n - input must fit into 32 bits" + }, + "id": 7015, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint32", + "nameLocation": "15302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6990, + "mutability": "mutable", + "name": "value", + "nameLocation": "15319:5:20", + "nodeType": "VariableDeclaration", + "scope": 7015, + "src": "15311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6989, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15310:15:20" + }, + "returnParameters": { + "id": 6994, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6993, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7015, + "src": "15349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 6992, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "src": "15348:8:20" + }, + "scope": 7969, + "src": "15293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7042, + "nodeType": "Block", + "src": "15857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7023, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "15871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 7026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint24_$", + "typeString": "type(uint24)" + }, + "typeName": { + "id": 7025, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "15884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint24_$", + "typeString": "type(uint24)" + } + ], + "id": 7024, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "15879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint24", + "typeString": "type(uint24)" + } + }, + "id": 7028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "15892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "15879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "src": "15871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7036, + "nodeType": "IfStatement", + "src": "15867:103:20", + "trueBody": { + "id": 7035, + "nodeType": "Block", + "src": "15897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3234", + "id": 7031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + "value": "24" + }, + { + "id": 7032, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "15953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7030, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "15918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 7033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7034, + "nodeType": "RevertStatement", + "src": "15911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7039, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "15993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint24_$", + "typeString": "type(uint24)" + }, + "typeName": { + "id": 7037, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "15986:6:20", + "typeDescriptions": {} + } + }, + "id": 7040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "functionReturnParameters": 7022, + "id": 7041, + "nodeType": "Return", + "src": "15979:20:20" + } + ] + }, + "documentation": { + "id": 7016, + "nodeType": "StructuredDocumentation", + "src": "15512:276:20", + "text": " @dev Returns the downcasted uint24 from uint256, reverting on\n overflow (when the input is greater than largest uint24).\n Counterpart to Solidity's `uint24` operator.\n Requirements:\n - input must fit into 24 bits" + }, + "id": 7043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint24", + "nameLocation": "15802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7018, + "mutability": "mutable", + "name": "value", + "nameLocation": "15819:5:20", + "nodeType": "VariableDeclaration", + "scope": 7043, + "src": "15811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15810:15:20" + }, + "returnParameters": { + "id": 7022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7021, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7043, + "src": "15849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + }, + "typeName": { + "id": 7020, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "15849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "visibility": "internal" + } + ], + "src": "15848:8:20" + }, + "scope": 7969, + "src": "15793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7070, + "nodeType": "Block", + "src": "16357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7051, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7046, + "src": "16371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 7054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 7053, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "16384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + } + ], + "id": 7052, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "16379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint16", + "typeString": "type(uint16)" + } + }, + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "16392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "16379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "16371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7064, + "nodeType": "IfStatement", + "src": "16367:103:20", + "trueBody": { + "id": 7063, + "nodeType": "Block", + "src": "16397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3136", + "id": 7059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + { + "id": 7060, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7046, + "src": "16453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7058, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "16418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 7061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7062, + "nodeType": "RevertStatement", + "src": "16411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7067, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7046, + "src": "16493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 7065, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "16486:6:20", + "typeDescriptions": {} + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 7050, + "id": 7069, + "nodeType": "Return", + "src": "16479:20:20" + } + ] + }, + "documentation": { + "id": 7044, + "nodeType": "StructuredDocumentation", + "src": "16012:276:20", + "text": " @dev Returns the downcasted uint16 from uint256, reverting on\n overflow (when the input is greater than largest uint16).\n Counterpart to Solidity's `uint16` operator.\n Requirements:\n - input must fit into 16 bits" + }, + "id": 7071, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint16", + "nameLocation": "16302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7046, + "mutability": "mutable", + "name": "value", + "nameLocation": "16319:5:20", + "nodeType": "VariableDeclaration", + "scope": 7071, + "src": "16311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16310:15:20" + }, + "returnParameters": { + "id": 7050, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7049, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7071, + "src": "16349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 7048, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "16349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "visibility": "internal" + } + ], + "src": "16348:8:20" + }, + "scope": 7969, + "src": "16293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7098, + "nodeType": "Block", + "src": "16851:146:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7079, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7074, + "src": "16865:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 7082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16878:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 7081, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16878:5:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + } + ], + "id": 7080, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "16873:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16873:11:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint8", + "typeString": "type(uint8)" + } + }, + "id": 7084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "16885:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "16873:15:20", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16865:23:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7092, + "nodeType": "IfStatement", + "src": "16861:101:20", + "trueBody": { + "id": 7091, + "nodeType": "Block", + "src": "16890:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "38", + "id": 7087, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16942:1:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + { + "id": 7088, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7074, + "src": "16945:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7086, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "16911:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 7089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16911:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7090, + "nodeType": "RevertStatement", + "src": "16904:47:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7095, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7074, + "src": "16984:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16978:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 7093, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16978:5:20", + "typeDescriptions": {} + } + }, + "id": 7096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16978:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 7078, + "id": 7097, + "nodeType": "Return", + "src": "16971:19:20" + } + ] + }, + "documentation": { + "id": 7072, + "nodeType": "StructuredDocumentation", + "src": "16512:272:20", + "text": " @dev Returns the downcasted uint8 from uint256, reverting on\n overflow (when the input is greater than largest uint8).\n Counterpart to Solidity's `uint8` operator.\n Requirements:\n - input must fit into 8 bits" + }, + "id": 7099, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint8", + "nameLocation": "16798:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7074, + "mutability": "mutable", + "name": "value", + "nameLocation": "16814:5:20", + "nodeType": "VariableDeclaration", + "scope": 7099, + "src": "16806:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16806:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16805:15:20" + }, + "returnParameters": { + "id": 7078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7077, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7099, + "src": "16844:5:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7076, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16844:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "16843:7:20" + }, + "scope": 7969, + "src": "16789:208:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7121, + "nodeType": "Block", + "src": "17233:128:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7107, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7102, + "src": "17247:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "30", + "id": 7108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17255:1:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17247:9:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7115, + "nodeType": "IfStatement", + "src": "17243:81:20", + "trueBody": { + "id": 7114, + "nodeType": "Block", + "src": "17258:66:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 7111, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7102, + "src": "17307:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7110, + "name": "SafeCastOverflowedIntToUint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "17279:27:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_int256_$returns$_t_error_$", + "typeString": "function (int256) pure returns (error)" + } + }, + "id": 7112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17279:34:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7113, + "nodeType": "RevertStatement", + "src": "17272:41:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7118, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7102, + "src": "17348:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17340:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 7116, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17340:7:20", + "typeDescriptions": {} + } + }, + "id": 7119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17340:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7106, + "id": 7120, + "nodeType": "Return", + "src": "17333:21:20" + } + ] + }, + "documentation": { + "id": 7100, + "nodeType": "StructuredDocumentation", + "src": "17003:160:20", + "text": " @dev Converts a signed int256 into an unsigned uint256.\n Requirements:\n - input must be greater than or equal to 0." + }, + "id": 7122, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint256", + "nameLocation": "17177:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7102, + "mutability": "mutable", + "name": "value", + "nameLocation": "17194:5:20", + "nodeType": "VariableDeclaration", + "scope": 7122, + "src": "17187:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7101, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "17187:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "17186:14:20" + }, + "returnParameters": { + "id": 7106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7105, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7122, + "src": "17224:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7104, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17224:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17223:9:20" + }, + "scope": 7969, + "src": "17168:193:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7147, + "nodeType": "Block", + "src": "17758:150:20", + "statements": [ + { + "expression": { + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7130, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7128, + "src": "17768:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7133, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7125, + "src": "17788:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17781:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int248_$", + "typeString": "type(int248)" + }, + "typeName": { + "id": 7131, + "name": "int248", + "nodeType": "ElementaryTypeName", + "src": "17781:6:20", + "typeDescriptions": {} + } + }, + "id": 7134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17781:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "src": "17768:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "id": 7136, + "nodeType": "ExpressionStatement", + "src": "17768:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7137, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7128, + "src": "17808:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7138, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7125, + "src": "17822:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "17808:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7146, + "nodeType": "IfStatement", + "src": "17804:98:20", + "trueBody": { + "id": 7145, + "nodeType": "Block", + "src": "17829:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323438", + "id": 7141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17880:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_248_by_1", + "typeString": "int_const 248" + }, + "value": "248" + }, + { + "id": 7142, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7125, + "src": "17885:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_248_by_1", + "typeString": "int_const 248" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7140, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "17850:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17850:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7144, + "nodeType": "RevertStatement", + "src": "17843:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7123, + "nodeType": "StructuredDocumentation", + "src": "17367:312:20", + "text": " @dev Returns the downcasted int248 from int256, reverting on\n overflow (when the input is less than smallest int248 or\n greater than largest int248).\n Counterpart to Solidity's `int248` operator.\n Requirements:\n - input must fit into 248 bits" + }, + "id": 7148, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt248", + "nameLocation": "17693:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7125, + "mutability": "mutable", + "name": "value", + "nameLocation": "17709:5:20", + "nodeType": "VariableDeclaration", + "scope": 7148, + "src": "17702:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7124, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "17702:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "17701:14:20" + }, + "returnParameters": { + "id": 7129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7128, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "17746:10:20", + "nodeType": "VariableDeclaration", + "scope": 7148, + "src": "17739:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + }, + "typeName": { + "id": 7127, + "name": "int248", + "nodeType": "ElementaryTypeName", + "src": "17739:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "visibility": "internal" + } + ], + "src": "17738:19:20" + }, + "scope": 7969, + "src": "17684:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7173, + "nodeType": "Block", + "src": "18305:150:20", + "statements": [ + { + "expression": { + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7156, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7154, + "src": "18315:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7159, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7151, + "src": "18335:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18328:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int240_$", + "typeString": "type(int240)" + }, + "typeName": { + "id": 7157, + "name": "int240", + "nodeType": "ElementaryTypeName", + "src": "18328:6:20", + "typeDescriptions": {} + } + }, + "id": 7160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18328:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "src": "18315:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "id": 7162, + "nodeType": "ExpressionStatement", + "src": "18315:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7163, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7154, + "src": "18355:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7164, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7151, + "src": "18369:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "18355:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7172, + "nodeType": "IfStatement", + "src": "18351:98:20", + "trueBody": { + "id": 7171, + "nodeType": "Block", + "src": "18376:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323430", + "id": 7167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18427:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_240_by_1", + "typeString": "int_const 240" + }, + "value": "240" + }, + { + "id": 7168, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7151, + "src": "18432:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_240_by_1", + "typeString": "int_const 240" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7166, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "18397:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18397:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7170, + "nodeType": "RevertStatement", + "src": "18390:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7149, + "nodeType": "StructuredDocumentation", + "src": "17914:312:20", + "text": " @dev Returns the downcasted int240 from int256, reverting on\n overflow (when the input is less than smallest int240 or\n greater than largest int240).\n Counterpart to Solidity's `int240` operator.\n Requirements:\n - input must fit into 240 bits" + }, + "id": 7174, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt240", + "nameLocation": "18240:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7151, + "mutability": "mutable", + "name": "value", + "nameLocation": "18256:5:20", + "nodeType": "VariableDeclaration", + "scope": 7174, + "src": "18249:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7150, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "18249:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "18248:14:20" + }, + "returnParameters": { + "id": 7155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7154, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "18293:10:20", + "nodeType": "VariableDeclaration", + "scope": 7174, + "src": "18286:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + }, + "typeName": { + "id": 7153, + "name": "int240", + "nodeType": "ElementaryTypeName", + "src": "18286:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "visibility": "internal" + } + ], + "src": "18285:19:20" + }, + "scope": 7969, + "src": "18231:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7199, + "nodeType": "Block", + "src": "18852:150:20", + "statements": [ + { + "expression": { + "id": 7187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7182, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7180, + "src": "18862:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7185, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7177, + "src": "18882:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18875:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int232_$", + "typeString": "type(int232)" + }, + "typeName": { + "id": 7183, + "name": "int232", + "nodeType": "ElementaryTypeName", + "src": "18875:6:20", + "typeDescriptions": {} + } + }, + "id": 7186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18875:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "src": "18862:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "id": 7188, + "nodeType": "ExpressionStatement", + "src": "18862:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7189, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7180, + "src": "18902:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7190, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7177, + "src": "18916:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "18902:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7198, + "nodeType": "IfStatement", + "src": "18898:98:20", + "trueBody": { + "id": 7197, + "nodeType": "Block", + "src": "18923:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323332", + "id": 7193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18974:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_232_by_1", + "typeString": "int_const 232" + }, + "value": "232" + }, + { + "id": 7194, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7177, + "src": "18979:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_232_by_1", + "typeString": "int_const 232" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7192, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "18944:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18944:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7196, + "nodeType": "RevertStatement", + "src": "18937:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7175, + "nodeType": "StructuredDocumentation", + "src": "18461:312:20", + "text": " @dev Returns the downcasted int232 from int256, reverting on\n overflow (when the input is less than smallest int232 or\n greater than largest int232).\n Counterpart to Solidity's `int232` operator.\n Requirements:\n - input must fit into 232 bits" + }, + "id": 7200, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt232", + "nameLocation": "18787:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7177, + "mutability": "mutable", + "name": "value", + "nameLocation": "18803:5:20", + "nodeType": "VariableDeclaration", + "scope": 7200, + "src": "18796:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7176, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "18796:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "18795:14:20" + }, + "returnParameters": { + "id": 7181, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7180, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "18840:10:20", + "nodeType": "VariableDeclaration", + "scope": 7200, + "src": "18833:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + }, + "typeName": { + "id": 7179, + "name": "int232", + "nodeType": "ElementaryTypeName", + "src": "18833:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "visibility": "internal" + } + ], + "src": "18832:19:20" + }, + "scope": 7969, + "src": "18778:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7225, + "nodeType": "Block", + "src": "19399:150:20", + "statements": [ + { + "expression": { + "id": 7213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7208, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7206, + "src": "19409:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7211, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7203, + "src": "19429:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "19422:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int224_$", + "typeString": "type(int224)" + }, + "typeName": { + "id": 7209, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "19422:6:20", + "typeDescriptions": {} + } + }, + "id": 7212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19422:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "src": "19409:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "id": 7214, + "nodeType": "ExpressionStatement", + "src": "19409:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7215, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7206, + "src": "19449:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7216, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7203, + "src": "19463:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "19449:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7224, + "nodeType": "IfStatement", + "src": "19445:98:20", + "trueBody": { + "id": 7223, + "nodeType": "Block", + "src": "19470:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323234", + "id": 7219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19521:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_224_by_1", + "typeString": "int_const 224" + }, + "value": "224" + }, + { + "id": 7220, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7203, + "src": "19526:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_224_by_1", + "typeString": "int_const 224" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7218, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "19491:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19491:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7222, + "nodeType": "RevertStatement", + "src": "19484:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7201, + "nodeType": "StructuredDocumentation", + "src": "19008:312:20", + "text": " @dev Returns the downcasted int224 from int256, reverting on\n overflow (when the input is less than smallest int224 or\n greater than largest int224).\n Counterpart to Solidity's `int224` operator.\n Requirements:\n - input must fit into 224 bits" + }, + "id": 7226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt224", + "nameLocation": "19334:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7203, + "mutability": "mutable", + "name": "value", + "nameLocation": "19350:5:20", + "nodeType": "VariableDeclaration", + "scope": 7226, + "src": "19343:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7202, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "19343:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "19342:14:20" + }, + "returnParameters": { + "id": 7207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7206, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "19387:10:20", + "nodeType": "VariableDeclaration", + "scope": 7226, + "src": "19380:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 7205, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "19380:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "visibility": "internal" + } + ], + "src": "19379:19:20" + }, + "scope": 7969, + "src": "19325:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7251, + "nodeType": "Block", + "src": "19946:150:20", + "statements": [ + { + "expression": { + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7234, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7232, + "src": "19956:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7237, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7229, + "src": "19976:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "19969:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int216_$", + "typeString": "type(int216)" + }, + "typeName": { + "id": 7235, + "name": "int216", + "nodeType": "ElementaryTypeName", + "src": "19969:6:20", + "typeDescriptions": {} + } + }, + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19969:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "src": "19956:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "id": 7240, + "nodeType": "ExpressionStatement", + "src": "19956:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7241, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7232, + "src": "19996:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7242, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7229, + "src": "20010:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "19996:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7250, + "nodeType": "IfStatement", + "src": "19992:98:20", + "trueBody": { + "id": 7249, + "nodeType": "Block", + "src": "20017:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323136", + "id": 7245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20068:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_216_by_1", + "typeString": "int_const 216" + }, + "value": "216" + }, + { + "id": 7246, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7229, + "src": "20073:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_216_by_1", + "typeString": "int_const 216" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7244, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "20038:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20038:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7248, + "nodeType": "RevertStatement", + "src": "20031:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7227, + "nodeType": "StructuredDocumentation", + "src": "19555:312:20", + "text": " @dev Returns the downcasted int216 from int256, reverting on\n overflow (when the input is less than smallest int216 or\n greater than largest int216).\n Counterpart to Solidity's `int216` operator.\n Requirements:\n - input must fit into 216 bits" + }, + "id": 7252, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt216", + "nameLocation": "19881:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7229, + "mutability": "mutable", + "name": "value", + "nameLocation": "19897:5:20", + "nodeType": "VariableDeclaration", + "scope": 7252, + "src": "19890:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7228, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "19890:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "19889:14:20" + }, + "returnParameters": { + "id": 7233, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7232, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "19934:10:20", + "nodeType": "VariableDeclaration", + "scope": 7252, + "src": "19927:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + }, + "typeName": { + "id": 7231, + "name": "int216", + "nodeType": "ElementaryTypeName", + "src": "19927:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "visibility": "internal" + } + ], + "src": "19926:19:20" + }, + "scope": 7969, + "src": "19872:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7277, + "nodeType": "Block", + "src": "20493:150:20", + "statements": [ + { + "expression": { + "id": 7265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7260, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7258, + "src": "20503:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7263, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7255, + "src": "20523:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20516:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int208_$", + "typeString": "type(int208)" + }, + "typeName": { + "id": 7261, + "name": "int208", + "nodeType": "ElementaryTypeName", + "src": "20516:6:20", + "typeDescriptions": {} + } + }, + "id": 7264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20516:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "src": "20503:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "id": 7266, + "nodeType": "ExpressionStatement", + "src": "20503:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7267, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7258, + "src": "20543:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7268, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7255, + "src": "20557:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "20543:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7276, + "nodeType": "IfStatement", + "src": "20539:98:20", + "trueBody": { + "id": 7275, + "nodeType": "Block", + "src": "20564:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323038", + "id": 7271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20615:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_208_by_1", + "typeString": "int_const 208" + }, + "value": "208" + }, + { + "id": 7272, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7255, + "src": "20620:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_208_by_1", + "typeString": "int_const 208" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7270, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "20585:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20585:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7274, + "nodeType": "RevertStatement", + "src": "20578:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7253, + "nodeType": "StructuredDocumentation", + "src": "20102:312:20", + "text": " @dev Returns the downcasted int208 from int256, reverting on\n overflow (when the input is less than smallest int208 or\n greater than largest int208).\n Counterpart to Solidity's `int208` operator.\n Requirements:\n - input must fit into 208 bits" + }, + "id": 7278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt208", + "nameLocation": "20428:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7256, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7255, + "mutability": "mutable", + "name": "value", + "nameLocation": "20444:5:20", + "nodeType": "VariableDeclaration", + "scope": 7278, + "src": "20437:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7254, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "20437:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "20436:14:20" + }, + "returnParameters": { + "id": 7259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7258, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "20481:10:20", + "nodeType": "VariableDeclaration", + "scope": 7278, + "src": "20474:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + }, + "typeName": { + "id": 7257, + "name": "int208", + "nodeType": "ElementaryTypeName", + "src": "20474:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "visibility": "internal" + } + ], + "src": "20473:19:20" + }, + "scope": 7969, + "src": "20419:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7303, + "nodeType": "Block", + "src": "21040:150:20", + "statements": [ + { + "expression": { + "id": 7291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7286, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7284, + "src": "21050:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7289, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7281, + "src": "21070:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21063:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int200_$", + "typeString": "type(int200)" + }, + "typeName": { + "id": 7287, + "name": "int200", + "nodeType": "ElementaryTypeName", + "src": "21063:6:20", + "typeDescriptions": {} + } + }, + "id": 7290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21063:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "src": "21050:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "id": 7292, + "nodeType": "ExpressionStatement", + "src": "21050:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7293, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7284, + "src": "21090:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7294, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7281, + "src": "21104:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "21090:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7302, + "nodeType": "IfStatement", + "src": "21086:98:20", + "trueBody": { + "id": 7301, + "nodeType": "Block", + "src": "21111:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323030", + "id": 7297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21162:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_200_by_1", + "typeString": "int_const 200" + }, + "value": "200" + }, + { + "id": 7298, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7281, + "src": "21167:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_200_by_1", + "typeString": "int_const 200" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7296, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "21132:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21132:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7300, + "nodeType": "RevertStatement", + "src": "21125:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7279, + "nodeType": "StructuredDocumentation", + "src": "20649:312:20", + "text": " @dev Returns the downcasted int200 from int256, reverting on\n overflow (when the input is less than smallest int200 or\n greater than largest int200).\n Counterpart to Solidity's `int200` operator.\n Requirements:\n - input must fit into 200 bits" + }, + "id": 7304, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt200", + "nameLocation": "20975:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7282, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7281, + "mutability": "mutable", + "name": "value", + "nameLocation": "20991:5:20", + "nodeType": "VariableDeclaration", + "scope": 7304, + "src": "20984:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7280, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "20984:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "20983:14:20" + }, + "returnParameters": { + "id": 7285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7284, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "21028:10:20", + "nodeType": "VariableDeclaration", + "scope": 7304, + "src": "21021:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + }, + "typeName": { + "id": 7283, + "name": "int200", + "nodeType": "ElementaryTypeName", + "src": "21021:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "visibility": "internal" + } + ], + "src": "21020:19:20" + }, + "scope": 7969, + "src": "20966:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7329, + "nodeType": "Block", + "src": "21587:150:20", + "statements": [ + { + "expression": { + "id": 7317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7312, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7310, + "src": "21597:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7315, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7307, + "src": "21617:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21610:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int192_$", + "typeString": "type(int192)" + }, + "typeName": { + "id": 7313, + "name": "int192", + "nodeType": "ElementaryTypeName", + "src": "21610:6:20", + "typeDescriptions": {} + } + }, + "id": 7316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21610:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "src": "21597:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "id": 7318, + "nodeType": "ExpressionStatement", + "src": "21597:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7319, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7310, + "src": "21637:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7320, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7307, + "src": "21651:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "21637:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7328, + "nodeType": "IfStatement", + "src": "21633:98:20", + "trueBody": { + "id": 7327, + "nodeType": "Block", + "src": "21658:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313932", + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21709:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_192_by_1", + "typeString": "int_const 192" + }, + "value": "192" + }, + { + "id": 7324, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7307, + "src": "21714:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_192_by_1", + "typeString": "int_const 192" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7322, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "21679:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21679:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7326, + "nodeType": "RevertStatement", + "src": "21672:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7305, + "nodeType": "StructuredDocumentation", + "src": "21196:312:20", + "text": " @dev Returns the downcasted int192 from int256, reverting on\n overflow (when the input is less than smallest int192 or\n greater than largest int192).\n Counterpart to Solidity's `int192` operator.\n Requirements:\n - input must fit into 192 bits" + }, + "id": 7330, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt192", + "nameLocation": "21522:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7308, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7307, + "mutability": "mutable", + "name": "value", + "nameLocation": "21538:5:20", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21531:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7306, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "21531:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "21530:14:20" + }, + "returnParameters": { + "id": 7311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7310, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "21575:10:20", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21568:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + }, + "typeName": { + "id": 7309, + "name": "int192", + "nodeType": "ElementaryTypeName", + "src": "21568:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "visibility": "internal" + } + ], + "src": "21567:19:20" + }, + "scope": 7969, + "src": "21513:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7355, + "nodeType": "Block", + "src": "22134:150:20", + "statements": [ + { + "expression": { + "id": 7343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7338, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7336, + "src": "22144:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7341, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "22164:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22157:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int184_$", + "typeString": "type(int184)" + }, + "typeName": { + "id": 7339, + "name": "int184", + "nodeType": "ElementaryTypeName", + "src": "22157:6:20", + "typeDescriptions": {} + } + }, + "id": 7342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "22157:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "src": "22144:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "id": 7344, + "nodeType": "ExpressionStatement", + "src": "22144:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7345, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7336, + "src": "22184:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7346, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "22198:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "22184:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7354, + "nodeType": "IfStatement", + "src": "22180:98:20", + "trueBody": { + "id": 7353, + "nodeType": "Block", + "src": "22205:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313834", + "id": 7349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22256:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_184_by_1", + "typeString": "int_const 184" + }, + "value": "184" + }, + { + "id": 7350, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "22261:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_184_by_1", + "typeString": "int_const 184" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7348, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "22226:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "22226:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7352, + "nodeType": "RevertStatement", + "src": "22219:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7331, + "nodeType": "StructuredDocumentation", + "src": "21743:312:20", + "text": " @dev Returns the downcasted int184 from int256, reverting on\n overflow (when the input is less than smallest int184 or\n greater than largest int184).\n Counterpart to Solidity's `int184` operator.\n Requirements:\n - input must fit into 184 bits" + }, + "id": 7356, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt184", + "nameLocation": "22069:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7333, + "mutability": "mutable", + "name": "value", + "nameLocation": "22085:5:20", + "nodeType": "VariableDeclaration", + "scope": 7356, + "src": "22078:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7332, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "22078:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "22077:14:20" + }, + "returnParameters": { + "id": 7337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7336, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "22122:10:20", + "nodeType": "VariableDeclaration", + "scope": 7356, + "src": "22115:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + }, + "typeName": { + "id": 7335, + "name": "int184", + "nodeType": "ElementaryTypeName", + "src": "22115:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "visibility": "internal" + } + ], + "src": "22114:19:20" + }, + "scope": 7969, + "src": "22060:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7381, + "nodeType": "Block", + "src": "22681:150:20", + "statements": [ + { + "expression": { + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7364, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7362, + "src": "22691:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7367, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7359, + "src": "22711:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22704:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int176_$", + "typeString": "type(int176)" + }, + "typeName": { + "id": 7365, + "name": "int176", + "nodeType": "ElementaryTypeName", + "src": "22704:6:20", + "typeDescriptions": {} + } + }, + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "22704:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "src": "22691:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "id": 7370, + "nodeType": "ExpressionStatement", + "src": "22691:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7371, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7362, + "src": "22731:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7372, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7359, + "src": "22745:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "22731:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7380, + "nodeType": "IfStatement", + "src": "22727:98:20", + "trueBody": { + "id": 7379, + "nodeType": "Block", + "src": "22752:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313736", + "id": 7375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22803:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_176_by_1", + "typeString": "int_const 176" + }, + "value": "176" + }, + { + "id": 7376, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7359, + "src": "22808:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_176_by_1", + "typeString": "int_const 176" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7374, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "22773:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "22773:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7378, + "nodeType": "RevertStatement", + "src": "22766:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7357, + "nodeType": "StructuredDocumentation", + "src": "22290:312:20", + "text": " @dev Returns the downcasted int176 from int256, reverting on\n overflow (when the input is less than smallest int176 or\n greater than largest int176).\n Counterpart to Solidity's `int176` operator.\n Requirements:\n - input must fit into 176 bits" + }, + "id": 7382, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt176", + "nameLocation": "22616:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7359, + "mutability": "mutable", + "name": "value", + "nameLocation": "22632:5:20", + "nodeType": "VariableDeclaration", + "scope": 7382, + "src": "22625:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7358, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "22625:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "22624:14:20" + }, + "returnParameters": { + "id": 7363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7362, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "22669:10:20", + "nodeType": "VariableDeclaration", + "scope": 7382, + "src": "22662:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + }, + "typeName": { + "id": 7361, + "name": "int176", + "nodeType": "ElementaryTypeName", + "src": "22662:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "visibility": "internal" + } + ], + "src": "22661:19:20" + }, + "scope": 7969, + "src": "22607:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7407, + "nodeType": "Block", + "src": "23228:150:20", + "statements": [ + { + "expression": { + "id": 7395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7390, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7388, + "src": "23238:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7393, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7385, + "src": "23258:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23251:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int168_$", + "typeString": "type(int168)" + }, + "typeName": { + "id": 7391, + "name": "int168", + "nodeType": "ElementaryTypeName", + "src": "23251:6:20", + "typeDescriptions": {} + } + }, + "id": 7394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "23251:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "src": "23238:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "id": 7396, + "nodeType": "ExpressionStatement", + "src": "23238:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7397, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7388, + "src": "23278:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7398, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7385, + "src": "23292:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "23278:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7406, + "nodeType": "IfStatement", + "src": "23274:98:20", + "trueBody": { + "id": 7405, + "nodeType": "Block", + "src": "23299:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313638", + "id": 7401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23350:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_168_by_1", + "typeString": "int_const 168" + }, + "value": "168" + }, + { + "id": 7402, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7385, + "src": "23355:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_168_by_1", + "typeString": "int_const 168" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7400, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "23320:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "23320:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7404, + "nodeType": "RevertStatement", + "src": "23313:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7383, + "nodeType": "StructuredDocumentation", + "src": "22837:312:20", + "text": " @dev Returns the downcasted int168 from int256, reverting on\n overflow (when the input is less than smallest int168 or\n greater than largest int168).\n Counterpart to Solidity's `int168` operator.\n Requirements:\n - input must fit into 168 bits" + }, + "id": 7408, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt168", + "nameLocation": "23163:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7386, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7385, + "mutability": "mutable", + "name": "value", + "nameLocation": "23179:5:20", + "nodeType": "VariableDeclaration", + "scope": 7408, + "src": "23172:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7384, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "23172:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "23171:14:20" + }, + "returnParameters": { + "id": 7389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7388, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "23216:10:20", + "nodeType": "VariableDeclaration", + "scope": 7408, + "src": "23209:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + }, + "typeName": { + "id": 7387, + "name": "int168", + "nodeType": "ElementaryTypeName", + "src": "23209:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "visibility": "internal" + } + ], + "src": "23208:19:20" + }, + "scope": 7969, + "src": "23154:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7433, + "nodeType": "Block", + "src": "23775:150:20", + "statements": [ + { + "expression": { + "id": 7421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7416, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7414, + "src": "23785:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7419, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7411, + "src": "23805:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23798:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int160_$", + "typeString": "type(int160)" + }, + "typeName": { + "id": 7417, + "name": "int160", + "nodeType": "ElementaryTypeName", + "src": "23798:6:20", + "typeDescriptions": {} + } + }, + "id": 7420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "23798:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "src": "23785:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "id": 7422, + "nodeType": "ExpressionStatement", + "src": "23785:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7423, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7414, + "src": "23825:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7424, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7411, + "src": "23839:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "23825:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7432, + "nodeType": "IfStatement", + "src": "23821:98:20", + "trueBody": { + "id": 7431, + "nodeType": "Block", + "src": "23846:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313630", + "id": 7427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23897:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_160_by_1", + "typeString": "int_const 160" + }, + "value": "160" + }, + { + "id": 7428, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7411, + "src": "23902:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_160_by_1", + "typeString": "int_const 160" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7426, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "23867:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "23867:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7430, + "nodeType": "RevertStatement", + "src": "23860:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7409, + "nodeType": "StructuredDocumentation", + "src": "23384:312:20", + "text": " @dev Returns the downcasted int160 from int256, reverting on\n overflow (when the input is less than smallest int160 or\n greater than largest int160).\n Counterpart to Solidity's `int160` operator.\n Requirements:\n - input must fit into 160 bits" + }, + "id": 7434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt160", + "nameLocation": "23710:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7412, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7411, + "mutability": "mutable", + "name": "value", + "nameLocation": "23726:5:20", + "nodeType": "VariableDeclaration", + "scope": 7434, + "src": "23719:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7410, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "23719:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "23718:14:20" + }, + "returnParameters": { + "id": 7415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7414, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "23763:10:20", + "nodeType": "VariableDeclaration", + "scope": 7434, + "src": "23756:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + }, + "typeName": { + "id": 7413, + "name": "int160", + "nodeType": "ElementaryTypeName", + "src": "23756:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "visibility": "internal" + } + ], + "src": "23755:19:20" + }, + "scope": 7969, + "src": "23701:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7459, + "nodeType": "Block", + "src": "24322:150:20", + "statements": [ + { + "expression": { + "id": 7447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7442, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7440, + "src": "24332:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7445, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7437, + "src": "24352:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24345:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int152_$", + "typeString": "type(int152)" + }, + "typeName": { + "id": 7443, + "name": "int152", + "nodeType": "ElementaryTypeName", + "src": "24345:6:20", + "typeDescriptions": {} + } + }, + "id": 7446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "24345:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "src": "24332:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "id": 7448, + "nodeType": "ExpressionStatement", + "src": "24332:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7449, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7440, + "src": "24372:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7450, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7437, + "src": "24386:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "24372:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7458, + "nodeType": "IfStatement", + "src": "24368:98:20", + "trueBody": { + "id": 7457, + "nodeType": "Block", + "src": "24393:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313532", + "id": 7453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24444:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_152_by_1", + "typeString": "int_const 152" + }, + "value": "152" + }, + { + "id": 7454, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7437, + "src": "24449:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_152_by_1", + "typeString": "int_const 152" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7452, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "24414:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "24414:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7456, + "nodeType": "RevertStatement", + "src": "24407:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7435, + "nodeType": "StructuredDocumentation", + "src": "23931:312:20", + "text": " @dev Returns the downcasted int152 from int256, reverting on\n overflow (when the input is less than smallest int152 or\n greater than largest int152).\n Counterpart to Solidity's `int152` operator.\n Requirements:\n - input must fit into 152 bits" + }, + "id": 7460, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt152", + "nameLocation": "24257:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7437, + "mutability": "mutable", + "name": "value", + "nameLocation": "24273:5:20", + "nodeType": "VariableDeclaration", + "scope": 7460, + "src": "24266:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7436, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "24266:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "24265:14:20" + }, + "returnParameters": { + "id": 7441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7440, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "24310:10:20", + "nodeType": "VariableDeclaration", + "scope": 7460, + "src": "24303:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + }, + "typeName": { + "id": 7439, + "name": "int152", + "nodeType": "ElementaryTypeName", + "src": "24303:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "visibility": "internal" + } + ], + "src": "24302:19:20" + }, + "scope": 7969, + "src": "24248:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7485, + "nodeType": "Block", + "src": "24869:150:20", + "statements": [ + { + "expression": { + "id": 7473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7468, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7466, + "src": "24879:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7471, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7463, + "src": "24899:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24892:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int144_$", + "typeString": "type(int144)" + }, + "typeName": { + "id": 7469, + "name": "int144", + "nodeType": "ElementaryTypeName", + "src": "24892:6:20", + "typeDescriptions": {} + } + }, + "id": 7472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "24892:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "src": "24879:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "id": 7474, + "nodeType": "ExpressionStatement", + "src": "24879:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7475, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7466, + "src": "24919:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7476, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7463, + "src": "24933:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "24919:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7484, + "nodeType": "IfStatement", + "src": "24915:98:20", + "trueBody": { + "id": 7483, + "nodeType": "Block", + "src": "24940:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313434", + "id": 7479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24991:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_144_by_1", + "typeString": "int_const 144" + }, + "value": "144" + }, + { + "id": 7480, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7463, + "src": "24996:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_144_by_1", + "typeString": "int_const 144" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7478, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "24961:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "24961:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7482, + "nodeType": "RevertStatement", + "src": "24954:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7461, + "nodeType": "StructuredDocumentation", + "src": "24478:312:20", + "text": " @dev Returns the downcasted int144 from int256, reverting on\n overflow (when the input is less than smallest int144 or\n greater than largest int144).\n Counterpart to Solidity's `int144` operator.\n Requirements:\n - input must fit into 144 bits" + }, + "id": 7486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt144", + "nameLocation": "24804:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7464, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7463, + "mutability": "mutable", + "name": "value", + "nameLocation": "24820:5:20", + "nodeType": "VariableDeclaration", + "scope": 7486, + "src": "24813:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7462, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "24813:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "24812:14:20" + }, + "returnParameters": { + "id": 7467, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7466, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "24857:10:20", + "nodeType": "VariableDeclaration", + "scope": 7486, + "src": "24850:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + }, + "typeName": { + "id": 7465, + "name": "int144", + "nodeType": "ElementaryTypeName", + "src": "24850:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "visibility": "internal" + } + ], + "src": "24849:19:20" + }, + "scope": 7969, + "src": "24795:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7511, + "nodeType": "Block", + "src": "25416:150:20", + "statements": [ + { + "expression": { + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7494, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7492, + "src": "25426:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7497, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7489, + "src": "25446:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7496, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25439:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int136_$", + "typeString": "type(int136)" + }, + "typeName": { + "id": 7495, + "name": "int136", + "nodeType": "ElementaryTypeName", + "src": "25439:6:20", + "typeDescriptions": {} + } + }, + "id": 7498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "25439:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "src": "25426:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "id": 7500, + "nodeType": "ExpressionStatement", + "src": "25426:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7501, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7492, + "src": "25466:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7502, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7489, + "src": "25480:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "25466:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7510, + "nodeType": "IfStatement", + "src": "25462:98:20", + "trueBody": { + "id": 7509, + "nodeType": "Block", + "src": "25487:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313336", + "id": 7505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25538:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_136_by_1", + "typeString": "int_const 136" + }, + "value": "136" + }, + { + "id": 7506, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7489, + "src": "25543:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_136_by_1", + "typeString": "int_const 136" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7504, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "25508:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "25508:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7508, + "nodeType": "RevertStatement", + "src": "25501:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7487, + "nodeType": "StructuredDocumentation", + "src": "25025:312:20", + "text": " @dev Returns the downcasted int136 from int256, reverting on\n overflow (when the input is less than smallest int136 or\n greater than largest int136).\n Counterpart to Solidity's `int136` operator.\n Requirements:\n - input must fit into 136 bits" + }, + "id": 7512, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt136", + "nameLocation": "25351:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7489, + "mutability": "mutable", + "name": "value", + "nameLocation": "25367:5:20", + "nodeType": "VariableDeclaration", + "scope": 7512, + "src": "25360:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7488, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "25360:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "25359:14:20" + }, + "returnParameters": { + "id": 7493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7492, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "25404:10:20", + "nodeType": "VariableDeclaration", + "scope": 7512, + "src": "25397:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + }, + "typeName": { + "id": 7491, + "name": "int136", + "nodeType": "ElementaryTypeName", + "src": "25397:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "visibility": "internal" + } + ], + "src": "25396:19:20" + }, + "scope": 7969, + "src": "25342:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7537, + "nodeType": "Block", + "src": "25963:150:20", + "statements": [ + { + "expression": { + "id": 7525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7520, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7518, + "src": "25973:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7523, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7515, + "src": "25993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7522, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 7521, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "25986:6:20", + "typeDescriptions": {} + } + }, + "id": 7524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "25986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "src": "25973:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "id": 7526, + "nodeType": "ExpressionStatement", + "src": "25973:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7527, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7518, + "src": "26013:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7528, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7515, + "src": "26027:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "26013:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7536, + "nodeType": "IfStatement", + "src": "26009:98:20", + "trueBody": { + "id": 7535, + "nodeType": "Block", + "src": "26034:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313238", + "id": 7531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26085:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + { + "id": 7532, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7515, + "src": "26090:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7530, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "26055:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26055:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7534, + "nodeType": "RevertStatement", + "src": "26048:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7513, + "nodeType": "StructuredDocumentation", + "src": "25572:312:20", + "text": " @dev Returns the downcasted int128 from int256, reverting on\n overflow (when the input is less than smallest int128 or\n greater than largest int128).\n Counterpart to Solidity's `int128` operator.\n Requirements:\n - input must fit into 128 bits" + }, + "id": 7538, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt128", + "nameLocation": "25898:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7515, + "mutability": "mutable", + "name": "value", + "nameLocation": "25914:5:20", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25907:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7514, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "25907:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "25906:14:20" + }, + "returnParameters": { + "id": 7519, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7518, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "25951:10:20", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25944:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 7517, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "25944:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + } + ], + "src": "25943:19:20" + }, + "scope": 7969, + "src": "25889:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7563, + "nodeType": "Block", + "src": "26510:150:20", + "statements": [ + { + "expression": { + "id": 7551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7546, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7544, + "src": "26520:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7549, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "26540:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26533:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int120_$", + "typeString": "type(int120)" + }, + "typeName": { + "id": 7547, + "name": "int120", + "nodeType": "ElementaryTypeName", + "src": "26533:6:20", + "typeDescriptions": {} + } + }, + "id": 7550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26533:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "src": "26520:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "id": 7552, + "nodeType": "ExpressionStatement", + "src": "26520:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7553, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7544, + "src": "26560:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7554, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "26574:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "26560:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7562, + "nodeType": "IfStatement", + "src": "26556:98:20", + "trueBody": { + "id": 7561, + "nodeType": "Block", + "src": "26581:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313230", + "id": 7557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26632:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + "value": "120" + }, + { + "id": 7558, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "26637:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7556, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "26602:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26602:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7560, + "nodeType": "RevertStatement", + "src": "26595:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7539, + "nodeType": "StructuredDocumentation", + "src": "26119:312:20", + "text": " @dev Returns the downcasted int120 from int256, reverting on\n overflow (when the input is less than smallest int120 or\n greater than largest int120).\n Counterpart to Solidity's `int120` operator.\n Requirements:\n - input must fit into 120 bits" + }, + "id": 7564, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt120", + "nameLocation": "26445:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7541, + "mutability": "mutable", + "name": "value", + "nameLocation": "26461:5:20", + "nodeType": "VariableDeclaration", + "scope": 7564, + "src": "26454:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7540, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "26454:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "26453:14:20" + }, + "returnParameters": { + "id": 7545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7544, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "26498:10:20", + "nodeType": "VariableDeclaration", + "scope": 7564, + "src": "26491:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + }, + "typeName": { + "id": 7543, + "name": "int120", + "nodeType": "ElementaryTypeName", + "src": "26491:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "visibility": "internal" + } + ], + "src": "26490:19:20" + }, + "scope": 7969, + "src": "26436:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7589, + "nodeType": "Block", + "src": "27057:150:20", + "statements": [ + { + "expression": { + "id": 7577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7572, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7570, + "src": "27067:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7575, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7567, + "src": "27087:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27080:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int112_$", + "typeString": "type(int112)" + }, + "typeName": { + "id": 7573, + "name": "int112", + "nodeType": "ElementaryTypeName", + "src": "27080:6:20", + "typeDescriptions": {} + } + }, + "id": 7576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27080:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "src": "27067:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "id": 7578, + "nodeType": "ExpressionStatement", + "src": "27067:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7579, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7570, + "src": "27107:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7580, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7567, + "src": "27121:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "27107:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7588, + "nodeType": "IfStatement", + "src": "27103:98:20", + "trueBody": { + "id": 7587, + "nodeType": "Block", + "src": "27128:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313132", + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27179:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + "value": "112" + }, + { + "id": 7584, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7567, + "src": "27184:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7582, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "27149:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27149:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7586, + "nodeType": "RevertStatement", + "src": "27142:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7565, + "nodeType": "StructuredDocumentation", + "src": "26666:312:20", + "text": " @dev Returns the downcasted int112 from int256, reverting on\n overflow (when the input is less than smallest int112 or\n greater than largest int112).\n Counterpart to Solidity's `int112` operator.\n Requirements:\n - input must fit into 112 bits" + }, + "id": 7590, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt112", + "nameLocation": "26992:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7567, + "mutability": "mutable", + "name": "value", + "nameLocation": "27008:5:20", + "nodeType": "VariableDeclaration", + "scope": 7590, + "src": "27001:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7566, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "27001:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "27000:14:20" + }, + "returnParameters": { + "id": 7571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7570, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "27045:10:20", + "nodeType": "VariableDeclaration", + "scope": 7590, + "src": "27038:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + }, + "typeName": { + "id": 7569, + "name": "int112", + "nodeType": "ElementaryTypeName", + "src": "27038:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "visibility": "internal" + } + ], + "src": "27037:19:20" + }, + "scope": 7969, + "src": "26983:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7615, + "nodeType": "Block", + "src": "27604:150:20", + "statements": [ + { + "expression": { + "id": 7603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7598, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "27614:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7601, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7593, + "src": "27634:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27627:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int104_$", + "typeString": "type(int104)" + }, + "typeName": { + "id": 7599, + "name": "int104", + "nodeType": "ElementaryTypeName", + "src": "27627:6:20", + "typeDescriptions": {} + } + }, + "id": 7602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27627:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "src": "27614:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "id": 7604, + "nodeType": "ExpressionStatement", + "src": "27614:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7605, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "27654:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7606, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7593, + "src": "27668:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "27654:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7614, + "nodeType": "IfStatement", + "src": "27650:98:20", + "trueBody": { + "id": 7613, + "nodeType": "Block", + "src": "27675:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313034", + "id": 7609, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27726:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + "value": "104" + }, + { + "id": 7610, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7593, + "src": "27731:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7608, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "27696:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27696:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7612, + "nodeType": "RevertStatement", + "src": "27689:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7591, + "nodeType": "StructuredDocumentation", + "src": "27213:312:20", + "text": " @dev Returns the downcasted int104 from int256, reverting on\n overflow (when the input is less than smallest int104 or\n greater than largest int104).\n Counterpart to Solidity's `int104` operator.\n Requirements:\n - input must fit into 104 bits" + }, + "id": 7616, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt104", + "nameLocation": "27539:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7594, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7593, + "mutability": "mutable", + "name": "value", + "nameLocation": "27555:5:20", + "nodeType": "VariableDeclaration", + "scope": 7616, + "src": "27548:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7592, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "27548:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "27547:14:20" + }, + "returnParameters": { + "id": 7597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7596, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "27592:10:20", + "nodeType": "VariableDeclaration", + "scope": 7616, + "src": "27585:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + }, + "typeName": { + "id": 7595, + "name": "int104", + "nodeType": "ElementaryTypeName", + "src": "27585:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "visibility": "internal" + } + ], + "src": "27584:19:20" + }, + "scope": 7969, + "src": "27530:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7641, + "nodeType": "Block", + "src": "28144:148:20", + "statements": [ + { + "expression": { + "id": 7629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7624, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7622, + "src": "28154:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7627, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7619, + "src": "28173:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28167:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int96_$", + "typeString": "type(int96)" + }, + "typeName": { + "id": 7625, + "name": "int96", + "nodeType": "ElementaryTypeName", + "src": "28167:5:20", + "typeDescriptions": {} + } + }, + "id": 7628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "28167:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "src": "28154:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "id": 7630, + "nodeType": "ExpressionStatement", + "src": "28154:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7631, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7622, + "src": "28193:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7632, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7619, + "src": "28207:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "28193:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7640, + "nodeType": "IfStatement", + "src": "28189:97:20", + "trueBody": { + "id": 7639, + "nodeType": "Block", + "src": "28214:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3936", + "id": 7635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28265:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + { + "id": 7636, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7619, + "src": "28269:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7634, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "28235:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "28235:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7638, + "nodeType": "RevertStatement", + "src": "28228:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7617, + "nodeType": "StructuredDocumentation", + "src": "27760:307:20", + "text": " @dev Returns the downcasted int96 from int256, reverting on\n overflow (when the input is less than smallest int96 or\n greater than largest int96).\n Counterpart to Solidity's `int96` operator.\n Requirements:\n - input must fit into 96 bits" + }, + "id": 7642, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt96", + "nameLocation": "28081:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7620, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7619, + "mutability": "mutable", + "name": "value", + "nameLocation": "28096:5:20", + "nodeType": "VariableDeclaration", + "scope": 7642, + "src": "28089:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7618, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "28089:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "28088:14:20" + }, + "returnParameters": { + "id": 7623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7622, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "28132:10:20", + "nodeType": "VariableDeclaration", + "scope": 7642, + "src": "28126:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + }, + "typeName": { + "id": 7621, + "name": "int96", + "nodeType": "ElementaryTypeName", + "src": "28126:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "visibility": "internal" + } + ], + "src": "28125:18:20" + }, + "scope": 7969, + "src": "28072:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7667, + "nodeType": "Block", + "src": "28682:148:20", + "statements": [ + { + "expression": { + "id": 7655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7650, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7648, + "src": "28692:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7653, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7645, + "src": "28711:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28705:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int88_$", + "typeString": "type(int88)" + }, + "typeName": { + "id": 7651, + "name": "int88", + "nodeType": "ElementaryTypeName", + "src": "28705:5:20", + "typeDescriptions": {} + } + }, + "id": 7654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "28705:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "src": "28692:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "id": 7656, + "nodeType": "ExpressionStatement", + "src": "28692:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7657, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7648, + "src": "28731:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7658, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7645, + "src": "28745:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "28731:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7666, + "nodeType": "IfStatement", + "src": "28727:97:20", + "trueBody": { + "id": 7665, + "nodeType": "Block", + "src": "28752:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3838", + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28803:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + "value": "88" + }, + { + "id": 7662, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7645, + "src": "28807:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7660, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "28773:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "28773:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7664, + "nodeType": "RevertStatement", + "src": "28766:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7643, + "nodeType": "StructuredDocumentation", + "src": "28298:307:20", + "text": " @dev Returns the downcasted int88 from int256, reverting on\n overflow (when the input is less than smallest int88 or\n greater than largest int88).\n Counterpart to Solidity's `int88` operator.\n Requirements:\n - input must fit into 88 bits" + }, + "id": 7668, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt88", + "nameLocation": "28619:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7645, + "mutability": "mutable", + "name": "value", + "nameLocation": "28634:5:20", + "nodeType": "VariableDeclaration", + "scope": 7668, + "src": "28627:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7644, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "28627:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "28626:14:20" + }, + "returnParameters": { + "id": 7649, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7648, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "28670:10:20", + "nodeType": "VariableDeclaration", + "scope": 7668, + "src": "28664:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + }, + "typeName": { + "id": 7647, + "name": "int88", + "nodeType": "ElementaryTypeName", + "src": "28664:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "visibility": "internal" + } + ], + "src": "28663:18:20" + }, + "scope": 7969, + "src": "28610:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7693, + "nodeType": "Block", + "src": "29220:148:20", + "statements": [ + { + "expression": { + "id": 7681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7676, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7674, + "src": "29230:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7679, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7671, + "src": "29249:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29243:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int80_$", + "typeString": "type(int80)" + }, + "typeName": { + "id": 7677, + "name": "int80", + "nodeType": "ElementaryTypeName", + "src": "29243:5:20", + "typeDescriptions": {} + } + }, + "id": 7680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29243:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "src": "29230:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "id": 7682, + "nodeType": "ExpressionStatement", + "src": "29230:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7683, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7674, + "src": "29269:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7684, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7671, + "src": "29283:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "29269:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7692, + "nodeType": "IfStatement", + "src": "29265:97:20", + "trueBody": { + "id": 7691, + "nodeType": "Block", + "src": "29290:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3830", + "id": 7687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29341:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + "value": "80" + }, + { + "id": 7688, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7671, + "src": "29345:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7686, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "29311:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29311:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7690, + "nodeType": "RevertStatement", + "src": "29304:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7669, + "nodeType": "StructuredDocumentation", + "src": "28836:307:20", + "text": " @dev Returns the downcasted int80 from int256, reverting on\n overflow (when the input is less than smallest int80 or\n greater than largest int80).\n Counterpart to Solidity's `int80` operator.\n Requirements:\n - input must fit into 80 bits" + }, + "id": 7694, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt80", + "nameLocation": "29157:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7672, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7671, + "mutability": "mutable", + "name": "value", + "nameLocation": "29172:5:20", + "nodeType": "VariableDeclaration", + "scope": 7694, + "src": "29165:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7670, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "29165:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "29164:14:20" + }, + "returnParameters": { + "id": 7675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7674, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "29208:10:20", + "nodeType": "VariableDeclaration", + "scope": 7694, + "src": "29202:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + }, + "typeName": { + "id": 7673, + "name": "int80", + "nodeType": "ElementaryTypeName", + "src": "29202:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "visibility": "internal" + } + ], + "src": "29201:18:20" + }, + "scope": 7969, + "src": "29148:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7719, + "nodeType": "Block", + "src": "29758:148:20", + "statements": [ + { + "expression": { + "id": 7707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7702, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7700, + "src": "29768:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7705, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7697, + "src": "29787:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29781:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int72_$", + "typeString": "type(int72)" + }, + "typeName": { + "id": 7703, + "name": "int72", + "nodeType": "ElementaryTypeName", + "src": "29781:5:20", + "typeDescriptions": {} + } + }, + "id": 7706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29781:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "src": "29768:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "id": 7708, + "nodeType": "ExpressionStatement", + "src": "29768:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7709, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7700, + "src": "29807:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7710, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7697, + "src": "29821:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "29807:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7718, + "nodeType": "IfStatement", + "src": "29803:97:20", + "trueBody": { + "id": 7717, + "nodeType": "Block", + "src": "29828:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3732", + "id": 7713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29879:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + "value": "72" + }, + { + "id": 7714, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7697, + "src": "29883:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7712, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "29849:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29849:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7716, + "nodeType": "RevertStatement", + "src": "29842:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7695, + "nodeType": "StructuredDocumentation", + "src": "29374:307:20", + "text": " @dev Returns the downcasted int72 from int256, reverting on\n overflow (when the input is less than smallest int72 or\n greater than largest int72).\n Counterpart to Solidity's `int72` operator.\n Requirements:\n - input must fit into 72 bits" + }, + "id": 7720, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt72", + "nameLocation": "29695:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7697, + "mutability": "mutable", + "name": "value", + "nameLocation": "29710:5:20", + "nodeType": "VariableDeclaration", + "scope": 7720, + "src": "29703:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7696, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "29703:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "29702:14:20" + }, + "returnParameters": { + "id": 7701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7700, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "29746:10:20", + "nodeType": "VariableDeclaration", + "scope": 7720, + "src": "29740:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + }, + "typeName": { + "id": 7699, + "name": "int72", + "nodeType": "ElementaryTypeName", + "src": "29740:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "visibility": "internal" + } + ], + "src": "29739:18:20" + }, + "scope": 7969, + "src": "29686:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7745, + "nodeType": "Block", + "src": "30296:148:20", + "statements": [ + { + "expression": { + "id": 7733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7728, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7726, + "src": "30306:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7731, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7723, + "src": "30325:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30319:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int64_$", + "typeString": "type(int64)" + }, + "typeName": { + "id": 7729, + "name": "int64", + "nodeType": "ElementaryTypeName", + "src": "30319:5:20", + "typeDescriptions": {} + } + }, + "id": 7732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30319:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "src": "30306:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "id": 7734, + "nodeType": "ExpressionStatement", + "src": "30306:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7735, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7726, + "src": "30345:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7736, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7723, + "src": "30359:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "30345:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7744, + "nodeType": "IfStatement", + "src": "30341:97:20", + "trueBody": { + "id": 7743, + "nodeType": "Block", + "src": "30366:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3634", + "id": 7739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30417:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + { + "id": 7740, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7723, + "src": "30421:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7738, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "30387:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30387:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7742, + "nodeType": "RevertStatement", + "src": "30380:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7721, + "nodeType": "StructuredDocumentation", + "src": "29912:307:20", + "text": " @dev Returns the downcasted int64 from int256, reverting on\n overflow (when the input is less than smallest int64 or\n greater than largest int64).\n Counterpart to Solidity's `int64` operator.\n Requirements:\n - input must fit into 64 bits" + }, + "id": 7746, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt64", + "nameLocation": "30233:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7724, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7723, + "mutability": "mutable", + "name": "value", + "nameLocation": "30248:5:20", + "nodeType": "VariableDeclaration", + "scope": 7746, + "src": "30241:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7722, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "30241:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "30240:14:20" + }, + "returnParameters": { + "id": 7727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7726, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "30284:10:20", + "nodeType": "VariableDeclaration", + "scope": 7746, + "src": "30278:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + }, + "typeName": { + "id": 7725, + "name": "int64", + "nodeType": "ElementaryTypeName", + "src": "30278:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "visibility": "internal" + } + ], + "src": "30277:18:20" + }, + "scope": 7969, + "src": "30224:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7771, + "nodeType": "Block", + "src": "30834:148:20", + "statements": [ + { + "expression": { + "id": 7759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7754, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7752, + "src": "30844:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7757, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7749, + "src": "30863:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30857:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int56_$", + "typeString": "type(int56)" + }, + "typeName": { + "id": 7755, + "name": "int56", + "nodeType": "ElementaryTypeName", + "src": "30857:5:20", + "typeDescriptions": {} + } + }, + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30857:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "src": "30844:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "id": 7760, + "nodeType": "ExpressionStatement", + "src": "30844:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7761, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7752, + "src": "30883:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7762, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7749, + "src": "30897:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "30883:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7770, + "nodeType": "IfStatement", + "src": "30879:97:20", + "trueBody": { + "id": 7769, + "nodeType": "Block", + "src": "30904:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3536", + "id": 7765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30955:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + "value": "56" + }, + { + "id": 7766, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7749, + "src": "30959:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7764, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "30925:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30925:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7768, + "nodeType": "RevertStatement", + "src": "30918:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7747, + "nodeType": "StructuredDocumentation", + "src": "30450:307:20", + "text": " @dev Returns the downcasted int56 from int256, reverting on\n overflow (when the input is less than smallest int56 or\n greater than largest int56).\n Counterpart to Solidity's `int56` operator.\n Requirements:\n - input must fit into 56 bits" + }, + "id": 7772, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt56", + "nameLocation": "30771:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7750, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7749, + "mutability": "mutable", + "name": "value", + "nameLocation": "30786:5:20", + "nodeType": "VariableDeclaration", + "scope": 7772, + "src": "30779:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7748, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "30779:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "30778:14:20" + }, + "returnParameters": { + "id": 7753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7752, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "30822:10:20", + "nodeType": "VariableDeclaration", + "scope": 7772, + "src": "30816:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + }, + "typeName": { + "id": 7751, + "name": "int56", + "nodeType": "ElementaryTypeName", + "src": "30816:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "visibility": "internal" + } + ], + "src": "30815:18:20" + }, + "scope": 7969, + "src": "30762:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7797, + "nodeType": "Block", + "src": "31372:148:20", + "statements": [ + { + "expression": { + "id": 7785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7780, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7778, + "src": "31382:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7783, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7775, + "src": "31401:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7782, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31395:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int48_$", + "typeString": "type(int48)" + }, + "typeName": { + "id": 7781, + "name": "int48", + "nodeType": "ElementaryTypeName", + "src": "31395:5:20", + "typeDescriptions": {} + } + }, + "id": 7784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31395:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "src": "31382:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "id": 7786, + "nodeType": "ExpressionStatement", + "src": "31382:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7787, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7778, + "src": "31421:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7788, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7775, + "src": "31435:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "31421:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7796, + "nodeType": "IfStatement", + "src": "31417:97:20", + "trueBody": { + "id": 7795, + "nodeType": "Block", + "src": "31442:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3438", + "id": 7791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31493:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + { + "id": 7792, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7775, + "src": "31497:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7790, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "31463:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31463:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7794, + "nodeType": "RevertStatement", + "src": "31456:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7773, + "nodeType": "StructuredDocumentation", + "src": "30988:307:20", + "text": " @dev Returns the downcasted int48 from int256, reverting on\n overflow (when the input is less than smallest int48 or\n greater than largest int48).\n Counterpart to Solidity's `int48` operator.\n Requirements:\n - input must fit into 48 bits" + }, + "id": 7798, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt48", + "nameLocation": "31309:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7775, + "mutability": "mutable", + "name": "value", + "nameLocation": "31324:5:20", + "nodeType": "VariableDeclaration", + "scope": 7798, + "src": "31317:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7774, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "31317:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "31316:14:20" + }, + "returnParameters": { + "id": 7779, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7778, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "31360:10:20", + "nodeType": "VariableDeclaration", + "scope": 7798, + "src": "31354:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + }, + "typeName": { + "id": 7777, + "name": "int48", + "nodeType": "ElementaryTypeName", + "src": "31354:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "visibility": "internal" + } + ], + "src": "31353:18:20" + }, + "scope": 7969, + "src": "31300:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7823, + "nodeType": "Block", + "src": "31910:148:20", + "statements": [ + { + "expression": { + "id": 7811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7806, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7804, + "src": "31920:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7809, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7801, + "src": "31939:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31933:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int40_$", + "typeString": "type(int40)" + }, + "typeName": { + "id": 7807, + "name": "int40", + "nodeType": "ElementaryTypeName", + "src": "31933:5:20", + "typeDescriptions": {} + } + }, + "id": 7810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31933:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "src": "31920:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "id": 7812, + "nodeType": "ExpressionStatement", + "src": "31920:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7813, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7804, + "src": "31959:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7814, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7801, + "src": "31973:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "31959:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7822, + "nodeType": "IfStatement", + "src": "31955:97:20", + "trueBody": { + "id": 7821, + "nodeType": "Block", + "src": "31980:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3430", + "id": 7817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32031:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + { + "id": 7818, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7801, + "src": "32035:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7816, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "32001:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32001:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7820, + "nodeType": "RevertStatement", + "src": "31994:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7799, + "nodeType": "StructuredDocumentation", + "src": "31526:307:20", + "text": " @dev Returns the downcasted int40 from int256, reverting on\n overflow (when the input is less than smallest int40 or\n greater than largest int40).\n Counterpart to Solidity's `int40` operator.\n Requirements:\n - input must fit into 40 bits" + }, + "id": 7824, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt40", + "nameLocation": "31847:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7802, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7801, + "mutability": "mutable", + "name": "value", + "nameLocation": "31862:5:20", + "nodeType": "VariableDeclaration", + "scope": 7824, + "src": "31855:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7800, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "31855:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "31854:14:20" + }, + "returnParameters": { + "id": 7805, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7804, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "31898:10:20", + "nodeType": "VariableDeclaration", + "scope": 7824, + "src": "31892:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + }, + "typeName": { + "id": 7803, + "name": "int40", + "nodeType": "ElementaryTypeName", + "src": "31892:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "visibility": "internal" + } + ], + "src": "31891:18:20" + }, + "scope": 7969, + "src": "31838:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7849, + "nodeType": "Block", + "src": "32448:148:20", + "statements": [ + { + "expression": { + "id": 7837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7832, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7830, + "src": "32458:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7835, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7827, + "src": "32477:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32471:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int32_$", + "typeString": "type(int32)" + }, + "typeName": { + "id": 7833, + "name": "int32", + "nodeType": "ElementaryTypeName", + "src": "32471:5:20", + "typeDescriptions": {} + } + }, + "id": 7836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32471:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "src": "32458:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "id": 7838, + "nodeType": "ExpressionStatement", + "src": "32458:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7839, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7830, + "src": "32497:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7840, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7827, + "src": "32511:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "32497:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7848, + "nodeType": "IfStatement", + "src": "32493:97:20", + "trueBody": { + "id": 7847, + "nodeType": "Block", + "src": "32518:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3332", + "id": 7843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32569:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + { + "id": 7844, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7827, + "src": "32573:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7842, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "32539:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32539:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7846, + "nodeType": "RevertStatement", + "src": "32532:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7825, + "nodeType": "StructuredDocumentation", + "src": "32064:307:20", + "text": " @dev Returns the downcasted int32 from int256, reverting on\n overflow (when the input is less than smallest int32 or\n greater than largest int32).\n Counterpart to Solidity's `int32` operator.\n Requirements:\n - input must fit into 32 bits" + }, + "id": 7850, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt32", + "nameLocation": "32385:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7828, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7827, + "mutability": "mutable", + "name": "value", + "nameLocation": "32400:5:20", + "nodeType": "VariableDeclaration", + "scope": 7850, + "src": "32393:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7826, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "32393:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "32392:14:20" + }, + "returnParameters": { + "id": 7831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7830, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "32436:10:20", + "nodeType": "VariableDeclaration", + "scope": 7850, + "src": "32430:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + }, + "typeName": { + "id": 7829, + "name": "int32", + "nodeType": "ElementaryTypeName", + "src": "32430:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "visibility": "internal" + } + ], + "src": "32429:18:20" + }, + "scope": 7969, + "src": "32376:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7875, + "nodeType": "Block", + "src": "32986:148:20", + "statements": [ + { + "expression": { + "id": 7863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7858, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7856, + "src": "32996:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7861, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7853, + "src": "33015:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33009:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int24_$", + "typeString": "type(int24)" + }, + "typeName": { + "id": 7859, + "name": "int24", + "nodeType": "ElementaryTypeName", + "src": "33009:5:20", + "typeDescriptions": {} + } + }, + "id": 7862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "33009:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "src": "32996:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "id": 7864, + "nodeType": "ExpressionStatement", + "src": "32996:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7865, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7856, + "src": "33035:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7866, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7853, + "src": "33049:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "33035:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7874, + "nodeType": "IfStatement", + "src": "33031:97:20", + "trueBody": { + "id": 7873, + "nodeType": "Block", + "src": "33056:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3234", + "id": 7869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33107:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + "value": "24" + }, + { + "id": 7870, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7853, + "src": "33111:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7868, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "33077:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "33077:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7872, + "nodeType": "RevertStatement", + "src": "33070:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7851, + "nodeType": "StructuredDocumentation", + "src": "32602:307:20", + "text": " @dev Returns the downcasted int24 from int256, reverting on\n overflow (when the input is less than smallest int24 or\n greater than largest int24).\n Counterpart to Solidity's `int24` operator.\n Requirements:\n - input must fit into 24 bits" + }, + "id": 7876, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt24", + "nameLocation": "32923:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7853, + "mutability": "mutable", + "name": "value", + "nameLocation": "32938:5:20", + "nodeType": "VariableDeclaration", + "scope": 7876, + "src": "32931:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7852, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "32931:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "32930:14:20" + }, + "returnParameters": { + "id": 7857, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7856, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "32974:10:20", + "nodeType": "VariableDeclaration", + "scope": 7876, + "src": "32968:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + }, + "typeName": { + "id": 7855, + "name": "int24", + "nodeType": "ElementaryTypeName", + "src": "32968:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "visibility": "internal" + } + ], + "src": "32967:18:20" + }, + "scope": 7969, + "src": "32914:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7901, + "nodeType": "Block", + "src": "33524:148:20", + "statements": [ + { + "expression": { + "id": 7889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7884, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7882, + "src": "33534:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7887, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7879, + "src": "33553:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33547:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int16_$", + "typeString": "type(int16)" + }, + "typeName": { + "id": 7885, + "name": "int16", + "nodeType": "ElementaryTypeName", + "src": "33547:5:20", + "typeDescriptions": {} + } + }, + "id": 7888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "33547:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "src": "33534:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "id": 7890, + "nodeType": "ExpressionStatement", + "src": "33534:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7891, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7882, + "src": "33573:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7892, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7879, + "src": "33587:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "33573:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7900, + "nodeType": "IfStatement", + "src": "33569:97:20", + "trueBody": { + "id": 7899, + "nodeType": "Block", + "src": "33594:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3136", + "id": 7895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33645:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + { + "id": 7896, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7879, + "src": "33649:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7894, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "33615:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "33615:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7898, + "nodeType": "RevertStatement", + "src": "33608:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7877, + "nodeType": "StructuredDocumentation", + "src": "33140:307:20", + "text": " @dev Returns the downcasted int16 from int256, reverting on\n overflow (when the input is less than smallest int16 or\n greater than largest int16).\n Counterpart to Solidity's `int16` operator.\n Requirements:\n - input must fit into 16 bits" + }, + "id": 7902, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt16", + "nameLocation": "33461:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7879, + "mutability": "mutable", + "name": "value", + "nameLocation": "33476:5:20", + "nodeType": "VariableDeclaration", + "scope": 7902, + "src": "33469:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7878, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "33469:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "33468:14:20" + }, + "returnParameters": { + "id": 7883, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7882, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "33512:10:20", + "nodeType": "VariableDeclaration", + "scope": 7902, + "src": "33506:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + }, + "typeName": { + "id": 7881, + "name": "int16", + "nodeType": "ElementaryTypeName", + "src": "33506:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "visibility": "internal" + } + ], + "src": "33505:18:20" + }, + "scope": 7969, + "src": "33452:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7927, + "nodeType": "Block", + "src": "34055:146:20", + "statements": [ + { + "expression": { + "id": 7915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7910, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7908, + "src": "34065:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7913, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7905, + "src": "34083:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34078:4:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int8_$", + "typeString": "type(int8)" + }, + "typeName": { + "id": 7911, + "name": "int8", + "nodeType": "ElementaryTypeName", + "src": "34078:4:20", + "typeDescriptions": {} + } + }, + "id": 7914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34078:11:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "src": "34065:24:20", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "id": 7916, + "nodeType": "ExpressionStatement", + "src": "34065:24:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7917, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7908, + "src": "34103:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7918, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7905, + "src": "34117:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "34103:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7926, + "nodeType": "IfStatement", + "src": "34099:96:20", + "trueBody": { + "id": 7925, + "nodeType": "Block", + "src": "34124:71:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "38", + "id": 7921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34175:1:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + { + "id": 7922, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7905, + "src": "34178:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7920, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "34145:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34145:39:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7924, + "nodeType": "RevertStatement", + "src": "34138:46:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7903, + "nodeType": "StructuredDocumentation", + "src": "33678:302:20", + "text": " @dev Returns the downcasted int8 from int256, reverting on\n overflow (when the input is less than smallest int8 or\n greater than largest int8).\n Counterpart to Solidity's `int8` operator.\n Requirements:\n - input must fit into 8 bits" + }, + "id": 7928, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt8", + "nameLocation": "33994:6:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7905, + "mutability": "mutable", + "name": "value", + "nameLocation": "34008:5:20", + "nodeType": "VariableDeclaration", + "scope": 7928, + "src": "34001:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7904, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "34001:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "34000:14:20" + }, + "returnParameters": { + "id": 7909, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7908, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "34043:10:20", + "nodeType": "VariableDeclaration", + "scope": 7928, + "src": "34038:15:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + }, + "typeName": { + "id": 7907, + "name": "int8", + "nodeType": "ElementaryTypeName", + "src": "34038:4:20", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "visibility": "internal" + } + ], + "src": "34037:17:20" + }, + "scope": 7969, + "src": "33985:216:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7957, + "nodeType": "Block", + "src": "34441:250:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7936, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7931, + "src": "34554:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 7941, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34575:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 7940, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "34575:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + } + ], + "id": 7939, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "34570:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34570:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_int256", + "typeString": "type(int256)" + } + }, + "id": 7943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "34583:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "34570:16:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34562:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 7937, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34562:7:20", + "typeDescriptions": {} + } + }, + "id": 7944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34562:25:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34554:33:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7951, + "nodeType": "IfStatement", + "src": "34550:105:20", + "trueBody": { + "id": 7950, + "nodeType": "Block", + "src": "34589:66:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 7947, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7931, + "src": "34638:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7946, + "name": "SafeCastOverflowedUintToInt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6231, + "src": "34610:27:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint256) pure returns (error)" + } + }, + "id": 7948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34610:34:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7949, + "nodeType": "RevertStatement", + "src": "34603:41:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7954, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7931, + "src": "34678:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7953, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34671:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 7952, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "34671:6:20", + "typeDescriptions": {} + } + }, + "id": 7955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34671:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 7935, + "id": 7956, + "nodeType": "Return", + "src": "34664:20:20" + } + ] + }, + "documentation": { + "id": 7929, + "nodeType": "StructuredDocumentation", + "src": "34207:165:20", + "text": " @dev Converts an unsigned uint256 into a signed int256.\n Requirements:\n - input must be less than or equal to maxInt256." + }, + "id": 7958, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt256", + "nameLocation": "34386:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7931, + "mutability": "mutable", + "name": "value", + "nameLocation": "34403:5:20", + "nodeType": "VariableDeclaration", + "scope": 7958, + "src": "34395:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7930, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34395:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "34394:15:20" + }, + "returnParameters": { + "id": 7935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7934, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7958, + "src": "34433:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7933, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "34433:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "34432:8:20" + }, + "scope": 7969, + "src": "34377:314:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7967, + "nodeType": "Block", + "src": "34850:87:20", + "statements": [ + { + "AST": { + "nativeSrc": "34885:46:20", + "nodeType": "YulBlock", + "src": "34885:46:20", + "statements": [ + { + "nativeSrc": "34899:22:20", + "nodeType": "YulAssignment", + "src": "34899:22:20", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "b", + "nativeSrc": "34918:1:20", + "nodeType": "YulIdentifier", + "src": "34918:1:20" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "34911:6:20", + "nodeType": "YulIdentifier", + "src": "34911:6:20" + }, + "nativeSrc": "34911:9:20", + "nodeType": "YulFunctionCall", + "src": "34911:9:20" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "34904:6:20", + "nodeType": "YulIdentifier", + "src": "34904:6:20" + }, + "nativeSrc": "34904:17:20", + "nodeType": "YulFunctionCall", + "src": "34904:17:20" + }, + "variableNames": [ + { + "name": "u", + "nativeSrc": "34899:1:20", + "nodeType": "YulIdentifier", + "src": "34899:1:20" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 7961, + "isOffset": false, + "isSlot": false, + "src": "34918:1:20", + "valueSize": 1 + }, + { + "declaration": 7964, + "isOffset": false, + "isSlot": false, + "src": "34899:1:20", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 7966, + "nodeType": "InlineAssembly", + "src": "34860:71:20" + } + ] + }, + "documentation": { + "id": 7959, + "nodeType": "StructuredDocumentation", + "src": "34697:90:20", + "text": " @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump." + }, + "id": 7968, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint", + "nameLocation": "34801:6:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7962, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7961, + "mutability": "mutable", + "name": "b", + "nameLocation": "34813:1:20", + "nodeType": "VariableDeclaration", + "scope": 7968, + "src": "34808:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7960, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "34808:4:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "34807:8:20" + }, + "returnParameters": { + "id": 7965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7964, + "mutability": "mutable", + "name": "u", + "nameLocation": "34847:1:20", + "nodeType": "VariableDeclaration", + "scope": 7968, + "src": "34839:9:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7963, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34839:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "34838:11:20" + }, + "scope": 7969, + "src": "34792:145:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 7970, + "src": "769:34170:20", + "usedErrors": [ + 6214, + 6219, + 6226, + 6231 + ], + "usedEvents": [] + } + ], + "src": "192:34748:20" + }, + "id": 20 + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/math/SignedMath.sol", + "exportedSymbols": { + "SafeCast": [ + 7969 + ], + "SignedMath": [ + 8113 + ] + }, + "id": 8114, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7971, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "109:24:21" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol", + "file": "./SafeCast.sol", + "id": 7973, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8114, + "sourceUnit": 7970, + "src": "135:40:21", + "symbolAliases": [ + { + "foreign": { + "id": 7972, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "143:8:21", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SignedMath", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 7974, + "nodeType": "StructuredDocumentation", + "src": "177:80:21", + "text": " @dev Standard signed math utilities missing in the Solidity language." + }, + "fullyImplemented": true, + "id": 8113, + "linearizedBaseContracts": [ + 8113 + ], + "name": "SignedMath", + "nameLocation": "266:10:21", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 8003, + "nodeType": "Block", + "src": "746:215:21", + "statements": [ + { + "id": 8002, + "nodeType": "UncheckedBlock", + "src": "756:199:21", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7986, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7981, + "src": "894:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7987, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7979, + "src": "900:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 7988, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7981, + "src": "904:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "900:5:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 7990, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "899:7:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 7995, + "name": "condition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7977, + "src": "932:9:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 7993, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "916:8:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 7994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "925:6:21", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "916:15:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 7996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "916:26:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "909:6:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 7991, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "909:6:21", + "typeDescriptions": {} + } + }, + "id": 7997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "909:34:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "899:44:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 7999, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "898:46:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "894:50:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 7985, + "id": 8001, + "nodeType": "Return", + "src": "887:57:21" + } + ] + } + ] + }, + "documentation": { + "id": 7975, + "nodeType": "StructuredDocumentation", + "src": "283:374:21", + "text": " @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n one branch when needed, making this function more expensive." + }, + "id": 8004, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ternary", + "nameLocation": "671:7:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7982, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7977, + "mutability": "mutable", + "name": "condition", + "nameLocation": "684:9:21", + "nodeType": "VariableDeclaration", + "scope": 8004, + "src": "679:14:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7976, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "679:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7979, + "mutability": "mutable", + "name": "a", + "nameLocation": "702:1:21", + "nodeType": "VariableDeclaration", + "scope": 8004, + "src": "695:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7978, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "695:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7981, + "mutability": "mutable", + "name": "b", + "nameLocation": "712:1:21", + "nodeType": "VariableDeclaration", + "scope": 8004, + "src": "705:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7980, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "705:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "678:36:21" + }, + "returnParameters": { + "id": 7985, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7984, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8004, + "src": "738:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7983, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "738:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "737:8:21" + }, + "scope": 8113, + "src": "662:299:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8022, + "nodeType": "Block", + "src": "1102:44:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8015, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8007, + "src": "1127:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 8016, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8009, + "src": "1131:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1127:5:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 8018, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8007, + "src": "1134:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 8019, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8009, + "src": "1137:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 8014, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8004, + "src": "1119:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_int256_$_t_int256_$returns$_t_int256_$", + "typeString": "function (bool,int256,int256) pure returns (int256)" + } + }, + "id": 8020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1119:20:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 8013, + "id": 8021, + "nodeType": "Return", + "src": "1112:27:21" + } + ] + }, + "documentation": { + "id": 8005, + "nodeType": "StructuredDocumentation", + "src": "967:66:21", + "text": " @dev Returns the largest of two signed numbers." + }, + "id": 8023, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "max", + "nameLocation": "1047:3:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8007, + "mutability": "mutable", + "name": "a", + "nameLocation": "1058:1:21", + "nodeType": "VariableDeclaration", + "scope": 8023, + "src": "1051:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8006, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1051:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8009, + "mutability": "mutable", + "name": "b", + "nameLocation": "1068:1:21", + "nodeType": "VariableDeclaration", + "scope": 8023, + "src": "1061:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8008, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1061:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1050:20:21" + }, + "returnParameters": { + "id": 8013, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8012, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8023, + "src": "1094:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8011, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1094:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1093:8:21" + }, + "scope": 8113, + "src": "1038:108:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8041, + "nodeType": "Block", + "src": "1288:44:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8034, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8026, + "src": "1313:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 8035, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8028, + "src": "1317:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1313:5:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 8037, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8026, + "src": "1320:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 8038, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8028, + "src": "1323:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 8033, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8004, + "src": "1305:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_int256_$_t_int256_$returns$_t_int256_$", + "typeString": "function (bool,int256,int256) pure returns (int256)" + } + }, + "id": 8039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1305:20:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 8032, + "id": 8040, + "nodeType": "Return", + "src": "1298:27:21" + } + ] + }, + "documentation": { + "id": 8024, + "nodeType": "StructuredDocumentation", + "src": "1152:67:21", + "text": " @dev Returns the smallest of two signed numbers." + }, + "id": 8042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "min", + "nameLocation": "1233:3:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8029, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8026, + "mutability": "mutable", + "name": "a", + "nameLocation": "1244:1:21", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "1237:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8025, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1237:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8028, + "mutability": "mutable", + "name": "b", + "nameLocation": "1254:1:21", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "1247:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8027, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1247:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1236:20:21" + }, + "returnParameters": { + "id": 8032, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8031, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "1280:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8030, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1280:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1279:8:21" + }, + "scope": 8113, + "src": "1224:108:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8085, + "nodeType": "Block", + "src": "1537:162:21", + "statements": [ + { + "assignments": [ + 8053 + ], + "declarations": [ + { + "constant": false, + "id": 8053, + "mutability": "mutable", + "name": "x", + "nameLocation": "1606:1:21", + "nodeType": "VariableDeclaration", + "scope": 8085, + "src": "1599:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8052, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1599:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 8066, + "initialValue": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8054, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8045, + "src": "1611:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 8055, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8047, + "src": "1615:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1611:5:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8057, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1610:7:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8058, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8045, + "src": "1622:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 8059, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8047, + "src": "1626:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1622:5:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8061, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1621:7:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 8062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1632:1:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1621:12:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8064, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1620:14:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1610:24:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1599:35:21" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8067, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8053, + "src": "1651:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 8072, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8053, + "src": "1671:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 8071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1663:7:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 8070, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1663:7:21", + "typeDescriptions": {} + } + }, + "id": 8073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1663:10:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "323535", + "id": 8074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1677:3:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "1663:17:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1656:6:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 8068, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1656:6:21", + "typeDescriptions": {} + } + }, + "id": 8076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1656:25:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8077, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8045, + "src": "1685:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 8078, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8047, + "src": "1689:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1685:5:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8080, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1684:7:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1656:35:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8082, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1655:37:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1651:41:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 8051, + "id": 8084, + "nodeType": "Return", + "src": "1644:48:21" + } + ] + }, + "documentation": { + "id": 8043, + "nodeType": "StructuredDocumentation", + "src": "1338:126:21", + "text": " @dev Returns the average of two signed numbers without overflow.\n The result is rounded towards zero." + }, + "id": 8086, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "average", + "nameLocation": "1478:7:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8048, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8045, + "mutability": "mutable", + "name": "a", + "nameLocation": "1493:1:21", + "nodeType": "VariableDeclaration", + "scope": 8086, + "src": "1486:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8044, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1486:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8047, + "mutability": "mutable", + "name": "b", + "nameLocation": "1503:1:21", + "nodeType": "VariableDeclaration", + "scope": 8086, + "src": "1496:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8046, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1496:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1485:20:21" + }, + "returnParameters": { + "id": 8051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8050, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8086, + "src": "1529:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8049, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1529:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1528:8:21" + }, + "scope": 8113, + "src": "1469:230:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8111, + "nodeType": "Block", + "src": "1843:767:21", + "statements": [ + { + "id": 8110, + "nodeType": "UncheckedBlock", + "src": "1853:751:21", + "statements": [ + { + "assignments": [ + 8095 + ], + "declarations": [ + { + "constant": false, + "id": 8095, + "mutability": "mutable", + "name": "mask", + "nameLocation": "2424:4:21", + "nodeType": "VariableDeclaration", + "scope": 8110, + "src": "2417:11:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8094, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "2417:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 8099, + "initialValue": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8096, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8089, + "src": "2431:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "323535", + "id": 8097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2436:3:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "2431:8:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2417:22:21" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8102, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8089, + "src": "2576:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 8103, + "name": "mask", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8095, + "src": "2580:4:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "2576:8:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8105, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2575:10:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 8106, + "name": "mask", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8095, + "src": "2588:4:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "2575:17:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 8101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2567:7:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 8100, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2567:7:21", + "typeDescriptions": {} + } + }, + "id": 8108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2567:26:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8093, + "id": 8109, + "nodeType": "Return", + "src": "2560:33:21" + } + ] + } + ] + }, + "documentation": { + "id": 8087, + "nodeType": "StructuredDocumentation", + "src": "1705:78:21", + "text": " @dev Returns the absolute unsigned value of a signed value." + }, + "id": 8112, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "abs", + "nameLocation": "1797:3:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8090, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8089, + "mutability": "mutable", + "name": "n", + "nameLocation": "1808:1:21", + "nodeType": "VariableDeclaration", + "scope": 8112, + "src": "1801:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8088, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1801:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1800:10:21" + }, + "returnParameters": { + "id": 8093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8092, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8112, + "src": "1834:7:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1834:7:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1833:9:21" + }, + "scope": 8113, + "src": "1788:822:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 8114, + "src": "258:2354:21", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "109:2504:21" + }, + "id": 21 + }, + "contracts/TokenRelayer.sol": { + "ast": { + "absolutePath": "contracts/TokenRelayer.sol", + "exportedSymbols": { + "ECDSA": [ + 4137 + ], + "EIP712": [ + 4364 + ], + "IERC20": [ + 340 + ], + "IERC20Permit": [ + 376 + ], + "Ownable": [ + 147 + ], + "ReentrancyGuard": [ + 1827 + ], + "SafeERC20": [ + 831 + ], + "TokenRelayer": [ + 8603 + ] + }, + "id": 8604, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 8115, + "literals": [ + "solidity", + "^", + "0.8", + ".28" + ], + "nodeType": "PragmaDirective", + "src": "32:24:22" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 8117, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 148, + "src": "58:67:22", + "symbolAliases": [ + { + "foreign": { + "id": 8116, + "name": "Ownable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 147, + "src": "66:7:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 8119, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 341, + "src": "126:70:22", + "symbolAliases": [ + { + "foreign": { + "id": 8118, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "134:6:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol", + "file": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol", + "id": 8121, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 377, + "src": "197:93:22", + "symbolAliases": [ + { + "foreign": { + "id": 8120, + "name": "IERC20Permit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "205:12:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "id": 8123, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 832, + "src": "291:82:22", + "symbolAliases": [ + { + "foreign": { + "id": 8122, + "name": "SafeERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 831, + "src": "299:9:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "id": 8125, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 1828, + "src": "374:82:22", + "symbolAliases": [ + { + "foreign": { + "id": 8124, + "name": "ReentrancyGuard", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1827, + "src": "382:15:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", + "file": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", + "id": 8127, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 4138, + "src": "457:75:22", + "symbolAliases": [ + { + "foreign": { + "id": 8126, + "name": "ECDSA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4137, + "src": "465:5:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/EIP712.sol", + "file": "@openzeppelin/contracts/utils/cryptography/EIP712.sol", + "id": 8129, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 4365, + "src": "533:77:22", + "symbolAliases": [ + { + "foreign": { + "id": 8128, + "name": "EIP712", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "541:6:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 8131, + "name": "Ownable", + "nameLocations": [ + "1183:7:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 147, + "src": "1183:7:22" + }, + "id": 8132, + "nodeType": "InheritanceSpecifier", + "src": "1183:7:22" + }, + { + "baseName": { + "id": 8133, + "name": "ReentrancyGuard", + "nameLocations": [ + "1192:15:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1827, + "src": "1192:15:22" + }, + "id": 8134, + "nodeType": "InheritanceSpecifier", + "src": "1192:15:22" + }, + { + "baseName": { + "id": 8135, + "name": "EIP712", + "nameLocations": [ + "1209:6:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4364, + "src": "1209:6:22" + }, + "id": 8136, + "nodeType": "InheritanceSpecifier", + "src": "1209:6:22" + } + ], + "canonicalName": "TokenRelayer", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 8130, + "nodeType": "StructuredDocumentation", + "src": "612:545:22", + "text": " @title TokenRelayer\n @notice A relayer contract that accepts ERC20 permit signatures and executes\n arbitrary calls to a destination contract, both authorized via signature.\n \n Flow:\n 1. User signs a permit allowing the relayer to spend their tokens\n 2. User signs a payload (e.g., transfer from relayer to another user)\n 3. Relayer:\n a. Executes permit to approve the tokens\n b. Transfers tokens from user to relayer (via transferFrom)\n c. Forwards the payload call (transfer from relayer to another user)" + }, + "fullyImplemented": true, + "id": 8603, + "linearizedBaseContracts": [ + 8603, + 4364, + 262, + 1827, + 147, + 1662 + ], + "name": "TokenRelayer", + "nameLocation": "1167:12:22", + "nodeType": "ContractDefinition", + "nodes": [ + { + "global": false, + "id": 8140, + "libraryName": { + "id": 8137, + "name": "SafeERC20", + "nameLocations": [ + "1228:9:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 831, + "src": "1228:9:22" + }, + "nodeType": "UsingForDirective", + "src": "1222:27:22", + "typeName": { + "id": 8139, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 8138, + "name": "IERC20", + "nameLocations": [ + "1242:6:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "1242:6:22" + }, + "referencedDeclaration": 340, + "src": "1242:6:22", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + }, + { + "constant": true, + "id": 8145, + "mutability": "constant", + "name": "_TYPE_HASH_PAYLOAD", + "nameLocation": "1335:18:22", + "nodeType": "VariableDeclaration", + "scope": 8603, + "src": "1310:202:22", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8141, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1310:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "5061796c6f616428616464726573732064657374696e6174696f6e2c61646472657373206f776e65722c6164647265737320746f6b656e2c75696e743235362076616c75652c627974657320646174612c75696e743235362065746856616c75652c75696e74323536206e6f6e63652c75696e7432353620646561646c696e6529", + "id": 8143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1375:131:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844", + "typeString": "literal_string \"Payload(address destination,address owner,address token,uint256 value,bytes data,uint256 ethValue,uint256 nonce,uint256 deadline)\"" + }, + "value": "Payload(address destination,address owner,address token,uint256 value,bytes data,uint256 ethValue,uint256 nonce,uint256 deadline)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844", + "typeString": "literal_string \"Payload(address destination,address owner,address token,uint256 value,bytes data,uint256 ethValue,uint256 nonce,uint256 deadline)\"" + } + ], + "id": 8142, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1356:9:22", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 8144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1356:156:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "75bd6863", + "id": 8147, + "mutability": "immutable", + "name": "destinationContract", + "nameLocation": "1544:19:22", + "nodeType": "VariableDeclaration", + "scope": 8603, + "src": "1519:44:22", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8146, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1519:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d850124e", + "id": 8153, + "mutability": "mutable", + "name": "usedPayloadNonces", + "nameLocation": "1622:17:22", + "nodeType": "VariableDeclaration", + "scope": 8603, + "src": "1570:69:22", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + }, + "typeName": { + "id": 8152, + "keyName": "", + "keyNameLocation": "-1:-1:-1", + "keyType": { + "id": 8148, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1578:7:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1570:44:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 8151, + "keyName": "", + "keyNameLocation": "-1:-1:-1", + "keyType": { + "id": 8149, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1597:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1589:24:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 8150, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1608:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "visibility": "public" + }, + { + "canonicalName": "TokenRelayer.ExecuteParams", + "id": 8182, + "members": [ + { + "constant": false, + "id": 8155, + "mutability": "mutable", + "name": "token", + "nameLocation": "1768:5:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1760:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1760:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8157, + "mutability": "mutable", + "name": "owner", + "nameLocation": "1791:5:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1783:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8156, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1783:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8159, + "mutability": "mutable", + "name": "value", + "nameLocation": "1814:5:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1806:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8158, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8161, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "1837:8:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1829:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8160, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1829:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8163, + "mutability": "mutable", + "name": "permitV", + "nameLocation": "1861:7:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1855:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8162, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1855:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8165, + "mutability": "mutable", + "name": "permitR", + "nameLocation": "1886:7:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1878:15:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8164, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1878:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8167, + "mutability": "mutable", + "name": "permitS", + "nameLocation": "1911:7:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1903:15:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8166, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1903:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8169, + "mutability": "mutable", + "name": "payloadData", + "nameLocation": "1934:11:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1928:17:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 8168, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1928:5:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8171, + "mutability": "mutable", + "name": "payloadValue", + "nameLocation": "1963:12:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1955:20:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1955:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8173, + "mutability": "mutable", + "name": "payloadNonce", + "nameLocation": "1993:12:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1985:20:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1985:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8175, + "mutability": "mutable", + "name": "payloadDeadline", + "nameLocation": "2023:15:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "2015:23:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2015:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8177, + "mutability": "mutable", + "name": "payloadV", + "nameLocation": "2054:8:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "2048:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8176, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2048:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8179, + "mutability": "mutable", + "name": "payloadR", + "nameLocation": "2080:8:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "2072:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8178, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2072:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8181, + "mutability": "mutable", + "name": "payloadS", + "nameLocation": "2106:8:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "2098:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8180, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2098:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "name": "ExecuteParams", + "nameLocation": "1736:13:22", + "nodeType": "StructDefinition", + "scope": 8603, + "src": "1729:392:22", + "visibility": "public" + }, + { + "anonymous": false, + "eventSelector": "78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350", + "id": 8190, + "name": "RelayerExecuted", + "nameLocation": "2133:15:22", + "nodeType": "EventDefinition", + "parameters": { + "id": 8189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8184, + "indexed": true, + "mutability": "mutable", + "name": "signer", + "nameLocation": "2174:6:22", + "nodeType": "VariableDeclaration", + "scope": 8190, + "src": "2158:22:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2158:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8186, + "indexed": true, + "mutability": "mutable", + "name": "token", + "nameLocation": "2206:5:22", + "nodeType": "VariableDeclaration", + "scope": 8190, + "src": "2190:21:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8185, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2190:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8188, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2229:6:22", + "nodeType": "VariableDeclaration", + "scope": 8190, + "src": "2221:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2221:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2148:93:22" + }, + "src": "2127:115:22" + }, + { + "anonymous": false, + "eventSelector": "a0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e0", + "id": 8198, + "name": "TokenWithdrawn", + "nameLocation": "2294:14:22", + "nodeType": "EventDefinition", + "parameters": { + "id": 8197, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8192, + "indexed": true, + "mutability": "mutable", + "name": "token", + "nameLocation": "2325:5:22", + "nodeType": "VariableDeclaration", + "scope": 8198, + "src": "2309:21:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8191, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2309:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8194, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2340:6:22", + "nodeType": "VariableDeclaration", + "scope": 8198, + "src": "2332:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8193, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2332:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8196, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2364:2:22", + "nodeType": "VariableDeclaration", + "scope": 8198, + "src": "2348:18:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8195, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2348:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2308:59:22" + }, + "src": "2288:80:22" + }, + { + "anonymous": false, + "eventSelector": "6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc", + "id": 8204, + "name": "ETHWithdrawn", + "nameLocation": "2379:12:22", + "nodeType": "EventDefinition", + "parameters": { + "id": 8203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8200, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2400:6:22", + "nodeType": "VariableDeclaration", + "scope": 8204, + "src": "2392:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8199, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2392:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8202, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2424:2:22", + "nodeType": "VariableDeclaration", + "scope": 8204, + "src": "2408:18:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8201, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2408:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2391:36:22" + }, + "src": "2373:55:22" + }, + { + "body": { + "id": 8231, + "nodeType": "Block", + "src": "2614:135:22", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 8223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8218, + "name": "_destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "2632:20:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 8221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2664:1:22", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 8220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2656:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8219, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2656:7:22", + "typeDescriptions": {} + } + }, + "id": 8222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2656:10:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2632:34:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c69642064657374696e6174696f6e", + "id": 8224, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2668:21:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368", + "typeString": "literal_string \"Invalid destination\"" + }, + "value": "Invalid destination" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368", + "typeString": "literal_string \"Invalid destination\"" + } + ], + "id": 8217, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2624:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2624:66:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8226, + "nodeType": "ExpressionStatement", + "src": "2624:66:22" + }, + { + "expression": { + "id": 8229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 8227, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "2700:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 8228, + "name": "_destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "2722:20:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2700:42:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 8230, + "nodeType": "ExpressionStatement", + "src": "2700:42:22" + } + ] + }, + "id": 8232, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 8209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2562:3:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2566:6:22", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2562:10:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 8211, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 8208, + "name": "Ownable", + "nameLocations": [ + "2554:7:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 147, + "src": "2554:7:22" + }, + "nodeType": "ModifierInvocation", + "src": "2554:19:22" + }, + { + "arguments": [ + { + "hexValue": "546f6b656e52656c61796572", + "id": 8213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2589:14:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_142b4a499251a4eacaab3f10318ce24bd0fa67fa5375e1dfcd0a44e62c5b47a4", + "typeString": "literal_string \"TokenRelayer\"" + }, + "value": "TokenRelayer" + }, + { + "hexValue": "31", + "id": 8214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2605:3:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "typeString": "literal_string \"1\"" + }, + "value": "1" + } + ], + "id": 8215, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 8212, + "name": "EIP712", + "nameLocations": [ + "2582:6:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4364, + "src": "2582:6:22" + }, + "nodeType": "ModifierInvocation", + "src": "2582:27:22" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8206, + "mutability": "mutable", + "name": "_destinationContract", + "nameLocation": "2524:20:22", + "nodeType": "VariableDeclaration", + "scope": 8232, + "src": "2516:28:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2516:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2515:30:22" + }, + "returnParameters": { + "id": 8216, + "nodeType": "ParameterList", + "parameters": [], + "src": "2614:0:22" + }, + "scope": 8603, + "src": "2504:245:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8235, + "nodeType": "Block", + "src": "2852:2:22", + "statements": [] + }, + "id": 8236, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8233, + "nodeType": "ParameterList", + "parameters": [], + "src": "2832:2:22" + }, + "returnParameters": { + "id": 8234, + "nodeType": "ParameterList", + "parameters": [], + "src": "2852:0:22" + }, + "scope": 8603, + "src": "2825:29:22", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 8401, + "nodeType": "Block", + "src": "3073:1918:22", + "statements": [ + { + "assignments": [ + 8245 + ], + "declarations": [ + { + "constant": false, + "id": 8245, + "mutability": "mutable", + "name": "owner", + "nameLocation": "3091:5:22", + "nodeType": "VariableDeclaration", + "scope": 8401, + "src": "3083:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3083:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 8248, + "initialValue": { + "expression": { + "id": 8246, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3099:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3106:5:22", + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 8157, + "src": "3099:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3083:28:22" + }, + { + "assignments": [ + 8250 + ], + "declarations": [ + { + "constant": false, + "id": 8250, + "mutability": "mutable", + "name": "nonce", + "nameLocation": "3129:5:22", + "nodeType": "VariableDeclaration", + "scope": 8401, + "src": "3121:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8249, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3121:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 8253, + "initialValue": { + "expression": { + "id": 8251, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3137:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3144:12:22", + "memberName": "payloadNonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 8173, + "src": "3137:19:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3121:35:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 8260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8255, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "3201:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 8258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3218:1:22", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 8257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3210:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8256, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3210:7:22", + "typeDescriptions": {} + } + }, + "id": 8259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3210:10:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3201:19:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c6964206f776e6572", + "id": 8261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3222:15:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae", + "typeString": "literal_string \"Invalid owner\"" + }, + "value": "Invalid owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae", + "typeString": "literal_string \"Invalid owner\"" + } + ], + "id": 8254, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3193:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3193:45:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8263, + "nodeType": "ExpressionStatement", + "src": "3193:45:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 8271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8265, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3256:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3263:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "3256:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 8269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3280:1:22", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 8268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3272:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8267, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3272:7:22", + "typeDescriptions": {} + } + }, + "id": 8270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3272:10:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3256:26:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c696420746f6b656e", + "id": 8272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3284:15:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6", + "typeString": "literal_string \"Invalid token\"" + }, + "value": "Invalid token" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6", + "typeString": "literal_string \"Invalid token\"" + } + ], + "id": 8264, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3248:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3248:52:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8274, + "nodeType": "ExpressionStatement", + "src": "3248:52:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3318:32:22", + "subExpression": { + "baseExpression": { + "baseExpression": { + "id": 8276, + "name": "usedPayloadNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8153, + "src": "3319:17:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 8278, + "indexExpression": { + "id": 8277, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "3337:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3319:24:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 8280, + "indexExpression": { + "id": 8279, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8250, + "src": "3344:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3319:31:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e6f6e63652075736564", + "id": 8282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3352:12:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21", + "typeString": "literal_string \"Nonce used\"" + }, + "value": "Nonce used" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21", + "typeString": "literal_string \"Nonce used\"" + } + ], + "id": 8275, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3310:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3310:55:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8284, + "nodeType": "ExpressionStatement", + "src": "3310:55:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8286, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "3383:5:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3389:9:22", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "3383:15:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8288, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3402:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3409:15:22", + "memberName": "payloadDeadline", + "nodeType": "MemberAccess", + "referencedDeclaration": 8175, + "src": "3402:22:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3383:41:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5061796c6f61642065787069726564", + "id": 8291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3426:17:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae", + "typeString": "literal_string \"Payload expired\"" + }, + "value": "Payload expired" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae", + "typeString": "literal_string \"Payload expired\"" + } + ], + "id": 8285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3375:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3375:69:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8293, + "nodeType": "ExpressionStatement", + "src": "3375:69:22" + }, + { + "assignments": [ + 8295 + ], + "declarations": [ + { + "constant": false, + "id": 8295, + "mutability": "mutable", + "name": "digest", + "nameLocation": "3531:6:22", + "nodeType": "VariableDeclaration", + "scope": 8401, + "src": "3523:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8294, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3523:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8310, + "initialValue": { + "arguments": [ + { + "id": 8297, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "3568:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8298, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3587:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3594:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "3587:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8300, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3613:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3620:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 8159, + "src": "3613:12:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8302, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3639:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3646:11:22", + "memberName": "payloadData", + "nodeType": "MemberAccess", + "referencedDeclaration": 8169, + "src": "3639:18:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "expression": { + "id": 8304, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3671:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3678:12:22", + "memberName": "payloadValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 8171, + "src": "3671:19:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8306, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8250, + "src": "3704:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8307, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3723:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3730:15:22", + "memberName": "payloadDeadline", + "nodeType": "MemberAccess", + "referencedDeclaration": 8175, + "src": "3723:22:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8296, + "name": "_computeDigest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8441, + "src": "3540:14:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,address,uint256,bytes memory,uint256,uint256,uint256) view returns (bytes32)" + } + }, + "id": 8309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3540:215:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3523:232:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 8323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 8314, + "name": "digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8295, + "src": "3864:6:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8315, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3872:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3879:8:22", + "memberName": "payloadV", + "nodeType": "MemberAccess", + "referencedDeclaration": 8177, + "src": "3872:15:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 8317, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3889:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3896:8:22", + "memberName": "payloadR", + "nodeType": "MemberAccess", + "referencedDeclaration": 8179, + "src": "3889:15:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8319, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3906:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3913:8:22", + "memberName": "payloadS", + "nodeType": "MemberAccess", + "referencedDeclaration": 8181, + "src": "3906:15:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 8312, + "name": "ECDSA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4137, + "src": "3850:5:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ECDSA_$4137_$", + "typeString": "type(library ECDSA)" + } + }, + "id": 8313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3856:7:22", + "memberName": "recover", + "nodeType": "MemberAccess", + "referencedDeclaration": 4059, + "src": "3850:13:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 8321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3850:72:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 8322, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "3926:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3850:81:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c696420736967", + "id": 8324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3933:13:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72", + "typeString": "literal_string \"Invalid sig\"" + }, + "value": "Invalid sig" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72", + "typeString": "literal_string \"Invalid sig\"" + } + ], + "id": 8311, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3842:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3842:105:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8326, + "nodeType": "ExpressionStatement", + "src": "3842:105:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8328, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3966:3:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3970:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "3966:9:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 8330, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3979:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3986:12:22", + "memberName": "payloadValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 8171, + "src": "3979:19:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3966:32:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374204554482076616c75652070726f7669646564", + "id": 8333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4000:30:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76", + "typeString": "literal_string \"Incorrect ETH value provided\"" + }, + "value": "Incorrect ETH value provided" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76", + "typeString": "literal_string \"Incorrect ETH value provided\"" + } + ], + "id": 8327, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3958:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3958:73:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8335, + "nodeType": "ExpressionStatement", + "src": "3958:73:22" + }, + { + "expression": { + "id": 8342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 8336, + "name": "usedPayloadNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8153, + "src": "4158:17:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 8339, + "indexExpression": { + "id": 8337, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "4176:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4158:24:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 8340, + "indexExpression": { + "id": 8338, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8250, + "src": "4183:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4158:31:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 8341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4192:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "4158:38:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 8343, + "nodeType": "ExpressionStatement", + "src": "4158:38:22" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 8345, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4342:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4349:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "4342:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8347, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "4368:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8348, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4387:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4394:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 8159, + "src": "4387:12:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8350, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4413:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4420:8:22", + "memberName": "deadline", + "nodeType": "MemberAccess", + "referencedDeclaration": 8161, + "src": "4413:15:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8352, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4442:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4449:7:22", + "memberName": "permitV", + "nodeType": "MemberAccess", + "referencedDeclaration": 8163, + "src": "4442:14:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 8354, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4470:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4477:7:22", + "memberName": "permitR", + "nodeType": "MemberAccess", + "referencedDeclaration": 8165, + "src": "4470:14:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8356, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4498:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4505:7:22", + "memberName": "permitS", + "nodeType": "MemberAccess", + "referencedDeclaration": 8167, + "src": "4498:14:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 8344, + "name": "_executePermitAndTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8508, + "src": "4303:25:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32)" + } + }, + "id": 8358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4303:219:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8359, + "nodeType": "ExpressionStatement", + "src": "4303:219:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8365, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "4626:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8366, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4647:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4654:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 8159, + "src": "4647:12:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 8361, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4599:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4606:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "4599:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8360, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "4592:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4592:20:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4613:12:22", + "memberName": "forceApprove", + "nodeType": "MemberAccess", + "referencedDeclaration": 626, + "src": "4592:33:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$340_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 8368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4592:68:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8369, + "nodeType": "ExpressionStatement", + "src": "4592:68:22" + }, + { + "assignments": [ + 8371 + ], + "declarations": [ + { + "constant": false, + "id": 8371, + "mutability": "mutable", + "name": "callSuccess", + "nameLocation": "4676:11:22", + "nodeType": "VariableDeclaration", + "scope": 8401, + "src": "4671:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8370, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4671:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 8378, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 8373, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4703:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4710:11:22", + "memberName": "payloadData", + "nodeType": "MemberAccess", + "referencedDeclaration": 8169, + "src": "4703:18:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "expression": { + "id": 8375, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4723:3:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4727:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "4723:9:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8372, + "name": "_forwardCall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8529, + "src": "4690:12:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes memory,uint256) returns (bool)" + } + }, + "id": 8377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4690:43:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4671:62:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8380, + "name": "callSuccess", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8371, + "src": "4751:11:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "43616c6c206661696c6564", + "id": 8381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4764:13:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b", + "typeString": "literal_string \"Call failed\"" + }, + "value": "Call failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b", + "typeString": "literal_string \"Call failed\"" + } + ], + "id": 8379, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4743:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4743:35:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8383, + "nodeType": "ExpressionStatement", + "src": "4743:35:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8389, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "4895:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "30", + "id": 8390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4916:1:22", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 8385, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4868:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4875:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "4868:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8384, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "4861:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4861:20:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4882:12:22", + "memberName": "forceApprove", + "nodeType": "MemberAccess", + "referencedDeclaration": 626, + "src": "4861:33:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$340_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 8391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4861:57:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8392, + "nodeType": "ExpressionStatement", + "src": "4861:57:22" + }, + { + "eventCall": { + "arguments": [ + { + "id": 8394, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "4950:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8395, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4957:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4964:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "4957:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8397, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4971:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4978:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 8159, + "src": "4971:12:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8393, + "name": "RelayerExecuted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8190, + "src": "4934:15:22", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 8399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4934:50:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8400, + "nodeType": "EmitStatement", + "src": "4929:55:22" + } + ] + }, + "functionSelector": "2af83bfe", + "id": 8402, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 8242, + "kind": "modifierInvocation", + "modifierName": { + "id": 8241, + "name": "nonReentrant", + "nameLocations": [ + "3060:12:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1757, + "src": "3060:12:22" + }, + "nodeType": "ModifierInvocation", + "src": "3060:12:22" + } + ], + "name": "execute", + "nameLocation": "3004:7:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8240, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8239, + "mutability": "mutable", + "name": "params", + "nameLocation": "3035:6:22", + "nodeType": "VariableDeclaration", + "scope": 8402, + "src": "3012:29:22", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams" + }, + "typeName": { + "id": 8238, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 8237, + "name": "ExecuteParams", + "nameLocations": [ + "3012:13:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 8182, + "src": "3012:13:22" + }, + "referencedDeclaration": 8182, + "src": "3012:13:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_storage_ptr", + "typeString": "struct TokenRelayer.ExecuteParams" + } + }, + "visibility": "internal" + } + ], + "src": "3011:31:22" + }, + "returnParameters": { + "id": 8243, + "nodeType": "ParameterList", + "parameters": [], + "src": "3073:0:22" + }, + "scope": 8603, + "src": "2995:1996:22", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 8440, + "nodeType": "Block", + "src": "5285:400:22", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 8425, + "name": "_TYPE_HASH_PAYLOAD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8145, + "src": "5370:18:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 8426, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "5406:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8427, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8404, + "src": "5494:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8428, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8406, + "src": "5517:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8429, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8408, + "src": "5540:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 8431, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8410, + "src": "5573:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 8430, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "5563:9:22", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 8432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5563:15:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 8433, + "name": "ethValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8412, + "src": "5596:8:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8434, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8414, + "src": "5622:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8435, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8416, + "src": "5645:8:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 8423, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "5342:3:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 8424, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5346:6:22", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "5342:10:22", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 8436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5342:325:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 8422, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "5332:9:22", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 8437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5332:336:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 8421, + "name": "_hashTypedDataV4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4297, + "src": "5302:16:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32) view returns (bytes32)" + } + }, + "id": 8438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5302:376:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8420, + "id": 8439, + "nodeType": "Return", + "src": "5295:383:22" + } + ] + }, + "id": 8441, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_computeDigest", + "nameLocation": "5062:14:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8404, + "mutability": "mutable", + "name": "owner", + "nameLocation": "5094:5:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5086:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5086:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8406, + "mutability": "mutable", + "name": "token", + "nameLocation": "5117:5:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5109:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8405, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5109:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8408, + "mutability": "mutable", + "name": "value", + "nameLocation": "5140:5:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5132:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8407, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5132:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8410, + "mutability": "mutable", + "name": "data", + "nameLocation": "5168:4:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5155:17:22", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 8409, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5155:5:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8412, + "mutability": "mutable", + "name": "ethValue", + "nameLocation": "5190:8:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5182:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5182:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8414, + "mutability": "mutable", + "name": "nonce", + "nameLocation": "5216:5:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5208:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5208:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8416, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "5239:8:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5231:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8415, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5231:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5076:177:22" + }, + "returnParameters": { + "id": 8420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8419, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5276:7:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8418, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5276:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5275:9:22" + }, + "scope": 8603, + "src": "5053:632:22", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 8507, + "nodeType": "Block", + "src": "6141:577:22", + "statements": [ + { + "clauses": [ + { + "block": { + "id": 8474, + "nodeType": "Block", + "src": "6291:43:22", + "statements": [] + }, + "errorName": "", + "id": 8475, + "nodeType": "TryCatchClause", + "src": "6291:43:22" + }, + { + "block": { + "id": 8492, + "nodeType": "Block", + "src": "6341:246:22", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 8481, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8446, + "src": "6472:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 8484, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6487:4:22", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + ], + "id": 8483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6479:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6479:7:22", + "typeDescriptions": {} + } + }, + "id": 8485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6479:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 8478, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8444, + "src": "6455:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8477, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "6448:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6448:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6462:9:22", + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 317, + "src": "6448:23:22", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 8486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6448:45:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 8487, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8448, + "src": "6497:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6448:54:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5065726d6974206661696c656420616e6420696e73756666696369656e7420616c6c6f77616e6365", + "id": 8489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6520:42:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15", + "typeString": "literal_string \"Permit failed and insufficient allowance\"" + }, + "value": "Permit failed and insufficient allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15", + "typeString": "literal_string \"Permit failed and insufficient allowance\"" + } + ], + "id": 8476, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6423:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6423:153:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8491, + "nodeType": "ExpressionStatement", + "src": "6423:153:22" + } + ] + }, + "errorName": "", + "id": 8493, + "nodeType": "TryCatchClause", + "src": "6335:252:22" + } + ], + "externalCall": { + "arguments": [ + { + "id": 8463, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8446, + "src": "6243:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 8466, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6258:4:22", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + ], + "id": 8465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6250:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6250:7:22", + "typeDescriptions": {} + } + }, + "id": 8467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6250:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8468, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8448, + "src": "6265:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8469, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8450, + "src": "6272:8:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8470, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8452, + "src": "6282:1:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 8471, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8454, + "src": "6285:1:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 8472, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8456, + "src": "6288:1:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [ + { + "id": 8460, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8444, + "src": "6229:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8459, + "name": "IERC20Permit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "6216:12:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Permit_$376_$", + "typeString": "type(contract IERC20Permit)" + } + }, + "id": 8461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6216:19:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Permit_$376", + "typeString": "contract IERC20Permit" + } + }, + "id": 8462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6236:6:22", + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 361, + "src": "6216:26:22", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 8473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6216:74:22", + "tryCall": true, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8494, + "nodeType": "TryStatement", + "src": "6212:375:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8499, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8446, + "src": "6683:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 8502, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6698:4:22", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + ], + "id": 8501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6690:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8500, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6690:7:22", + "typeDescriptions": {} + } + }, + "id": 8503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6690:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8504, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8448, + "src": "6705:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8496, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8444, + "src": "6659:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8495, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "6652:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6652:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6666:16:22", + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 456, + "src": "6652:30:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$340_$", + "typeString": "function (contract IERC20,address,address,uint256)" + } + }, + "id": 8505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6652:59:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8506, + "nodeType": "ExpressionStatement", + "src": "6652:59:22" + } + ] + }, + "documentation": { + "id": 8442, + "nodeType": "StructuredDocumentation", + "src": "5691:245:22", + "text": " @dev Execute permit approval and then transfer tokens from owner to self (relayer).\n Permit is wrapped in try-catch: if it was front-run, we check\n that the allowance is already sufficient before proceeding." + }, + "id": 8508, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_executePermitAndTransfer", + "nameLocation": "5950:25:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8457, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8444, + "mutability": "mutable", + "name": "token", + "nameLocation": "5993:5:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "5985:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8443, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5985:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8446, + "mutability": "mutable", + "name": "owner", + "nameLocation": "6016:5:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6008:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8445, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6008:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8448, + "mutability": "mutable", + "name": "value", + "nameLocation": "6039:5:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6031:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8447, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6031:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8450, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "6062:8:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6054:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8449, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6054:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8452, + "mutability": "mutable", + "name": "v", + "nameLocation": "6086:1:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6080:7:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8451, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6080:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8454, + "mutability": "mutable", + "name": "r", + "nameLocation": "6105:1:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6097:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8453, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6097:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8456, + "mutability": "mutable", + "name": "s", + "nameLocation": "6124:1:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6116:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8455, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6116:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5975:156:22" + }, + "returnParameters": { + "id": 8458, + "nodeType": "ParameterList", + "parameters": [], + "src": "6141:0:22" + }, + "scope": 8603, + "src": "5941:777:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8528, + "nodeType": "Block", + "src": "6804:104:22", + "statements": [ + { + "assignments": [ + 8518, + null + ], + "declarations": [ + { + "constant": false, + "id": 8518, + "mutability": "mutable", + "name": "success", + "nameLocation": "6820:7:22", + "nodeType": "VariableDeclaration", + "scope": 8528, + "src": "6815:12:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8517, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6815:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 8525, + "initialValue": { + "arguments": [ + { + "id": 8523, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8510, + "src": "6872:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 8519, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "6833:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 8520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6853:4:22", + "memberName": "call", + "nodeType": "MemberAccess", + "src": "6833:24:22", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 8522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 8521, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8512, + "src": "6865:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "6833:38:22", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 8524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6833:44:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6814:63:22" + }, + { + "expression": { + "id": 8526, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8518, + "src": "6894:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8516, + "id": 8527, + "nodeType": "Return", + "src": "6887:14:22" + } + ] + }, + "id": 8529, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forwardCall", + "nameLocation": "6733:12:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8510, + "mutability": "mutable", + "name": "data", + "nameLocation": "6759:4:22", + "nodeType": "VariableDeclaration", + "scope": 8529, + "src": "6746:17:22", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 8509, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6746:5:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8512, + "mutability": "mutable", + "name": "value", + "nameLocation": "6773:5:22", + "nodeType": "VariableDeclaration", + "scope": 8529, + "src": "6765:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8511, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6765:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6745:34:22" + }, + "returnParameters": { + "id": 8516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8515, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8529, + "src": "6798:4:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8514, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6798:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "6797:6:22" + }, + "scope": 8603, + "src": "6724:184:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8555, + "nodeType": "Block", + "src": "7309:113:22", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 8543, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7346:5:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 8544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7346:7:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8545, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8534, + "src": "7355:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8540, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8532, + "src": "7326:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8539, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "7319:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7319:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7333:12:22", + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 425, + "src": "7319:26:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$340_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 8546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7319:43:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8547, + "nodeType": "ExpressionStatement", + "src": "7319:43:22" + }, + { + "eventCall": { + "arguments": [ + { + "id": 8549, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8532, + "src": "7392:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8550, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8534, + "src": "7399:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 8551, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7407:5:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 8552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7407:7:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8548, + "name": "TokenWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8198, + "src": "7377:14:22", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (address,uint256,address)" + } + }, + "id": 8553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7377:38:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8554, + "nodeType": "EmitStatement", + "src": "7372:43:22" + } + ] + }, + "documentation": { + "id": 8530, + "nodeType": "StructuredDocumentation", + "src": "6914:217:22", + "text": " @notice Allows the owner to recover any ERC20 tokens held by this contract.\n @param token The ERC20 token contract address.\n @param amount The amount of tokens to transfer to the owner." + }, + "functionSelector": "9e281a98", + "id": 8556, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 8537, + "kind": "modifierInvocation", + "modifierName": { + "id": 8536, + "name": "onlyOwner", + "nameLocations": [ + "7299:9:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58, + "src": "7299:9:22" + }, + "nodeType": "ModifierInvocation", + "src": "7299:9:22" + } + ], + "name": "withdrawToken", + "nameLocation": "7245:13:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8532, + "mutability": "mutable", + "name": "token", + "nameLocation": "7267:5:22", + "nodeType": "VariableDeclaration", + "scope": 8556, + "src": "7259:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8531, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7259:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8534, + "mutability": "mutable", + "name": "amount", + "nameLocation": "7282:6:22", + "nodeType": "VariableDeclaration", + "scope": 8556, + "src": "7274:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8533, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7274:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7258:31:22" + }, + "returnParameters": { + "id": 8538, + "nodeType": "ParameterList", + "parameters": [], + "src": "7309:0:22" + }, + "scope": 8603, + "src": "7236:186:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 8585, + "nodeType": "Block", + "src": "7675:160:22", + "statements": [ + { + "assignments": [ + 8565, + null + ], + "declarations": [ + { + "constant": false, + "id": 8565, + "mutability": "mutable", + "name": "success", + "nameLocation": "7691:7:22", + "nodeType": "VariableDeclaration", + "scope": 8585, + "src": "7686:12:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7686:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 8573, + "initialValue": { + "arguments": [ + { + "hexValue": "", + "id": 8571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7732:2:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 8566, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7704:5:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 8567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7704:7:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 8568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7712:4:22", + "memberName": "call", + "nodeType": "MemberAccess", + "src": "7704:12:22", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 8570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 8569, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8559, + "src": "7724:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "7704:27:22", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 8572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7704:31:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7685:50:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8575, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8565, + "src": "7753:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "455448207472616e73666572206661696c6564", + "id": 8576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7762:21:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd", + "typeString": "literal_string \"ETH transfer failed\"" + }, + "value": "ETH transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd", + "typeString": "literal_string \"ETH transfer failed\"" + } + ], + "id": 8574, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7745:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7745:39:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8578, + "nodeType": "ExpressionStatement", + "src": "7745:39:22" + }, + { + "eventCall": { + "arguments": [ + { + "id": 8580, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8559, + "src": "7812:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 8581, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7820:5:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 8582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7820:7:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8579, + "name": "ETHWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8204, + "src": "7799:12:22", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 8583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7799:29:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8584, + "nodeType": "EmitStatement", + "src": "7794:34:22" + } + ] + }, + "documentation": { + "id": 8557, + "nodeType": "StructuredDocumentation", + "src": "7428:157:22", + "text": " @notice Allows the owner to recover any native ETH held by this contract.\n @param amount The amount of ETH to transfer to the owner." + }, + "functionSelector": "f14210a6", + "id": 8586, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 8562, + "kind": "modifierInvocation", + "modifierName": { + "id": 8561, + "name": "onlyOwner", + "nameLocations": [ + "7665:9:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58, + "src": "7665:9:22" + }, + "nodeType": "ModifierInvocation", + "src": "7665:9:22" + } + ], + "name": "withdrawETH", + "nameLocation": "7628:11:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8559, + "mutability": "mutable", + "name": "amount", + "nameLocation": "7648:6:22", + "nodeType": "VariableDeclaration", + "scope": 8586, + "src": "7640:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8558, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7640:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7639:16:22" + }, + "returnParameters": { + "id": 8563, + "nodeType": "ParameterList", + "parameters": [], + "src": "7675:0:22" + }, + "scope": 8603, + "src": "7619:216:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 8601, + "nodeType": "Block", + "src": "7997:56:22", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "id": 8595, + "name": "usedPayloadNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8153, + "src": "8014:17:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 8597, + "indexExpression": { + "id": 8596, + "name": "signer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8588, + "src": "8032:6:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8014:25:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 8599, + "indexExpression": { + "id": 8598, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8590, + "src": "8040:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8014:32:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8594, + "id": 8600, + "nodeType": "Return", + "src": "8007:39:22" + } + ] + }, + "functionSelector": "dcb79457", + "id": 8602, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isExecutionCompleted", + "nameLocation": "7916:20:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8591, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8588, + "mutability": "mutable", + "name": "signer", + "nameLocation": "7945:6:22", + "nodeType": "VariableDeclaration", + "scope": 8602, + "src": "7937:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8587, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7937:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8590, + "mutability": "mutable", + "name": "nonce", + "nameLocation": "7961:5:22", + "nodeType": "VariableDeclaration", + "scope": 8602, + "src": "7953:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8589, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7953:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7936:31:22" + }, + "returnParameters": { + "id": 8594, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8593, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8602, + "src": "7991:4:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8592, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7991:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7990:6:22" + }, + "scope": 8603, + "src": "7907:146:22", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 8604, + "src": "1158:6897:22", + "usedErrors": [ + 13, + 18, + 388, + 1734, + 1841, + 1843, + 3689, + 3694, + 3699 + ], + "usedEvents": [ + 24, + 242, + 8190, + 8198, + 8204 + ] + } + ], + "src": "32:8024:22" + }, + "id": 22 + } + }, + "contracts": { + "@openzeppelin/contracts/access/Ownable.sol": { + "Ownable": { + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "owner()": "8da5cb5b", + "renounceOwnership()": "715018a6", + "transferOwnership(address)": "f2fde38b" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. The initial owner is set to the address provided by the deployer. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the address provided by the deployer as the initial owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/access/Ownable.sol\":\"Ownable\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/interfaces/IERC1363.sol": { + "IERC1363": { + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "approveAndCall(address,uint256)": "3177029f", + "approveAndCall(address,uint256,bytes)": "cae9ca51", + "balanceOf(address)": "70a08231", + "supportsInterface(bytes4)": "01ffc9a7", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferAndCall(address,uint256)": "1296ee62", + "transferAndCall(address,uint256,bytes)": "4000aea0", + "transferFrom(address,address,uint256)": "23b872dd", + "transferFromAndCall(address,address,uint256)": "d8fbe994", + "transferFromAndCall(address,address,uint256,bytes)": "c1d34b89" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transferAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transferFromAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFromAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"approveAndCall(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"value\":\"The amount of tokens to be spent.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"approveAndCall(address,uint256,bytes)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\",\"params\":{\"data\":\"Additional data with no specified format, sent in call to `spender`.\",\"spender\":\"The address which will spend the funds.\",\"value\":\"The amount of tokens to be spent.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferAndCall(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to` and then calls {IERC1363Receiver-onTransferReceived} on `to`.\",\"params\":{\"to\":\"The address which you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"transferAndCall(address,uint256,bytes)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to` and then calls {IERC1363Receiver-onTransferReceived} on `to`.\",\"params\":{\"data\":\"Additional data with no specified format, sent in call to `to`.\",\"to\":\"The address which you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFromAndCall(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism and then calls {IERC1363Receiver-onTransferReceived} on `to`.\",\"params\":{\"from\":\"The address which you want to send tokens from.\",\"to\":\"The address which you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"transferFromAndCall(address,address,uint256,bytes)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism and then calls {IERC1363Receiver-onTransferReceived} on `to`.\",\"params\":{\"data\":\"Additional data with no specified format, sent in call to `to`.\",\"from\":\"The address which you want to send tokens from.\",\"to\":\"The address which you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}}},\"title\":\"IERC1363\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/interfaces/IERC1363.sol\":\"IERC1363\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/interfaces/IERC5267.sol": { + "IERC5267": { + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "eip712Domain()": "84b0196e" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"}},\"kind\":\"dev\",\"methods\":{\"eip712Domain()\":{\"details\":\"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/interfaces/IERC5267.sol\":\"IERC5267\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0xfb223a85dd0b2175cfbbaa325a744e2cd74ecd17c3df2b77b0722f991d2725ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84bf1dea0589ec49c8d15d559cc6d86ee493048a89b2d4adb60fbe705a3d89ae\",\"dweb:/ipfs/Qmd56n556d529wk2pRMhYhm5nhMDhviwereodDikjs68w1\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "IERC20": { + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC-20 standard as defined in the ERC.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "IERC20Permit": { + "abi": [ + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "DOMAIN_SEPARATOR()": "3644e515", + "nonces(address)": "7ecebe00", + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't need to send a transaction, and thus is not required to hold Ether at all. ==== Security Considerations There are two important considerations concerning the use of `permit`. The first is that a valid permit signature expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be considered as an intention to spend the allowance in any specific way. The second is that because permits have built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be generally recommended is: ```solidity function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} doThing(..., value); } function doThing(..., uint256 value) public { token.safeTransferFrom(msg.sender, address(this), value); ... } ``` Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also {SafeERC20-safeTransferFrom}). Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so contracts should have entry points that don't rely on permit.\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over ``owner``'s tokens, given ``owner``'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also applies here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. CAUTION: See Security Considerations above.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":\"IERC20Permit\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x53befc41288eaa87edcd3a7be7e8475a32e44c6a29f9bf52fae789781301d9ff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a1d7fab53c4ceaf42391b83d9b36d7e9cc524a8da125cffdcd32c56560f9d1c9\",\"dweb:/ipfs/QmaRZdVhQdqNXofeimibkBG65q9GVcXVZEGpycwwX3znC6\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "SafeERC20": { + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentAllowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestedDecrease", + "type": "uint256" + } + ], + "name": "SafeERC20FailedDecreaseAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205c28a953d80cbde5965c90d7d69e4200c2946ffa7d85a8c75c36f5291a6d6e6464736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 TLOAD 0x28 0xA9 MSTORE8 0xD8 0xC 0xBD 0xE5 SWAP7 TLOAD SWAP1 0xD7 0xD6 SWAP15 TIMESTAMP STOP 0xC2 SWAP5 PUSH16 0xFA7D85A8C75C36F5291A6D6E6464736F PUSH13 0x634300081C0033000000000000 ", + "sourceMap": "698:12615:7:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;698:12615:7;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205c28a953d80cbde5965c90d7d69e4200c2946ffa7d85a8c75c36f5291a6d6e6464736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 TLOAD 0x28 0xA9 MSTORE8 0xD8 0xC 0xBD 0xE5 SWAP7 TLOAD SWAP1 0xD7 0xD6 SWAP15 TIMESTAMP STOP 0xC2 SWAP5 PUSH16 0xFA7D85A8C75C36F5291A6D6E6464736F PUSH13 0x634300081C0033000000000000 ", + "sourceMap": "698:12615:7:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Wrappers around ERC-20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\",\"errors\":{\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{},\"title\":\"SafeERC20\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x304d732678032a9781ae85c8f204c8fba3d3a5e31c02616964e75cfdc5049098\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://299ced486011781dc98f638059678323c03079fefae1482abaa2135b22fa92d0\",\"dweb:/ipfs/QmbZNbcPTBxNvwChavN2kkZZs7xHhYL7mv51KrxMhsMs3j\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/Bytes.sol": { + "Bytes": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220072fadf3f16461513580a2d3f78bb66cb36505b035a64cbbe629d90098ae436d64736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SMOD 0x2F 0xAD RETURN CALL PUSH5 0x61513580A2 0xD3 0xF7 DUP12 0xB6 PUSH13 0xB36505B035A64CBBE629D90098 0xAE NUMBER PUSH14 0x64736F6C634300081C0033000000 ", + "sourceMap": "198:14538:8:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;198:14538:8;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220072fadf3f16461513580a2d3f78bb66cb36505b035a64cbbe629d90098ae436d64736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SMOD 0x2F 0xAD RETURN CALL PUSH5 0x61513580A2 0xD3 0xF7 DUP12 0xB6 PUSH13 0xB36505B035A64CBBE629D90098 0xAE NUMBER PUSH14 0x64736F6C634300081C0033000000 ", + "sourceMap": "198:14538:8:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Bytes operations.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Bytes.sol\":\"Bytes\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/Context.sol": { + "Context": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/Panic.sol": { + "Panic": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220cca8e34ba4a10a3072e457ee409c3e14973552ffad66786674cea596605f229764736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCC 0xA8 0xE3 0x4B LOG4 LOG1 EXP ADDRESS PUSH19 0xE457EE409C3E14973552FFAD66786674CEA596 PUSH1 0x5F 0x22 SWAP8 PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "657:1315:10:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;657:1315:10;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220cca8e34ba4a10a3072e457ee409c3e14973552ffad66786674cea596605f229764736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCC 0xA8 0xE3 0x4B LOG4 LOG1 EXP ADDRESS PUSH19 0xE457EE409C3E14973552FFAD66786674CEA596 PUSH1 0x5F 0x22 SWAP8 PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "657:1315:10:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Helper library for emitting standardized panic codes. ```solidity contract Example { using Panic for uint256; // Use any of the declared internal constants function foo() { Panic.GENERIC.panic(); } // Alternatively function foo() { Panic.panic(Panic.GENERIC); } } ``` Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil]. _Available since v5.1._\",\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"ARRAY_OUT_OF_BOUNDS\":{\"details\":\"array out of bounds access\"},\"ASSERT\":{\"details\":\"used by the assert() builtin\"},\"DIVISION_BY_ZERO\":{\"details\":\"division or modulo by zero\"},\"EMPTY_ARRAY_POP\":{\"details\":\"empty array pop\"},\"ENUM_CONVERSION_ERROR\":{\"details\":\"enum conversion error\"},\"GENERIC\":{\"details\":\"generic / unspecified error\"},\"INVALID_INTERNAL_FUNCTION\":{\"details\":\"calling invalid internal function\"},\"RESOURCE_ERROR\":{\"details\":\"resource error (too large allocation or too large array)\"},\"STORAGE_ENCODING_ERROR\":{\"details\":\"invalid encoding in storage\"},\"UNDER_OVERFLOW\":{\"details\":\"arithmetic underflow or overflow\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Panic.sol\":\"Panic\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "ReentrancyGuard": { + "abi": [ + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"}],\"devdoc\":{\"custom:stateless\":\"\",\"details\":\"Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at, consider using {ReentrancyGuardTransient} instead. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. IMPORTANT: Deprecated. This storage-based reentrancy guard will be removed and replaced by the {ReentrancyGuardTransient} variant in v6.0.\",\"errors\":{\"ReentrancyGuardReentrantCall()\":[{\"details\":\"Unauthorized reentrant call.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xa516cbf1c7d15d3517c2d668601ce016c54395bf5171918a14e2686977465f53\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1e1d079e8edfb58efd23a311e315a4807b01b5d1cf153f8fa2d0608b9dec3e99\",\"dweb:/ipfs/QmTBExeX2SDTkn5xbk5ssbYSx7VqRp9H4Ux1CY4uQM4b9N\"]},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/ShortStrings.sol": { + "ShortStrings": { + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205331629f8f9bf0cbfbabc3d9173056cd00dba4e3cc0330036bc4382e2359a42464736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MSTORE8 BALANCE PUSH3 0x9F8F9B CREATE 0xCB 0xFB 0xAB 0xC3 0xD9 OR ADDRESS JUMP 0xCD STOP 0xDB LOG4 0xE3 0xCC SUB ADDRESS SUB PUSH12 0xC4382E2359A42464736F6C63 NUMBER STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "1255:3054:12:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;1255:3054:12;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205331629f8f9bf0cbfbabc3d9173056cd00dba4e3cc0330036bc4382e2359a42464736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MSTORE8 BALANCE PUSH3 0x9F8F9B CREATE 0xCB 0xFB 0xAB 0xC3 0xD9 OR ADDRESS JUMP 0xCD STOP 0xDB LOG4 0xE3 0xCC SUB ADDRESS SUB PUSH12 0xC4382E2359A42464736F6C63 NUMBER STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "1255:3054:12:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidShortString\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"StringTooLong\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"This library provides functions to convert short memory strings into a `ShortString` type that can be used as an immutable variable. Strings of arbitrary length can be optimized using this library if they are short enough (up to 31 bytes) by packing them with their length (1 byte) in a single EVM word (32 bytes). Additionally, a fallback mechanism can be used for every other case. Usage example: ```solidity contract Named { using ShortStrings for *; ShortString private immutable _name; string private _nameFallback; constructor(string memory contractName) { _name = contractName.toShortStringWithFallback(_nameFallback); } function name() external view returns (string memory) { return _name.toStringWithFallback(_nameFallback); } } ```\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/ShortStrings.sol\":\"ShortStrings\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x0768b3bdb701fe4994b3be932ca8635551dfebe04c645f77500322741bebf57c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a2059f9ca8d3c11c49ca49fc9c5fb070f18cc85d12a7688e45322ed0e2a1cb99\",\"dweb:/ipfs/QmS2gwX51RAvSw4tYbjHccY2CKbh2uvDzqHLAFXdsddgia\"]},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "StorageSlot": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202e11909616c8a357ae57cd11f3e744f7b7de3a3174b44a2b6467fa9904f2585764736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2E GT SWAP1 SWAP7 AND 0xC8 LOG3 JUMPI 0xAE JUMPI 0xCD GT RETURN 0xE7 PREVRANDAO 0xF7 0xB7 0xDE GASPRICE BALANCE PUSH21 0xB44A2B6467FA9904F2585764736F6C634300081C00 CALLER ", + "sourceMap": "1407:2774:13:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;1407:2774:13;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202e11909616c8a357ae57cd11f3e744f7b7de3a3174b44a2b6467fa9904f2585764736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2E GT SWAP1 SWAP7 AND 0xC8 LOG3 JUMPI 0xAE JUMPI 0xCD GT RETURN 0xE7 PREVRANDAO 0xF7 0xB7 0xDE GASPRICE BALANCE PUSH21 0xB44A2B6467FA9904F2585764736F6C634300081C00 CALLER ", + "sourceMap": "1407:2774:13:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for reading and writing primitive types to specific storage slots. Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. This library helps with reading and writing to such slots without the need for inline assembly. The functions in this library return Slot structs that contain a `value` member that can be used to read or write. Example usage to set ERC-1967 implementation slot: ```solidity contract ERC1967 { // Define the slot. Alternatively, use the SlotDerivation library to derive the slot. bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } function _setImplementation(address newImplementation) internal { require(newImplementation.code.length > 0); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } } ``` TIP: Consider using this library along with {SlotDerivation}.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/StorageSlot.sol\":\"StorageSlot\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "Strings": { + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "StringsInsufficientHexLength", + "type": "error" + }, + { + "inputs": [], + "name": "StringsInvalidAddressFormat", + "type": "error" + }, + { + "inputs": [], + "name": "StringsInvalidChar", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220172eadb738f4060c9567e763c4ffa1f0bf958b6bde49f20427622bab52603b4264736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 OR 0x2E 0xAD 0xB7 CODESIZE DELEGATECALL MOD 0xC SWAP6 PUSH8 0xE763C4FFA1F0BF95 DUP12 PUSH12 0xDE49F20427622BAB52603B42 PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "332:21205:14:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;332:21205:14;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220172eadb738f4060c9567e763c4ffa1f0bf958b6bde49f20427622bab52603b4264736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 OR 0x2E 0xAD 0xB7 CODESIZE DELEGATECALL MOD 0xC SWAP6 PUSH8 0xE763C4FFA1F0BF95 DUP12 PUSH12 0xDE49F20427622BAB52603B42 PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "332:21205:14:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StringsInvalidAddressFormat\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StringsInvalidChar\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"String operations.\",\"errors\":{\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}],\"StringsInvalidAddressFormat()\":[{\"details\":\"The string being parsed is not a properly formatted address.\"}],\"StringsInvalidChar()\":[{\"details\":\"The string being parsed contains characters that are not in scope of the given base.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x1fdc2de9585ab0f1c417f02a873a2b6343cd64bb7ffec6b00ffa11a4a158d9e8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ab223a3d969c6cd7610049431dd42740960c477e45878f5d8b54411f7a32bdc\",\"dweb:/ipfs/QmWumhjvhpKcwx3vDPQninsNVTc3BGvqaihkQakFkQYpaS\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "ECDSA": { + "abi": [ + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220861fc53c54256420d26202ed953c1a6a70251bfd2cbefbfb0e98c93d2669cfb464736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP7 0x1F 0xC5 EXTCODECOPY SLOAD 0x25 PUSH5 0x20D26202ED SWAP6 EXTCODECOPY BYTE PUSH11 0x70251BFD2CBEFBFB0E98C9 RETURNDATASIZE 0x26 PUSH10 0xCFB464736F6C63430008 SHR STOP CALLER ", + "sourceMap": "344:11807:15:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;344:11807:15;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220861fc53c54256420d26202ed953c1a6a70251bfd2cbefbfb0e98c93d2669cfb464736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP7 0x1F 0xC5 EXTCODECOPY SLOAD 0x25 PUSH5 0x20D26202ED SWAP6 EXTCODECOPY BYTE PUSH11 0x70251BFD2CBEFBFB0E98C9 RETURNDATASIZE 0x26 PUSH10 0xCFB464736F6C63430008 SHR STOP CALLER ", + "sourceMap": "344:11807:15:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Elliptic Curve Digital Signature Algorithm (ECDSA) operations. These functions can be used to verify that a message was signed by the holder of the private keys of a given address.\",\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature is invalid.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":\"ECDSA\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xbeb5cad8aaabe0d35d2ec1a8414d91e81e5a8ca679add4cf57e2f33476861f40\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebb272a5ee2da4e8bd5551334e0ce8dce4e9c56a04570d6bf046d260fab3116a\",\"dweb:/ipfs/QmNw6RyM769qcqFocDq6HJMG2WiEnQbvizpRaUXsACHho2\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/cryptography/EIP712.sol": { + "EIP712": { + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "eip712Domain()": "84b0196e" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidShortString\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"StringTooLong\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\",\"details\":\"https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data. The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA ({_hashTypedDataV4}). The implementation of the domain separator was designed to be as efficient as possible while still properly updating the chain id to protect against replay attacks on an eventual fork of the chain. NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\",\"events\":{\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the domain separator and parameter caches. The meaning of `name` and `version` is specified in https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]: - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. - `version`: the current major version of the signing domain. NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart contract upgrade].\"},\"eip712Domain()\":{\"details\":\"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/cryptography/EIP712.sol\":\"EIP712\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0xfb223a85dd0b2175cfbbaa325a744e2cd74ecd17c3df2b77b0722f991d2725ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84bf1dea0589ec49c8d15d559cc6d86ee493048a89b2d4adb60fbe705a3d89ae\",\"dweb:/ipfs/Qmd56n556d529wk2pRMhYhm5nhMDhviwereodDikjs68w1\"]},\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x0768b3bdb701fe4994b3be932ca8635551dfebe04c645f77500322741bebf57c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a2059f9ca8d3c11c49ca49fc9c5fb070f18cc85d12a7688e45322ed0e2a1cb99\",\"dweb:/ipfs/QmS2gwX51RAvSw4tYbjHccY2CKbh2uvDzqHLAFXdsddgia\"]},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x1fdc2de9585ab0f1c417f02a873a2b6343cd64bb7ffec6b00ffa11a4a158d9e8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ab223a3d969c6cd7610049431dd42740960c477e45878f5d8b54411f7a32bdc\",\"dweb:/ipfs/QmWumhjvhpKcwx3vDPQninsNVTc3BGvqaihkQakFkQYpaS\"]},\"@openzeppelin/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0x8440117ea216b97a7bad690a67449fd372c840d073c8375822667e14702782b4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebb6645995b8290d0b9121825e2533e4e28977b2c6befee76e15e58f0feb61d4\",\"dweb:/ipfs/QmVR72j6kL5R2txuihieDev1FeTi4KWJS1Z6ABbwL3Qtph\"]},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0x6d8579873b9650426bfbd2a754092d1725049ca05e4e3c8c2c82dd9f3453129d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fa3127a8968d55096d37124a9e212013af112affa5e30b84a1d22263c31576c\",\"dweb:/ipfs/QmetxaVcn5Q6nkpF9yXzaxPQ7d3rgrhV13sTH9BgiuzGJL\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "MessageHashUtils": { + "abi": [ + { + "inputs": [], + "name": "ERC5267ExtensionsNotSupported", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206131ed8ee4dbbce47bcc4c6f88c9616eec0a3b2c76e6ecedd23ff36dd351a5da64736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH2 0x31ED DUP15 0xE4 0xDB 0xBC 0xE4 PUSH28 0xCC4C6F88C9616EEC0A3B2C76E6ECEDD23FF36DD351A5DA64736F6C63 NUMBER STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "521:8109:17:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;521:8109:17;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206131ed8ee4dbbce47bcc4c6f88c9616eec0a3b2c76e6ecedd23ff36dd351a5da64736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH2 0x31ED DUP15 0xE4 0xDB 0xBC 0xE4 PUSH28 0xCC4C6F88C9616EEC0A3B2C76E6ECEDD23FF36DD351A5DA64736F6C63 NUMBER STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "521:8109:17:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ERC5267ExtensionsNotSupported\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. The library provides methods for generating a hash of a message that conforms to the https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] specifications.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":\"MessageHashUtils\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x1fdc2de9585ab0f1c417f02a873a2b6343cd64bb7ffec6b00ffa11a4a158d9e8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ab223a3d969c6cd7610049431dd42740960c477e45878f5d8b54411f7a32bdc\",\"dweb:/ipfs/QmWumhjvhpKcwx3vDPQninsNVTc3BGvqaihkQakFkQYpaS\"]},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0x6d8579873b9650426bfbd2a754092d1725049ca05e4e3c8c2c82dd9f3453129d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fa3127a8968d55096d37124a9e212013af112affa5e30b84a1d22263c31576c\",\"dweb:/ipfs/QmetxaVcn5Q6nkpF9yXzaxPQ7d3rgrhV13sTH9BgiuzGJL\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "IERC165": { + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "supportsInterface(bytes4)": "01ffc9a7" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC-165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[ERC]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":\"IERC165\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "Math": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122091005e0c663891cd7c55899184f368372b30b74607e9cbbb4e1eb5ac7371189564736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP2 STOP MCOPY 0xC PUSH7 0x3891CD7C558991 DUP5 RETURN PUSH9 0x372B30B74607E9CBBB 0x4E 0x1E 0xB5 0xAC PUSH20 0x71189564736F6C634300081C0033000000000000 ", + "sourceMap": "281:32382:19:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;281:32382:19;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122091005e0c663891cd7c55899184f368372b30b74607e9cbbb4e1eb5ac7371189564736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP2 STOP MCOPY 0xC PUSH7 0x3891CD7C558991 DUP5 RETURN PUSH9 0x372B30B74607E9CBBB 0x4E 0x1E 0xB5 0xAC PUSH20 0x71189564736F6C634300081C0033000000000000 ", + "sourceMap": "281:32382:19:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/math/SafeCast.sol": { + "SafeCast": { + "abi": [ + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "int256", + "name": "value", + "type": "int256" + } + ], + "name": "SafeCastOverflowedIntDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "value", + "type": "int256" + } + ], + "name": "SafeCastOverflowedIntToUint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintToInt", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206e23643c396df695b2797f650857ef0eb0576e47d97a4599ed83883f99aad72664736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH15 0x23643C396DF695B2797F650857EF0E 0xB0 JUMPI PUSH15 0x47D97A4599ED83883F99AAD7266473 PUSH16 0x6C634300081C00330000000000000000 ", + "sourceMap": "769:34170:20:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;769:34170:20;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206e23643c396df695b2797f650857ef0eb0576e47d97a4599ed83883f99aad72664736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH15 0x23643C396DF695B2797F650857EF0E 0xB0 JUMPI PUSH15 0x47D97A4599ED83883F99AAD7266473 PUSH16 0x6C634300081C00330000000000000000 ", + "sourceMap": "769:34170:20:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"int256\",\"name\":\"value\",\"type\":\"int256\"}],\"name\":\"SafeCastOverflowedIntDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"value\",\"type\":\"int256\"}],\"name\":\"SafeCastOverflowedIntToUint\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintToInt\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"errors\":{\"SafeCastOverflowedIntDowncast(uint8,int256)\":[{\"details\":\"Value doesn't fit in an int of `bits` size.\"}],\"SafeCastOverflowedIntToUint(int256)\":[{\"details\":\"An int value doesn't fit in a uint of `bits` size.\"}],\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in a uint of `bits` size.\"}],\"SafeCastOverflowedUintToInt(uint256)\":[{\"details\":\"A uint value doesn't fit in an int of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":\"SafeCast\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "SignedMath": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202c4428eb6666cae863602bfb74d48242f67136c2baeeed29a59362a5e64d7e8564736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2C PREVRANDAO 0x28 0xEB PUSH7 0x66CAE863602BFB PUSH21 0xD48242F67136C2BAEEED29A59362A5E64D7E856473 PUSH16 0x6C634300081C00330000000000000000 ", + "sourceMap": "258:2354:21:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;258:2354:21;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202c4428eb6666cae863602bfb74d48242f67136c2baeeed29a59362a5e64d7e8564736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2C PREVRANDAO 0x28 0xEB PUSH7 0x66CAE863602BFB PUSH21 0xD48242F67136C2BAEEED29A59362A5E64D7E856473 PUSH16 0x6C634300081C00330000000000000000 ", + "sourceMap": "258:2354:21:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]}},\"version\":1}" + } + }, + "contracts/TokenRelayer.sol": { + "TokenRelayer": { + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_destinationContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "ETHWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RelayerExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "TokenWithdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "destinationContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "permitV", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "permitR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "permitS", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "payloadData", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "payloadValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloadNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloadDeadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "payloadV", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "payloadR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "payloadS", + "type": "bytes32" + } + ], + "internalType": "struct TokenRelayer.ExecuteParams", + "name": "params", + "type": "tuple" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "isExecutionCompleted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "usedPayloadNonces", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "evm": { + "bytecode": { + "functionDebugData": { + "@_1746": { + "entryPoint": null, + "id": 1746, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_4234": { + "entryPoint": null, + "id": 4234, + "parameterSlots": 2, + "returnSlots": 0 + }, + "@_50": { + "entryPoint": null, + "id": 50, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@_8232": { + "entryPoint": null, + "id": 8232, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@_buildDomainSeparator_4281": { + "entryPoint": null, + "id": 4281, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_reentrancyGuardStorageSlot_1826": { + "entryPoint": null, + "id": 1826, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_transferOwnership_146": { + "entryPoint": 470, + "id": 146, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@getStringSlot_2145": { + "entryPoint": null, + "id": 2145, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@getUint256Slot_2112": { + "entryPoint": null, + "id": 2112, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@toShortStringWithFallback_1985": { + "entryPoint": 549, + "id": 1985, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@toShortString_1887": { + "entryPoint": 599, + "id": 1887, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_decode_tuple_t_address_fromMemory": { + "entryPoint": 660, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address__to_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 6, + "returnSlots": 1 + }, + "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 1043, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "array_dataslot_string_storage": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "clean_up_bytearray_end_slots_string_storage": { + "entryPoint": 781, + "id": null, + "parameterSlots": 3, + "returnSlots": 0 + }, + "convert_bytes_to_fixedbytes_from_t_bytes_memory_ptr_to_t_bytes32": { + "entryPoint": 1096, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage": { + "entryPoint": 857, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "extract_byte_array_length": { + "entryPoint": 725, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "extract_used_part_and_set_length_of_short_byte_array": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "panic_error_0x41": { + "entryPoint": 705, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nativeSrc": "0:4722:23", + "nodeType": "YulBlock", + "src": "0:4722:23", + "statements": [ + { + "nativeSrc": "6:3:23", + "nodeType": "YulBlock", + "src": "6:3:23", + "statements": [] + }, + { + "body": { + "nativeSrc": "95:209:23", + "nodeType": "YulBlock", + "src": "95:209:23", + "statements": [ + { + "body": { + "nativeSrc": "141:16:23", + "nodeType": "YulBlock", + "src": "141:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "150:1:23", + "nodeType": "YulLiteral", + "src": "150:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "153:1:23", + "nodeType": "YulLiteral", + "src": "153:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "143:6:23", + "nodeType": "YulIdentifier", + "src": "143:6:23" + }, + "nativeSrc": "143:12:23", + "nodeType": "YulFunctionCall", + "src": "143:12:23" + }, + "nativeSrc": "143:12:23", + "nodeType": "YulExpressionStatement", + "src": "143:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "116:7:23", + "nodeType": "YulIdentifier", + "src": "116:7:23" + }, + { + "name": "headStart", + "nativeSrc": "125:9:23", + "nodeType": "YulIdentifier", + "src": "125:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "112:3:23", + "nodeType": "YulIdentifier", + "src": "112:3:23" + }, + "nativeSrc": "112:23:23", + "nodeType": "YulFunctionCall", + "src": "112:23:23" + }, + { + "kind": "number", + "nativeSrc": "137:2:23", + "nodeType": "YulLiteral", + "src": "137:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "108:3:23", + "nodeType": "YulIdentifier", + "src": "108:3:23" + }, + "nativeSrc": "108:32:23", + "nodeType": "YulFunctionCall", + "src": "108:32:23" + }, + "nativeSrc": "105:52:23", + "nodeType": "YulIf", + "src": "105:52:23" + }, + { + "nativeSrc": "166:29:23", + "nodeType": "YulVariableDeclaration", + "src": "166:29:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "185:9:23", + "nodeType": "YulIdentifier", + "src": "185:9:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "179:5:23", + "nodeType": "YulIdentifier", + "src": "179:5:23" + }, + "nativeSrc": "179:16:23", + "nodeType": "YulFunctionCall", + "src": "179:16:23" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "170:5:23", + "nodeType": "YulTypedName", + "src": "170:5:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "258:16:23", + "nodeType": "YulBlock", + "src": "258:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "267:1:23", + "nodeType": "YulLiteral", + "src": "267:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "270:1:23", + "nodeType": "YulLiteral", + "src": "270:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "260:6:23", + "nodeType": "YulIdentifier", + "src": "260:6:23" + }, + "nativeSrc": "260:12:23", + "nodeType": "YulFunctionCall", + "src": "260:12:23" + }, + "nativeSrc": "260:12:23", + "nodeType": "YulExpressionStatement", + "src": "260:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "217:5:23", + "nodeType": "YulIdentifier", + "src": "217:5:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "228:5:23", + "nodeType": "YulIdentifier", + "src": "228:5:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "243:3:23", + "nodeType": "YulLiteral", + "src": "243:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "248:1:23", + "nodeType": "YulLiteral", + "src": "248:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "239:3:23", + "nodeType": "YulIdentifier", + "src": "239:3:23" + }, + "nativeSrc": "239:11:23", + "nodeType": "YulFunctionCall", + "src": "239:11:23" + }, + { + "kind": "number", + "nativeSrc": "252:1:23", + "nodeType": "YulLiteral", + "src": "252:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "235:3:23", + "nodeType": "YulIdentifier", + "src": "235:3:23" + }, + "nativeSrc": "235:19:23", + "nodeType": "YulFunctionCall", + "src": "235:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "224:3:23", + "nodeType": "YulIdentifier", + "src": "224:3:23" + }, + "nativeSrc": "224:31:23", + "nodeType": "YulFunctionCall", + "src": "224:31:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "214:2:23", + "nodeType": "YulIdentifier", + "src": "214:2:23" + }, + "nativeSrc": "214:42:23", + "nodeType": "YulFunctionCall", + "src": "214:42:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "207:6:23", + "nodeType": "YulIdentifier", + "src": "207:6:23" + }, + "nativeSrc": "207:50:23", + "nodeType": "YulFunctionCall", + "src": "207:50:23" + }, + "nativeSrc": "204:70:23", + "nodeType": "YulIf", + "src": "204:70:23" + }, + { + "nativeSrc": "283:15:23", + "nodeType": "YulAssignment", + "src": "283:15:23", + "value": { + "name": "value", + "nativeSrc": "293:5:23", + "nodeType": "YulIdentifier", + "src": "293:5:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "283:6:23", + "nodeType": "YulIdentifier", + "src": "283:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address_fromMemory", + "nativeSrc": "14:290:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "61:9:23", + "nodeType": "YulTypedName", + "src": "61:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "72:7:23", + "nodeType": "YulTypedName", + "src": "72:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "84:6:23", + "nodeType": "YulTypedName", + "src": "84:6:23", + "type": "" + } + ], + "src": "14:290:23" + }, + { + "body": { + "nativeSrc": "410:102:23", + "nodeType": "YulBlock", + "src": "410:102:23", + "statements": [ + { + "nativeSrc": "420:26:23", + "nodeType": "YulAssignment", + "src": "420:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "432:9:23", + "nodeType": "YulIdentifier", + "src": "432:9:23" + }, + { + "kind": "number", + "nativeSrc": "443:2:23", + "nodeType": "YulLiteral", + "src": "443:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "428:3:23", + "nodeType": "YulIdentifier", + "src": "428:3:23" + }, + "nativeSrc": "428:18:23", + "nodeType": "YulFunctionCall", + "src": "428:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "420:4:23", + "nodeType": "YulIdentifier", + "src": "420:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "462:9:23", + "nodeType": "YulIdentifier", + "src": "462:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "477:6:23", + "nodeType": "YulIdentifier", + "src": "477:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "493:3:23", + "nodeType": "YulLiteral", + "src": "493:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "498:1:23", + "nodeType": "YulLiteral", + "src": "498:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "489:3:23", + "nodeType": "YulIdentifier", + "src": "489:3:23" + }, + "nativeSrc": "489:11:23", + "nodeType": "YulFunctionCall", + "src": "489:11:23" + }, + { + "kind": "number", + "nativeSrc": "502:1:23", + "nodeType": "YulLiteral", + "src": "502:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "485:3:23", + "nodeType": "YulIdentifier", + "src": "485:3:23" + }, + "nativeSrc": "485:19:23", + "nodeType": "YulFunctionCall", + "src": "485:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "473:3:23", + "nodeType": "YulIdentifier", + "src": "473:3:23" + }, + "nativeSrc": "473:32:23", + "nodeType": "YulFunctionCall", + "src": "473:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "455:6:23", + "nodeType": "YulIdentifier", + "src": "455:6:23" + }, + "nativeSrc": "455:51:23", + "nodeType": "YulFunctionCall", + "src": "455:51:23" + }, + "nativeSrc": "455:51:23", + "nodeType": "YulExpressionStatement", + "src": "455:51:23" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "309:203:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "379:9:23", + "nodeType": "YulTypedName", + "src": "379:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "390:6:23", + "nodeType": "YulTypedName", + "src": "390:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "401:4:23", + "nodeType": "YulTypedName", + "src": "401:4:23", + "type": "" + } + ], + "src": "309:203:23" + }, + { + "body": { + "nativeSrc": "691:169:23", + "nodeType": "YulBlock", + "src": "691:169:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "708:9:23", + "nodeType": "YulIdentifier", + "src": "708:9:23" + }, + { + "kind": "number", + "nativeSrc": "719:2:23", + "nodeType": "YulLiteral", + "src": "719:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "701:6:23", + "nodeType": "YulIdentifier", + "src": "701:6:23" + }, + "nativeSrc": "701:21:23", + "nodeType": "YulFunctionCall", + "src": "701:21:23" + }, + "nativeSrc": "701:21:23", + "nodeType": "YulExpressionStatement", + "src": "701:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "742:9:23", + "nodeType": "YulIdentifier", + "src": "742:9:23" + }, + { + "kind": "number", + "nativeSrc": "753:2:23", + "nodeType": "YulLiteral", + "src": "753:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "738:3:23", + "nodeType": "YulIdentifier", + "src": "738:3:23" + }, + "nativeSrc": "738:18:23", + "nodeType": "YulFunctionCall", + "src": "738:18:23" + }, + { + "kind": "number", + "nativeSrc": "758:2:23", + "nodeType": "YulLiteral", + "src": "758:2:23", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "731:6:23", + "nodeType": "YulIdentifier", + "src": "731:6:23" + }, + "nativeSrc": "731:30:23", + "nodeType": "YulFunctionCall", + "src": "731:30:23" + }, + "nativeSrc": "731:30:23", + "nodeType": "YulExpressionStatement", + "src": "731:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "781:9:23", + "nodeType": "YulIdentifier", + "src": "781:9:23" + }, + { + "kind": "number", + "nativeSrc": "792:2:23", + "nodeType": "YulLiteral", + "src": "792:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "777:3:23", + "nodeType": "YulIdentifier", + "src": "777:3:23" + }, + "nativeSrc": "777:18:23", + "nodeType": "YulFunctionCall", + "src": "777:18:23" + }, + { + "hexValue": "496e76616c69642064657374696e6174696f6e", + "kind": "string", + "nativeSrc": "797:21:23", + "nodeType": "YulLiteral", + "src": "797:21:23", + "type": "", + "value": "Invalid destination" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "770:6:23", + "nodeType": "YulIdentifier", + "src": "770:6:23" + }, + "nativeSrc": "770:49:23", + "nodeType": "YulFunctionCall", + "src": "770:49:23" + }, + "nativeSrc": "770:49:23", + "nodeType": "YulExpressionStatement", + "src": "770:49:23" + }, + { + "nativeSrc": "828:26:23", + "nodeType": "YulAssignment", + "src": "828:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "840:9:23", + "nodeType": "YulIdentifier", + "src": "840:9:23" + }, + { + "kind": "number", + "nativeSrc": "851:2:23", + "nodeType": "YulLiteral", + "src": "851:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "836:3:23", + "nodeType": "YulIdentifier", + "src": "836:3:23" + }, + "nativeSrc": "836:18:23", + "nodeType": "YulFunctionCall", + "src": "836:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "828:4:23", + "nodeType": "YulIdentifier", + "src": "828:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "517:343:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "668:9:23", + "nodeType": "YulTypedName", + "src": "668:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "682:4:23", + "nodeType": "YulTypedName", + "src": "682:4:23", + "type": "" + } + ], + "src": "517:343:23" + }, + { + "body": { + "nativeSrc": "897:95:23", + "nodeType": "YulBlock", + "src": "897:95:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "914:1:23", + "nodeType": "YulLiteral", + "src": "914:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "921:3:23", + "nodeType": "YulLiteral", + "src": "921:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "926:10:23", + "nodeType": "YulLiteral", + "src": "926:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "917:3:23", + "nodeType": "YulIdentifier", + "src": "917:3:23" + }, + "nativeSrc": "917:20:23", + "nodeType": "YulFunctionCall", + "src": "917:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "907:6:23", + "nodeType": "YulIdentifier", + "src": "907:6:23" + }, + "nativeSrc": "907:31:23", + "nodeType": "YulFunctionCall", + "src": "907:31:23" + }, + "nativeSrc": "907:31:23", + "nodeType": "YulExpressionStatement", + "src": "907:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "954:1:23", + "nodeType": "YulLiteral", + "src": "954:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "957:4:23", + "nodeType": "YulLiteral", + "src": "957:4:23", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "947:6:23", + "nodeType": "YulIdentifier", + "src": "947:6:23" + }, + "nativeSrc": "947:15:23", + "nodeType": "YulFunctionCall", + "src": "947:15:23" + }, + "nativeSrc": "947:15:23", + "nodeType": "YulExpressionStatement", + "src": "947:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "978:1:23", + "nodeType": "YulLiteral", + "src": "978:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "981:4:23", + "nodeType": "YulLiteral", + "src": "981:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "971:6:23", + "nodeType": "YulIdentifier", + "src": "971:6:23" + }, + "nativeSrc": "971:15:23", + "nodeType": "YulFunctionCall", + "src": "971:15:23" + }, + "nativeSrc": "971:15:23", + "nodeType": "YulExpressionStatement", + "src": "971:15:23" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "865:127:23", + "nodeType": "YulFunctionDefinition", + "src": "865:127:23" + }, + { + "body": { + "nativeSrc": "1052:325:23", + "nodeType": "YulBlock", + "src": "1052:325:23", + "statements": [ + { + "nativeSrc": "1062:22:23", + "nodeType": "YulAssignment", + "src": "1062:22:23", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1076:1:23", + "nodeType": "YulLiteral", + "src": "1076:1:23", + "type": "", + "value": "1" + }, + { + "name": "data", + "nativeSrc": "1079:4:23", + "nodeType": "YulIdentifier", + "src": "1079:4:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "1072:3:23", + "nodeType": "YulIdentifier", + "src": "1072:3:23" + }, + "nativeSrc": "1072:12:23", + "nodeType": "YulFunctionCall", + "src": "1072:12:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "1062:6:23", + "nodeType": "YulIdentifier", + "src": "1062:6:23" + } + ] + }, + { + "nativeSrc": "1093:38:23", + "nodeType": "YulVariableDeclaration", + "src": "1093:38:23", + "value": { + "arguments": [ + { + "name": "data", + "nativeSrc": "1123:4:23", + "nodeType": "YulIdentifier", + "src": "1123:4:23" + }, + { + "kind": "number", + "nativeSrc": "1129:1:23", + "nodeType": "YulLiteral", + "src": "1129:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1119:3:23", + "nodeType": "YulIdentifier", + "src": "1119:3:23" + }, + "nativeSrc": "1119:12:23", + "nodeType": "YulFunctionCall", + "src": "1119:12:23" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "1097:18:23", + "nodeType": "YulTypedName", + "src": "1097:18:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1170:31:23", + "nodeType": "YulBlock", + "src": "1170:31:23", + "statements": [ + { + "nativeSrc": "1172:27:23", + "nodeType": "YulAssignment", + "src": "1172:27:23", + "value": { + "arguments": [ + { + "name": "length", + "nativeSrc": "1186:6:23", + "nodeType": "YulIdentifier", + "src": "1186:6:23" + }, + { + "kind": "number", + "nativeSrc": "1194:4:23", + "nodeType": "YulLiteral", + "src": "1194:4:23", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1182:3:23", + "nodeType": "YulIdentifier", + "src": "1182:3:23" + }, + "nativeSrc": "1182:17:23", + "nodeType": "YulFunctionCall", + "src": "1182:17:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "1172:6:23", + "nodeType": "YulIdentifier", + "src": "1172:6:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "1150:18:23", + "nodeType": "YulIdentifier", + "src": "1150:18:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1143:6:23", + "nodeType": "YulIdentifier", + "src": "1143:6:23" + }, + "nativeSrc": "1143:26:23", + "nodeType": "YulFunctionCall", + "src": "1143:26:23" + }, + "nativeSrc": "1140:61:23", + "nodeType": "YulIf", + "src": "1140:61:23" + }, + { + "body": { + "nativeSrc": "1260:111:23", + "nodeType": "YulBlock", + "src": "1260:111:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1281:1:23", + "nodeType": "YulLiteral", + "src": "1281:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1288:3:23", + "nodeType": "YulLiteral", + "src": "1288:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "1293:10:23", + "nodeType": "YulLiteral", + "src": "1293:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1284:3:23", + "nodeType": "YulIdentifier", + "src": "1284:3:23" + }, + "nativeSrc": "1284:20:23", + "nodeType": "YulFunctionCall", + "src": "1284:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1274:6:23", + "nodeType": "YulIdentifier", + "src": "1274:6:23" + }, + "nativeSrc": "1274:31:23", + "nodeType": "YulFunctionCall", + "src": "1274:31:23" + }, + "nativeSrc": "1274:31:23", + "nodeType": "YulExpressionStatement", + "src": "1274:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1325:1:23", + "nodeType": "YulLiteral", + "src": "1325:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "1328:4:23", + "nodeType": "YulLiteral", + "src": "1328:4:23", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1318:6:23", + "nodeType": "YulIdentifier", + "src": "1318:6:23" + }, + "nativeSrc": "1318:15:23", + "nodeType": "YulFunctionCall", + "src": "1318:15:23" + }, + "nativeSrc": "1318:15:23", + "nodeType": "YulExpressionStatement", + "src": "1318:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1353:1:23", + "nodeType": "YulLiteral", + "src": "1353:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1356:4:23", + "nodeType": "YulLiteral", + "src": "1356:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1346:6:23", + "nodeType": "YulIdentifier", + "src": "1346:6:23" + }, + "nativeSrc": "1346:15:23", + "nodeType": "YulFunctionCall", + "src": "1346:15:23" + }, + "nativeSrc": "1346:15:23", + "nodeType": "YulExpressionStatement", + "src": "1346:15:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "1216:18:23", + "nodeType": "YulIdentifier", + "src": "1216:18:23" + }, + { + "arguments": [ + { + "name": "length", + "nativeSrc": "1239:6:23", + "nodeType": "YulIdentifier", + "src": "1239:6:23" + }, + { + "kind": "number", + "nativeSrc": "1247:2:23", + "nodeType": "YulLiteral", + "src": "1247:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1236:2:23", + "nodeType": "YulIdentifier", + "src": "1236:2:23" + }, + "nativeSrc": "1236:14:23", + "nodeType": "YulFunctionCall", + "src": "1236:14:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "1213:2:23", + "nodeType": "YulIdentifier", + "src": "1213:2:23" + }, + "nativeSrc": "1213:38:23", + "nodeType": "YulFunctionCall", + "src": "1213:38:23" + }, + "nativeSrc": "1210:161:23", + "nodeType": "YulIf", + "src": "1210:161:23" + } + ] + }, + "name": "extract_byte_array_length", + "nativeSrc": "997:380:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nativeSrc": "1032:4:23", + "nodeType": "YulTypedName", + "src": "1032:4:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nativeSrc": "1041:6:23", + "nodeType": "YulTypedName", + "src": "1041:6:23", + "type": "" + } + ], + "src": "997:380:23" + }, + { + "body": { + "nativeSrc": "1438:65:23", + "nodeType": "YulBlock", + "src": "1438:65:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1455:1:23", + "nodeType": "YulLiteral", + "src": "1455:1:23", + "type": "", + "value": "0" + }, + { + "name": "ptr", + "nativeSrc": "1458:3:23", + "nodeType": "YulIdentifier", + "src": "1458:3:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1448:6:23", + "nodeType": "YulIdentifier", + "src": "1448:6:23" + }, + "nativeSrc": "1448:14:23", + "nodeType": "YulFunctionCall", + "src": "1448:14:23" + }, + "nativeSrc": "1448:14:23", + "nodeType": "YulExpressionStatement", + "src": "1448:14:23" + }, + { + "nativeSrc": "1471:26:23", + "nodeType": "YulAssignment", + "src": "1471:26:23", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1489:1:23", + "nodeType": "YulLiteral", + "src": "1489:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1492:4:23", + "nodeType": "YulLiteral", + "src": "1492:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "1479:9:23", + "nodeType": "YulIdentifier", + "src": "1479:9:23" + }, + "nativeSrc": "1479:18:23", + "nodeType": "YulFunctionCall", + "src": "1479:18:23" + }, + "variableNames": [ + { + "name": "data", + "nativeSrc": "1471:4:23", + "nodeType": "YulIdentifier", + "src": "1471:4:23" + } + ] + } + ] + }, + "name": "array_dataslot_string_storage", + "nativeSrc": "1382:121:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "ptr", + "nativeSrc": "1421:3:23", + "nodeType": "YulTypedName", + "src": "1421:3:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "data", + "nativeSrc": "1429:4:23", + "nodeType": "YulTypedName", + "src": "1429:4:23", + "type": "" + } + ], + "src": "1382:121:23" + }, + { + "body": { + "nativeSrc": "1589:437:23", + "nodeType": "YulBlock", + "src": "1589:437:23", + "statements": [ + { + "body": { + "nativeSrc": "1622:398:23", + "nodeType": "YulBlock", + "src": "1622:398:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1643:1:23", + "nodeType": "YulLiteral", + "src": "1643:1:23", + "type": "", + "value": "0" + }, + { + "name": "array", + "nativeSrc": "1646:5:23", + "nodeType": "YulIdentifier", + "src": "1646:5:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1636:6:23", + "nodeType": "YulIdentifier", + "src": "1636:6:23" + }, + "nativeSrc": "1636:16:23", + "nodeType": "YulFunctionCall", + "src": "1636:16:23" + }, + "nativeSrc": "1636:16:23", + "nodeType": "YulExpressionStatement", + "src": "1636:16:23" + }, + { + "nativeSrc": "1665:30:23", + "nodeType": "YulVariableDeclaration", + "src": "1665:30:23", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1687:1:23", + "nodeType": "YulLiteral", + "src": "1687:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1690:4:23", + "nodeType": "YulLiteral", + "src": "1690:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "1677:9:23", + "nodeType": "YulIdentifier", + "src": "1677:9:23" + }, + "nativeSrc": "1677:18:23", + "nodeType": "YulFunctionCall", + "src": "1677:18:23" + }, + "variables": [ + { + "name": "data", + "nativeSrc": "1669:4:23", + "nodeType": "YulTypedName", + "src": "1669:4:23", + "type": "" + } + ] + }, + { + "nativeSrc": "1708:57:23", + "nodeType": "YulVariableDeclaration", + "src": "1708:57:23", + "value": { + "arguments": [ + { + "name": "data", + "nativeSrc": "1731:4:23", + "nodeType": "YulIdentifier", + "src": "1731:4:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1741:1:23", + "nodeType": "YulLiteral", + "src": "1741:1:23", + "type": "", + "value": "5" + }, + { + "arguments": [ + { + "name": "startIndex", + "nativeSrc": "1748:10:23", + "nodeType": "YulIdentifier", + "src": "1748:10:23" + }, + { + "kind": "number", + "nativeSrc": "1760:2:23", + "nodeType": "YulLiteral", + "src": "1760:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1744:3:23", + "nodeType": "YulIdentifier", + "src": "1744:3:23" + }, + "nativeSrc": "1744:19:23", + "nodeType": "YulFunctionCall", + "src": "1744:19:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "1737:3:23", + "nodeType": "YulIdentifier", + "src": "1737:3:23" + }, + "nativeSrc": "1737:27:23", + "nodeType": "YulFunctionCall", + "src": "1737:27:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1727:3:23", + "nodeType": "YulIdentifier", + "src": "1727:3:23" + }, + "nativeSrc": "1727:38:23", + "nodeType": "YulFunctionCall", + "src": "1727:38:23" + }, + "variables": [ + { + "name": "deleteStart", + "nativeSrc": "1712:11:23", + "nodeType": "YulTypedName", + "src": "1712:11:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1802:23:23", + "nodeType": "YulBlock", + "src": "1802:23:23", + "statements": [ + { + "nativeSrc": "1804:19:23", + "nodeType": "YulAssignment", + "src": "1804:19:23", + "value": { + "name": "data", + "nativeSrc": "1819:4:23", + "nodeType": "YulIdentifier", + "src": "1819:4:23" + }, + "variableNames": [ + { + "name": "deleteStart", + "nativeSrc": "1804:11:23", + "nodeType": "YulIdentifier", + "src": "1804:11:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "startIndex", + "nativeSrc": "1784:10:23", + "nodeType": "YulIdentifier", + "src": "1784:10:23" + }, + { + "kind": "number", + "nativeSrc": "1796:4:23", + "nodeType": "YulLiteral", + "src": "1796:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1781:2:23", + "nodeType": "YulIdentifier", + "src": "1781:2:23" + }, + "nativeSrc": "1781:20:23", + "nodeType": "YulFunctionCall", + "src": "1781:20:23" + }, + "nativeSrc": "1778:47:23", + "nodeType": "YulIf", + "src": "1778:47:23" + }, + { + "nativeSrc": "1838:41:23", + "nodeType": "YulVariableDeclaration", + "src": "1838:41:23", + "value": { + "arguments": [ + { + "name": "data", + "nativeSrc": "1852:4:23", + "nodeType": "YulIdentifier", + "src": "1852:4:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1862:1:23", + "nodeType": "YulLiteral", + "src": "1862:1:23", + "type": "", + "value": "5" + }, + { + "arguments": [ + { + "name": "len", + "nativeSrc": "1869:3:23", + "nodeType": "YulIdentifier", + "src": "1869:3:23" + }, + { + "kind": "number", + "nativeSrc": "1874:2:23", + "nodeType": "YulLiteral", + "src": "1874:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1865:3:23", + "nodeType": "YulIdentifier", + "src": "1865:3:23" + }, + "nativeSrc": "1865:12:23", + "nodeType": "YulFunctionCall", + "src": "1865:12:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "1858:3:23", + "nodeType": "YulIdentifier", + "src": "1858:3:23" + }, + "nativeSrc": "1858:20:23", + "nodeType": "YulFunctionCall", + "src": "1858:20:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1848:3:23", + "nodeType": "YulIdentifier", + "src": "1848:3:23" + }, + "nativeSrc": "1848:31:23", + "nodeType": "YulFunctionCall", + "src": "1848:31:23" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "1842:2:23", + "nodeType": "YulTypedName", + "src": "1842:2:23", + "type": "" + } + ] + }, + { + "nativeSrc": "1892:24:23", + "nodeType": "YulVariableDeclaration", + "src": "1892:24:23", + "value": { + "name": "deleteStart", + "nativeSrc": "1905:11:23", + "nodeType": "YulIdentifier", + "src": "1905:11:23" + }, + "variables": [ + { + "name": "start", + "nativeSrc": "1896:5:23", + "nodeType": "YulTypedName", + "src": "1896:5:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1990:20:23", + "nodeType": "YulBlock", + "src": "1990:20:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "start", + "nativeSrc": "1999:5:23", + "nodeType": "YulIdentifier", + "src": "1999:5:23" + }, + { + "kind": "number", + "nativeSrc": "2006:1:23", + "nodeType": "YulLiteral", + "src": "2006:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "1992:6:23", + "nodeType": "YulIdentifier", + "src": "1992:6:23" + }, + "nativeSrc": "1992:16:23", + "nodeType": "YulFunctionCall", + "src": "1992:16:23" + }, + "nativeSrc": "1992:16:23", + "nodeType": "YulExpressionStatement", + "src": "1992:16:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "start", + "nativeSrc": "1940:5:23", + "nodeType": "YulIdentifier", + "src": "1940:5:23" + }, + { + "name": "_1", + "nativeSrc": "1947:2:23", + "nodeType": "YulIdentifier", + "src": "1947:2:23" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1937:2:23", + "nodeType": "YulIdentifier", + "src": "1937:2:23" + }, + "nativeSrc": "1937:13:23", + "nodeType": "YulFunctionCall", + "src": "1937:13:23" + }, + "nativeSrc": "1929:81:23", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "1951:26:23", + "nodeType": "YulBlock", + "src": "1951:26:23", + "statements": [ + { + "nativeSrc": "1953:22:23", + "nodeType": "YulAssignment", + "src": "1953:22:23", + "value": { + "arguments": [ + { + "name": "start", + "nativeSrc": "1966:5:23", + "nodeType": "YulIdentifier", + "src": "1966:5:23" + }, + { + "kind": "number", + "nativeSrc": "1973:1:23", + "nodeType": "YulLiteral", + "src": "1973:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1962:3:23", + "nodeType": "YulIdentifier", + "src": "1962:3:23" + }, + "nativeSrc": "1962:13:23", + "nodeType": "YulFunctionCall", + "src": "1962:13:23" + }, + "variableNames": [ + { + "name": "start", + "nativeSrc": "1953:5:23", + "nodeType": "YulIdentifier", + "src": "1953:5:23" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "1933:3:23", + "nodeType": "YulBlock", + "src": "1933:3:23", + "statements": [] + }, + "src": "1929:81:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "len", + "nativeSrc": "1605:3:23", + "nodeType": "YulIdentifier", + "src": "1605:3:23" + }, + { + "kind": "number", + "nativeSrc": "1610:2:23", + "nodeType": "YulLiteral", + "src": "1610:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1602:2:23", + "nodeType": "YulIdentifier", + "src": "1602:2:23" + }, + "nativeSrc": "1602:11:23", + "nodeType": "YulFunctionCall", + "src": "1602:11:23" + }, + "nativeSrc": "1599:421:23", + "nodeType": "YulIf", + "src": "1599:421:23" + } + ] + }, + "name": "clean_up_bytearray_end_slots_string_storage", + "nativeSrc": "1508:518:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "array", + "nativeSrc": "1561:5:23", + "nodeType": "YulTypedName", + "src": "1561:5:23", + "type": "" + }, + { + "name": "len", + "nativeSrc": "1568:3:23", + "nodeType": "YulTypedName", + "src": "1568:3:23", + "type": "" + }, + { + "name": "startIndex", + "nativeSrc": "1573:10:23", + "nodeType": "YulTypedName", + "src": "1573:10:23", + "type": "" + } + ], + "src": "1508:518:23" + }, + { + "body": { + "nativeSrc": "2116:81:23", + "nodeType": "YulBlock", + "src": "2116:81:23", + "statements": [ + { + "nativeSrc": "2126:65:23", + "nodeType": "YulAssignment", + "src": "2126:65:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "data", + "nativeSrc": "2141:4:23", + "nodeType": "YulIdentifier", + "src": "2141:4:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2159:1:23", + "nodeType": "YulLiteral", + "src": "2159:1:23", + "type": "", + "value": "3" + }, + { + "name": "len", + "nativeSrc": "2162:3:23", + "nodeType": "YulIdentifier", + "src": "2162:3:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2155:3:23", + "nodeType": "YulIdentifier", + "src": "2155:3:23" + }, + "nativeSrc": "2155:11:23", + "nodeType": "YulFunctionCall", + "src": "2155:11:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2172:1:23", + "nodeType": "YulLiteral", + "src": "2172:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "2168:3:23", + "nodeType": "YulIdentifier", + "src": "2168:3:23" + }, + "nativeSrc": "2168:6:23", + "nodeType": "YulFunctionCall", + "src": "2168:6:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "2151:3:23", + "nodeType": "YulIdentifier", + "src": "2151:3:23" + }, + "nativeSrc": "2151:24:23", + "nodeType": "YulFunctionCall", + "src": "2151:24:23" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "2147:3:23", + "nodeType": "YulIdentifier", + "src": "2147:3:23" + }, + "nativeSrc": "2147:29:23", + "nodeType": "YulFunctionCall", + "src": "2147:29:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2137:3:23", + "nodeType": "YulIdentifier", + "src": "2137:3:23" + }, + "nativeSrc": "2137:40:23", + "nodeType": "YulFunctionCall", + "src": "2137:40:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2183:1:23", + "nodeType": "YulLiteral", + "src": "2183:1:23", + "type": "", + "value": "1" + }, + { + "name": "len", + "nativeSrc": "2186:3:23", + "nodeType": "YulIdentifier", + "src": "2186:3:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2179:3:23", + "nodeType": "YulIdentifier", + "src": "2179:3:23" + }, + "nativeSrc": "2179:11:23", + "nodeType": "YulFunctionCall", + "src": "2179:11:23" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "2134:2:23", + "nodeType": "YulIdentifier", + "src": "2134:2:23" + }, + "nativeSrc": "2134:57:23", + "nodeType": "YulFunctionCall", + "src": "2134:57:23" + }, + "variableNames": [ + { + "name": "used", + "nativeSrc": "2126:4:23", + "nodeType": "YulIdentifier", + "src": "2126:4:23" + } + ] + } + ] + }, + "name": "extract_used_part_and_set_length_of_short_byte_array", + "nativeSrc": "2031:166:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nativeSrc": "2093:4:23", + "nodeType": "YulTypedName", + "src": "2093:4:23", + "type": "" + }, + { + "name": "len", + "nativeSrc": "2099:3:23", + "nodeType": "YulTypedName", + "src": "2099:3:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "used", + "nativeSrc": "2107:4:23", + "nodeType": "YulTypedName", + "src": "2107:4:23", + "type": "" + } + ], + "src": "2031:166:23" + }, + { + "body": { + "nativeSrc": "2298:1203:23", + "nodeType": "YulBlock", + "src": "2298:1203:23", + "statements": [ + { + "nativeSrc": "2308:24:23", + "nodeType": "YulVariableDeclaration", + "src": "2308:24:23", + "value": { + "arguments": [ + { + "name": "src", + "nativeSrc": "2328:3:23", + "nodeType": "YulIdentifier", + "src": "2328:3:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2322:5:23", + "nodeType": "YulIdentifier", + "src": "2322:5:23" + }, + "nativeSrc": "2322:10:23", + "nodeType": "YulFunctionCall", + "src": "2322:10:23" + }, + "variables": [ + { + "name": "newLen", + "nativeSrc": "2312:6:23", + "nodeType": "YulTypedName", + "src": "2312:6:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2375:22:23", + "nodeType": "YulBlock", + "src": "2375:22:23", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "2377:16:23", + "nodeType": "YulIdentifier", + "src": "2377:16:23" + }, + "nativeSrc": "2377:18:23", + "nodeType": "YulFunctionCall", + "src": "2377:18:23" + }, + "nativeSrc": "2377:18:23", + "nodeType": "YulExpressionStatement", + "src": "2377:18:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "newLen", + "nativeSrc": "2347:6:23", + "nodeType": "YulIdentifier", + "src": "2347:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2363:2:23", + "nodeType": "YulLiteral", + "src": "2363:2:23", + "type": "", + "value": "64" + }, + { + "kind": "number", + "nativeSrc": "2367:1:23", + "nodeType": "YulLiteral", + "src": "2367:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2359:3:23", + "nodeType": "YulIdentifier", + "src": "2359:3:23" + }, + "nativeSrc": "2359:10:23", + "nodeType": "YulFunctionCall", + "src": "2359:10:23" + }, + { + "kind": "number", + "nativeSrc": "2371:1:23", + "nodeType": "YulLiteral", + "src": "2371:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2355:3:23", + "nodeType": "YulIdentifier", + "src": "2355:3:23" + }, + "nativeSrc": "2355:18:23", + "nodeType": "YulFunctionCall", + "src": "2355:18:23" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "2344:2:23", + "nodeType": "YulIdentifier", + "src": "2344:2:23" + }, + "nativeSrc": "2344:30:23", + "nodeType": "YulFunctionCall", + "src": "2344:30:23" + }, + "nativeSrc": "2341:56:23", + "nodeType": "YulIf", + "src": "2341:56:23" + }, + { + "expression": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "2450:4:23", + "nodeType": "YulIdentifier", + "src": "2450:4:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "slot", + "nativeSrc": "2488:4:23", + "nodeType": "YulIdentifier", + "src": "2488:4:23" + } + ], + "functionName": { + "name": "sload", + "nativeSrc": "2482:5:23", + "nodeType": "YulIdentifier", + "src": "2482:5:23" + }, + "nativeSrc": "2482:11:23", + "nodeType": "YulFunctionCall", + "src": "2482:11:23" + } + ], + "functionName": { + "name": "extract_byte_array_length", + "nativeSrc": "2456:25:23", + "nodeType": "YulIdentifier", + "src": "2456:25:23" + }, + "nativeSrc": "2456:38:23", + "nodeType": "YulFunctionCall", + "src": "2456:38:23" + }, + { + "name": "newLen", + "nativeSrc": "2496:6:23", + "nodeType": "YulIdentifier", + "src": "2496:6:23" + } + ], + "functionName": { + "name": "clean_up_bytearray_end_slots_string_storage", + "nativeSrc": "2406:43:23", + "nodeType": "YulIdentifier", + "src": "2406:43:23" + }, + "nativeSrc": "2406:97:23", + "nodeType": "YulFunctionCall", + "src": "2406:97:23" + }, + "nativeSrc": "2406:97:23", + "nodeType": "YulExpressionStatement", + "src": "2406:97:23" + }, + { + "nativeSrc": "2512:18:23", + "nodeType": "YulVariableDeclaration", + "src": "2512:18:23", + "value": { + "kind": "number", + "nativeSrc": "2529:1:23", + "nodeType": "YulLiteral", + "src": "2529:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "srcOffset", + "nativeSrc": "2516:9:23", + "nodeType": "YulTypedName", + "src": "2516:9:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2539:17:23", + "nodeType": "YulAssignment", + "src": "2539:17:23", + "value": { + "kind": "number", + "nativeSrc": "2552:4:23", + "nodeType": "YulLiteral", + "src": "2552:4:23", + "type": "", + "value": "0x20" + }, + "variableNames": [ + { + "name": "srcOffset", + "nativeSrc": "2539:9:23", + "nodeType": "YulIdentifier", + "src": "2539:9:23" + } + ] + }, + { + "cases": [ + { + "body": { + "nativeSrc": "2602:642:23", + "nodeType": "YulBlock", + "src": "2602:642:23", + "statements": [ + { + "nativeSrc": "2616:35:23", + "nodeType": "YulVariableDeclaration", + "src": "2616:35:23", + "value": { + "arguments": [ + { + "name": "newLen", + "nativeSrc": "2635:6:23", + "nodeType": "YulIdentifier", + "src": "2635:6:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2647:2:23", + "nodeType": "YulLiteral", + "src": "2647:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "2643:3:23", + "nodeType": "YulIdentifier", + "src": "2643:3:23" + }, + "nativeSrc": "2643:7:23", + "nodeType": "YulFunctionCall", + "src": "2643:7:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2631:3:23", + "nodeType": "YulIdentifier", + "src": "2631:3:23" + }, + "nativeSrc": "2631:20:23", + "nodeType": "YulFunctionCall", + "src": "2631:20:23" + }, + "variables": [ + { + "name": "loopEnd", + "nativeSrc": "2620:7:23", + "nodeType": "YulTypedName", + "src": "2620:7:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2664:49:23", + "nodeType": "YulVariableDeclaration", + "src": "2664:49:23", + "value": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "2708:4:23", + "nodeType": "YulIdentifier", + "src": "2708:4:23" + } + ], + "functionName": { + "name": "array_dataslot_string_storage", + "nativeSrc": "2678:29:23", + "nodeType": "YulIdentifier", + "src": "2678:29:23" + }, + "nativeSrc": "2678:35:23", + "nodeType": "YulFunctionCall", + "src": "2678:35:23" + }, + "variables": [ + { + "name": "dstPtr", + "nativeSrc": "2668:6:23", + "nodeType": "YulTypedName", + "src": "2668:6:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2726:10:23", + "nodeType": "YulVariableDeclaration", + "src": "2726:10:23", + "value": { + "kind": "number", + "nativeSrc": "2735:1:23", + "nodeType": "YulLiteral", + "src": "2735:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "2730:1:23", + "nodeType": "YulTypedName", + "src": "2730:1:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2806:165:23", + "nodeType": "YulBlock", + "src": "2806:165:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "dstPtr", + "nativeSrc": "2831:6:23", + "nodeType": "YulIdentifier", + "src": "2831:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "2849:3:23", + "nodeType": "YulIdentifier", + "src": "2849:3:23" + }, + { + "name": "srcOffset", + "nativeSrc": "2854:9:23", + "nodeType": "YulIdentifier", + "src": "2854:9:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2845:3:23", + "nodeType": "YulIdentifier", + "src": "2845:3:23" + }, + "nativeSrc": "2845:19:23", + "nodeType": "YulFunctionCall", + "src": "2845:19:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2839:5:23", + "nodeType": "YulIdentifier", + "src": "2839:5:23" + }, + "nativeSrc": "2839:26:23", + "nodeType": "YulFunctionCall", + "src": "2839:26:23" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "2824:6:23", + "nodeType": "YulIdentifier", + "src": "2824:6:23" + }, + "nativeSrc": "2824:42:23", + "nodeType": "YulFunctionCall", + "src": "2824:42:23" + }, + "nativeSrc": "2824:42:23", + "nodeType": "YulExpressionStatement", + "src": "2824:42:23" + }, + { + "nativeSrc": "2883:24:23", + "nodeType": "YulAssignment", + "src": "2883:24:23", + "value": { + "arguments": [ + { + "name": "dstPtr", + "nativeSrc": "2897:6:23", + "nodeType": "YulIdentifier", + "src": "2897:6:23" + }, + { + "kind": "number", + "nativeSrc": "2905:1:23", + "nodeType": "YulLiteral", + "src": "2905:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2893:3:23", + "nodeType": "YulIdentifier", + "src": "2893:3:23" + }, + "nativeSrc": "2893:14:23", + "nodeType": "YulFunctionCall", + "src": "2893:14:23" + }, + "variableNames": [ + { + "name": "dstPtr", + "nativeSrc": "2883:6:23", + "nodeType": "YulIdentifier", + "src": "2883:6:23" + } + ] + }, + { + "nativeSrc": "2924:33:23", + "nodeType": "YulAssignment", + "src": "2924:33:23", + "value": { + "arguments": [ + { + "name": "srcOffset", + "nativeSrc": "2941:9:23", + "nodeType": "YulIdentifier", + "src": "2941:9:23" + }, + { + "kind": "number", + "nativeSrc": "2952:4:23", + "nodeType": "YulLiteral", + "src": "2952:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2937:3:23", + "nodeType": "YulIdentifier", + "src": "2937:3:23" + }, + "nativeSrc": "2937:20:23", + "nodeType": "YulFunctionCall", + "src": "2937:20:23" + }, + "variableNames": [ + { + "name": "srcOffset", + "nativeSrc": "2924:9:23", + "nodeType": "YulIdentifier", + "src": "2924:9:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "2760:1:23", + "nodeType": "YulIdentifier", + "src": "2760:1:23" + }, + { + "name": "loopEnd", + "nativeSrc": "2763:7:23", + "nodeType": "YulIdentifier", + "src": "2763:7:23" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "2757:2:23", + "nodeType": "YulIdentifier", + "src": "2757:2:23" + }, + "nativeSrc": "2757:14:23", + "nodeType": "YulFunctionCall", + "src": "2757:14:23" + }, + "nativeSrc": "2749:222:23", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "2772:21:23", + "nodeType": "YulBlock", + "src": "2772:21:23", + "statements": [ + { + "nativeSrc": "2774:17:23", + "nodeType": "YulAssignment", + "src": "2774:17:23", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "2783:1:23", + "nodeType": "YulIdentifier", + "src": "2783:1:23" + }, + { + "kind": "number", + "nativeSrc": "2786:4:23", + "nodeType": "YulLiteral", + "src": "2786:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2779:3:23", + "nodeType": "YulIdentifier", + "src": "2779:3:23" + }, + "nativeSrc": "2779:12:23", + "nodeType": "YulFunctionCall", + "src": "2779:12:23" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "2774:1:23", + "nodeType": "YulIdentifier", + "src": "2774:1:23" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "2753:3:23", + "nodeType": "YulBlock", + "src": "2753:3:23", + "statements": [] + }, + "src": "2749:222:23" + }, + { + "body": { + "nativeSrc": "3019:166:23", + "nodeType": "YulBlock", + "src": "3019:166:23", + "statements": [ + { + "nativeSrc": "3037:43:23", + "nodeType": "YulVariableDeclaration", + "src": "3037:43:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "3064:3:23", + "nodeType": "YulIdentifier", + "src": "3064:3:23" + }, + { + "name": "srcOffset", + "nativeSrc": "3069:9:23", + "nodeType": "YulIdentifier", + "src": "3069:9:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3060:3:23", + "nodeType": "YulIdentifier", + "src": "3060:3:23" + }, + "nativeSrc": "3060:19:23", + "nodeType": "YulFunctionCall", + "src": "3060:19:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3054:5:23", + "nodeType": "YulIdentifier", + "src": "3054:5:23" + }, + "nativeSrc": "3054:26:23", + "nodeType": "YulFunctionCall", + "src": "3054:26:23" + }, + "variables": [ + { + "name": "lastValue", + "nativeSrc": "3041:9:23", + "nodeType": "YulTypedName", + "src": "3041:9:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "dstPtr", + "nativeSrc": "3104:6:23", + "nodeType": "YulIdentifier", + "src": "3104:6:23" + }, + { + "arguments": [ + { + "name": "lastValue", + "nativeSrc": "3116:9:23", + "nodeType": "YulIdentifier", + "src": "3116:9:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3143:1:23", + "nodeType": "YulLiteral", + "src": "3143:1:23", + "type": "", + "value": "3" + }, + { + "name": "newLen", + "nativeSrc": "3146:6:23", + "nodeType": "YulIdentifier", + "src": "3146:6:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3139:3:23", + "nodeType": "YulIdentifier", + "src": "3139:3:23" + }, + "nativeSrc": "3139:14:23", + "nodeType": "YulFunctionCall", + "src": "3139:14:23" + }, + { + "kind": "number", + "nativeSrc": "3155:3:23", + "nodeType": "YulLiteral", + "src": "3155:3:23", + "type": "", + "value": "248" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3135:3:23", + "nodeType": "YulIdentifier", + "src": "3135:3:23" + }, + "nativeSrc": "3135:24:23", + "nodeType": "YulFunctionCall", + "src": "3135:24:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3165:1:23", + "nodeType": "YulLiteral", + "src": "3165:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "3161:3:23", + "nodeType": "YulIdentifier", + "src": "3161:3:23" + }, + "nativeSrc": "3161:6:23", + "nodeType": "YulFunctionCall", + "src": "3161:6:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "3131:3:23", + "nodeType": "YulIdentifier", + "src": "3131:3:23" + }, + "nativeSrc": "3131:37:23", + "nodeType": "YulFunctionCall", + "src": "3131:37:23" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "3127:3:23", + "nodeType": "YulIdentifier", + "src": "3127:3:23" + }, + "nativeSrc": "3127:42:23", + "nodeType": "YulFunctionCall", + "src": "3127:42:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3112:3:23", + "nodeType": "YulIdentifier", + "src": "3112:3:23" + }, + "nativeSrc": "3112:58:23", + "nodeType": "YulFunctionCall", + "src": "3112:58:23" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "3097:6:23", + "nodeType": "YulIdentifier", + "src": "3097:6:23" + }, + "nativeSrc": "3097:74:23", + "nodeType": "YulFunctionCall", + "src": "3097:74:23" + }, + "nativeSrc": "3097:74:23", + "nodeType": "YulExpressionStatement", + "src": "3097:74:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "loopEnd", + "nativeSrc": "2990:7:23", + "nodeType": "YulIdentifier", + "src": "2990:7:23" + }, + { + "name": "newLen", + "nativeSrc": "2999:6:23", + "nodeType": "YulIdentifier", + "src": "2999:6:23" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "2987:2:23", + "nodeType": "YulIdentifier", + "src": "2987:2:23" + }, + "nativeSrc": "2987:19:23", + "nodeType": "YulFunctionCall", + "src": "2987:19:23" + }, + "nativeSrc": "2984:201:23", + "nodeType": "YulIf", + "src": "2984:201:23" + }, + { + "expression": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "3205:4:23", + "nodeType": "YulIdentifier", + "src": "3205:4:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3219:1:23", + "nodeType": "YulLiteral", + "src": "3219:1:23", + "type": "", + "value": "1" + }, + { + "name": "newLen", + "nativeSrc": "3222:6:23", + "nodeType": "YulIdentifier", + "src": "3222:6:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3215:3:23", + "nodeType": "YulIdentifier", + "src": "3215:3:23" + }, + "nativeSrc": "3215:14:23", + "nodeType": "YulFunctionCall", + "src": "3215:14:23" + }, + { + "kind": "number", + "nativeSrc": "3231:1:23", + "nodeType": "YulLiteral", + "src": "3231:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3211:3:23", + "nodeType": "YulIdentifier", + "src": "3211:3:23" + }, + "nativeSrc": "3211:22:23", + "nodeType": "YulFunctionCall", + "src": "3211:22:23" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "3198:6:23", + "nodeType": "YulIdentifier", + "src": "3198:6:23" + }, + "nativeSrc": "3198:36:23", + "nodeType": "YulFunctionCall", + "src": "3198:36:23" + }, + "nativeSrc": "3198:36:23", + "nodeType": "YulExpressionStatement", + "src": "3198:36:23" + } + ] + }, + "nativeSrc": "2595:649:23", + "nodeType": "YulCase", + "src": "2595:649:23", + "value": { + "kind": "number", + "nativeSrc": "2600:1:23", + "nodeType": "YulLiteral", + "src": "2600:1:23", + "type": "", + "value": "1" + } + }, + { + "body": { + "nativeSrc": "3261:234:23", + "nodeType": "YulBlock", + "src": "3261:234:23", + "statements": [ + { + "nativeSrc": "3275:14:23", + "nodeType": "YulVariableDeclaration", + "src": "3275:14:23", + "value": { + "kind": "number", + "nativeSrc": "3288:1:23", + "nodeType": "YulLiteral", + "src": "3288:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "3279:5:23", + "nodeType": "YulTypedName", + "src": "3279:5:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3324:67:23", + "nodeType": "YulBlock", + "src": "3324:67:23", + "statements": [ + { + "nativeSrc": "3342:35:23", + "nodeType": "YulAssignment", + "src": "3342:35:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "3361:3:23", + "nodeType": "YulIdentifier", + "src": "3361:3:23" + }, + { + "name": "srcOffset", + "nativeSrc": "3366:9:23", + "nodeType": "YulIdentifier", + "src": "3366:9:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3357:3:23", + "nodeType": "YulIdentifier", + "src": "3357:3:23" + }, + "nativeSrc": "3357:19:23", + "nodeType": "YulFunctionCall", + "src": "3357:19:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3351:5:23", + "nodeType": "YulIdentifier", + "src": "3351:5:23" + }, + "nativeSrc": "3351:26:23", + "nodeType": "YulFunctionCall", + "src": "3351:26:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "3342:5:23", + "nodeType": "YulIdentifier", + "src": "3342:5:23" + } + ] + } + ] + }, + "condition": { + "name": "newLen", + "nativeSrc": "3305:6:23", + "nodeType": "YulIdentifier", + "src": "3305:6:23" + }, + "nativeSrc": "3302:89:23", + "nodeType": "YulIf", + "src": "3302:89:23" + }, + { + "expression": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "3411:4:23", + "nodeType": "YulIdentifier", + "src": "3411:4:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "3470:5:23", + "nodeType": "YulIdentifier", + "src": "3470:5:23" + }, + { + "name": "newLen", + "nativeSrc": "3477:6:23", + "nodeType": "YulIdentifier", + "src": "3477:6:23" + } + ], + "functionName": { + "name": "extract_used_part_and_set_length_of_short_byte_array", + "nativeSrc": "3417:52:23", + "nodeType": "YulIdentifier", + "src": "3417:52:23" + }, + "nativeSrc": "3417:67:23", + "nodeType": "YulFunctionCall", + "src": "3417:67:23" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "3404:6:23", + "nodeType": "YulIdentifier", + "src": "3404:6:23" + }, + "nativeSrc": "3404:81:23", + "nodeType": "YulFunctionCall", + "src": "3404:81:23" + }, + "nativeSrc": "3404:81:23", + "nodeType": "YulExpressionStatement", + "src": "3404:81:23" + } + ] + }, + "nativeSrc": "3253:242:23", + "nodeType": "YulCase", + "src": "3253:242:23", + "value": "default" + } + ], + "expression": { + "arguments": [ + { + "name": "newLen", + "nativeSrc": "2575:6:23", + "nodeType": "YulIdentifier", + "src": "2575:6:23" + }, + { + "kind": "number", + "nativeSrc": "2583:2:23", + "nodeType": "YulLiteral", + "src": "2583:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "2572:2:23", + "nodeType": "YulIdentifier", + "src": "2572:2:23" + }, + "nativeSrc": "2572:14:23", + "nodeType": "YulFunctionCall", + "src": "2572:14:23" + }, + "nativeSrc": "2565:930:23", + "nodeType": "YulSwitch", + "src": "2565:930:23" + } + ] + }, + "name": "copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage", + "nativeSrc": "2202:1299:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "slot", + "nativeSrc": "2283:4:23", + "nodeType": "YulTypedName", + "src": "2283:4:23", + "type": "" + }, + { + "name": "src", + "nativeSrc": "2289:3:23", + "nodeType": "YulTypedName", + "src": "2289:3:23", + "type": "" + } + ], + "src": "2202:1299:23" + }, + { + "body": { + "nativeSrc": "3719:276:23", + "nodeType": "YulBlock", + "src": "3719:276:23", + "statements": [ + { + "nativeSrc": "3729:27:23", + "nodeType": "YulAssignment", + "src": "3729:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3741:9:23", + "nodeType": "YulIdentifier", + "src": "3741:9:23" + }, + { + "kind": "number", + "nativeSrc": "3752:3:23", + "nodeType": "YulLiteral", + "src": "3752:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3737:3:23", + "nodeType": "YulIdentifier", + "src": "3737:3:23" + }, + "nativeSrc": "3737:19:23", + "nodeType": "YulFunctionCall", + "src": "3737:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3729:4:23", + "nodeType": "YulIdentifier", + "src": "3729:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3772:9:23", + "nodeType": "YulIdentifier", + "src": "3772:9:23" + }, + { + "name": "value0", + "nativeSrc": "3783:6:23", + "nodeType": "YulIdentifier", + "src": "3783:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3765:6:23", + "nodeType": "YulIdentifier", + "src": "3765:6:23" + }, + "nativeSrc": "3765:25:23", + "nodeType": "YulFunctionCall", + "src": "3765:25:23" + }, + "nativeSrc": "3765:25:23", + "nodeType": "YulExpressionStatement", + "src": "3765:25:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3810:9:23", + "nodeType": "YulIdentifier", + "src": "3810:9:23" + }, + { + "kind": "number", + "nativeSrc": "3821:2:23", + "nodeType": "YulLiteral", + "src": "3821:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3806:3:23", + "nodeType": "YulIdentifier", + "src": "3806:3:23" + }, + "nativeSrc": "3806:18:23", + "nodeType": "YulFunctionCall", + "src": "3806:18:23" + }, + { + "name": "value1", + "nativeSrc": "3826:6:23", + "nodeType": "YulIdentifier", + "src": "3826:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3799:6:23", + "nodeType": "YulIdentifier", + "src": "3799:6:23" + }, + "nativeSrc": "3799:34:23", + "nodeType": "YulFunctionCall", + "src": "3799:34:23" + }, + "nativeSrc": "3799:34:23", + "nodeType": "YulExpressionStatement", + "src": "3799:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3853:9:23", + "nodeType": "YulIdentifier", + "src": "3853:9:23" + }, + { + "kind": "number", + "nativeSrc": "3864:2:23", + "nodeType": "YulLiteral", + "src": "3864:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3849:3:23", + "nodeType": "YulIdentifier", + "src": "3849:3:23" + }, + "nativeSrc": "3849:18:23", + "nodeType": "YulFunctionCall", + "src": "3849:18:23" + }, + { + "name": "value2", + "nativeSrc": "3869:6:23", + "nodeType": "YulIdentifier", + "src": "3869:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3842:6:23", + "nodeType": "YulIdentifier", + "src": "3842:6:23" + }, + "nativeSrc": "3842:34:23", + "nodeType": "YulFunctionCall", + "src": "3842:34:23" + }, + "nativeSrc": "3842:34:23", + "nodeType": "YulExpressionStatement", + "src": "3842:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3896:9:23", + "nodeType": "YulIdentifier", + "src": "3896:9:23" + }, + { + "kind": "number", + "nativeSrc": "3907:2:23", + "nodeType": "YulLiteral", + "src": "3907:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3892:3:23", + "nodeType": "YulIdentifier", + "src": "3892:3:23" + }, + "nativeSrc": "3892:18:23", + "nodeType": "YulFunctionCall", + "src": "3892:18:23" + }, + { + "name": "value3", + "nativeSrc": "3912:6:23", + "nodeType": "YulIdentifier", + "src": "3912:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3885:6:23", + "nodeType": "YulIdentifier", + "src": "3885:6:23" + }, + "nativeSrc": "3885:34:23", + "nodeType": "YulFunctionCall", + "src": "3885:34:23" + }, + "nativeSrc": "3885:34:23", + "nodeType": "YulExpressionStatement", + "src": "3885:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3939:9:23", + "nodeType": "YulIdentifier", + "src": "3939:9:23" + }, + { + "kind": "number", + "nativeSrc": "3950:3:23", + "nodeType": "YulLiteral", + "src": "3950:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3935:3:23", + "nodeType": "YulIdentifier", + "src": "3935:3:23" + }, + "nativeSrc": "3935:19:23", + "nodeType": "YulFunctionCall", + "src": "3935:19:23" + }, + { + "arguments": [ + { + "name": "value4", + "nativeSrc": "3960:6:23", + "nodeType": "YulIdentifier", + "src": "3960:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3976:3:23", + "nodeType": "YulLiteral", + "src": "3976:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "3981:1:23", + "nodeType": "YulLiteral", + "src": "3981:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3972:3:23", + "nodeType": "YulIdentifier", + "src": "3972:3:23" + }, + "nativeSrc": "3972:11:23", + "nodeType": "YulFunctionCall", + "src": "3972:11:23" + }, + { + "kind": "number", + "nativeSrc": "3985:1:23", + "nodeType": "YulLiteral", + "src": "3985:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3968:3:23", + "nodeType": "YulIdentifier", + "src": "3968:3:23" + }, + "nativeSrc": "3968:19:23", + "nodeType": "YulFunctionCall", + "src": "3968:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3956:3:23", + "nodeType": "YulIdentifier", + "src": "3956:3:23" + }, + "nativeSrc": "3956:32:23", + "nodeType": "YulFunctionCall", + "src": "3956:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3928:6:23", + "nodeType": "YulIdentifier", + "src": "3928:6:23" + }, + "nativeSrc": "3928:61:23", + "nodeType": "YulFunctionCall", + "src": "3928:61:23" + }, + "nativeSrc": "3928:61:23", + "nodeType": "YulExpressionStatement", + "src": "3928:61:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed", + "nativeSrc": "3506:489:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3656:9:23", + "nodeType": "YulTypedName", + "src": "3656:9:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "3667:6:23", + "nodeType": "YulTypedName", + "src": "3667:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "3675:6:23", + "nodeType": "YulTypedName", + "src": "3675:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "3683:6:23", + "nodeType": "YulTypedName", + "src": "3683:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "3691:6:23", + "nodeType": "YulTypedName", + "src": "3691:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "3699:6:23", + "nodeType": "YulTypedName", + "src": "3699:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3710:4:23", + "nodeType": "YulTypedName", + "src": "3710:4:23", + "type": "" + } + ], + "src": "3506:489:23" + }, + { + "body": { + "nativeSrc": "4121:297:23", + "nodeType": "YulBlock", + "src": "4121:297:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4138:9:23", + "nodeType": "YulIdentifier", + "src": "4138:9:23" + }, + { + "kind": "number", + "nativeSrc": "4149:2:23", + "nodeType": "YulLiteral", + "src": "4149:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4131:6:23", + "nodeType": "YulIdentifier", + "src": "4131:6:23" + }, + "nativeSrc": "4131:21:23", + "nodeType": "YulFunctionCall", + "src": "4131:21:23" + }, + "nativeSrc": "4131:21:23", + "nodeType": "YulExpressionStatement", + "src": "4131:21:23" + }, + { + "nativeSrc": "4161:27:23", + "nodeType": "YulVariableDeclaration", + "src": "4161:27:23", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4181:6:23", + "nodeType": "YulIdentifier", + "src": "4181:6:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4175:5:23", + "nodeType": "YulIdentifier", + "src": "4175:5:23" + }, + "nativeSrc": "4175:13:23", + "nodeType": "YulFunctionCall", + "src": "4175:13:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "4165:6:23", + "nodeType": "YulTypedName", + "src": "4165:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4208:9:23", + "nodeType": "YulIdentifier", + "src": "4208:9:23" + }, + { + "kind": "number", + "nativeSrc": "4219:2:23", + "nodeType": "YulLiteral", + "src": "4219:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4204:3:23", + "nodeType": "YulIdentifier", + "src": "4204:3:23" + }, + "nativeSrc": "4204:18:23", + "nodeType": "YulFunctionCall", + "src": "4204:18:23" + }, + { + "name": "length", + "nativeSrc": "4224:6:23", + "nodeType": "YulIdentifier", + "src": "4224:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4197:6:23", + "nodeType": "YulIdentifier", + "src": "4197:6:23" + }, + "nativeSrc": "4197:34:23", + "nodeType": "YulFunctionCall", + "src": "4197:34:23" + }, + "nativeSrc": "4197:34:23", + "nodeType": "YulExpressionStatement", + "src": "4197:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4250:9:23", + "nodeType": "YulIdentifier", + "src": "4250:9:23" + }, + { + "kind": "number", + "nativeSrc": "4261:2:23", + "nodeType": "YulLiteral", + "src": "4261:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4246:3:23", + "nodeType": "YulIdentifier", + "src": "4246:3:23" + }, + "nativeSrc": "4246:18:23", + "nodeType": "YulFunctionCall", + "src": "4246:18:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4270:6:23", + "nodeType": "YulIdentifier", + "src": "4270:6:23" + }, + { + "kind": "number", + "nativeSrc": "4278:2:23", + "nodeType": "YulLiteral", + "src": "4278:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4266:3:23", + "nodeType": "YulIdentifier", + "src": "4266:3:23" + }, + "nativeSrc": "4266:15:23", + "nodeType": "YulFunctionCall", + "src": "4266:15:23" + }, + { + "name": "length", + "nativeSrc": "4283:6:23", + "nodeType": "YulIdentifier", + "src": "4283:6:23" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "4240:5:23", + "nodeType": "YulIdentifier", + "src": "4240:5:23" + }, + "nativeSrc": "4240:50:23", + "nodeType": "YulFunctionCall", + "src": "4240:50:23" + }, + "nativeSrc": "4240:50:23", + "nodeType": "YulExpressionStatement", + "src": "4240:50:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4314:9:23", + "nodeType": "YulIdentifier", + "src": "4314:9:23" + }, + { + "name": "length", + "nativeSrc": "4325:6:23", + "nodeType": "YulIdentifier", + "src": "4325:6:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4310:3:23", + "nodeType": "YulIdentifier", + "src": "4310:3:23" + }, + "nativeSrc": "4310:22:23", + "nodeType": "YulFunctionCall", + "src": "4310:22:23" + }, + { + "kind": "number", + "nativeSrc": "4334:2:23", + "nodeType": "YulLiteral", + "src": "4334:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4306:3:23", + "nodeType": "YulIdentifier", + "src": "4306:3:23" + }, + "nativeSrc": "4306:31:23", + "nodeType": "YulFunctionCall", + "src": "4306:31:23" + }, + { + "kind": "number", + "nativeSrc": "4339:1:23", + "nodeType": "YulLiteral", + "src": "4339:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4299:6:23", + "nodeType": "YulIdentifier", + "src": "4299:6:23" + }, + "nativeSrc": "4299:42:23", + "nodeType": "YulFunctionCall", + "src": "4299:42:23" + }, + "nativeSrc": "4299:42:23", + "nodeType": "YulExpressionStatement", + "src": "4299:42:23" + }, + { + "nativeSrc": "4350:62:23", + "nodeType": "YulAssignment", + "src": "4350:62:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4366:9:23", + "nodeType": "YulIdentifier", + "src": "4366:9:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "4385:6:23", + "nodeType": "YulIdentifier", + "src": "4385:6:23" + }, + { + "kind": "number", + "nativeSrc": "4393:2:23", + "nodeType": "YulLiteral", + "src": "4393:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4381:3:23", + "nodeType": "YulIdentifier", + "src": "4381:3:23" + }, + "nativeSrc": "4381:15:23", + "nodeType": "YulFunctionCall", + "src": "4381:15:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4402:2:23", + "nodeType": "YulLiteral", + "src": "4402:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4398:3:23", + "nodeType": "YulIdentifier", + "src": "4398:3:23" + }, + "nativeSrc": "4398:7:23", + "nodeType": "YulFunctionCall", + "src": "4398:7:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4377:3:23", + "nodeType": "YulIdentifier", + "src": "4377:3:23" + }, + "nativeSrc": "4377:29:23", + "nodeType": "YulFunctionCall", + "src": "4377:29:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4362:3:23", + "nodeType": "YulIdentifier", + "src": "4362:3:23" + }, + "nativeSrc": "4362:45:23", + "nodeType": "YulFunctionCall", + "src": "4362:45:23" + }, + { + "kind": "number", + "nativeSrc": "4409:2:23", + "nodeType": "YulLiteral", + "src": "4409:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4358:3:23", + "nodeType": "YulIdentifier", + "src": "4358:3:23" + }, + "nativeSrc": "4358:54:23", + "nodeType": "YulFunctionCall", + "src": "4358:54:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4350:4:23", + "nodeType": "YulIdentifier", + "src": "4350:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "4000:418:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4090:9:23", + "nodeType": "YulTypedName", + "src": "4090:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4101:6:23", + "nodeType": "YulTypedName", + "src": "4101:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4112:4:23", + "nodeType": "YulTypedName", + "src": "4112:4:23", + "type": "" + } + ], + "src": "4000:418:23" + }, + { + "body": { + "nativeSrc": "4517:203:23", + "nodeType": "YulBlock", + "src": "4517:203:23", + "statements": [ + { + "nativeSrc": "4527:26:23", + "nodeType": "YulVariableDeclaration", + "src": "4527:26:23", + "value": { + "arguments": [ + { + "name": "array", + "nativeSrc": "4547:5:23", + "nodeType": "YulIdentifier", + "src": "4547:5:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4541:5:23", + "nodeType": "YulIdentifier", + "src": "4541:5:23" + }, + "nativeSrc": "4541:12:23", + "nodeType": "YulFunctionCall", + "src": "4541:12:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "4531:6:23", + "nodeType": "YulTypedName", + "src": "4531:6:23", + "type": "" + } + ] + }, + { + "nativeSrc": "4562:32:23", + "nodeType": "YulAssignment", + "src": "4562:32:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "array", + "nativeSrc": "4581:5:23", + "nodeType": "YulIdentifier", + "src": "4581:5:23" + }, + { + "kind": "number", + "nativeSrc": "4588:4:23", + "nodeType": "YulLiteral", + "src": "4588:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4577:3:23", + "nodeType": "YulIdentifier", + "src": "4577:3:23" + }, + "nativeSrc": "4577:16:23", + "nodeType": "YulFunctionCall", + "src": "4577:16:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4571:5:23", + "nodeType": "YulIdentifier", + "src": "4571:5:23" + }, + "nativeSrc": "4571:23:23", + "nodeType": "YulFunctionCall", + "src": "4571:23:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "4562:5:23", + "nodeType": "YulIdentifier", + "src": "4562:5:23" + } + ] + }, + { + "body": { + "nativeSrc": "4631:83:23", + "nodeType": "YulBlock", + "src": "4631:83:23", + "statements": [ + { + "nativeSrc": "4645:59:23", + "nodeType": "YulAssignment", + "src": "4645:59:23", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "4658:5:23", + "nodeType": "YulIdentifier", + "src": "4658:5:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4673:1:23", + "nodeType": "YulLiteral", + "src": "4673:1:23", + "type": "", + "value": "3" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4680:4:23", + "nodeType": "YulLiteral", + "src": "4680:4:23", + "type": "", + "value": "0x20" + }, + { + "name": "length", + "nativeSrc": "4686:6:23", + "nodeType": "YulIdentifier", + "src": "4686:6:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4676:3:23", + "nodeType": "YulIdentifier", + "src": "4676:3:23" + }, + "nativeSrc": "4676:17:23", + "nodeType": "YulFunctionCall", + "src": "4676:17:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4669:3:23", + "nodeType": "YulIdentifier", + "src": "4669:3:23" + }, + "nativeSrc": "4669:25:23", + "nodeType": "YulFunctionCall", + "src": "4669:25:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4700:1:23", + "nodeType": "YulLiteral", + "src": "4700:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4696:3:23", + "nodeType": "YulIdentifier", + "src": "4696:3:23" + }, + "nativeSrc": "4696:6:23", + "nodeType": "YulFunctionCall", + "src": "4696:6:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4665:3:23", + "nodeType": "YulIdentifier", + "src": "4665:3:23" + }, + "nativeSrc": "4665:38:23", + "nodeType": "YulFunctionCall", + "src": "4665:38:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4654:3:23", + "nodeType": "YulIdentifier", + "src": "4654:3:23" + }, + "nativeSrc": "4654:50:23", + "nodeType": "YulFunctionCall", + "src": "4654:50:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "4645:5:23", + "nodeType": "YulIdentifier", + "src": "4645:5:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nativeSrc": "4609:6:23", + "nodeType": "YulIdentifier", + "src": "4609:6:23" + }, + { + "kind": "number", + "nativeSrc": "4617:4:23", + "nodeType": "YulLiteral", + "src": "4617:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "4606:2:23", + "nodeType": "YulIdentifier", + "src": "4606:2:23" + }, + "nativeSrc": "4606:16:23", + "nodeType": "YulFunctionCall", + "src": "4606:16:23" + }, + "nativeSrc": "4603:111:23", + "nodeType": "YulIf", + "src": "4603:111:23" + } + ] + }, + "name": "convert_bytes_to_fixedbytes_from_t_bytes_memory_ptr_to_t_bytes32", + "nativeSrc": "4423:297:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "array", + "nativeSrc": "4497:5:23", + "nodeType": "YulTypedName", + "src": "4497:5:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nativeSrc": "4507:5:23", + "nodeType": "YulTypedName", + "src": "4507:5:23", + "type": "" + } + ], + "src": "4423:297:23" + } + ] + }, + "contents": "{\n { }\n function abi_decode_tuple_t_address_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 19)\n mstore(add(headStart, 64), \"Invalid destination\")\n tail := add(headStart, 96)\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function extract_byte_array_length(data) -> length\n {\n length := shr(1, data)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) { length := and(length, 0x7f) }\n if eq(outOfPlaceEncoding, lt(length, 32))\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n }\n function array_dataslot_string_storage(ptr) -> data\n {\n mstore(0, ptr)\n data := keccak256(0, 0x20)\n }\n function clean_up_bytearray_end_slots_string_storage(array, len, startIndex)\n {\n if gt(len, 31)\n {\n mstore(0, array)\n let data := keccak256(0, 0x20)\n let deleteStart := add(data, shr(5, add(startIndex, 31)))\n if lt(startIndex, 0x20) { deleteStart := data }\n let _1 := add(data, shr(5, add(len, 31)))\n let start := deleteStart\n for { } lt(start, _1) { start := add(start, 1) }\n { sstore(start, 0) }\n }\n }\n function extract_used_part_and_set_length_of_short_byte_array(data, len) -> used\n {\n used := or(and(data, not(shr(shl(3, len), not(0)))), shl(1, len))\n }\n function copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage(slot, src)\n {\n let newLen := mload(src)\n if gt(newLen, sub(shl(64, 1), 1)) { panic_error_0x41() }\n clean_up_bytearray_end_slots_string_storage(slot, extract_byte_array_length(sload(slot)), newLen)\n let srcOffset := 0\n srcOffset := 0x20\n switch gt(newLen, 31)\n case 1 {\n let loopEnd := and(newLen, not(31))\n let dstPtr := array_dataslot_string_storage(slot)\n let i := 0\n for { } lt(i, loopEnd) { i := add(i, 0x20) }\n {\n sstore(dstPtr, mload(add(src, srcOffset)))\n dstPtr := add(dstPtr, 1)\n srcOffset := add(srcOffset, 0x20)\n }\n if lt(loopEnd, newLen)\n {\n let lastValue := mload(add(src, srcOffset))\n sstore(dstPtr, and(lastValue, not(shr(and(shl(3, newLen), 248), not(0)))))\n }\n sstore(slot, add(shl(1, newLen), 1))\n }\n default {\n let value := 0\n if newLen\n {\n value := mload(add(src, srcOffset))\n }\n sstore(slot, extract_used_part_and_set_length_of_short_byte_array(value, newLen))\n }\n }\n function abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed(headStart, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 160)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), and(value4, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n mstore(headStart, 32)\n let length := mload(value0)\n mstore(add(headStart, 32), length)\n mcopy(add(headStart, 64), add(value0, 32), length)\n mstore(add(add(headStart, length), 64), 0)\n tail := add(add(headStart, and(add(length, 31), not(31))), 64)\n }\n function convert_bytes_to_fixedbytes_from_t_bytes_memory_ptr_to_t_bytes32(array) -> value\n {\n let length := mload(array)\n value := mload(add(array, 0x20))\n if lt(length, 0x20)\n {\n value := and(value, shl(shl(3, sub(0x20, length)), not(0)))\n }\n }\n}", + "id": 23, + "language": "Yul", + "name": "#utility.yul" + } + ], + "linkReferences": {}, + "object": "610180604052348015610010575f5ffd5b50604051611a4d380380611a4d83398101604081905261002f91610294565b604080518082018252600c81526b2a37b5b2b72932b630bcb2b960a11b602080830191909152825180840190935260018352603160f81b9083015290338061009157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61009a816101d6565b5060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00556100ca826001610225565b610120526100d9816002610225565b61014052815160208084019190912060e052815190820120610100524660a05261016560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166101c45760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642064657374696e6174696f6e000000000000000000000000006044820152606401610088565b6001600160a01b03166101605261046b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6020835110156102405761023983610257565b9050610251565b8161024b8482610359565b5060ff90505b92915050565b5f5f829050601f81511115610281578260405163305a27a960e01b81526004016100889190610413565b805161028c82610448565b179392505050565b5f602082840312156102a4575f5ffd5b81516001600160a01b03811681146102ba575f5ffd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102e957607f821691505b60208210810361030757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561035457805f5260205f20601f840160051c810160208510156103325750805b601f840160051c820191505b81811015610351575f815560010161033e565b50505b505050565b81516001600160401b03811115610372576103726102c1565b6103868161038084546102d5565b8461030d565b6020601f8211600181146103b8575f83156103a15750848201515b5f19600385901b1c1916600184901b178455610351565b5f84815260208120601f198516915b828110156103e757878501518255602094850194600190920191016103c7565b508482101561040457868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610307575f1960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161156c6104e15f395f818160d701528181610525015281816105f4015281816109500152610bf801525f610d2d01525f610cfb01525f6111bc01525f61119401525f6110ef01525f61111901525f611143015261156c5ff3fe608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033", + "opcodes": "PUSH2 0x180 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x1A4D CODESIZE SUB DUP1 PUSH2 0x1A4D DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x294 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0xC DUP2 MSTORE PUSH12 0x2A37B5B2B72932B630BCB2B9 PUSH1 0xA1 SHL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE PUSH1 0x1 DUP4 MSTORE PUSH1 0x31 PUSH1 0xF8 SHL SWAP1 DUP4 ADD MSTORE SWAP1 CALLER DUP1 PUSH2 0x91 JUMPI PUSH1 0x40 MLOAD PUSH4 0x1E4FBDF7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH0 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x9A DUP2 PUSH2 0x1D6 JUMP JUMPDEST POP PUSH1 0x1 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE PUSH2 0xCA DUP3 PUSH1 0x1 PUSH2 0x225 JUMP JUMPDEST PUSH2 0x120 MSTORE PUSH2 0xD9 DUP2 PUSH1 0x2 PUSH2 0x225 JUMP JUMPDEST PUSH2 0x140 MSTORE DUP2 MLOAD PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 KECCAK256 PUSH1 0xE0 MSTORE DUP2 MLOAD SWAP1 DUP3 ADD KECCAK256 PUSH2 0x100 MSTORE CHAINID PUSH1 0xA0 MSTORE PUSH2 0x165 PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH1 0x20 DUP3 ADD MSTORE SWAP1 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP3 ADD MSTORE CHAINID PUSH1 0x80 DUP3 ADD MSTORE ADDRESS PUSH1 0xA0 DUP3 ADD MSTORE PUSH0 SWAP1 PUSH1 0xC0 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x80 MSTORE POP POP ADDRESS PUSH1 0xC0 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x1C4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x496E76616C69642064657374696E6174696F6E00000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x88 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x160 MSTORE PUSH2 0x46B JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP4 AND DUP2 OR DUP5 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP1 SWAP3 AND SWAP3 DUP4 SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP4 MLOAD LT ISZERO PUSH2 0x240 JUMPI PUSH2 0x239 DUP4 PUSH2 0x257 JUMP JUMPDEST SWAP1 POP PUSH2 0x251 JUMP JUMPDEST DUP2 PUSH2 0x24B DUP5 DUP3 PUSH2 0x359 JUMP JUMPDEST POP PUSH1 0xFF SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH0 DUP3 SWAP1 POP PUSH1 0x1F DUP2 MLOAD GT ISZERO PUSH2 0x281 JUMPI DUP3 PUSH1 0x40 MLOAD PUSH4 0x305A27A9 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x88 SWAP2 SWAP1 PUSH2 0x413 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x28C DUP3 PUSH2 0x448 JUMP JUMPDEST OR SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2A4 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x2BA JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH1 0x1 DUP2 DUP2 SHR SWAP1 DUP3 AND DUP1 PUSH2 0x2E9 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x307 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1F DUP3 GT ISZERO PUSH2 0x354 JUMPI DUP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 PUSH1 0x1F DUP5 ADD PUSH1 0x5 SHR DUP2 ADD PUSH1 0x20 DUP6 LT ISZERO PUSH2 0x332 JUMPI POP DUP1 JUMPDEST PUSH1 0x1F DUP5 ADD PUSH1 0x5 SHR DUP3 ADD SWAP2 POP JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x351 JUMPI PUSH0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x33E JUMP JUMPDEST POP POP JUMPDEST POP POP POP JUMP JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x372 JUMPI PUSH2 0x372 PUSH2 0x2C1 JUMP JUMPDEST PUSH2 0x386 DUP2 PUSH2 0x380 DUP5 SLOAD PUSH2 0x2D5 JUMP JUMPDEST DUP5 PUSH2 0x30D JUMP JUMPDEST PUSH1 0x20 PUSH1 0x1F DUP3 GT PUSH1 0x1 DUP2 EQ PUSH2 0x3B8 JUMPI PUSH0 DUP4 ISZERO PUSH2 0x3A1 JUMPI POP DUP5 DUP3 ADD MLOAD JUMPDEST PUSH0 NOT PUSH1 0x3 DUP6 SWAP1 SHL SHR NOT AND PUSH1 0x1 DUP5 SWAP1 SHL OR DUP5 SSTORE PUSH2 0x351 JUMP JUMPDEST PUSH0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 KECCAK256 PUSH1 0x1F NOT DUP6 AND SWAP2 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x3E7 JUMPI DUP8 DUP6 ADD MLOAD DUP3 SSTORE PUSH1 0x20 SWAP5 DUP6 ADD SWAP5 PUSH1 0x1 SWAP1 SWAP3 ADD SWAP2 ADD PUSH2 0x3C7 JUMP JUMPDEST POP DUP5 DUP3 LT ISZERO PUSH2 0x404 JUMPI DUP7 DUP5 ADD MLOAD PUSH0 NOT PUSH1 0x3 DUP8 SWAP1 SHL PUSH1 0xF8 AND SHR NOT AND DUP2 SSTORE JUMPDEST POP POP POP POP PUSH1 0x1 SWAP1 DUP2 SHL ADD SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x20 DUP2 MSTORE PUSH0 DUP3 MLOAD DUP1 PUSH1 0x20 DUP5 ADD MSTORE DUP1 PUSH1 0x20 DUP6 ADD PUSH1 0x40 DUP6 ADD MCOPY PUSH0 PUSH1 0x40 DUP3 DUP6 ADD ADD MSTORE PUSH1 0x40 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP5 ADD ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP1 DUP4 ADD MLOAD SWAP2 SWAP1 DUP2 LT ISZERO PUSH2 0x307 JUMPI PUSH0 NOT PUSH1 0x20 SWAP2 SWAP1 SWAP2 SUB PUSH1 0x3 SHL SHL AND SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x120 MLOAD PUSH2 0x140 MLOAD PUSH2 0x160 MLOAD PUSH2 0x156C PUSH2 0x4E1 PUSH0 CODECOPY PUSH0 DUP2 DUP2 PUSH1 0xD7 ADD MSTORE DUP2 DUP2 PUSH2 0x525 ADD MSTORE DUP2 DUP2 PUSH2 0x5F4 ADD MSTORE DUP2 DUP2 PUSH2 0x950 ADD MSTORE PUSH2 0xBF8 ADD MSTORE PUSH0 PUSH2 0xD2D ADD MSTORE PUSH0 PUSH2 0xCFB ADD MSTORE PUSH0 PUSH2 0x11BC ADD MSTORE PUSH0 PUSH2 0x1194 ADD MSTORE PUSH0 PUSH2 0x10EF ADD MSTORE PUSH0 PUSH2 0x1119 ADD MSTORE PUSH0 PUSH2 0x1143 ADD MSTORE PUSH2 0x156C PUSH0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x92 JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9E281A98 GT PUSH2 0x57 JUMPI DUP1 PUSH4 0x9E281A98 EQ PUSH2 0x159 JUMPI DUP1 PUSH4 0xD850124E EQ PUSH2 0x178 JUMPI DUP1 PUSH4 0xDCB79457 EQ PUSH2 0x1C1 JUMPI DUP1 PUSH4 0xF14210A6 EQ PUSH2 0x1E0 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x1FF JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP1 PUSH4 0x2AF83BFE EQ PUSH2 0x9D JUMPI DUP1 PUSH4 0x715018A6 EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0x75BD6863 EQ PUSH2 0xC6 JUMPI DUP1 PUSH4 0x84B0196E EQ PUSH2 0x116 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x13D JUMPI PUSH0 PUSH0 REVERT JUMPDEST CALLDATASIZE PUSH2 0x99 JUMPI STOP JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0xB0 PUSH2 0xAB CALLDATASIZE PUSH1 0x4 PUSH2 0x12DD JUMP JUMPDEST PUSH2 0x21E JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xBD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x6AE JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xD1 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xF9 PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x121 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x12A PUSH2 0x6C1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x10D SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x134A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x148 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xF9 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x164 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x173 CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH2 0x703 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x183 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x192 CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x10D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CC JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x1DB CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH2 0x78B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1EB JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x1FA CALLDATASIZE PUSH1 0x4 PUSH2 0x1423 JUMP JUMPDEST PUSH2 0x7B8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x20A JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x219 CALLDATASIZE PUSH1 0x4 PUSH2 0x143A JUMP JUMPDEST PUSH2 0x8A7 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x8E1 JUMP JUMPDEST PUSH0 PUSH2 0x237 PUSH1 0x40 DUP4 ADD PUSH1 0x20 DUP5 ADD PUSH2 0x143A JUMP JUMPDEST SWAP1 POP PUSH2 0x120 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x28A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x24B73B30B634B21037BBB732B9 PUSH1 0x99 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH2 0x298 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SUB PUSH2 0x2DE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x24B73B30B634B2103A37B5B2B7 PUSH1 0x99 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x33E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xA PUSH1 0x24 DUP3 ADD MSTORE PUSH10 0x139BDB98D9481D5CD959 PUSH1 0xB2 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST DUP3 PUSH2 0x140 ADD CALLDATALOAD TIMESTAMP GT ISZERO PUSH2 0x385 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xF PUSH1 0x24 DUP3 ADD MSTORE PUSH15 0x14185E5B1BD85908195E1C1A5C9959 PUSH1 0x8A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 PUSH2 0x3EE DUP4 PUSH2 0x397 PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH2 0x3A9 PUSH1 0xE0 DUP10 ADD DUP10 PUSH2 0x1453 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP POP POP POP PUSH2 0x100 DUP10 ADD CALLDATALOAD DUP8 PUSH2 0x140 DUP12 ADD CALLDATALOAD PUSH2 0x90F JUMP JUMPDEST SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x421 DUP3 PUSH2 0x410 PUSH2 0x180 DUP9 ADD PUSH2 0x160 DUP10 ADD PUSH2 0x149D JUMP JUMPDEST DUP8 PUSH2 0x180 ADD CALLDATALOAD DUP9 PUSH2 0x1A0 ADD CALLDATALOAD PUSH2 0x9DB JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x465 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xB PUSH1 0x24 DUP3 ADD MSTORE PUSH11 0x496E76616C696420736967 PUSH1 0xA8 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST DUP4 PUSH2 0x100 ADD CALLDATALOAD CALLVALUE EQ PUSH2 0x4B9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1C PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x496E636F7272656374204554482076616C75652070726F766964656400000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP6 DUP5 MSTORE DUP3 MSTORE SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH2 0x520 SWAP1 PUSH2 0x4F6 SWAP1 DUP7 ADD DUP7 PUSH2 0x143A JUMP JUMPDEST DUP5 PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH1 0x60 DUP9 ADD CALLDATALOAD PUSH2 0x511 PUSH1 0xA0 DUP11 ADD PUSH1 0x80 DUP12 ADD PUSH2 0x149D JUMP JUMPDEST DUP10 PUSH1 0xA0 ADD CALLDATALOAD DUP11 PUSH1 0xC0 ADD CALLDATALOAD PUSH2 0xA07 JUMP JUMPDEST PUSH2 0x566 PUSH32 0x0 PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH2 0x556 PUSH1 0x20 DUP9 ADD DUP9 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 SWAP1 PUSH2 0xB75 JUMP JUMPDEST PUSH0 PUSH2 0x5B2 PUSH2 0x577 PUSH1 0xE0 DUP8 ADD DUP8 PUSH2 0x1453 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP CALLVALUE SWAP3 POP PUSH2 0xBF4 SWAP2 POP POP JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x5EF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xB PUSH1 0x24 DUP3 ADD MSTORE PUSH11 0x10D85B1B0819985A5B1959 PUSH1 0xAA SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0x621 PUSH32 0x0 PUSH0 PUSH2 0x556 PUSH1 0x20 DUP10 ADD DUP10 PUSH2 0x143A JUMP JUMPDEST PUSH2 0x62E PUSH1 0x20 DUP7 ADD DUP7 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x78129A649632642D8E9F346C85D9EFB70D32D50A36774C4585491A9228BBD350 DUP8 PUSH1 0x40 ADD CALLDATALOAD PUSH1 0x40 MLOAD PUSH2 0x676 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP PUSH2 0x6AB PUSH1 0x1 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x6B6 PUSH2 0xC79 JUMP JUMPDEST PUSH2 0x6BF PUSH0 PUSH2 0xCA5 JUMP JUMPDEST JUMP JUMPDEST PUSH0 PUSH1 0x60 DUP1 PUSH0 PUSH0 PUSH0 PUSH1 0x60 PUSH2 0x6D2 PUSH2 0xCF4 JUMP JUMPDEST PUSH2 0x6DA PUSH2 0xD26 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 SWAP3 MSTORE PUSH1 0xF PUSH1 0xF8 SHL SWAP12 SWAP4 SWAP11 POP SWAP2 SWAP9 POP CHAINID SWAP8 POP ADDRESS SWAP7 POP SWAP5 POP SWAP3 POP SWAP1 POP JUMP JUMPDEST PUSH2 0x70B PUSH2 0xC79 JUMP JUMPDEST PUSH2 0x730 PUSH2 0x71F PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 DUP4 PUSH2 0xD53 JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0xA0524EE0FD8662D6C046D199DA2A6D3DC49445182CEC055873A5BB9C2843C8E0 DUP4 PUSH1 0x40 MLOAD PUSH2 0x77F SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x7C0 PUSH2 0xC79 JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 DUP4 SWAP1 DUP4 DUP2 DUP2 DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH0 DUP2 EQ PUSH2 0x80A JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x80F JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH2 0x856 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x115512081D1C985B9CD9995C8819985A5B1959 PUSH1 0x6A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x6148672A948A12B8E0BF92A9338349B9AC890FAD62A234ABAF0A4DA99F62CFCC DUP4 PUSH1 0x40 MLOAD PUSH2 0x89B SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH2 0x8AF PUSH2 0xC79 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x8D8 JUMPI PUSH1 0x40 MLOAD PUSH4 0x1E4FBDF7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH0 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0x6AB DUP2 PUSH2 0xCA5 JUMP JUMPDEST PUSH2 0x8E9 PUSH2 0xD60 JUMP JUMPDEST PUSH1 0x2 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE JUMP JUMPDEST DUP4 MLOAD PUSH1 0x20 DUP1 DUP7 ADD SWAP2 SWAP1 SWAP2 KECCAK256 PUSH1 0x40 DUP1 MLOAD PUSH32 0xF0543E2024FD0AE16CCB842686C2733758EC65ACFD69FB599C05B286F8DB8844 SWAP4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 DUP2 AND SWAP2 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP11 AND PUSH1 0x60 DUP5 ADD MSTORE DUP9 AND PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0xA0 DUP3 ADD DUP8 SWAP1 MSTORE PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xE0 DUP2 ADD DUP5 SWAP1 MSTORE PUSH2 0x100 DUP2 ADD DUP4 SWAP1 MSTORE PUSH2 0x120 DUP2 ADD DUP3 SWAP1 MSTORE PUSH0 SWAP1 PUSH2 0x9CF SWAP1 PUSH2 0x140 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH2 0xDA2 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH0 PUSH0 PUSH2 0x9EB DUP9 DUP9 DUP9 DUP9 PUSH2 0xDCE JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x9FB DUP3 DUP3 PUSH2 0xE96 JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xD505ACCF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE ADDRESS PUSH1 0x24 DUP4 ADD MSTORE PUSH1 0x44 DUP3 ADD DUP8 SWAP1 MSTORE PUSH1 0x64 DUP3 ADD DUP7 SWAP1 MSTORE PUSH1 0xFF DUP6 AND PUSH1 0x84 DUP4 ADD MSTORE PUSH1 0xA4 DUP3 ADD DUP5 SWAP1 MSTORE PUSH1 0xC4 DUP3 ADD DUP4 SWAP1 MSTORE DUP9 AND SWAP1 PUSH4 0xD505ACCF SWAP1 PUSH1 0xE4 ADD PUSH0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA72 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0xA83 JUMPI POP PUSH1 0x1 JUMPDEST PUSH2 0xB57 JUMPI PUSH1 0x40 MLOAD PUSH4 0x6EB1769F PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE ADDRESS PUSH1 0x24 DUP4 ADD MSTORE DUP7 SWAP2 SWAP1 DUP10 AND SWAP1 PUSH4 0xDD62ED3E SWAP1 PUSH1 0x44 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xAD4 JUMPI RETURNDATASIZE PUSH0 PUSH0 RETURNDATACOPY RETURNDATASIZE PUSH0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xAF8 SWAP2 SWAP1 PUSH2 0x14BD JUMP JUMPDEST LT ISZERO PUSH2 0xB57 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x28 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x5065726D6974206661696C656420616E6420696E73756666696369656E742061 PUSH1 0x44 DUP3 ADD MSTORE PUSH8 0x6C6C6F77616E6365 PUSH1 0xC0 SHL PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0xB6C PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP8 ADDRESS DUP9 PUSH2 0xF52 JUMP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0xB81 DUP4 DUP4 DUP4 PUSH0 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBEF JUMPI PUSH2 0xB92 DUP4 DUP4 PUSH0 PUSH1 0x1 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBBA JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0xBC7 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBEF JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 DUP6 PUSH1 0x40 MLOAD PUSH2 0xC2F SWAP2 SWAP1 PUSH2 0x14D4 JUMP JUMPDEST PUSH0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH0 DUP2 EQ PUSH2 0xC69 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0xC6E JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP1 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x6BF JUMPI PUSH1 0x40 MLOAD PUSH4 0x118CDAA7 PUSH1 0xE0 SHL DUP2 MSTORE CALLER PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP4 AND DUP2 OR DUP5 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP1 SWAP3 AND SWAP3 DUP4 SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0xD21 PUSH32 0x0 PUSH1 0x1 PUSH2 0xFF0 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0xD21 PUSH32 0x0 PUSH1 0x2 PUSH2 0xFF0 JUMP JUMPDEST PUSH2 0xBC7 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0x1099 JUMP JUMPDEST PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SLOAD PUSH1 0x2 SUB PUSH2 0x6BF JUMPI PUSH1 0x40 MLOAD PUSH4 0x3EE5AEB5 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH2 0x7B2 PUSH2 0xDAE PUSH2 0x10E3 JUMP JUMPDEST DUP4 PUSH1 0x40 MLOAD PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH0 DUP1 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP5 GT ISZERO PUSH2 0xE07 JUMPI POP PUSH0 SWAP2 POP PUSH1 0x3 SWAP1 POP DUP3 PUSH2 0xE8C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP11 SWAP1 MSTORE PUSH1 0xFF DUP10 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xE58 JUMPI RETURNDATASIZE PUSH0 PUSH0 RETURNDATACOPY RETURNDATASIZE PUSH0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0xE83 JUMPI POP PUSH0 SWAP3 POP PUSH1 0x1 SWAP2 POP DUP3 SWAP1 POP PUSH2 0xE8C JUMP JUMPDEST SWAP3 POP PUSH0 SWAP2 POP DUP2 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 POP SWAP5 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEA9 JUMPI PUSH2 0xEA9 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xEB2 JUMPI POP POP JUMP JUMPDEST PUSH1 0x1 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEC6 JUMPI PUSH2 0xEC6 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xEE4 JUMPI PUSH1 0x40 MLOAD PUSH4 0xF645EEDF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEF8 JUMPI PUSH2 0xEF8 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xF19 JUMPI PUSH1 0x40 MLOAD PUSH4 0xFCE698F7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x3 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xF2D JUMPI PUSH2 0xF2D PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xF4E JUMPI PUSH1 0x40 MLOAD PUSH4 0x35E2F383 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xF60 DUP5 DUP5 DUP5 DUP5 PUSH1 0x1 PUSH2 0x120C JUMP JUMPDEST PUSH2 0xF88 JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x95EA7B3 PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x44 DUP2 DUP1 DUP12 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0xFE4 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0xFD8 JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 DUP8 EXTCODESIZE GT RETURNDATASIZE ISZERO AND DUP4 AND SWAP3 POP JUMPDEST PUSH1 0x40 MSTORE POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0xFF DUP4 EQ PUSH2 0x100A JUMPI PUSH2 0x1003 DUP4 PUSH2 0x1279 JUMP JUMPDEST SWAP1 POP PUSH2 0x7B2 JUMP JUMPDEST DUP2 DUP1 SLOAD PUSH2 0x1016 SWAP1 PUSH2 0x14FE JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x1042 SWAP1 PUSH2 0x14FE JUMP JUMPDEST DUP1 ISZERO PUSH2 0x108D JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1064 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x108D JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1070 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP PUSH2 0x7B2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xA9059CBB PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x44 DUP2 DUP1 DUP12 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0xFE4 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0xFD8 JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND EQ DUP1 ISZERO PUSH2 0x113B JUMPI POP PUSH32 0x0 CHAINID EQ JUMPDEST ISZERO PUSH2 0x1165 JUMPI POP PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0xD21 PUSH1 0x40 DUP1 MLOAD PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH1 0x20 DUP3 ADD MSTORE PUSH32 0x0 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH32 0x0 PUSH1 0x60 DUP3 ADD MSTORE CHAINID PUSH1 0x80 DUP3 ADD MSTORE ADDRESS PUSH1 0xA0 DUP3 ADD MSTORE PUSH0 SWAP1 PUSH1 0xC0 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x23B872DD PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 MSTORE DUP7 AND PUSH1 0x24 MSTORE PUSH1 0x44 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x64 DUP2 DUP1 DUP13 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0x1268 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0x125C JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 DUP9 EXTCODESIZE GT RETURNDATASIZE ISZERO AND DUP4 AND SWAP3 POP JUMPDEST PUSH1 0x40 MSTORE POP PUSH0 PUSH1 0x60 MSTORE SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH0 PUSH2 0x1285 DUP4 PUSH2 0x12B6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE SWAP2 SWAP3 POP PUSH0 SWAP2 SWAP1 PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY POP POP POP SWAP2 DUP3 MSTORE POP PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE POP SWAP1 JUMP JUMPDEST PUSH0 PUSH1 0xFF DUP3 AND PUSH1 0x1F DUP2 GT ISZERO PUSH2 0x7B2 JUMPI PUSH1 0x40 MLOAD PUSH4 0x2CD44AC3 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x12ED JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1303 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP3 ADD PUSH2 0x1C0 DUP2 DUP6 SUB SLT ISZERO PUSH2 0x1315 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP7 ADD MCOPY PUSH0 PUSH1 0x20 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x20 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xFF PUSH1 0xF8 SHL DUP9 AND DUP2 MSTORE PUSH1 0xE0 PUSH1 0x20 DUP3 ADD MSTORE PUSH0 PUSH2 0x1368 PUSH1 0xE0 DUP4 ADD DUP10 PUSH2 0x131C JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x137A DUP2 DUP10 PUSH2 0x131C JUMP JUMPDEST PUSH1 0x60 DUP5 ADD DUP9 SWAP1 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0xA0 DUP5 ADD DUP7 SWAP1 MSTORE DUP4 DUP2 SUB PUSH1 0xC0 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE PUSH1 0x20 DUP1 DUP8 ADD SWAP4 POP SWAP1 SWAP2 ADD SWAP1 PUSH0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x13CF JUMPI DUP4 MLOAD DUP4 MSTORE PUSH1 0x20 SWAP4 DUP5 ADD SWAP4 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x13B1 JUMP JUMPDEST POP SWAP1 SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x13F6 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH0 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x140C JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x1415 DUP4 PUSH2 0x13E0 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1433 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x144A JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x1315 DUP3 PUSH2 0x13E0 JUMP JUMPDEST PUSH0 PUSH0 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1468 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1482 JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0x1496 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x14AD JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1315 JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x14CD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 MLOAD DUP1 PUSH1 0x20 DUP6 ADD DUP5 MCOPY PUSH0 SWAP3 ADD SWAP2 DUP3 MSTORE POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH1 0x1 DUP2 DUP2 SHR SWAP1 DUP3 AND DUP1 PUSH2 0x1512 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x1530 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP13 CALLVALUE 0xDB 0x2F PUSH16 0x83AF136A5340CCE7FE8EF554EA8EB633 PUSH6 0x6FBF9BFF3BD7 BALANCE 0xAE 0xC4 0xF PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "1158:6897:22:-:0;;;2504:245;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3428:431:16;;;;;;;;;;;-1:-1:-1;;;3428:431:16;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3428:431:16;;;;;2562:10:22;;1269:95:0;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;455:51:23;428:18;;1322:31:0;;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;2365:1:11;1505:66;2539;3501:45:16;:4;3532:13;3501:30;:45::i;:::-;3493:53;;3567:51;:7;3601:16;3567:33;:51::i;:::-;3556:62;;3642:22;;;;;;;;;;3628:36;;3691:25;;;;;;3674:42;;3744:13;3727:30;;3792:23;4326:11;;4339:14;;4304:80;;;2079:95;4304:80;;;3765:25:23;3806:18;;;3799:34;;;;3849:18;;;3842:34;4355:13:16;3892:18:23;;;3885:34;4378:4:16;3935:19:23;;;3928:61;4268:7:16;;3737:19:23;;4304:80:16;;;;;;;;;;;;4294:91;;;;;;4287:98;;4213:179;;3792:23;3767:48;;-1:-1:-1;;3847:4:16;3825:27;;-1:-1:-1;;;;;2632:34:22;::::2;2624:66;;;::::0;-1:-1:-1;;;2624:66:22;;719:2:23;2624:66:22::2;::::0;::::2;701:21:23::0;758:2;738:18;;;731:30;797:21;777:18;;;770:49;836:18;;2624:66:22::2;517:343:23::0;2624:66:22::2;-1:-1:-1::0;;;;;2700:42:22::2;;::::0;1158:6897;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;2893:342:12:-;2989:11;3038:4;3022:5;3016:19;:26;3012:217;;;3065:20;3079:5;3065:13;:20::i;:::-;3058:27;;;;3012:217;3142:5;3116:46;3157:5;3142;3116:46;:::i;:::-;-1:-1:-1;1390:66:12;;-1:-1:-1;3012:217:12;2893:342;;;;:::o;1708:288::-;1773:11;1796:17;1822:3;1796:30;;1854:4;1840;:11;:18;1836:74;;;1895:3;1881:18;;-1:-1:-1;;;1881:18:12;;;;;;;;:::i;1836:74::-;1976:11;;1959:13;1976:4;1959:13;:::i;:::-;1951:36;;1708:288;-1:-1:-1;;;1708:288:12:o;14:290:23:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:23;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:23:o;865:127::-;926:10;921:3;917:20;914:1;907:31;957:4;954:1;947:15;981:4;978:1;971:15;997:380;1076:1;1072:12;;;;1119;;;1140:61;;1194:4;1186:6;1182:17;1172:27;;1140:61;1247:2;1239:6;1236:14;1216:18;1213:38;1210:161;;1293:10;1288:3;1284:20;1281:1;1274:31;1328:4;1325:1;1318:15;1356:4;1353:1;1346:15;1210:161;;997:380;;;:::o;1508:518::-;1610:2;1605:3;1602:11;1599:421;;;1646:5;1643:1;1636:16;1690:4;1687:1;1677:18;1760:2;1748:10;1744:19;1741:1;1737:27;1731:4;1727:38;1796:4;1784:10;1781:20;1778:47;;;-1:-1:-1;1819:4:23;1778:47;1874:2;1869:3;1865:12;1862:1;1858:20;1852:4;1848:31;1838:41;;1929:81;1947:2;1940:5;1937:13;1929:81;;;2006:1;1992:16;;1973:1;1962:13;1929:81;;;1933:3;;1599:421;1508:518;;;:::o;2202:1299::-;2322:10;;-1:-1:-1;;;;;2344:30:23;;2341:56;;;2377:18;;:::i;:::-;2406:97;2496:6;2456:38;2488:4;2482:11;2456:38;:::i;:::-;2450:4;2406:97;:::i;:::-;2552:4;2583:2;2572:14;;2600:1;2595:649;;;;3288:1;3305:6;3302:89;;;-1:-1:-1;3357:19:23;;;3351:26;3302:89;-1:-1:-1;;2159:1:23;2155:11;;;2151:24;2147:29;2137:40;2183:1;2179:11;;;2134:57;3404:81;;2565:930;;2595:649;1455:1;1448:14;;;1492:4;1479:18;;-1:-1:-1;;2631:20:23;;;2749:222;2763:7;2760:1;2757:14;2749:222;;;2845:19;;;2839:26;2824:42;;2952:4;2937:20;;;;2905:1;2893:14;;;;2779:12;2749:222;;;2753:3;2999:6;2990:7;2987:19;2984:201;;;3060:19;;;3054:26;-1:-1:-1;;3143:1:23;3139:14;;;3155:3;3135:24;3131:37;3127:42;3112:58;3097:74;;2984:201;-1:-1:-1;;;;3231:1:23;3215:14;;;3211:22;3198:36;;-1:-1:-1;2202:1299:23:o;4000:418::-;4149:2;4138:9;4131:21;4112:4;4181:6;4175:13;4224:6;4219:2;4208:9;4204:18;4197:34;4283:6;4278:2;4270:6;4266:15;4261:2;4250:9;4246:18;4240:50;4339:1;4334:2;4325:6;4314:9;4310:22;4306:31;4299:42;4409:2;4402;4398:7;4393:2;4385:6;4381:15;4377:29;4366:9;4362:45;4358:54;4350:62;;;4000:418;;;;:::o;4423:297::-;4541:12;;4588:4;4577:16;;;4571:23;;4541:12;4606:16;;4603:111;;;-1:-1:-1;;4680:4:23;4676:17;;;;4673:1;4669:25;4665:38;4654:50;;4423:297;-1:-1:-1;4423:297:23:o;:::-;1158:6897:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": { + "@_8236": { + "entryPoint": null, + "id": 8236, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_EIP712Name_4351": { + "entryPoint": 3316, + "id": 4351, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_EIP712Version_4363": { + "entryPoint": 3366, + "id": 4363, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_buildDomainSeparator_4281": { + "entryPoint": null, + "id": 4281, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_checkOwner_84": { + "entryPoint": 3193, + "id": 84, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_computeDigest_8441": { + "entryPoint": 2319, + "id": 8441, + "parameterSlots": 7, + "returnSlots": 1 + }, + "@_domainSeparatorV4_4260": { + "entryPoint": 4323, + "id": 4260, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_executePermitAndTransfer_8508": { + "entryPoint": 2567, + "id": 8508, + "parameterSlots": 7, + "returnSlots": 0 + }, + "@_forwardCall_8529": { + "entryPoint": 3060, + "id": 8529, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@_hashTypedDataV4_4297": { + "entryPoint": 3490, + "id": 4297, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@_msgSender_1644": { + "entryPoint": null, + "id": 1644, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_nonReentrantAfter_1803": { + "entryPoint": null, + "id": 1803, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_nonReentrantBeforeView_1776": { + "entryPoint": 3424, + "id": 1776, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_nonReentrantBefore_1791": { + "entryPoint": 2273, + "id": 1791, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_reentrancyGuardEntered_1818": { + "entryPoint": null, + "id": 1818, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_reentrancyGuardStorageSlot_1826": { + "entryPoint": null, + "id": 1826, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_safeApprove_830": { + "entryPoint": 3982, + "id": 830, + "parameterSlots": 4, + "returnSlots": 1 + }, + "@_safeTransferFrom_807": { + "entryPoint": 4620, + "id": 807, + "parameterSlots": 5, + "returnSlots": 1 + }, + "@_safeTransfer_782": { + "entryPoint": 4249, + "id": 782, + "parameterSlots": 4, + "returnSlots": 1 + }, + "@_throwError_4136": { + "entryPoint": 3734, + "id": 4136, + "parameterSlots": 2, + "returnSlots": 0 + }, + "@_transferOwnership_146": { + "entryPoint": 3237, + "id": 146, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@byteLength_1945": { + "entryPoint": 4790, + "id": 1945, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@destinationContract_8147": { + "entryPoint": null, + "id": 8147, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@eip712Domain_4339": { + "entryPoint": 1729, + "id": 4339, + "parameterSlots": 0, + "returnSlots": 7 + }, + "@execute_8402": { + "entryPoint": 542, + "id": 8402, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@forceApprove_626": { + "entryPoint": 2933, + "id": 626, + "parameterSlots": 3, + "returnSlots": 0 + }, + "@getUint256Slot_2112": { + "entryPoint": null, + "id": 2112, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@isExecutionCompleted_8602": { + "entryPoint": 1931, + "id": 8602, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@owner_67": { + "entryPoint": null, + "id": 67, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@recover_4059": { + "entryPoint": 2523, + "id": 4059, + "parameterSlots": 4, + "returnSlots": 1 + }, + "@renounceOwnership_98": { + "entryPoint": 1710, + "id": 98, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@safeTransferFrom_456": { + "entryPoint": 3922, + "id": 456, + "parameterSlots": 4, + "returnSlots": 0 + }, + "@safeTransfer_425": { + "entryPoint": 3411, + "id": 425, + "parameterSlots": 3, + "returnSlots": 0 + }, + "@toStringWithFallback_2012": { + "entryPoint": 4080, + "id": 2012, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@toString_1913": { + "entryPoint": 4729, + "id": 1913, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@toTypedDataHash_4451": { + "entryPoint": null, + "id": 4451, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@transferOwnership_126": { + "entryPoint": 2215, + "id": 126, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@tryRecover_4023": { + "entryPoint": 3534, + "id": 4023, + "parameterSlots": 4, + "returnSlots": 3 + }, + "@usedPayloadNonces_8153": { + "entryPoint": null, + "id": 8153, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@withdrawETH_8586": { + "entryPoint": 1976, + "id": 8586, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@withdrawToken_8556": { + "entryPoint": 1795, + "id": 8556, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_decode_address": { + "entryPoint": 5088, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_decode_tuple_t_address": { + "entryPoint": 5178, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_addresst_uint256": { + "entryPoint": 5115, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "abi_decode_tuple_t_struct$_ExecuteParams_$8182_calldata_ptr": { + "entryPoint": 4829, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint256": { + "entryPoint": 5155, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint256_fromMemory": { + "entryPoint": 5309, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint8": { + "entryPoint": 5277, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_string": { + "entryPoint": 4892, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed": { + "entryPoint": 5332, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address__to_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 3, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__to_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 8, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__to_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed": { + "entryPoint": 4938, + "id": null, + "parameterSlots": 8, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__to_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 10, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 6, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 5, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "access_calldata_tail_t_bytes_calldata_ptr": { + "entryPoint": 5203, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "extract_byte_array_length": { + "entryPoint": 5374, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "panic_error_0x21": { + "entryPoint": 5354, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "panic_error_0x41": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nativeSrc": "0:11637:23", + "nodeType": "YulBlock", + "src": "0:11637:23", + "statements": [ + { + "nativeSrc": "6:3:23", + "nodeType": "YulBlock", + "src": "6:3:23", + "statements": [] + }, + { + "body": { + "nativeSrc": "117:290:23", + "nodeType": "YulBlock", + "src": "117:290:23", + "statements": [ + { + "body": { + "nativeSrc": "163:16:23", + "nodeType": "YulBlock", + "src": "163:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "172:1:23", + "nodeType": "YulLiteral", + "src": "172:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "175:1:23", + "nodeType": "YulLiteral", + "src": "175:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "165:6:23", + "nodeType": "YulIdentifier", + "src": "165:6:23" + }, + "nativeSrc": "165:12:23", + "nodeType": "YulFunctionCall", + "src": "165:12:23" + }, + "nativeSrc": "165:12:23", + "nodeType": "YulExpressionStatement", + "src": "165:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "138:7:23", + "nodeType": "YulIdentifier", + "src": "138:7:23" + }, + { + "name": "headStart", + "nativeSrc": "147:9:23", + "nodeType": "YulIdentifier", + "src": "147:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "134:3:23", + "nodeType": "YulIdentifier", + "src": "134:3:23" + }, + "nativeSrc": "134:23:23", + "nodeType": "YulFunctionCall", + "src": "134:23:23" + }, + { + "kind": "number", + "nativeSrc": "159:2:23", + "nodeType": "YulLiteral", + "src": "159:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "130:3:23", + "nodeType": "YulIdentifier", + "src": "130:3:23" + }, + "nativeSrc": "130:32:23", + "nodeType": "YulFunctionCall", + "src": "130:32:23" + }, + "nativeSrc": "127:52:23", + "nodeType": "YulIf", + "src": "127:52:23" + }, + { + "nativeSrc": "188:37:23", + "nodeType": "YulVariableDeclaration", + "src": "188:37:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "215:9:23", + "nodeType": "YulIdentifier", + "src": "215:9:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "202:12:23", + "nodeType": "YulIdentifier", + "src": "202:12:23" + }, + "nativeSrc": "202:23:23", + "nodeType": "YulFunctionCall", + "src": "202:23:23" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "192:6:23", + "nodeType": "YulTypedName", + "src": "192:6:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "268:16:23", + "nodeType": "YulBlock", + "src": "268:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "277:1:23", + "nodeType": "YulLiteral", + "src": "277:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "280:1:23", + "nodeType": "YulLiteral", + "src": "280:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "270:6:23", + "nodeType": "YulIdentifier", + "src": "270:6:23" + }, + "nativeSrc": "270:12:23", + "nodeType": "YulFunctionCall", + "src": "270:12:23" + }, + "nativeSrc": "270:12:23", + "nodeType": "YulExpressionStatement", + "src": "270:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "240:6:23", + "nodeType": "YulIdentifier", + "src": "240:6:23" + }, + { + "kind": "number", + "nativeSrc": "248:18:23", + "nodeType": "YulLiteral", + "src": "248:18:23", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "237:2:23", + "nodeType": "YulIdentifier", + "src": "237:2:23" + }, + "nativeSrc": "237:30:23", + "nodeType": "YulFunctionCall", + "src": "237:30:23" + }, + "nativeSrc": "234:50:23", + "nodeType": "YulIf", + "src": "234:50:23" + }, + { + "nativeSrc": "293:32:23", + "nodeType": "YulVariableDeclaration", + "src": "293:32:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "307:9:23", + "nodeType": "YulIdentifier", + "src": "307:9:23" + }, + { + "name": "offset", + "nativeSrc": "318:6:23", + "nodeType": "YulIdentifier", + "src": "318:6:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "303:3:23", + "nodeType": "YulIdentifier", + "src": "303:3:23" + }, + "nativeSrc": "303:22:23", + "nodeType": "YulFunctionCall", + "src": "303:22:23" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "297:2:23", + "nodeType": "YulTypedName", + "src": "297:2:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "364:16:23", + "nodeType": "YulBlock", + "src": "364:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "373:1:23", + "nodeType": "YulLiteral", + "src": "373:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "376:1:23", + "nodeType": "YulLiteral", + "src": "376:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "366:6:23", + "nodeType": "YulIdentifier", + "src": "366:6:23" + }, + "nativeSrc": "366:12:23", + "nodeType": "YulFunctionCall", + "src": "366:12:23" + }, + "nativeSrc": "366:12:23", + "nodeType": "YulExpressionStatement", + "src": "366:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "345:7:23", + "nodeType": "YulIdentifier", + "src": "345:7:23" + }, + { + "name": "_1", + "nativeSrc": "354:2:23", + "nodeType": "YulIdentifier", + "src": "354:2:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "341:3:23", + "nodeType": "YulIdentifier", + "src": "341:3:23" + }, + "nativeSrc": "341:16:23", + "nodeType": "YulFunctionCall", + "src": "341:16:23" + }, + { + "kind": "number", + "nativeSrc": "359:3:23", + "nodeType": "YulLiteral", + "src": "359:3:23", + "type": "", + "value": "448" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "337:3:23", + "nodeType": "YulIdentifier", + "src": "337:3:23" + }, + "nativeSrc": "337:26:23", + "nodeType": "YulFunctionCall", + "src": "337:26:23" + }, + "nativeSrc": "334:46:23", + "nodeType": "YulIf", + "src": "334:46:23" + }, + { + "nativeSrc": "389:12:23", + "nodeType": "YulAssignment", + "src": "389:12:23", + "value": { + "name": "_1", + "nativeSrc": "399:2:23", + "nodeType": "YulIdentifier", + "src": "399:2:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "389:6:23", + "nodeType": "YulIdentifier", + "src": "389:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_struct$_ExecuteParams_$8182_calldata_ptr", + "nativeSrc": "14:393:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "83:9:23", + "nodeType": "YulTypedName", + "src": "83:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "94:7:23", + "nodeType": "YulTypedName", + "src": "94:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "106:6:23", + "nodeType": "YulTypedName", + "src": "106:6:23", + "type": "" + } + ], + "src": "14:393:23" + }, + { + "body": { + "nativeSrc": "513:102:23", + "nodeType": "YulBlock", + "src": "513:102:23", + "statements": [ + { + "nativeSrc": "523:26:23", + "nodeType": "YulAssignment", + "src": "523:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "535:9:23", + "nodeType": "YulIdentifier", + "src": "535:9:23" + }, + { + "kind": "number", + "nativeSrc": "546:2:23", + "nodeType": "YulLiteral", + "src": "546:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "531:3:23", + "nodeType": "YulIdentifier", + "src": "531:3:23" + }, + "nativeSrc": "531:18:23", + "nodeType": "YulFunctionCall", + "src": "531:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "523:4:23", + "nodeType": "YulIdentifier", + "src": "523:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "565:9:23", + "nodeType": "YulIdentifier", + "src": "565:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "580:6:23", + "nodeType": "YulIdentifier", + "src": "580:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "596:3:23", + "nodeType": "YulLiteral", + "src": "596:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "601:1:23", + "nodeType": "YulLiteral", + "src": "601:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "592:3:23", + "nodeType": "YulIdentifier", + "src": "592:3:23" + }, + "nativeSrc": "592:11:23", + "nodeType": "YulFunctionCall", + "src": "592:11:23" + }, + { + "kind": "number", + "nativeSrc": "605:1:23", + "nodeType": "YulLiteral", + "src": "605:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "588:3:23", + "nodeType": "YulIdentifier", + "src": "588:3:23" + }, + "nativeSrc": "588:19:23", + "nodeType": "YulFunctionCall", + "src": "588:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "576:3:23", + "nodeType": "YulIdentifier", + "src": "576:3:23" + }, + "nativeSrc": "576:32:23", + "nodeType": "YulFunctionCall", + "src": "576:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "558:6:23", + "nodeType": "YulIdentifier", + "src": "558:6:23" + }, + "nativeSrc": "558:51:23", + "nodeType": "YulFunctionCall", + "src": "558:51:23" + }, + "nativeSrc": "558:51:23", + "nodeType": "YulExpressionStatement", + "src": "558:51:23" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "412:203:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "482:9:23", + "nodeType": "YulTypedName", + "src": "482:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "493:6:23", + "nodeType": "YulTypedName", + "src": "493:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "504:4:23", + "nodeType": "YulTypedName", + "src": "504:4:23", + "type": "" + } + ], + "src": "412:203:23" + }, + { + "body": { + "nativeSrc": "670:239:23", + "nodeType": "YulBlock", + "src": "670:239:23", + "statements": [ + { + "nativeSrc": "680:26:23", + "nodeType": "YulVariableDeclaration", + "src": "680:26:23", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "700:5:23", + "nodeType": "YulIdentifier", + "src": "700:5:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "694:5:23", + "nodeType": "YulIdentifier", + "src": "694:5:23" + }, + "nativeSrc": "694:12:23", + "nodeType": "YulFunctionCall", + "src": "694:12:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "684:6:23", + "nodeType": "YulTypedName", + "src": "684:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "722:3:23", + "nodeType": "YulIdentifier", + "src": "722:3:23" + }, + { + "name": "length", + "nativeSrc": "727:6:23", + "nodeType": "YulIdentifier", + "src": "727:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "715:6:23", + "nodeType": "YulIdentifier", + "src": "715:6:23" + }, + "nativeSrc": "715:19:23", + "nodeType": "YulFunctionCall", + "src": "715:19:23" + }, + "nativeSrc": "715:19:23", + "nodeType": "YulExpressionStatement", + "src": "715:19:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "753:3:23", + "nodeType": "YulIdentifier", + "src": "753:3:23" + }, + { + "kind": "number", + "nativeSrc": "758:4:23", + "nodeType": "YulLiteral", + "src": "758:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "749:3:23", + "nodeType": "YulIdentifier", + "src": "749:3:23" + }, + "nativeSrc": "749:14:23", + "nodeType": "YulFunctionCall", + "src": "749:14:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "769:5:23", + "nodeType": "YulIdentifier", + "src": "769:5:23" + }, + { + "kind": "number", + "nativeSrc": "776:4:23", + "nodeType": "YulLiteral", + "src": "776:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "765:3:23", + "nodeType": "YulIdentifier", + "src": "765:3:23" + }, + "nativeSrc": "765:16:23", + "nodeType": "YulFunctionCall", + "src": "765:16:23" + }, + { + "name": "length", + "nativeSrc": "783:6:23", + "nodeType": "YulIdentifier", + "src": "783:6:23" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "743:5:23", + "nodeType": "YulIdentifier", + "src": "743:5:23" + }, + "nativeSrc": "743:47:23", + "nodeType": "YulFunctionCall", + "src": "743:47:23" + }, + "nativeSrc": "743:47:23", + "nodeType": "YulExpressionStatement", + "src": "743:47:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "814:3:23", + "nodeType": "YulIdentifier", + "src": "814:3:23" + }, + { + "name": "length", + "nativeSrc": "819:6:23", + "nodeType": "YulIdentifier", + "src": "819:6:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "810:3:23", + "nodeType": "YulIdentifier", + "src": "810:3:23" + }, + "nativeSrc": "810:16:23", + "nodeType": "YulFunctionCall", + "src": "810:16:23" + }, + { + "kind": "number", + "nativeSrc": "828:4:23", + "nodeType": "YulLiteral", + "src": "828:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "806:3:23", + "nodeType": "YulIdentifier", + "src": "806:3:23" + }, + "nativeSrc": "806:27:23", + "nodeType": "YulFunctionCall", + "src": "806:27:23" + }, + { + "kind": "number", + "nativeSrc": "835:1:23", + "nodeType": "YulLiteral", + "src": "835:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "799:6:23", + "nodeType": "YulIdentifier", + "src": "799:6:23" + }, + "nativeSrc": "799:38:23", + "nodeType": "YulFunctionCall", + "src": "799:38:23" + }, + "nativeSrc": "799:38:23", + "nodeType": "YulExpressionStatement", + "src": "799:38:23" + }, + { + "nativeSrc": "846:57:23", + "nodeType": "YulAssignment", + "src": "846:57:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "861:3:23", + "nodeType": "YulIdentifier", + "src": "861:3:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "874:6:23", + "nodeType": "YulIdentifier", + "src": "874:6:23" + }, + { + "kind": "number", + "nativeSrc": "882:2:23", + "nodeType": "YulLiteral", + "src": "882:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "870:3:23", + "nodeType": "YulIdentifier", + "src": "870:3:23" + }, + "nativeSrc": "870:15:23", + "nodeType": "YulFunctionCall", + "src": "870:15:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "891:2:23", + "nodeType": "YulLiteral", + "src": "891:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "887:3:23", + "nodeType": "YulIdentifier", + "src": "887:3:23" + }, + "nativeSrc": "887:7:23", + "nodeType": "YulFunctionCall", + "src": "887:7:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "866:3:23", + "nodeType": "YulIdentifier", + "src": "866:3:23" + }, + "nativeSrc": "866:29:23", + "nodeType": "YulFunctionCall", + "src": "866:29:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "857:3:23", + "nodeType": "YulIdentifier", + "src": "857:3:23" + }, + "nativeSrc": "857:39:23", + "nodeType": "YulFunctionCall", + "src": "857:39:23" + }, + { + "kind": "number", + "nativeSrc": "898:4:23", + "nodeType": "YulLiteral", + "src": "898:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "853:3:23", + "nodeType": "YulIdentifier", + "src": "853:3:23" + }, + "nativeSrc": "853:50:23", + "nodeType": "YulFunctionCall", + "src": "853:50:23" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "846:3:23", + "nodeType": "YulIdentifier", + "src": "846:3:23" + } + ] + } + ] + }, + "name": "abi_encode_string", + "nativeSrc": "620:289:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "647:5:23", + "nodeType": "YulTypedName", + "src": "647:5:23", + "type": "" + }, + { + "name": "pos", + "nativeSrc": "654:3:23", + "nodeType": "YulTypedName", + "src": "654:3:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "662:3:23", + "nodeType": "YulTypedName", + "src": "662:3:23", + "type": "" + } + ], + "src": "620:289:23" + }, + { + "body": { + "nativeSrc": "1271:881:23", + "nodeType": "YulBlock", + "src": "1271:881:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1288:9:23", + "nodeType": "YulIdentifier", + "src": "1288:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "1303:6:23", + "nodeType": "YulIdentifier", + "src": "1303:6:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1315:3:23", + "nodeType": "YulLiteral", + "src": "1315:3:23", + "type": "", + "value": "248" + }, + { + "kind": "number", + "nativeSrc": "1320:3:23", + "nodeType": "YulLiteral", + "src": "1320:3:23", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1311:3:23", + "nodeType": "YulIdentifier", + "src": "1311:3:23" + }, + "nativeSrc": "1311:13:23", + "nodeType": "YulFunctionCall", + "src": "1311:13:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1299:3:23", + "nodeType": "YulIdentifier", + "src": "1299:3:23" + }, + "nativeSrc": "1299:26:23", + "nodeType": "YulFunctionCall", + "src": "1299:26:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1281:6:23", + "nodeType": "YulIdentifier", + "src": "1281:6:23" + }, + "nativeSrc": "1281:45:23", + "nodeType": "YulFunctionCall", + "src": "1281:45:23" + }, + "nativeSrc": "1281:45:23", + "nodeType": "YulExpressionStatement", + "src": "1281:45:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1346:9:23", + "nodeType": "YulIdentifier", + "src": "1346:9:23" + }, + { + "kind": "number", + "nativeSrc": "1357:2:23", + "nodeType": "YulLiteral", + "src": "1357:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1342:3:23", + "nodeType": "YulIdentifier", + "src": "1342:3:23" + }, + "nativeSrc": "1342:18:23", + "nodeType": "YulFunctionCall", + "src": "1342:18:23" + }, + { + "kind": "number", + "nativeSrc": "1362:3:23", + "nodeType": "YulLiteral", + "src": "1362:3:23", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1335:6:23", + "nodeType": "YulIdentifier", + "src": "1335:6:23" + }, + "nativeSrc": "1335:31:23", + "nodeType": "YulFunctionCall", + "src": "1335:31:23" + }, + "nativeSrc": "1335:31:23", + "nodeType": "YulExpressionStatement", + "src": "1335:31:23" + }, + { + "nativeSrc": "1375:60:23", + "nodeType": "YulVariableDeclaration", + "src": "1375:60:23", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "1407:6:23", + "nodeType": "YulIdentifier", + "src": "1407:6:23" + }, + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1419:9:23", + "nodeType": "YulIdentifier", + "src": "1419:9:23" + }, + { + "kind": "number", + "nativeSrc": "1430:3:23", + "nodeType": "YulLiteral", + "src": "1430:3:23", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1415:3:23", + "nodeType": "YulIdentifier", + "src": "1415:3:23" + }, + "nativeSrc": "1415:19:23", + "nodeType": "YulFunctionCall", + "src": "1415:19:23" + } + ], + "functionName": { + "name": "abi_encode_string", + "nativeSrc": "1389:17:23", + "nodeType": "YulIdentifier", + "src": "1389:17:23" + }, + "nativeSrc": "1389:46:23", + "nodeType": "YulFunctionCall", + "src": "1389:46:23" + }, + "variables": [ + { + "name": "tail_1", + "nativeSrc": "1379:6:23", + "nodeType": "YulTypedName", + "src": "1379:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1455:9:23", + "nodeType": "YulIdentifier", + "src": "1455:9:23" + }, + { + "kind": "number", + "nativeSrc": "1466:2:23", + "nodeType": "YulLiteral", + "src": "1466:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1451:3:23", + "nodeType": "YulIdentifier", + "src": "1451:3:23" + }, + "nativeSrc": "1451:18:23", + "nodeType": "YulFunctionCall", + "src": "1451:18:23" + }, + { + "arguments": [ + { + "name": "tail_1", + "nativeSrc": "1475:6:23", + "nodeType": "YulIdentifier", + "src": "1475:6:23" + }, + { + "name": "headStart", + "nativeSrc": "1483:9:23", + "nodeType": "YulIdentifier", + "src": "1483:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1471:3:23", + "nodeType": "YulIdentifier", + "src": "1471:3:23" + }, + "nativeSrc": "1471:22:23", + "nodeType": "YulFunctionCall", + "src": "1471:22:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1444:6:23", + "nodeType": "YulIdentifier", + "src": "1444:6:23" + }, + "nativeSrc": "1444:50:23", + "nodeType": "YulFunctionCall", + "src": "1444:50:23" + }, + "nativeSrc": "1444:50:23", + "nodeType": "YulExpressionStatement", + "src": "1444:50:23" + }, + { + "nativeSrc": "1503:47:23", + "nodeType": "YulVariableDeclaration", + "src": "1503:47:23", + "value": { + "arguments": [ + { + "name": "value2", + "nativeSrc": "1535:6:23", + "nodeType": "YulIdentifier", + "src": "1535:6:23" + }, + { + "name": "tail_1", + "nativeSrc": "1543:6:23", + "nodeType": "YulIdentifier", + "src": "1543:6:23" + } + ], + "functionName": { + "name": "abi_encode_string", + "nativeSrc": "1517:17:23", + "nodeType": "YulIdentifier", + "src": "1517:17:23" + }, + "nativeSrc": "1517:33:23", + "nodeType": "YulFunctionCall", + "src": "1517:33:23" + }, + "variables": [ + { + "name": "tail_2", + "nativeSrc": "1507:6:23", + "nodeType": "YulTypedName", + "src": "1507:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1570:9:23", + "nodeType": "YulIdentifier", + "src": "1570:9:23" + }, + { + "kind": "number", + "nativeSrc": "1581:2:23", + "nodeType": "YulLiteral", + "src": "1581:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1566:3:23", + "nodeType": "YulIdentifier", + "src": "1566:3:23" + }, + "nativeSrc": "1566:18:23", + "nodeType": "YulFunctionCall", + "src": "1566:18:23" + }, + { + "name": "value3", + "nativeSrc": "1586:6:23", + "nodeType": "YulIdentifier", + "src": "1586:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1559:6:23", + "nodeType": "YulIdentifier", + "src": "1559:6:23" + }, + "nativeSrc": "1559:34:23", + "nodeType": "YulFunctionCall", + "src": "1559:34:23" + }, + "nativeSrc": "1559:34:23", + "nodeType": "YulExpressionStatement", + "src": "1559:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1613:9:23", + "nodeType": "YulIdentifier", + "src": "1613:9:23" + }, + { + "kind": "number", + "nativeSrc": "1624:3:23", + "nodeType": "YulLiteral", + "src": "1624:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1609:3:23", + "nodeType": "YulIdentifier", + "src": "1609:3:23" + }, + "nativeSrc": "1609:19:23", + "nodeType": "YulFunctionCall", + "src": "1609:19:23" + }, + { + "arguments": [ + { + "name": "value4", + "nativeSrc": "1634:6:23", + "nodeType": "YulIdentifier", + "src": "1634:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1650:3:23", + "nodeType": "YulLiteral", + "src": "1650:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "1655:1:23", + "nodeType": "YulLiteral", + "src": "1655:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1646:3:23", + "nodeType": "YulIdentifier", + "src": "1646:3:23" + }, + "nativeSrc": "1646:11:23", + "nodeType": "YulFunctionCall", + "src": "1646:11:23" + }, + { + "kind": "number", + "nativeSrc": "1659:1:23", + "nodeType": "YulLiteral", + "src": "1659:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1642:3:23", + "nodeType": "YulIdentifier", + "src": "1642:3:23" + }, + "nativeSrc": "1642:19:23", + "nodeType": "YulFunctionCall", + "src": "1642:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1630:3:23", + "nodeType": "YulIdentifier", + "src": "1630:3:23" + }, + "nativeSrc": "1630:32:23", + "nodeType": "YulFunctionCall", + "src": "1630:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1602:6:23", + "nodeType": "YulIdentifier", + "src": "1602:6:23" + }, + "nativeSrc": "1602:61:23", + "nodeType": "YulFunctionCall", + "src": "1602:61:23" + }, + "nativeSrc": "1602:61:23", + "nodeType": "YulExpressionStatement", + "src": "1602:61:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1683:9:23", + "nodeType": "YulIdentifier", + "src": "1683:9:23" + }, + { + "kind": "number", + "nativeSrc": "1694:3:23", + "nodeType": "YulLiteral", + "src": "1694:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1679:3:23", + "nodeType": "YulIdentifier", + "src": "1679:3:23" + }, + "nativeSrc": "1679:19:23", + "nodeType": "YulFunctionCall", + "src": "1679:19:23" + }, + { + "name": "value5", + "nativeSrc": "1700:6:23", + "nodeType": "YulIdentifier", + "src": "1700:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1672:6:23", + "nodeType": "YulIdentifier", + "src": "1672:6:23" + }, + "nativeSrc": "1672:35:23", + "nodeType": "YulFunctionCall", + "src": "1672:35:23" + }, + "nativeSrc": "1672:35:23", + "nodeType": "YulExpressionStatement", + "src": "1672:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1727:9:23", + "nodeType": "YulIdentifier", + "src": "1727:9:23" + }, + { + "kind": "number", + "nativeSrc": "1738:3:23", + "nodeType": "YulLiteral", + "src": "1738:3:23", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1723:3:23", + "nodeType": "YulIdentifier", + "src": "1723:3:23" + }, + "nativeSrc": "1723:19:23", + "nodeType": "YulFunctionCall", + "src": "1723:19:23" + }, + { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "1748:6:23", + "nodeType": "YulIdentifier", + "src": "1748:6:23" + }, + { + "name": "headStart", + "nativeSrc": "1756:9:23", + "nodeType": "YulIdentifier", + "src": "1756:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1744:3:23", + "nodeType": "YulIdentifier", + "src": "1744:3:23" + }, + "nativeSrc": "1744:22:23", + "nodeType": "YulFunctionCall", + "src": "1744:22:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1716:6:23", + "nodeType": "YulIdentifier", + "src": "1716:6:23" + }, + "nativeSrc": "1716:51:23", + "nodeType": "YulFunctionCall", + "src": "1716:51:23" + }, + "nativeSrc": "1716:51:23", + "nodeType": "YulExpressionStatement", + "src": "1716:51:23" + }, + { + "nativeSrc": "1776:17:23", + "nodeType": "YulVariableDeclaration", + "src": "1776:17:23", + "value": { + "name": "tail_2", + "nativeSrc": "1787:6:23", + "nodeType": "YulIdentifier", + "src": "1787:6:23" + }, + "variables": [ + { + "name": "pos", + "nativeSrc": "1780:3:23", + "nodeType": "YulTypedName", + "src": "1780:3:23", + "type": "" + } + ] + }, + { + "nativeSrc": "1802:27:23", + "nodeType": "YulVariableDeclaration", + "src": "1802:27:23", + "value": { + "arguments": [ + { + "name": "value6", + "nativeSrc": "1822:6:23", + "nodeType": "YulIdentifier", + "src": "1822:6:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "1816:5:23", + "nodeType": "YulIdentifier", + "src": "1816:5:23" + }, + "nativeSrc": "1816:13:23", + "nodeType": "YulFunctionCall", + "src": "1816:13:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "1806:6:23", + "nodeType": "YulTypedName", + "src": "1806:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "1845:6:23", + "nodeType": "YulIdentifier", + "src": "1845:6:23" + }, + { + "name": "length", + "nativeSrc": "1853:6:23", + "nodeType": "YulIdentifier", + "src": "1853:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1838:6:23", + "nodeType": "YulIdentifier", + "src": "1838:6:23" + }, + "nativeSrc": "1838:22:23", + "nodeType": "YulFunctionCall", + "src": "1838:22:23" + }, + "nativeSrc": "1838:22:23", + "nodeType": "YulExpressionStatement", + "src": "1838:22:23" + }, + { + "nativeSrc": "1869:22:23", + "nodeType": "YulAssignment", + "src": "1869:22:23", + "value": { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "1880:6:23", + "nodeType": "YulIdentifier", + "src": "1880:6:23" + }, + { + "kind": "number", + "nativeSrc": "1888:2:23", + "nodeType": "YulLiteral", + "src": "1888:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1876:3:23", + "nodeType": "YulIdentifier", + "src": "1876:3:23" + }, + "nativeSrc": "1876:15:23", + "nodeType": "YulFunctionCall", + "src": "1876:15:23" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "1869:3:23", + "nodeType": "YulIdentifier", + "src": "1869:3:23" + } + ] + }, + { + "nativeSrc": "1900:29:23", + "nodeType": "YulVariableDeclaration", + "src": "1900:29:23", + "value": { + "arguments": [ + { + "name": "value6", + "nativeSrc": "1918:6:23", + "nodeType": "YulIdentifier", + "src": "1918:6:23" + }, + { + "kind": "number", + "nativeSrc": "1926:2:23", + "nodeType": "YulLiteral", + "src": "1926:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1914:3:23", + "nodeType": "YulIdentifier", + "src": "1914:3:23" + }, + "nativeSrc": "1914:15:23", + "nodeType": "YulFunctionCall", + "src": "1914:15:23" + }, + "variables": [ + { + "name": "srcPtr", + "nativeSrc": "1904:6:23", + "nodeType": "YulTypedName", + "src": "1904:6:23", + "type": "" + } + ] + }, + { + "nativeSrc": "1938:10:23", + "nodeType": "YulVariableDeclaration", + "src": "1938:10:23", + "value": { + "kind": "number", + "nativeSrc": "1947:1:23", + "nodeType": "YulLiteral", + "src": "1947:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "1942:1:23", + "nodeType": "YulTypedName", + "src": "1942:1:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2006:120:23", + "nodeType": "YulBlock", + "src": "2006:120:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2027:3:23", + "nodeType": "YulIdentifier", + "src": "2027:3:23" + }, + { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "2038:6:23", + "nodeType": "YulIdentifier", + "src": "2038:6:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2032:5:23", + "nodeType": "YulIdentifier", + "src": "2032:5:23" + }, + "nativeSrc": "2032:13:23", + "nodeType": "YulFunctionCall", + "src": "2032:13:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2020:6:23", + "nodeType": "YulIdentifier", + "src": "2020:6:23" + }, + "nativeSrc": "2020:26:23", + "nodeType": "YulFunctionCall", + "src": "2020:26:23" + }, + "nativeSrc": "2020:26:23", + "nodeType": "YulExpressionStatement", + "src": "2020:26:23" + }, + { + "nativeSrc": "2059:19:23", + "nodeType": "YulAssignment", + "src": "2059:19:23", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2070:3:23", + "nodeType": "YulIdentifier", + "src": "2070:3:23" + }, + { + "kind": "number", + "nativeSrc": "2075:2:23", + "nodeType": "YulLiteral", + "src": "2075:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2066:3:23", + "nodeType": "YulIdentifier", + "src": "2066:3:23" + }, + "nativeSrc": "2066:12:23", + "nodeType": "YulFunctionCall", + "src": "2066:12:23" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "2059:3:23", + "nodeType": "YulIdentifier", + "src": "2059:3:23" + } + ] + }, + { + "nativeSrc": "2091:25:23", + "nodeType": "YulAssignment", + "src": "2091:25:23", + "value": { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "2105:6:23", + "nodeType": "YulIdentifier", + "src": "2105:6:23" + }, + { + "kind": "number", + "nativeSrc": "2113:2:23", + "nodeType": "YulLiteral", + "src": "2113:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2101:3:23", + "nodeType": "YulIdentifier", + "src": "2101:3:23" + }, + "nativeSrc": "2101:15:23", + "nodeType": "YulFunctionCall", + "src": "2101:15:23" + }, + "variableNames": [ + { + "name": "srcPtr", + "nativeSrc": "2091:6:23", + "nodeType": "YulIdentifier", + "src": "2091:6:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "1968:1:23", + "nodeType": "YulIdentifier", + "src": "1968:1:23" + }, + { + "name": "length", + "nativeSrc": "1971:6:23", + "nodeType": "YulIdentifier", + "src": "1971:6:23" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1965:2:23", + "nodeType": "YulIdentifier", + "src": "1965:2:23" + }, + "nativeSrc": "1965:13:23", + "nodeType": "YulFunctionCall", + "src": "1965:13:23" + }, + "nativeSrc": "1957:169:23", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "1979:18:23", + "nodeType": "YulBlock", + "src": "1979:18:23", + "statements": [ + { + "nativeSrc": "1981:14:23", + "nodeType": "YulAssignment", + "src": "1981:14:23", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "1990:1:23", + "nodeType": "YulIdentifier", + "src": "1990:1:23" + }, + { + "kind": "number", + "nativeSrc": "1993:1:23", + "nodeType": "YulLiteral", + "src": "1993:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1986:3:23", + "nodeType": "YulIdentifier", + "src": "1986:3:23" + }, + "nativeSrc": "1986:9:23", + "nodeType": "YulFunctionCall", + "src": "1986:9:23" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "1981:1:23", + "nodeType": "YulIdentifier", + "src": "1981:1:23" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "1961:3:23", + "nodeType": "YulBlock", + "src": "1961:3:23", + "statements": [] + }, + "src": "1957:169:23" + }, + { + "nativeSrc": "2135:11:23", + "nodeType": "YulAssignment", + "src": "2135:11:23", + "value": { + "name": "pos", + "nativeSrc": "2143:3:23", + "nodeType": "YulIdentifier", + "src": "2143:3:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2135:4:23", + "nodeType": "YulIdentifier", + "src": "2135:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__to_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed", + "nativeSrc": "914:1238:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1192:9:23", + "nodeType": "YulTypedName", + "src": "1192:9:23", + "type": "" + }, + { + "name": "value6", + "nativeSrc": "1203:6:23", + "nodeType": "YulTypedName", + "src": "1203:6:23", + "type": "" + }, + { + "name": "value5", + "nativeSrc": "1211:6:23", + "nodeType": "YulTypedName", + "src": "1211:6:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "1219:6:23", + "nodeType": "YulTypedName", + "src": "1219:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "1227:6:23", + "nodeType": "YulTypedName", + "src": "1227:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "1235:6:23", + "nodeType": "YulTypedName", + "src": "1235:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1243:6:23", + "nodeType": "YulTypedName", + "src": "1243:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "1251:6:23", + "nodeType": "YulTypedName", + "src": "1251:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "1262:4:23", + "nodeType": "YulTypedName", + "src": "1262:4:23", + "type": "" + } + ], + "src": "914:1238:23" + }, + { + "body": { + "nativeSrc": "2206:124:23", + "nodeType": "YulBlock", + "src": "2206:124:23", + "statements": [ + { + "nativeSrc": "2216:29:23", + "nodeType": "YulAssignment", + "src": "2216:29:23", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "2238:6:23", + "nodeType": "YulIdentifier", + "src": "2238:6:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2225:12:23", + "nodeType": "YulIdentifier", + "src": "2225:12:23" + }, + "nativeSrc": "2225:20:23", + "nodeType": "YulFunctionCall", + "src": "2225:20:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "2216:5:23", + "nodeType": "YulIdentifier", + "src": "2216:5:23" + } + ] + }, + { + "body": { + "nativeSrc": "2308:16:23", + "nodeType": "YulBlock", + "src": "2308:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2317:1:23", + "nodeType": "YulLiteral", + "src": "2317:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2320:1:23", + "nodeType": "YulLiteral", + "src": "2320:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2310:6:23", + "nodeType": "YulIdentifier", + "src": "2310:6:23" + }, + "nativeSrc": "2310:12:23", + "nodeType": "YulFunctionCall", + "src": "2310:12:23" + }, + "nativeSrc": "2310:12:23", + "nodeType": "YulExpressionStatement", + "src": "2310:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2267:5:23", + "nodeType": "YulIdentifier", + "src": "2267:5:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2278:5:23", + "nodeType": "YulIdentifier", + "src": "2278:5:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2293:3:23", + "nodeType": "YulLiteral", + "src": "2293:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "2298:1:23", + "nodeType": "YulLiteral", + "src": "2298:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2289:3:23", + "nodeType": "YulIdentifier", + "src": "2289:3:23" + }, + "nativeSrc": "2289:11:23", + "nodeType": "YulFunctionCall", + "src": "2289:11:23" + }, + { + "kind": "number", + "nativeSrc": "2302:1:23", + "nodeType": "YulLiteral", + "src": "2302:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2285:3:23", + "nodeType": "YulIdentifier", + "src": "2285:3:23" + }, + "nativeSrc": "2285:19:23", + "nodeType": "YulFunctionCall", + "src": "2285:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2274:3:23", + "nodeType": "YulIdentifier", + "src": "2274:3:23" + }, + "nativeSrc": "2274:31:23", + "nodeType": "YulFunctionCall", + "src": "2274:31:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "2264:2:23", + "nodeType": "YulIdentifier", + "src": "2264:2:23" + }, + "nativeSrc": "2264:42:23", + "nodeType": "YulFunctionCall", + "src": "2264:42:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2257:6:23", + "nodeType": "YulIdentifier", + "src": "2257:6:23" + }, + "nativeSrc": "2257:50:23", + "nodeType": "YulFunctionCall", + "src": "2257:50:23" + }, + "nativeSrc": "2254:70:23", + "nodeType": "YulIf", + "src": "2254:70:23" + } + ] + }, + "name": "abi_decode_address", + "nativeSrc": "2157:173:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "2185:6:23", + "nodeType": "YulTypedName", + "src": "2185:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nativeSrc": "2196:5:23", + "nodeType": "YulTypedName", + "src": "2196:5:23", + "type": "" + } + ], + "src": "2157:173:23" + }, + { + "body": { + "nativeSrc": "2422:213:23", + "nodeType": "YulBlock", + "src": "2422:213:23", + "statements": [ + { + "body": { + "nativeSrc": "2468:16:23", + "nodeType": "YulBlock", + "src": "2468:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2477:1:23", + "nodeType": "YulLiteral", + "src": "2477:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2480:1:23", + "nodeType": "YulLiteral", + "src": "2480:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2470:6:23", + "nodeType": "YulIdentifier", + "src": "2470:6:23" + }, + "nativeSrc": "2470:12:23", + "nodeType": "YulFunctionCall", + "src": "2470:12:23" + }, + "nativeSrc": "2470:12:23", + "nodeType": "YulExpressionStatement", + "src": "2470:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "2443:7:23", + "nodeType": "YulIdentifier", + "src": "2443:7:23" + }, + { + "name": "headStart", + "nativeSrc": "2452:9:23", + "nodeType": "YulIdentifier", + "src": "2452:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2439:3:23", + "nodeType": "YulIdentifier", + "src": "2439:3:23" + }, + "nativeSrc": "2439:23:23", + "nodeType": "YulFunctionCall", + "src": "2439:23:23" + }, + { + "kind": "number", + "nativeSrc": "2464:2:23", + "nodeType": "YulLiteral", + "src": "2464:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "2435:3:23", + "nodeType": "YulIdentifier", + "src": "2435:3:23" + }, + "nativeSrc": "2435:32:23", + "nodeType": "YulFunctionCall", + "src": "2435:32:23" + }, + "nativeSrc": "2432:52:23", + "nodeType": "YulIf", + "src": "2432:52:23" + }, + { + "nativeSrc": "2493:39:23", + "nodeType": "YulAssignment", + "src": "2493:39:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2522:9:23", + "nodeType": "YulIdentifier", + "src": "2522:9:23" + } + ], + "functionName": { + "name": "abi_decode_address", + "nativeSrc": "2503:18:23", + "nodeType": "YulIdentifier", + "src": "2503:18:23" + }, + "nativeSrc": "2503:29:23", + "nodeType": "YulFunctionCall", + "src": "2503:29:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "2493:6:23", + "nodeType": "YulIdentifier", + "src": "2493:6:23" + } + ] + }, + { + "nativeSrc": "2541:14:23", + "nodeType": "YulVariableDeclaration", + "src": "2541:14:23", + "value": { + "kind": "number", + "nativeSrc": "2554:1:23", + "nodeType": "YulLiteral", + "src": "2554:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "2545:5:23", + "nodeType": "YulTypedName", + "src": "2545:5:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2564:41:23", + "nodeType": "YulAssignment", + "src": "2564:41:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2590:9:23", + "nodeType": "YulIdentifier", + "src": "2590:9:23" + }, + { + "kind": "number", + "nativeSrc": "2601:2:23", + "nodeType": "YulLiteral", + "src": "2601:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2586:3:23", + "nodeType": "YulIdentifier", + "src": "2586:3:23" + }, + "nativeSrc": "2586:18:23", + "nodeType": "YulFunctionCall", + "src": "2586:18:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2573:12:23", + "nodeType": "YulIdentifier", + "src": "2573:12:23" + }, + "nativeSrc": "2573:32:23", + "nodeType": "YulFunctionCall", + "src": "2573:32:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "2564:5:23", + "nodeType": "YulIdentifier", + "src": "2564:5:23" + } + ] + }, + { + "nativeSrc": "2614:15:23", + "nodeType": "YulAssignment", + "src": "2614:15:23", + "value": { + "name": "value", + "nativeSrc": "2624:5:23", + "nodeType": "YulIdentifier", + "src": "2624:5:23" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "2614:6:23", + "nodeType": "YulIdentifier", + "src": "2614:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_addresst_uint256", + "nativeSrc": "2335:300:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2380:9:23", + "nodeType": "YulTypedName", + "src": "2380:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "2391:7:23", + "nodeType": "YulTypedName", + "src": "2391:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "2403:6:23", + "nodeType": "YulTypedName", + "src": "2403:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "2411:6:23", + "nodeType": "YulTypedName", + "src": "2411:6:23", + "type": "" + } + ], + "src": "2335:300:23" + }, + { + "body": { + "nativeSrc": "2735:92:23", + "nodeType": "YulBlock", + "src": "2735:92:23", + "statements": [ + { + "nativeSrc": "2745:26:23", + "nodeType": "YulAssignment", + "src": "2745:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2757:9:23", + "nodeType": "YulIdentifier", + "src": "2757:9:23" + }, + { + "kind": "number", + "nativeSrc": "2768:2:23", + "nodeType": "YulLiteral", + "src": "2768:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2753:3:23", + "nodeType": "YulIdentifier", + "src": "2753:3:23" + }, + "nativeSrc": "2753:18:23", + "nodeType": "YulFunctionCall", + "src": "2753:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2745:4:23", + "nodeType": "YulIdentifier", + "src": "2745:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2787:9:23", + "nodeType": "YulIdentifier", + "src": "2787:9:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "2812:6:23", + "nodeType": "YulIdentifier", + "src": "2812:6:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2805:6:23", + "nodeType": "YulIdentifier", + "src": "2805:6:23" + }, + "nativeSrc": "2805:14:23", + "nodeType": "YulFunctionCall", + "src": "2805:14:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2798:6:23", + "nodeType": "YulIdentifier", + "src": "2798:6:23" + }, + "nativeSrc": "2798:22:23", + "nodeType": "YulFunctionCall", + "src": "2798:22:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2780:6:23", + "nodeType": "YulIdentifier", + "src": "2780:6:23" + }, + "nativeSrc": "2780:41:23", + "nodeType": "YulFunctionCall", + "src": "2780:41:23" + }, + "nativeSrc": "2780:41:23", + "nodeType": "YulExpressionStatement", + "src": "2780:41:23" + } + ] + }, + "name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed", + "nativeSrc": "2640:187:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2704:9:23", + "nodeType": "YulTypedName", + "src": "2704:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2715:6:23", + "nodeType": "YulTypedName", + "src": "2715:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2726:4:23", + "nodeType": "YulTypedName", + "src": "2726:4:23", + "type": "" + } + ], + "src": "2640:187:23" + }, + { + "body": { + "nativeSrc": "2902:156:23", + "nodeType": "YulBlock", + "src": "2902:156:23", + "statements": [ + { + "body": { + "nativeSrc": "2948:16:23", + "nodeType": "YulBlock", + "src": "2948:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2957:1:23", + "nodeType": "YulLiteral", + "src": "2957:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2960:1:23", + "nodeType": "YulLiteral", + "src": "2960:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2950:6:23", + "nodeType": "YulIdentifier", + "src": "2950:6:23" + }, + "nativeSrc": "2950:12:23", + "nodeType": "YulFunctionCall", + "src": "2950:12:23" + }, + "nativeSrc": "2950:12:23", + "nodeType": "YulExpressionStatement", + "src": "2950:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "2923:7:23", + "nodeType": "YulIdentifier", + "src": "2923:7:23" + }, + { + "name": "headStart", + "nativeSrc": "2932:9:23", + "nodeType": "YulIdentifier", + "src": "2932:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2919:3:23", + "nodeType": "YulIdentifier", + "src": "2919:3:23" + }, + "nativeSrc": "2919:23:23", + "nodeType": "YulFunctionCall", + "src": "2919:23:23" + }, + { + "kind": "number", + "nativeSrc": "2944:2:23", + "nodeType": "YulLiteral", + "src": "2944:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "2915:3:23", + "nodeType": "YulIdentifier", + "src": "2915:3:23" + }, + "nativeSrc": "2915:32:23", + "nodeType": "YulFunctionCall", + "src": "2915:32:23" + }, + "nativeSrc": "2912:52:23", + "nodeType": "YulIf", + "src": "2912:52:23" + }, + { + "nativeSrc": "2973:14:23", + "nodeType": "YulVariableDeclaration", + "src": "2973:14:23", + "value": { + "kind": "number", + "nativeSrc": "2986:1:23", + "nodeType": "YulLiteral", + "src": "2986:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "2977:5:23", + "nodeType": "YulTypedName", + "src": "2977:5:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2996:32:23", + "nodeType": "YulAssignment", + "src": "2996:32:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3018:9:23", + "nodeType": "YulIdentifier", + "src": "3018:9:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3005:12:23", + "nodeType": "YulIdentifier", + "src": "3005:12:23" + }, + "nativeSrc": "3005:23:23", + "nodeType": "YulFunctionCall", + "src": "3005:23:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "2996:5:23", + "nodeType": "YulIdentifier", + "src": "2996:5:23" + } + ] + }, + { + "nativeSrc": "3037:15:23", + "nodeType": "YulAssignment", + "src": "3037:15:23", + "value": { + "name": "value", + "nativeSrc": "3047:5:23", + "nodeType": "YulIdentifier", + "src": "3047:5:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "3037:6:23", + "nodeType": "YulIdentifier", + "src": "3037:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256", + "nativeSrc": "2832:226:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2868:9:23", + "nodeType": "YulTypedName", + "src": "2868:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "2879:7:23", + "nodeType": "YulTypedName", + "src": "2879:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "2891:6:23", + "nodeType": "YulTypedName", + "src": "2891:6:23", + "type": "" + } + ], + "src": "2832:226:23" + }, + { + "body": { + "nativeSrc": "3133:116:23", + "nodeType": "YulBlock", + "src": "3133:116:23", + "statements": [ + { + "body": { + "nativeSrc": "3179:16:23", + "nodeType": "YulBlock", + "src": "3179:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3188:1:23", + "nodeType": "YulLiteral", + "src": "3188:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3191:1:23", + "nodeType": "YulLiteral", + "src": "3191:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3181:6:23", + "nodeType": "YulIdentifier", + "src": "3181:6:23" + }, + "nativeSrc": "3181:12:23", + "nodeType": "YulFunctionCall", + "src": "3181:12:23" + }, + "nativeSrc": "3181:12:23", + "nodeType": "YulExpressionStatement", + "src": "3181:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "3154:7:23", + "nodeType": "YulIdentifier", + "src": "3154:7:23" + }, + { + "name": "headStart", + "nativeSrc": "3163:9:23", + "nodeType": "YulIdentifier", + "src": "3163:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3150:3:23", + "nodeType": "YulIdentifier", + "src": "3150:3:23" + }, + "nativeSrc": "3150:23:23", + "nodeType": "YulFunctionCall", + "src": "3150:23:23" + }, + { + "kind": "number", + "nativeSrc": "3175:2:23", + "nodeType": "YulLiteral", + "src": "3175:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "3146:3:23", + "nodeType": "YulIdentifier", + "src": "3146:3:23" + }, + "nativeSrc": "3146:32:23", + "nodeType": "YulFunctionCall", + "src": "3146:32:23" + }, + "nativeSrc": "3143:52:23", + "nodeType": "YulIf", + "src": "3143:52:23" + }, + { + "nativeSrc": "3204:39:23", + "nodeType": "YulAssignment", + "src": "3204:39:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3233:9:23", + "nodeType": "YulIdentifier", + "src": "3233:9:23" + } + ], + "functionName": { + "name": "abi_decode_address", + "nativeSrc": "3214:18:23", + "nodeType": "YulIdentifier", + "src": "3214:18:23" + }, + "nativeSrc": "3214:29:23", + "nodeType": "YulFunctionCall", + "src": "3214:29:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "3204:6:23", + "nodeType": "YulIdentifier", + "src": "3204:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address", + "nativeSrc": "3063:186:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3099:9:23", + "nodeType": "YulTypedName", + "src": "3099:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "3110:7:23", + "nodeType": "YulTypedName", + "src": "3110:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "3122:6:23", + "nodeType": "YulTypedName", + "src": "3122:6:23", + "type": "" + } + ], + "src": "3063:186:23" + }, + { + "body": { + "nativeSrc": "3428:163:23", + "nodeType": "YulBlock", + "src": "3428:163:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3445:9:23", + "nodeType": "YulIdentifier", + "src": "3445:9:23" + }, + { + "kind": "number", + "nativeSrc": "3456:2:23", + "nodeType": "YulLiteral", + "src": "3456:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3438:6:23", + "nodeType": "YulIdentifier", + "src": "3438:6:23" + }, + "nativeSrc": "3438:21:23", + "nodeType": "YulFunctionCall", + "src": "3438:21:23" + }, + "nativeSrc": "3438:21:23", + "nodeType": "YulExpressionStatement", + "src": "3438:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3479:9:23", + "nodeType": "YulIdentifier", + "src": "3479:9:23" + }, + { + "kind": "number", + "nativeSrc": "3490:2:23", + "nodeType": "YulLiteral", + "src": "3490:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3475:3:23", + "nodeType": "YulIdentifier", + "src": "3475:3:23" + }, + "nativeSrc": "3475:18:23", + "nodeType": "YulFunctionCall", + "src": "3475:18:23" + }, + { + "kind": "number", + "nativeSrc": "3495:2:23", + "nodeType": "YulLiteral", + "src": "3495:2:23", + "type": "", + "value": "13" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3468:6:23", + "nodeType": "YulIdentifier", + "src": "3468:6:23" + }, + "nativeSrc": "3468:30:23", + "nodeType": "YulFunctionCall", + "src": "3468:30:23" + }, + "nativeSrc": "3468:30:23", + "nodeType": "YulExpressionStatement", + "src": "3468:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3518:9:23", + "nodeType": "YulIdentifier", + "src": "3518:9:23" + }, + { + "kind": "number", + "nativeSrc": "3529:2:23", + "nodeType": "YulLiteral", + "src": "3529:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3514:3:23", + "nodeType": "YulIdentifier", + "src": "3514:3:23" + }, + "nativeSrc": "3514:18:23", + "nodeType": "YulFunctionCall", + "src": "3514:18:23" + }, + { + "hexValue": "496e76616c6964206f776e6572", + "kind": "string", + "nativeSrc": "3534:15:23", + "nodeType": "YulLiteral", + "src": "3534:15:23", + "type": "", + "value": "Invalid owner" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3507:6:23", + "nodeType": "YulIdentifier", + "src": "3507:6:23" + }, + "nativeSrc": "3507:43:23", + "nodeType": "YulFunctionCall", + "src": "3507:43:23" + }, + "nativeSrc": "3507:43:23", + "nodeType": "YulExpressionStatement", + "src": "3507:43:23" + }, + { + "nativeSrc": "3559:26:23", + "nodeType": "YulAssignment", + "src": "3559:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3571:9:23", + "nodeType": "YulIdentifier", + "src": "3571:9:23" + }, + { + "kind": "number", + "nativeSrc": "3582:2:23", + "nodeType": "YulLiteral", + "src": "3582:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3567:3:23", + "nodeType": "YulIdentifier", + "src": "3567:3:23" + }, + "nativeSrc": "3567:18:23", + "nodeType": "YulFunctionCall", + "src": "3567:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3559:4:23", + "nodeType": "YulIdentifier", + "src": "3559:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3254:337:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3405:9:23", + "nodeType": "YulTypedName", + "src": "3405:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3419:4:23", + "nodeType": "YulTypedName", + "src": "3419:4:23", + "type": "" + } + ], + "src": "3254:337:23" + }, + { + "body": { + "nativeSrc": "3770:163:23", + "nodeType": "YulBlock", + "src": "3770:163:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3787:9:23", + "nodeType": "YulIdentifier", + "src": "3787:9:23" + }, + { + "kind": "number", + "nativeSrc": "3798:2:23", + "nodeType": "YulLiteral", + "src": "3798:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3780:6:23", + "nodeType": "YulIdentifier", + "src": "3780:6:23" + }, + "nativeSrc": "3780:21:23", + "nodeType": "YulFunctionCall", + "src": "3780:21:23" + }, + "nativeSrc": "3780:21:23", + "nodeType": "YulExpressionStatement", + "src": "3780:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3821:9:23", + "nodeType": "YulIdentifier", + "src": "3821:9:23" + }, + { + "kind": "number", + "nativeSrc": "3832:2:23", + "nodeType": "YulLiteral", + "src": "3832:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3817:3:23", + "nodeType": "YulIdentifier", + "src": "3817:3:23" + }, + "nativeSrc": "3817:18:23", + "nodeType": "YulFunctionCall", + "src": "3817:18:23" + }, + { + "kind": "number", + "nativeSrc": "3837:2:23", + "nodeType": "YulLiteral", + "src": "3837:2:23", + "type": "", + "value": "13" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3810:6:23", + "nodeType": "YulIdentifier", + "src": "3810:6:23" + }, + "nativeSrc": "3810:30:23", + "nodeType": "YulFunctionCall", + "src": "3810:30:23" + }, + "nativeSrc": "3810:30:23", + "nodeType": "YulExpressionStatement", + "src": "3810:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3860:9:23", + "nodeType": "YulIdentifier", + "src": "3860:9:23" + }, + { + "kind": "number", + "nativeSrc": "3871:2:23", + "nodeType": "YulLiteral", + "src": "3871:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3856:3:23", + "nodeType": "YulIdentifier", + "src": "3856:3:23" + }, + "nativeSrc": "3856:18:23", + "nodeType": "YulFunctionCall", + "src": "3856:18:23" + }, + { + "hexValue": "496e76616c696420746f6b656e", + "kind": "string", + "nativeSrc": "3876:15:23", + "nodeType": "YulLiteral", + "src": "3876:15:23", + "type": "", + "value": "Invalid token" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3849:6:23", + "nodeType": "YulIdentifier", + "src": "3849:6:23" + }, + "nativeSrc": "3849:43:23", + "nodeType": "YulFunctionCall", + "src": "3849:43:23" + }, + "nativeSrc": "3849:43:23", + "nodeType": "YulExpressionStatement", + "src": "3849:43:23" + }, + { + "nativeSrc": "3901:26:23", + "nodeType": "YulAssignment", + "src": "3901:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3913:9:23", + "nodeType": "YulIdentifier", + "src": "3913:9:23" + }, + { + "kind": "number", + "nativeSrc": "3924:2:23", + "nodeType": "YulLiteral", + "src": "3924:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3909:3:23", + "nodeType": "YulIdentifier", + "src": "3909:3:23" + }, + "nativeSrc": "3909:18:23", + "nodeType": "YulFunctionCall", + "src": "3909:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3901:4:23", + "nodeType": "YulIdentifier", + "src": "3901:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3596:337:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3747:9:23", + "nodeType": "YulTypedName", + "src": "3747:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3761:4:23", + "nodeType": "YulTypedName", + "src": "3761:4:23", + "type": "" + } + ], + "src": "3596:337:23" + }, + { + "body": { + "nativeSrc": "4112:160:23", + "nodeType": "YulBlock", + "src": "4112:160:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4129:9:23", + "nodeType": "YulIdentifier", + "src": "4129:9:23" + }, + { + "kind": "number", + "nativeSrc": "4140:2:23", + "nodeType": "YulLiteral", + "src": "4140:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4122:6:23", + "nodeType": "YulIdentifier", + "src": "4122:6:23" + }, + "nativeSrc": "4122:21:23", + "nodeType": "YulFunctionCall", + "src": "4122:21:23" + }, + "nativeSrc": "4122:21:23", + "nodeType": "YulExpressionStatement", + "src": "4122:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4163:9:23", + "nodeType": "YulIdentifier", + "src": "4163:9:23" + }, + { + "kind": "number", + "nativeSrc": "4174:2:23", + "nodeType": "YulLiteral", + "src": "4174:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4159:3:23", + "nodeType": "YulIdentifier", + "src": "4159:3:23" + }, + "nativeSrc": "4159:18:23", + "nodeType": "YulFunctionCall", + "src": "4159:18:23" + }, + { + "kind": "number", + "nativeSrc": "4179:2:23", + "nodeType": "YulLiteral", + "src": "4179:2:23", + "type": "", + "value": "10" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4152:6:23", + "nodeType": "YulIdentifier", + "src": "4152:6:23" + }, + "nativeSrc": "4152:30:23", + "nodeType": "YulFunctionCall", + "src": "4152:30:23" + }, + "nativeSrc": "4152:30:23", + "nodeType": "YulExpressionStatement", + "src": "4152:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4202:9:23", + "nodeType": "YulIdentifier", + "src": "4202:9:23" + }, + { + "kind": "number", + "nativeSrc": "4213:2:23", + "nodeType": "YulLiteral", + "src": "4213:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4198:3:23", + "nodeType": "YulIdentifier", + "src": "4198:3:23" + }, + "nativeSrc": "4198:18:23", + "nodeType": "YulFunctionCall", + "src": "4198:18:23" + }, + { + "hexValue": "4e6f6e63652075736564", + "kind": "string", + "nativeSrc": "4218:12:23", + "nodeType": "YulLiteral", + "src": "4218:12:23", + "type": "", + "value": "Nonce used" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4191:6:23", + "nodeType": "YulIdentifier", + "src": "4191:6:23" + }, + "nativeSrc": "4191:40:23", + "nodeType": "YulFunctionCall", + "src": "4191:40:23" + }, + "nativeSrc": "4191:40:23", + "nodeType": "YulExpressionStatement", + "src": "4191:40:23" + }, + { + "nativeSrc": "4240:26:23", + "nodeType": "YulAssignment", + "src": "4240:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4252:9:23", + "nodeType": "YulIdentifier", + "src": "4252:9:23" + }, + { + "kind": "number", + "nativeSrc": "4263:2:23", + "nodeType": "YulLiteral", + "src": "4263:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4248:3:23", + "nodeType": "YulIdentifier", + "src": "4248:3:23" + }, + "nativeSrc": "4248:18:23", + "nodeType": "YulFunctionCall", + "src": "4248:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4240:4:23", + "nodeType": "YulIdentifier", + "src": "4240:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3938:334:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4089:9:23", + "nodeType": "YulTypedName", + "src": "4089:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4103:4:23", + "nodeType": "YulTypedName", + "src": "4103:4:23", + "type": "" + } + ], + "src": "3938:334:23" + }, + { + "body": { + "nativeSrc": "4451:165:23", + "nodeType": "YulBlock", + "src": "4451:165:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4468:9:23", + "nodeType": "YulIdentifier", + "src": "4468:9:23" + }, + { + "kind": "number", + "nativeSrc": "4479:2:23", + "nodeType": "YulLiteral", + "src": "4479:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4461:6:23", + "nodeType": "YulIdentifier", + "src": "4461:6:23" + }, + "nativeSrc": "4461:21:23", + "nodeType": "YulFunctionCall", + "src": "4461:21:23" + }, + "nativeSrc": "4461:21:23", + "nodeType": "YulExpressionStatement", + "src": "4461:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4502:9:23", + "nodeType": "YulIdentifier", + "src": "4502:9:23" + }, + { + "kind": "number", + "nativeSrc": "4513:2:23", + "nodeType": "YulLiteral", + "src": "4513:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4498:3:23", + "nodeType": "YulIdentifier", + "src": "4498:3:23" + }, + "nativeSrc": "4498:18:23", + "nodeType": "YulFunctionCall", + "src": "4498:18:23" + }, + { + "kind": "number", + "nativeSrc": "4518:2:23", + "nodeType": "YulLiteral", + "src": "4518:2:23", + "type": "", + "value": "15" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4491:6:23", + "nodeType": "YulIdentifier", + "src": "4491:6:23" + }, + "nativeSrc": "4491:30:23", + "nodeType": "YulFunctionCall", + "src": "4491:30:23" + }, + "nativeSrc": "4491:30:23", + "nodeType": "YulExpressionStatement", + "src": "4491:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4541:9:23", + "nodeType": "YulIdentifier", + "src": "4541:9:23" + }, + { + "kind": "number", + "nativeSrc": "4552:2:23", + "nodeType": "YulLiteral", + "src": "4552:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4537:3:23", + "nodeType": "YulIdentifier", + "src": "4537:3:23" + }, + "nativeSrc": "4537:18:23", + "nodeType": "YulFunctionCall", + "src": "4537:18:23" + }, + { + "hexValue": "5061796c6f61642065787069726564", + "kind": "string", + "nativeSrc": "4557:17:23", + "nodeType": "YulLiteral", + "src": "4557:17:23", + "type": "", + "value": "Payload expired" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4530:6:23", + "nodeType": "YulIdentifier", + "src": "4530:6:23" + }, + "nativeSrc": "4530:45:23", + "nodeType": "YulFunctionCall", + "src": "4530:45:23" + }, + "nativeSrc": "4530:45:23", + "nodeType": "YulExpressionStatement", + "src": "4530:45:23" + }, + { + "nativeSrc": "4584:26:23", + "nodeType": "YulAssignment", + "src": "4584:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4596:9:23", + "nodeType": "YulIdentifier", + "src": "4596:9:23" + }, + { + "kind": "number", + "nativeSrc": "4607:2:23", + "nodeType": "YulLiteral", + "src": "4607:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4592:3:23", + "nodeType": "YulIdentifier", + "src": "4592:3:23" + }, + "nativeSrc": "4592:18:23", + "nodeType": "YulFunctionCall", + "src": "4592:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4584:4:23", + "nodeType": "YulIdentifier", + "src": "4584:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "4277:339:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4428:9:23", + "nodeType": "YulTypedName", + "src": "4428:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4442:4:23", + "nodeType": "YulTypedName", + "src": "4442:4:23", + "type": "" + } + ], + "src": "4277:339:23" + }, + { + "body": { + "nativeSrc": "4715:427:23", + "nodeType": "YulBlock", + "src": "4715:427:23", + "statements": [ + { + "nativeSrc": "4725:51:23", + "nodeType": "YulVariableDeclaration", + "src": "4725:51:23", + "value": { + "arguments": [ + { + "name": "ptr_to_tail", + "nativeSrc": "4764:11:23", + "nodeType": "YulIdentifier", + "src": "4764:11:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "4751:12:23", + "nodeType": "YulIdentifier", + "src": "4751:12:23" + }, + "nativeSrc": "4751:25:23", + "nodeType": "YulFunctionCall", + "src": "4751:25:23" + }, + "variables": [ + { + "name": "rel_offset_of_tail", + "nativeSrc": "4729:18:23", + "nodeType": "YulTypedName", + "src": "4729:18:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "4865:16:23", + "nodeType": "YulBlock", + "src": "4865:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4874:1:23", + "nodeType": "YulLiteral", + "src": "4874:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "4877:1:23", + "nodeType": "YulLiteral", + "src": "4877:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "4867:6:23", + "nodeType": "YulIdentifier", + "src": "4867:6:23" + }, + "nativeSrc": "4867:12:23", + "nodeType": "YulFunctionCall", + "src": "4867:12:23" + }, + "nativeSrc": "4867:12:23", + "nodeType": "YulExpressionStatement", + "src": "4867:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "rel_offset_of_tail", + "nativeSrc": "4799:18:23", + "nodeType": "YulIdentifier", + "src": "4799:18:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nativeSrc": "4827:12:23", + "nodeType": "YulIdentifier", + "src": "4827:12:23" + }, + "nativeSrc": "4827:14:23", + "nodeType": "YulFunctionCall", + "src": "4827:14:23" + }, + { + "name": "base_ref", + "nativeSrc": "4843:8:23", + "nodeType": "YulIdentifier", + "src": "4843:8:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4823:3:23", + "nodeType": "YulIdentifier", + "src": "4823:3:23" + }, + "nativeSrc": "4823:29:23", + "nodeType": "YulFunctionCall", + "src": "4823:29:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4858:2:23", + "nodeType": "YulLiteral", + "src": "4858:2:23", + "type": "", + "value": "30" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4854:3:23", + "nodeType": "YulIdentifier", + "src": "4854:3:23" + }, + "nativeSrc": "4854:7:23", + "nodeType": "YulFunctionCall", + "src": "4854:7:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4819:3:23", + "nodeType": "YulIdentifier", + "src": "4819:3:23" + }, + "nativeSrc": "4819:43:23", + "nodeType": "YulFunctionCall", + "src": "4819:43:23" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "4795:3:23", + "nodeType": "YulIdentifier", + "src": "4795:3:23" + }, + "nativeSrc": "4795:68:23", + "nodeType": "YulFunctionCall", + "src": "4795:68:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "4788:6:23", + "nodeType": "YulIdentifier", + "src": "4788:6:23" + }, + "nativeSrc": "4788:76:23", + "nodeType": "YulFunctionCall", + "src": "4788:76:23" + }, + "nativeSrc": "4785:96:23", + "nodeType": "YulIf", + "src": "4785:96:23" + }, + { + "nativeSrc": "4890:47:23", + "nodeType": "YulVariableDeclaration", + "src": "4890:47:23", + "value": { + "arguments": [ + { + "name": "base_ref", + "nativeSrc": "4908:8:23", + "nodeType": "YulIdentifier", + "src": "4908:8:23" + }, + { + "name": "rel_offset_of_tail", + "nativeSrc": "4918:18:23", + "nodeType": "YulIdentifier", + "src": "4918:18:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4904:3:23", + "nodeType": "YulIdentifier", + "src": "4904:3:23" + }, + "nativeSrc": "4904:33:23", + "nodeType": "YulFunctionCall", + "src": "4904:33:23" + }, + "variables": [ + { + "name": "addr_1", + "nativeSrc": "4894:6:23", + "nodeType": "YulTypedName", + "src": "4894:6:23", + "type": "" + } + ] + }, + { + "nativeSrc": "4946:30:23", + "nodeType": "YulAssignment", + "src": "4946:30:23", + "value": { + "arguments": [ + { + "name": "addr_1", + "nativeSrc": "4969:6:23", + "nodeType": "YulIdentifier", + "src": "4969:6:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "4956:12:23", + "nodeType": "YulIdentifier", + "src": "4956:12:23" + }, + "nativeSrc": "4956:20:23", + "nodeType": "YulFunctionCall", + "src": "4956:20:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "4946:6:23", + "nodeType": "YulIdentifier", + "src": "4946:6:23" + } + ] + }, + { + "body": { + "nativeSrc": "5019:16:23", + "nodeType": "YulBlock", + "src": "5019:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5028:1:23", + "nodeType": "YulLiteral", + "src": "5028:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5031:1:23", + "nodeType": "YulLiteral", + "src": "5031:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5021:6:23", + "nodeType": "YulIdentifier", + "src": "5021:6:23" + }, + "nativeSrc": "5021:12:23", + "nodeType": "YulFunctionCall", + "src": "5021:12:23" + }, + "nativeSrc": "5021:12:23", + "nodeType": "YulExpressionStatement", + "src": "5021:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nativeSrc": "4991:6:23", + "nodeType": "YulIdentifier", + "src": "4991:6:23" + }, + { + "kind": "number", + "nativeSrc": "4999:18:23", + "nodeType": "YulLiteral", + "src": "4999:18:23", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "4988:2:23", + "nodeType": "YulIdentifier", + "src": "4988:2:23" + }, + "nativeSrc": "4988:30:23", + "nodeType": "YulFunctionCall", + "src": "4988:30:23" + }, + "nativeSrc": "4985:50:23", + "nodeType": "YulIf", + "src": "4985:50:23" + }, + { + "nativeSrc": "5044:25:23", + "nodeType": "YulAssignment", + "src": "5044:25:23", + "value": { + "arguments": [ + { + "name": "addr_1", + "nativeSrc": "5056:6:23", + "nodeType": "YulIdentifier", + "src": "5056:6:23" + }, + { + "kind": "number", + "nativeSrc": "5064:4:23", + "nodeType": "YulLiteral", + "src": "5064:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5052:3:23", + "nodeType": "YulIdentifier", + "src": "5052:3:23" + }, + "nativeSrc": "5052:17:23", + "nodeType": "YulFunctionCall", + "src": "5052:17:23" + }, + "variableNames": [ + { + "name": "addr", + "nativeSrc": "5044:4:23", + "nodeType": "YulIdentifier", + "src": "5044:4:23" + } + ] + }, + { + "body": { + "nativeSrc": "5120:16:23", + "nodeType": "YulBlock", + "src": "5120:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5129:1:23", + "nodeType": "YulLiteral", + "src": "5129:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5132:1:23", + "nodeType": "YulLiteral", + "src": "5132:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5122:6:23", + "nodeType": "YulIdentifier", + "src": "5122:6:23" + }, + "nativeSrc": "5122:12:23", + "nodeType": "YulFunctionCall", + "src": "5122:12:23" + }, + "nativeSrc": "5122:12:23", + "nodeType": "YulExpressionStatement", + "src": "5122:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "addr", + "nativeSrc": "5085:4:23", + "nodeType": "YulIdentifier", + "src": "5085:4:23" + }, + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nativeSrc": "5095:12:23", + "nodeType": "YulIdentifier", + "src": "5095:12:23" + }, + "nativeSrc": "5095:14:23", + "nodeType": "YulFunctionCall", + "src": "5095:14:23" + }, + { + "name": "length", + "nativeSrc": "5111:6:23", + "nodeType": "YulIdentifier", + "src": "5111:6:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5091:3:23", + "nodeType": "YulIdentifier", + "src": "5091:3:23" + }, + "nativeSrc": "5091:27:23", + "nodeType": "YulFunctionCall", + "src": "5091:27:23" + } + ], + "functionName": { + "name": "sgt", + "nativeSrc": "5081:3:23", + "nodeType": "YulIdentifier", + "src": "5081:3:23" + }, + "nativeSrc": "5081:38:23", + "nodeType": "YulFunctionCall", + "src": "5081:38:23" + }, + "nativeSrc": "5078:58:23", + "nodeType": "YulIf", + "src": "5078:58:23" + } + ] + }, + "name": "access_calldata_tail_t_bytes_calldata_ptr", + "nativeSrc": "4621:521:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "base_ref", + "nativeSrc": "4672:8:23", + "nodeType": "YulTypedName", + "src": "4672:8:23", + "type": "" + }, + { + "name": "ptr_to_tail", + "nativeSrc": "4682:11:23", + "nodeType": "YulTypedName", + "src": "4682:11:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "addr", + "nativeSrc": "4698:4:23", + "nodeType": "YulTypedName", + "src": "4698:4:23", + "type": "" + }, + { + "name": "length", + "nativeSrc": "4704:6:23", + "nodeType": "YulTypedName", + "src": "4704:6:23", + "type": "" + } + ], + "src": "4621:521:23" + }, + { + "body": { + "nativeSrc": "5215:201:23", + "nodeType": "YulBlock", + "src": "5215:201:23", + "statements": [ + { + "body": { + "nativeSrc": "5261:16:23", + "nodeType": "YulBlock", + "src": "5261:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5270:1:23", + "nodeType": "YulLiteral", + "src": "5270:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5273:1:23", + "nodeType": "YulLiteral", + "src": "5273:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5263:6:23", + "nodeType": "YulIdentifier", + "src": "5263:6:23" + }, + "nativeSrc": "5263:12:23", + "nodeType": "YulFunctionCall", + "src": "5263:12:23" + }, + "nativeSrc": "5263:12:23", + "nodeType": "YulExpressionStatement", + "src": "5263:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "5236:7:23", + "nodeType": "YulIdentifier", + "src": "5236:7:23" + }, + { + "name": "headStart", + "nativeSrc": "5245:9:23", + "nodeType": "YulIdentifier", + "src": "5245:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5232:3:23", + "nodeType": "YulIdentifier", + "src": "5232:3:23" + }, + "nativeSrc": "5232:23:23", + "nodeType": "YulFunctionCall", + "src": "5232:23:23" + }, + { + "kind": "number", + "nativeSrc": "5257:2:23", + "nodeType": "YulLiteral", + "src": "5257:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "5228:3:23", + "nodeType": "YulIdentifier", + "src": "5228:3:23" + }, + "nativeSrc": "5228:32:23", + "nodeType": "YulFunctionCall", + "src": "5228:32:23" + }, + "nativeSrc": "5225:52:23", + "nodeType": "YulIf", + "src": "5225:52:23" + }, + { + "nativeSrc": "5286:36:23", + "nodeType": "YulVariableDeclaration", + "src": "5286:36:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5312:9:23", + "nodeType": "YulIdentifier", + "src": "5312:9:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "5299:12:23", + "nodeType": "YulIdentifier", + "src": "5299:12:23" + }, + "nativeSrc": "5299:23:23", + "nodeType": "YulFunctionCall", + "src": "5299:23:23" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "5290:5:23", + "nodeType": "YulTypedName", + "src": "5290:5:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "5370:16:23", + "nodeType": "YulBlock", + "src": "5370:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5379:1:23", + "nodeType": "YulLiteral", + "src": "5379:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5382:1:23", + "nodeType": "YulLiteral", + "src": "5382:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5372:6:23", + "nodeType": "YulIdentifier", + "src": "5372:6:23" + }, + "nativeSrc": "5372:12:23", + "nodeType": "YulFunctionCall", + "src": "5372:12:23" + }, + "nativeSrc": "5372:12:23", + "nodeType": "YulExpressionStatement", + "src": "5372:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "5344:5:23", + "nodeType": "YulIdentifier", + "src": "5344:5:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "5355:5:23", + "nodeType": "YulIdentifier", + "src": "5355:5:23" + }, + { + "kind": "number", + "nativeSrc": "5362:4:23", + "nodeType": "YulLiteral", + "src": "5362:4:23", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5351:3:23", + "nodeType": "YulIdentifier", + "src": "5351:3:23" + }, + "nativeSrc": "5351:16:23", + "nodeType": "YulFunctionCall", + "src": "5351:16:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "5341:2:23", + "nodeType": "YulIdentifier", + "src": "5341:2:23" + }, + "nativeSrc": "5341:27:23", + "nodeType": "YulFunctionCall", + "src": "5341:27:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "5334:6:23", + "nodeType": "YulIdentifier", + "src": "5334:6:23" + }, + "nativeSrc": "5334:35:23", + "nodeType": "YulFunctionCall", + "src": "5334:35:23" + }, + "nativeSrc": "5331:55:23", + "nodeType": "YulIf", + "src": "5331:55:23" + }, + { + "nativeSrc": "5395:15:23", + "nodeType": "YulAssignment", + "src": "5395:15:23", + "value": { + "name": "value", + "nativeSrc": "5405:5:23", + "nodeType": "YulIdentifier", + "src": "5405:5:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "5395:6:23", + "nodeType": "YulIdentifier", + "src": "5395:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint8", + "nativeSrc": "5147:269:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5181:9:23", + "nodeType": "YulTypedName", + "src": "5181:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "5192:7:23", + "nodeType": "YulTypedName", + "src": "5192:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "5204:6:23", + "nodeType": "YulTypedName", + "src": "5204:6:23", + "type": "" + } + ], + "src": "5147:269:23" + }, + { + "body": { + "nativeSrc": "5595:161:23", + "nodeType": "YulBlock", + "src": "5595:161:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5612:9:23", + "nodeType": "YulIdentifier", + "src": "5612:9:23" + }, + { + "kind": "number", + "nativeSrc": "5623:2:23", + "nodeType": "YulLiteral", + "src": "5623:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5605:6:23", + "nodeType": "YulIdentifier", + "src": "5605:6:23" + }, + "nativeSrc": "5605:21:23", + "nodeType": "YulFunctionCall", + "src": "5605:21:23" + }, + "nativeSrc": "5605:21:23", + "nodeType": "YulExpressionStatement", + "src": "5605:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5646:9:23", + "nodeType": "YulIdentifier", + "src": "5646:9:23" + }, + { + "kind": "number", + "nativeSrc": "5657:2:23", + "nodeType": "YulLiteral", + "src": "5657:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5642:3:23", + "nodeType": "YulIdentifier", + "src": "5642:3:23" + }, + "nativeSrc": "5642:18:23", + "nodeType": "YulFunctionCall", + "src": "5642:18:23" + }, + { + "kind": "number", + "nativeSrc": "5662:2:23", + "nodeType": "YulLiteral", + "src": "5662:2:23", + "type": "", + "value": "11" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5635:6:23", + "nodeType": "YulIdentifier", + "src": "5635:6:23" + }, + "nativeSrc": "5635:30:23", + "nodeType": "YulFunctionCall", + "src": "5635:30:23" + }, + "nativeSrc": "5635:30:23", + "nodeType": "YulExpressionStatement", + "src": "5635:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5685:9:23", + "nodeType": "YulIdentifier", + "src": "5685:9:23" + }, + { + "kind": "number", + "nativeSrc": "5696:2:23", + "nodeType": "YulLiteral", + "src": "5696:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5681:3:23", + "nodeType": "YulIdentifier", + "src": "5681:3:23" + }, + "nativeSrc": "5681:18:23", + "nodeType": "YulFunctionCall", + "src": "5681:18:23" + }, + { + "hexValue": "496e76616c696420736967", + "kind": "string", + "nativeSrc": "5701:13:23", + "nodeType": "YulLiteral", + "src": "5701:13:23", + "type": "", + "value": "Invalid sig" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5674:6:23", + "nodeType": "YulIdentifier", + "src": "5674:6:23" + }, + "nativeSrc": "5674:41:23", + "nodeType": "YulFunctionCall", + "src": "5674:41:23" + }, + "nativeSrc": "5674:41:23", + "nodeType": "YulExpressionStatement", + "src": "5674:41:23" + }, + { + "nativeSrc": "5724:26:23", + "nodeType": "YulAssignment", + "src": "5724:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5736:9:23", + "nodeType": "YulIdentifier", + "src": "5736:9:23" + }, + { + "kind": "number", + "nativeSrc": "5747:2:23", + "nodeType": "YulLiteral", + "src": "5747:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5732:3:23", + "nodeType": "YulIdentifier", + "src": "5732:3:23" + }, + "nativeSrc": "5732:18:23", + "nodeType": "YulFunctionCall", + "src": "5732:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "5724:4:23", + "nodeType": "YulIdentifier", + "src": "5724:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "5421:335:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5572:9:23", + "nodeType": "YulTypedName", + "src": "5572:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5586:4:23", + "nodeType": "YulTypedName", + "src": "5586:4:23", + "type": "" + } + ], + "src": "5421:335:23" + }, + { + "body": { + "nativeSrc": "5935:178:23", + "nodeType": "YulBlock", + "src": "5935:178:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5952:9:23", + "nodeType": "YulIdentifier", + "src": "5952:9:23" + }, + { + "kind": "number", + "nativeSrc": "5963:2:23", + "nodeType": "YulLiteral", + "src": "5963:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5945:6:23", + "nodeType": "YulIdentifier", + "src": "5945:6:23" + }, + "nativeSrc": "5945:21:23", + "nodeType": "YulFunctionCall", + "src": "5945:21:23" + }, + "nativeSrc": "5945:21:23", + "nodeType": "YulExpressionStatement", + "src": "5945:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5986:9:23", + "nodeType": "YulIdentifier", + "src": "5986:9:23" + }, + { + "kind": "number", + "nativeSrc": "5997:2:23", + "nodeType": "YulLiteral", + "src": "5997:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5982:3:23", + "nodeType": "YulIdentifier", + "src": "5982:3:23" + }, + "nativeSrc": "5982:18:23", + "nodeType": "YulFunctionCall", + "src": "5982:18:23" + }, + { + "kind": "number", + "nativeSrc": "6002:2:23", + "nodeType": "YulLiteral", + "src": "6002:2:23", + "type": "", + "value": "28" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5975:6:23", + "nodeType": "YulIdentifier", + "src": "5975:6:23" + }, + "nativeSrc": "5975:30:23", + "nodeType": "YulFunctionCall", + "src": "5975:30:23" + }, + "nativeSrc": "5975:30:23", + "nodeType": "YulExpressionStatement", + "src": "5975:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6025:9:23", + "nodeType": "YulIdentifier", + "src": "6025:9:23" + }, + { + "kind": "number", + "nativeSrc": "6036:2:23", + "nodeType": "YulLiteral", + "src": "6036:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6021:3:23", + "nodeType": "YulIdentifier", + "src": "6021:3:23" + }, + "nativeSrc": "6021:18:23", + "nodeType": "YulFunctionCall", + "src": "6021:18:23" + }, + { + "hexValue": "496e636f7272656374204554482076616c75652070726f7669646564", + "kind": "string", + "nativeSrc": "6041:30:23", + "nodeType": "YulLiteral", + "src": "6041:30:23", + "type": "", + "value": "Incorrect ETH value provided" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6014:6:23", + "nodeType": "YulIdentifier", + "src": "6014:6:23" + }, + "nativeSrc": "6014:58:23", + "nodeType": "YulFunctionCall", + "src": "6014:58:23" + }, + "nativeSrc": "6014:58:23", + "nodeType": "YulExpressionStatement", + "src": "6014:58:23" + }, + { + "nativeSrc": "6081:26:23", + "nodeType": "YulAssignment", + "src": "6081:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6093:9:23", + "nodeType": "YulIdentifier", + "src": "6093:9:23" + }, + { + "kind": "number", + "nativeSrc": "6104:2:23", + "nodeType": "YulLiteral", + "src": "6104:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6089:3:23", + "nodeType": "YulIdentifier", + "src": "6089:3:23" + }, + "nativeSrc": "6089:18:23", + "nodeType": "YulFunctionCall", + "src": "6089:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6081:4:23", + "nodeType": "YulIdentifier", + "src": "6081:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "5761:352:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5912:9:23", + "nodeType": "YulTypedName", + "src": "5912:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5926:4:23", + "nodeType": "YulTypedName", + "src": "5926:4:23", + "type": "" + } + ], + "src": "5761:352:23" + }, + { + "body": { + "nativeSrc": "6292:161:23", + "nodeType": "YulBlock", + "src": "6292:161:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6309:9:23", + "nodeType": "YulIdentifier", + "src": "6309:9:23" + }, + { + "kind": "number", + "nativeSrc": "6320:2:23", + "nodeType": "YulLiteral", + "src": "6320:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6302:6:23", + "nodeType": "YulIdentifier", + "src": "6302:6:23" + }, + "nativeSrc": "6302:21:23", + "nodeType": "YulFunctionCall", + "src": "6302:21:23" + }, + "nativeSrc": "6302:21:23", + "nodeType": "YulExpressionStatement", + "src": "6302:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6343:9:23", + "nodeType": "YulIdentifier", + "src": "6343:9:23" + }, + { + "kind": "number", + "nativeSrc": "6354:2:23", + "nodeType": "YulLiteral", + "src": "6354:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6339:3:23", + "nodeType": "YulIdentifier", + "src": "6339:3:23" + }, + "nativeSrc": "6339:18:23", + "nodeType": "YulFunctionCall", + "src": "6339:18:23" + }, + { + "kind": "number", + "nativeSrc": "6359:2:23", + "nodeType": "YulLiteral", + "src": "6359:2:23", + "type": "", + "value": "11" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6332:6:23", + "nodeType": "YulIdentifier", + "src": "6332:6:23" + }, + "nativeSrc": "6332:30:23", + "nodeType": "YulFunctionCall", + "src": "6332:30:23" + }, + "nativeSrc": "6332:30:23", + "nodeType": "YulExpressionStatement", + "src": "6332:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6382:9:23", + "nodeType": "YulIdentifier", + "src": "6382:9:23" + }, + { + "kind": "number", + "nativeSrc": "6393:2:23", + "nodeType": "YulLiteral", + "src": "6393:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6378:3:23", + "nodeType": "YulIdentifier", + "src": "6378:3:23" + }, + "nativeSrc": "6378:18:23", + "nodeType": "YulFunctionCall", + "src": "6378:18:23" + }, + { + "hexValue": "43616c6c206661696c6564", + "kind": "string", + "nativeSrc": "6398:13:23", + "nodeType": "YulLiteral", + "src": "6398:13:23", + "type": "", + "value": "Call failed" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6371:6:23", + "nodeType": "YulIdentifier", + "src": "6371:6:23" + }, + "nativeSrc": "6371:41:23", + "nodeType": "YulFunctionCall", + "src": "6371:41:23" + }, + "nativeSrc": "6371:41:23", + "nodeType": "YulExpressionStatement", + "src": "6371:41:23" + }, + { + "nativeSrc": "6421:26:23", + "nodeType": "YulAssignment", + "src": "6421:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6433:9:23", + "nodeType": "YulIdentifier", + "src": "6433:9:23" + }, + { + "kind": "number", + "nativeSrc": "6444:2:23", + "nodeType": "YulLiteral", + "src": "6444:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6429:3:23", + "nodeType": "YulIdentifier", + "src": "6429:3:23" + }, + "nativeSrc": "6429:18:23", + "nodeType": "YulFunctionCall", + "src": "6429:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6421:4:23", + "nodeType": "YulIdentifier", + "src": "6421:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "6118:335:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6269:9:23", + "nodeType": "YulTypedName", + "src": "6269:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6283:4:23", + "nodeType": "YulTypedName", + "src": "6283:4:23", + "type": "" + } + ], + "src": "6118:335:23" + }, + { + "body": { + "nativeSrc": "6559:76:23", + "nodeType": "YulBlock", + "src": "6559:76:23", + "statements": [ + { + "nativeSrc": "6569:26:23", + "nodeType": "YulAssignment", + "src": "6569:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6581:9:23", + "nodeType": "YulIdentifier", + "src": "6581:9:23" + }, + { + "kind": "number", + "nativeSrc": "6592:2:23", + "nodeType": "YulLiteral", + "src": "6592:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6577:3:23", + "nodeType": "YulIdentifier", + "src": "6577:3:23" + }, + "nativeSrc": "6577:18:23", + "nodeType": "YulFunctionCall", + "src": "6577:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6569:4:23", + "nodeType": "YulIdentifier", + "src": "6569:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6611:9:23", + "nodeType": "YulIdentifier", + "src": "6611:9:23" + }, + { + "name": "value0", + "nativeSrc": "6622:6:23", + "nodeType": "YulIdentifier", + "src": "6622:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6604:6:23", + "nodeType": "YulIdentifier", + "src": "6604:6:23" + }, + "nativeSrc": "6604:25:23", + "nodeType": "YulFunctionCall", + "src": "6604:25:23" + }, + "nativeSrc": "6604:25:23", + "nodeType": "YulExpressionStatement", + "src": "6604:25:23" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nativeSrc": "6458:177:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6528:9:23", + "nodeType": "YulTypedName", + "src": "6528:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "6539:6:23", + "nodeType": "YulTypedName", + "src": "6539:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6550:4:23", + "nodeType": "YulTypedName", + "src": "6550:4:23", + "type": "" + } + ], + "src": "6458:177:23" + }, + { + "body": { + "nativeSrc": "6672:95:23", + "nodeType": "YulBlock", + "src": "6672:95:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6689:1:23", + "nodeType": "YulLiteral", + "src": "6689:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6696:3:23", + "nodeType": "YulLiteral", + "src": "6696:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "6701:10:23", + "nodeType": "YulLiteral", + "src": "6701:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "6692:3:23", + "nodeType": "YulIdentifier", + "src": "6692:3:23" + }, + "nativeSrc": "6692:20:23", + "nodeType": "YulFunctionCall", + "src": "6692:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6682:6:23", + "nodeType": "YulIdentifier", + "src": "6682:6:23" + }, + "nativeSrc": "6682:31:23", + "nodeType": "YulFunctionCall", + "src": "6682:31:23" + }, + "nativeSrc": "6682:31:23", + "nodeType": "YulExpressionStatement", + "src": "6682:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6729:1:23", + "nodeType": "YulLiteral", + "src": "6729:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "6732:4:23", + "nodeType": "YulLiteral", + "src": "6732:4:23", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6722:6:23", + "nodeType": "YulIdentifier", + "src": "6722:6:23" + }, + "nativeSrc": "6722:15:23", + "nodeType": "YulFunctionCall", + "src": "6722:15:23" + }, + "nativeSrc": "6722:15:23", + "nodeType": "YulExpressionStatement", + "src": "6722:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6753:1:23", + "nodeType": "YulLiteral", + "src": "6753:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "6756:4:23", + "nodeType": "YulLiteral", + "src": "6756:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "6746:6:23", + "nodeType": "YulIdentifier", + "src": "6746:6:23" + }, + "nativeSrc": "6746:15:23", + "nodeType": "YulFunctionCall", + "src": "6746:15:23" + }, + "nativeSrc": "6746:15:23", + "nodeType": "YulExpressionStatement", + "src": "6746:15:23" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "6640:127:23", + "nodeType": "YulFunctionDefinition", + "src": "6640:127:23" + }, + { + "body": { + "nativeSrc": "6963:14:23", + "nodeType": "YulBlock", + "src": "6963:14:23", + "statements": [ + { + "nativeSrc": "6965:10:23", + "nodeType": "YulAssignment", + "src": "6965:10:23", + "value": { + "name": "pos", + "nativeSrc": "6972:3:23", + "nodeType": "YulIdentifier", + "src": "6972:3:23" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "6965:3:23", + "nodeType": "YulIdentifier", + "src": "6965:3:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "6772:205:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "6947:3:23", + "nodeType": "YulTypedName", + "src": "6947:3:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "6955:3:23", + "nodeType": "YulTypedName", + "src": "6955:3:23", + "type": "" + } + ], + "src": "6772:205:23" + }, + { + "body": { + "nativeSrc": "7156:169:23", + "nodeType": "YulBlock", + "src": "7156:169:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7173:9:23", + "nodeType": "YulIdentifier", + "src": "7173:9:23" + }, + { + "kind": "number", + "nativeSrc": "7184:2:23", + "nodeType": "YulLiteral", + "src": "7184:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7166:6:23", + "nodeType": "YulIdentifier", + "src": "7166:6:23" + }, + "nativeSrc": "7166:21:23", + "nodeType": "YulFunctionCall", + "src": "7166:21:23" + }, + "nativeSrc": "7166:21:23", + "nodeType": "YulExpressionStatement", + "src": "7166:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7207:9:23", + "nodeType": "YulIdentifier", + "src": "7207:9:23" + }, + { + "kind": "number", + "nativeSrc": "7218:2:23", + "nodeType": "YulLiteral", + "src": "7218:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7203:3:23", + "nodeType": "YulIdentifier", + "src": "7203:3:23" + }, + "nativeSrc": "7203:18:23", + "nodeType": "YulFunctionCall", + "src": "7203:18:23" + }, + { + "kind": "number", + "nativeSrc": "7223:2:23", + "nodeType": "YulLiteral", + "src": "7223:2:23", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7196:6:23", + "nodeType": "YulIdentifier", + "src": "7196:6:23" + }, + "nativeSrc": "7196:30:23", + "nodeType": "YulFunctionCall", + "src": "7196:30:23" + }, + "nativeSrc": "7196:30:23", + "nodeType": "YulExpressionStatement", + "src": "7196:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7246:9:23", + "nodeType": "YulIdentifier", + "src": "7246:9:23" + }, + { + "kind": "number", + "nativeSrc": "7257:2:23", + "nodeType": "YulLiteral", + "src": "7257:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7242:3:23", + "nodeType": "YulIdentifier", + "src": "7242:3:23" + }, + "nativeSrc": "7242:18:23", + "nodeType": "YulFunctionCall", + "src": "7242:18:23" + }, + { + "hexValue": "455448207472616e73666572206661696c6564", + "kind": "string", + "nativeSrc": "7262:21:23", + "nodeType": "YulLiteral", + "src": "7262:21:23", + "type": "", + "value": "ETH transfer failed" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7235:6:23", + "nodeType": "YulIdentifier", + "src": "7235:6:23" + }, + "nativeSrc": "7235:49:23", + "nodeType": "YulFunctionCall", + "src": "7235:49:23" + }, + "nativeSrc": "7235:49:23", + "nodeType": "YulExpressionStatement", + "src": "7235:49:23" + }, + { + "nativeSrc": "7293:26:23", + "nodeType": "YulAssignment", + "src": "7293:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7305:9:23", + "nodeType": "YulIdentifier", + "src": "7305:9:23" + }, + { + "kind": "number", + "nativeSrc": "7316:2:23", + "nodeType": "YulLiteral", + "src": "7316:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7301:3:23", + "nodeType": "YulIdentifier", + "src": "7301:3:23" + }, + "nativeSrc": "7301:18:23", + "nodeType": "YulFunctionCall", + "src": "7301:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "7293:4:23", + "nodeType": "YulIdentifier", + "src": "7293:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "6982:343:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "7133:9:23", + "nodeType": "YulTypedName", + "src": "7133:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "7147:4:23", + "nodeType": "YulTypedName", + "src": "7147:4:23", + "type": "" + } + ], + "src": "6982:343:23" + }, + { + "body": { + "nativeSrc": "7655:504:23", + "nodeType": "YulBlock", + "src": "7655:504:23", + "statements": [ + { + "nativeSrc": "7665:27:23", + "nodeType": "YulAssignment", + "src": "7665:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7677:9:23", + "nodeType": "YulIdentifier", + "src": "7677:9:23" + }, + { + "kind": "number", + "nativeSrc": "7688:3:23", + "nodeType": "YulLiteral", + "src": "7688:3:23", + "type": "", + "value": "288" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7673:3:23", + "nodeType": "YulIdentifier", + "src": "7673:3:23" + }, + "nativeSrc": "7673:19:23", + "nodeType": "YulFunctionCall", + "src": "7673:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "7665:4:23", + "nodeType": "YulIdentifier", + "src": "7665:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7708:9:23", + "nodeType": "YulIdentifier", + "src": "7708:9:23" + }, + { + "name": "value0", + "nativeSrc": "7719:6:23", + "nodeType": "YulIdentifier", + "src": "7719:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7701:6:23", + "nodeType": "YulIdentifier", + "src": "7701:6:23" + }, + "nativeSrc": "7701:25:23", + "nodeType": "YulFunctionCall", + "src": "7701:25:23" + }, + "nativeSrc": "7701:25:23", + "nodeType": "YulExpressionStatement", + "src": "7701:25:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7746:9:23", + "nodeType": "YulIdentifier", + "src": "7746:9:23" + }, + { + "kind": "number", + "nativeSrc": "7757:2:23", + "nodeType": "YulLiteral", + "src": "7757:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7742:3:23", + "nodeType": "YulIdentifier", + "src": "7742:3:23" + }, + "nativeSrc": "7742:18:23", + "nodeType": "YulFunctionCall", + "src": "7742:18:23" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "7766:6:23", + "nodeType": "YulIdentifier", + "src": "7766:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7782:3:23", + "nodeType": "YulLiteral", + "src": "7782:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "7787:1:23", + "nodeType": "YulLiteral", + "src": "7787:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7778:3:23", + "nodeType": "YulIdentifier", + "src": "7778:3:23" + }, + "nativeSrc": "7778:11:23", + "nodeType": "YulFunctionCall", + "src": "7778:11:23" + }, + { + "kind": "number", + "nativeSrc": "7791:1:23", + "nodeType": "YulLiteral", + "src": "7791:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7774:3:23", + "nodeType": "YulIdentifier", + "src": "7774:3:23" + }, + "nativeSrc": "7774:19:23", + "nodeType": "YulFunctionCall", + "src": "7774:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7762:3:23", + "nodeType": "YulIdentifier", + "src": "7762:3:23" + }, + "nativeSrc": "7762:32:23", + "nodeType": "YulFunctionCall", + "src": "7762:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7735:6:23", + "nodeType": "YulIdentifier", + "src": "7735:6:23" + }, + "nativeSrc": "7735:60:23", + "nodeType": "YulFunctionCall", + "src": "7735:60:23" + }, + "nativeSrc": "7735:60:23", + "nodeType": "YulExpressionStatement", + "src": "7735:60:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7815:9:23", + "nodeType": "YulIdentifier", + "src": "7815:9:23" + }, + { + "kind": "number", + "nativeSrc": "7826:2:23", + "nodeType": "YulLiteral", + "src": "7826:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7811:3:23", + "nodeType": "YulIdentifier", + "src": "7811:3:23" + }, + "nativeSrc": "7811:18:23", + "nodeType": "YulFunctionCall", + "src": "7811:18:23" + }, + { + "arguments": [ + { + "name": "value2", + "nativeSrc": "7835:6:23", + "nodeType": "YulIdentifier", + "src": "7835:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7851:3:23", + "nodeType": "YulLiteral", + "src": "7851:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "7856:1:23", + "nodeType": "YulLiteral", + "src": "7856:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7847:3:23", + "nodeType": "YulIdentifier", + "src": "7847:3:23" + }, + "nativeSrc": "7847:11:23", + "nodeType": "YulFunctionCall", + "src": "7847:11:23" + }, + { + "kind": "number", + "nativeSrc": "7860:1:23", + "nodeType": "YulLiteral", + "src": "7860:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7843:3:23", + "nodeType": "YulIdentifier", + "src": "7843:3:23" + }, + "nativeSrc": "7843:19:23", + "nodeType": "YulFunctionCall", + "src": "7843:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7831:3:23", + "nodeType": "YulIdentifier", + "src": "7831:3:23" + }, + "nativeSrc": "7831:32:23", + "nodeType": "YulFunctionCall", + "src": "7831:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7804:6:23", + "nodeType": "YulIdentifier", + "src": "7804:6:23" + }, + "nativeSrc": "7804:60:23", + "nodeType": "YulFunctionCall", + "src": "7804:60:23" + }, + "nativeSrc": "7804:60:23", + "nodeType": "YulExpressionStatement", + "src": "7804:60:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7884:9:23", + "nodeType": "YulIdentifier", + "src": "7884:9:23" + }, + { + "kind": "number", + "nativeSrc": "7895:2:23", + "nodeType": "YulLiteral", + "src": "7895:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7880:3:23", + "nodeType": "YulIdentifier", + "src": "7880:3:23" + }, + "nativeSrc": "7880:18:23", + "nodeType": "YulFunctionCall", + "src": "7880:18:23" + }, + { + "arguments": [ + { + "name": "value3", + "nativeSrc": "7904:6:23", + "nodeType": "YulIdentifier", + "src": "7904:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7920:3:23", + "nodeType": "YulLiteral", + "src": "7920:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "7925:1:23", + "nodeType": "YulLiteral", + "src": "7925:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7916:3:23", + "nodeType": "YulIdentifier", + "src": "7916:3:23" + }, + "nativeSrc": "7916:11:23", + "nodeType": "YulFunctionCall", + "src": "7916:11:23" + }, + { + "kind": "number", + "nativeSrc": "7929:1:23", + "nodeType": "YulLiteral", + "src": "7929:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7912:3:23", + "nodeType": "YulIdentifier", + "src": "7912:3:23" + }, + "nativeSrc": "7912:19:23", + "nodeType": "YulFunctionCall", + "src": "7912:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7900:3:23", + "nodeType": "YulIdentifier", + "src": "7900:3:23" + }, + "nativeSrc": "7900:32:23", + "nodeType": "YulFunctionCall", + "src": "7900:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7873:6:23", + "nodeType": "YulIdentifier", + "src": "7873:6:23" + }, + "nativeSrc": "7873:60:23", + "nodeType": "YulFunctionCall", + "src": "7873:60:23" + }, + "nativeSrc": "7873:60:23", + "nodeType": "YulExpressionStatement", + "src": "7873:60:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7953:9:23", + "nodeType": "YulIdentifier", + "src": "7953:9:23" + }, + { + "kind": "number", + "nativeSrc": "7964:3:23", + "nodeType": "YulLiteral", + "src": "7964:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7949:3:23", + "nodeType": "YulIdentifier", + "src": "7949:3:23" + }, + "nativeSrc": "7949:19:23", + "nodeType": "YulFunctionCall", + "src": "7949:19:23" + }, + { + "name": "value4", + "nativeSrc": "7970:6:23", + "nodeType": "YulIdentifier", + "src": "7970:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7942:6:23", + "nodeType": "YulIdentifier", + "src": "7942:6:23" + }, + "nativeSrc": "7942:35:23", + "nodeType": "YulFunctionCall", + "src": "7942:35:23" + }, + "nativeSrc": "7942:35:23", + "nodeType": "YulExpressionStatement", + "src": "7942:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7997:9:23", + "nodeType": "YulIdentifier", + "src": "7997:9:23" + }, + { + "kind": "number", + "nativeSrc": "8008:3:23", + "nodeType": "YulLiteral", + "src": "8008:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7993:3:23", + "nodeType": "YulIdentifier", + "src": "7993:3:23" + }, + "nativeSrc": "7993:19:23", + "nodeType": "YulFunctionCall", + "src": "7993:19:23" + }, + { + "name": "value5", + "nativeSrc": "8014:6:23", + "nodeType": "YulIdentifier", + "src": "8014:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7986:6:23", + "nodeType": "YulIdentifier", + "src": "7986:6:23" + }, + "nativeSrc": "7986:35:23", + "nodeType": "YulFunctionCall", + "src": "7986:35:23" + }, + "nativeSrc": "7986:35:23", + "nodeType": "YulExpressionStatement", + "src": "7986:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8041:9:23", + "nodeType": "YulIdentifier", + "src": "8041:9:23" + }, + { + "kind": "number", + "nativeSrc": "8052:3:23", + "nodeType": "YulLiteral", + "src": "8052:3:23", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8037:3:23", + "nodeType": "YulIdentifier", + "src": "8037:3:23" + }, + "nativeSrc": "8037:19:23", + "nodeType": "YulFunctionCall", + "src": "8037:19:23" + }, + { + "name": "value6", + "nativeSrc": "8058:6:23", + "nodeType": "YulIdentifier", + "src": "8058:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8030:6:23", + "nodeType": "YulIdentifier", + "src": "8030:6:23" + }, + "nativeSrc": "8030:35:23", + "nodeType": "YulFunctionCall", + "src": "8030:35:23" + }, + "nativeSrc": "8030:35:23", + "nodeType": "YulExpressionStatement", + "src": "8030:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8085:9:23", + "nodeType": "YulIdentifier", + "src": "8085:9:23" + }, + { + "kind": "number", + "nativeSrc": "8096:3:23", + "nodeType": "YulLiteral", + "src": "8096:3:23", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8081:3:23", + "nodeType": "YulIdentifier", + "src": "8081:3:23" + }, + "nativeSrc": "8081:19:23", + "nodeType": "YulFunctionCall", + "src": "8081:19:23" + }, + { + "name": "value7", + "nativeSrc": "8102:6:23", + "nodeType": "YulIdentifier", + "src": "8102:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8074:6:23", + "nodeType": "YulIdentifier", + "src": "8074:6:23" + }, + "nativeSrc": "8074:35:23", + "nodeType": "YulFunctionCall", + "src": "8074:35:23" + }, + "nativeSrc": "8074:35:23", + "nodeType": "YulExpressionStatement", + "src": "8074:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8129:9:23", + "nodeType": "YulIdentifier", + "src": "8129:9:23" + }, + { + "kind": "number", + "nativeSrc": "8140:3:23", + "nodeType": "YulLiteral", + "src": "8140:3:23", + "type": "", + "value": "256" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8125:3:23", + "nodeType": "YulIdentifier", + "src": "8125:3:23" + }, + "nativeSrc": "8125:19:23", + "nodeType": "YulFunctionCall", + "src": "8125:19:23" + }, + { + "name": "value8", + "nativeSrc": "8146:6:23", + "nodeType": "YulIdentifier", + "src": "8146:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8118:6:23", + "nodeType": "YulIdentifier", + "src": "8118:6:23" + }, + "nativeSrc": "8118:35:23", + "nodeType": "YulFunctionCall", + "src": "8118:35:23" + }, + "nativeSrc": "8118:35:23", + "nodeType": "YulExpressionStatement", + "src": "8118:35:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__to_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__fromStack_reversed", + "nativeSrc": "7330:829:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "7560:9:23", + "nodeType": "YulTypedName", + "src": "7560:9:23", + "type": "" + }, + { + "name": "value8", + "nativeSrc": "7571:6:23", + "nodeType": "YulTypedName", + "src": "7571:6:23", + "type": "" + }, + { + "name": "value7", + "nativeSrc": "7579:6:23", + "nodeType": "YulTypedName", + "src": "7579:6:23", + "type": "" + }, + { + "name": "value6", + "nativeSrc": "7587:6:23", + "nodeType": "YulTypedName", + "src": "7587:6:23", + "type": "" + }, + { + "name": "value5", + "nativeSrc": "7595:6:23", + "nodeType": "YulTypedName", + "src": "7595:6:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "7603:6:23", + "nodeType": "YulTypedName", + "src": "7603:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "7611:6:23", + "nodeType": "YulTypedName", + "src": "7611:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "7619:6:23", + "nodeType": "YulTypedName", + "src": "7619:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "7627:6:23", + "nodeType": "YulTypedName", + "src": "7627:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "7635:6:23", + "nodeType": "YulTypedName", + "src": "7635:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "7646:4:23", + "nodeType": "YulTypedName", + "src": "7646:4:23", + "type": "" + } + ], + "src": "7330:829:23" + }, + { + "body": { + "nativeSrc": "8429:401:23", + "nodeType": "YulBlock", + "src": "8429:401:23", + "statements": [ + { + "nativeSrc": "8439:27:23", + "nodeType": "YulAssignment", + "src": "8439:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8451:9:23", + "nodeType": "YulIdentifier", + "src": "8451:9:23" + }, + { + "kind": "number", + "nativeSrc": "8462:3:23", + "nodeType": "YulLiteral", + "src": "8462:3:23", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8447:3:23", + "nodeType": "YulIdentifier", + "src": "8447:3:23" + }, + "nativeSrc": "8447:19:23", + "nodeType": "YulFunctionCall", + "src": "8447:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "8439:4:23", + "nodeType": "YulIdentifier", + "src": "8439:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8482:9:23", + "nodeType": "YulIdentifier", + "src": "8482:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "8497:6:23", + "nodeType": "YulIdentifier", + "src": "8497:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8513:3:23", + "nodeType": "YulLiteral", + "src": "8513:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "8518:1:23", + "nodeType": "YulLiteral", + "src": "8518:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "8509:3:23", + "nodeType": "YulIdentifier", + "src": "8509:3:23" + }, + "nativeSrc": "8509:11:23", + "nodeType": "YulFunctionCall", + "src": "8509:11:23" + }, + { + "kind": "number", + "nativeSrc": "8522:1:23", + "nodeType": "YulLiteral", + "src": "8522:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8505:3:23", + "nodeType": "YulIdentifier", + "src": "8505:3:23" + }, + "nativeSrc": "8505:19:23", + "nodeType": "YulFunctionCall", + "src": "8505:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8493:3:23", + "nodeType": "YulIdentifier", + "src": "8493:3:23" + }, + "nativeSrc": "8493:32:23", + "nodeType": "YulFunctionCall", + "src": "8493:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8475:6:23", + "nodeType": "YulIdentifier", + "src": "8475:6:23" + }, + "nativeSrc": "8475:51:23", + "nodeType": "YulFunctionCall", + "src": "8475:51:23" + }, + "nativeSrc": "8475:51:23", + "nodeType": "YulExpressionStatement", + "src": "8475:51:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8546:9:23", + "nodeType": "YulIdentifier", + "src": "8546:9:23" + }, + { + "kind": "number", + "nativeSrc": "8557:2:23", + "nodeType": "YulLiteral", + "src": "8557:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8542:3:23", + "nodeType": "YulIdentifier", + "src": "8542:3:23" + }, + "nativeSrc": "8542:18:23", + "nodeType": "YulFunctionCall", + "src": "8542:18:23" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "8566:6:23", + "nodeType": "YulIdentifier", + "src": "8566:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8582:3:23", + "nodeType": "YulLiteral", + "src": "8582:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "8587:1:23", + "nodeType": "YulLiteral", + "src": "8587:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "8578:3:23", + "nodeType": "YulIdentifier", + "src": "8578:3:23" + }, + "nativeSrc": "8578:11:23", + "nodeType": "YulFunctionCall", + "src": "8578:11:23" + }, + { + "kind": "number", + "nativeSrc": "8591:1:23", + "nodeType": "YulLiteral", + "src": "8591:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8574:3:23", + "nodeType": "YulIdentifier", + "src": "8574:3:23" + }, + "nativeSrc": "8574:19:23", + "nodeType": "YulFunctionCall", + "src": "8574:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8562:3:23", + "nodeType": "YulIdentifier", + "src": "8562:3:23" + }, + "nativeSrc": "8562:32:23", + "nodeType": "YulFunctionCall", + "src": "8562:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8535:6:23", + "nodeType": "YulIdentifier", + "src": "8535:6:23" + }, + "nativeSrc": "8535:60:23", + "nodeType": "YulFunctionCall", + "src": "8535:60:23" + }, + "nativeSrc": "8535:60:23", + "nodeType": "YulExpressionStatement", + "src": "8535:60:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8615:9:23", + "nodeType": "YulIdentifier", + "src": "8615:9:23" + }, + { + "kind": "number", + "nativeSrc": "8626:2:23", + "nodeType": "YulLiteral", + "src": "8626:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8611:3:23", + "nodeType": "YulIdentifier", + "src": "8611:3:23" + }, + "nativeSrc": "8611:18:23", + "nodeType": "YulFunctionCall", + "src": "8611:18:23" + }, + { + "name": "value2", + "nativeSrc": "8631:6:23", + "nodeType": "YulIdentifier", + "src": "8631:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8604:6:23", + "nodeType": "YulIdentifier", + "src": "8604:6:23" + }, + "nativeSrc": "8604:34:23", + "nodeType": "YulFunctionCall", + "src": "8604:34:23" + }, + "nativeSrc": "8604:34:23", + "nodeType": "YulExpressionStatement", + "src": "8604:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8658:9:23", + "nodeType": "YulIdentifier", + "src": "8658:9:23" + }, + { + "kind": "number", + "nativeSrc": "8669:2:23", + "nodeType": "YulLiteral", + "src": "8669:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8654:3:23", + "nodeType": "YulIdentifier", + "src": "8654:3:23" + }, + "nativeSrc": "8654:18:23", + "nodeType": "YulFunctionCall", + "src": "8654:18:23" + }, + { + "name": "value3", + "nativeSrc": "8674:6:23", + "nodeType": "YulIdentifier", + "src": "8674:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8647:6:23", + "nodeType": "YulIdentifier", + "src": "8647:6:23" + }, + "nativeSrc": "8647:34:23", + "nodeType": "YulFunctionCall", + "src": "8647:34:23" + }, + "nativeSrc": "8647:34:23", + "nodeType": "YulExpressionStatement", + "src": "8647:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8701:9:23", + "nodeType": "YulIdentifier", + "src": "8701:9:23" + }, + { + "kind": "number", + "nativeSrc": "8712:3:23", + "nodeType": "YulLiteral", + "src": "8712:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8697:3:23", + "nodeType": "YulIdentifier", + "src": "8697:3:23" + }, + "nativeSrc": "8697:19:23", + "nodeType": "YulFunctionCall", + "src": "8697:19:23" + }, + { + "arguments": [ + { + "name": "value4", + "nativeSrc": "8722:6:23", + "nodeType": "YulIdentifier", + "src": "8722:6:23" + }, + { + "kind": "number", + "nativeSrc": "8730:4:23", + "nodeType": "YulLiteral", + "src": "8730:4:23", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8718:3:23", + "nodeType": "YulIdentifier", + "src": "8718:3:23" + }, + "nativeSrc": "8718:17:23", + "nodeType": "YulFunctionCall", + "src": "8718:17:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8690:6:23", + "nodeType": "YulIdentifier", + "src": "8690:6:23" + }, + "nativeSrc": "8690:46:23", + "nodeType": "YulFunctionCall", + "src": "8690:46:23" + }, + "nativeSrc": "8690:46:23", + "nodeType": "YulExpressionStatement", + "src": "8690:46:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8756:9:23", + "nodeType": "YulIdentifier", + "src": "8756:9:23" + }, + { + "kind": "number", + "nativeSrc": "8767:3:23", + "nodeType": "YulLiteral", + "src": "8767:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8752:3:23", + "nodeType": "YulIdentifier", + "src": "8752:3:23" + }, + "nativeSrc": "8752:19:23", + "nodeType": "YulFunctionCall", + "src": "8752:19:23" + }, + { + "name": "value5", + "nativeSrc": "8773:6:23", + "nodeType": "YulIdentifier", + "src": "8773:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8745:6:23", + "nodeType": "YulIdentifier", + "src": "8745:6:23" + }, + "nativeSrc": "8745:35:23", + "nodeType": "YulFunctionCall", + "src": "8745:35:23" + }, + "nativeSrc": "8745:35:23", + "nodeType": "YulExpressionStatement", + "src": "8745:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8800:9:23", + "nodeType": "YulIdentifier", + "src": "8800:9:23" + }, + { + "kind": "number", + "nativeSrc": "8811:3:23", + "nodeType": "YulLiteral", + "src": "8811:3:23", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8796:3:23", + "nodeType": "YulIdentifier", + "src": "8796:3:23" + }, + "nativeSrc": "8796:19:23", + "nodeType": "YulFunctionCall", + "src": "8796:19:23" + }, + { + "name": "value6", + "nativeSrc": "8817:6:23", + "nodeType": "YulIdentifier", + "src": "8817:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8789:6:23", + "nodeType": "YulIdentifier", + "src": "8789:6:23" + }, + "nativeSrc": "8789:35:23", + "nodeType": "YulFunctionCall", + "src": "8789:35:23" + }, + "nativeSrc": "8789:35:23", + "nodeType": "YulExpressionStatement", + "src": "8789:35:23" + } + ] + }, + "name": "abi_encode_tuple_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__to_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__fromStack_reversed", + "nativeSrc": "8164:666:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "8350:9:23", + "nodeType": "YulTypedName", + "src": "8350:9:23", + "type": "" + }, + { + "name": "value6", + "nativeSrc": "8361:6:23", + "nodeType": "YulTypedName", + "src": "8361:6:23", + "type": "" + }, + { + "name": "value5", + "nativeSrc": "8369:6:23", + "nodeType": "YulTypedName", + "src": "8369:6:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "8377:6:23", + "nodeType": "YulTypedName", + "src": "8377:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "8385:6:23", + "nodeType": "YulTypedName", + "src": "8385:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "8393:6:23", + "nodeType": "YulTypedName", + "src": "8393:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "8401:6:23", + "nodeType": "YulTypedName", + "src": "8401:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "8409:6:23", + "nodeType": "YulTypedName", + "src": "8409:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "8420:4:23", + "nodeType": "YulTypedName", + "src": "8420:4:23", + "type": "" + } + ], + "src": "8164:666:23" + }, + { + "body": { + "nativeSrc": "8964:171:23", + "nodeType": "YulBlock", + "src": "8964:171:23", + "statements": [ + { + "nativeSrc": "8974:26:23", + "nodeType": "YulAssignment", + "src": "8974:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8986:9:23", + "nodeType": "YulIdentifier", + "src": "8986:9:23" + }, + { + "kind": "number", + "nativeSrc": "8997:2:23", + "nodeType": "YulLiteral", + "src": "8997:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8982:3:23", + "nodeType": "YulIdentifier", + "src": "8982:3:23" + }, + "nativeSrc": "8982:18:23", + "nodeType": "YulFunctionCall", + "src": "8982:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "8974:4:23", + "nodeType": "YulIdentifier", + "src": "8974:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9016:9:23", + "nodeType": "YulIdentifier", + "src": "9016:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9031:6:23", + "nodeType": "YulIdentifier", + "src": "9031:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9047:3:23", + "nodeType": "YulLiteral", + "src": "9047:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "9052:1:23", + "nodeType": "YulLiteral", + "src": "9052:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9043:3:23", + "nodeType": "YulIdentifier", + "src": "9043:3:23" + }, + "nativeSrc": "9043:11:23", + "nodeType": "YulFunctionCall", + "src": "9043:11:23" + }, + { + "kind": "number", + "nativeSrc": "9056:1:23", + "nodeType": "YulLiteral", + "src": "9056:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9039:3:23", + "nodeType": "YulIdentifier", + "src": "9039:3:23" + }, + "nativeSrc": "9039:19:23", + "nodeType": "YulFunctionCall", + "src": "9039:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9027:3:23", + "nodeType": "YulIdentifier", + "src": "9027:3:23" + }, + "nativeSrc": "9027:32:23", + "nodeType": "YulFunctionCall", + "src": "9027:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9009:6:23", + "nodeType": "YulIdentifier", + "src": "9009:6:23" + }, + "nativeSrc": "9009:51:23", + "nodeType": "YulFunctionCall", + "src": "9009:51:23" + }, + "nativeSrc": "9009:51:23", + "nodeType": "YulExpressionStatement", + "src": "9009:51:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9080:9:23", + "nodeType": "YulIdentifier", + "src": "9080:9:23" + }, + { + "kind": "number", + "nativeSrc": "9091:2:23", + "nodeType": "YulLiteral", + "src": "9091:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9076:3:23", + "nodeType": "YulIdentifier", + "src": "9076:3:23" + }, + "nativeSrc": "9076:18:23", + "nodeType": "YulFunctionCall", + "src": "9076:18:23" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "9100:6:23", + "nodeType": "YulIdentifier", + "src": "9100:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9116:3:23", + "nodeType": "YulLiteral", + "src": "9116:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "9121:1:23", + "nodeType": "YulLiteral", + "src": "9121:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9112:3:23", + "nodeType": "YulIdentifier", + "src": "9112:3:23" + }, + "nativeSrc": "9112:11:23", + "nodeType": "YulFunctionCall", + "src": "9112:11:23" + }, + { + "kind": "number", + "nativeSrc": "9125:1:23", + "nodeType": "YulLiteral", + "src": "9125:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9108:3:23", + "nodeType": "YulIdentifier", + "src": "9108:3:23" + }, + "nativeSrc": "9108:19:23", + "nodeType": "YulFunctionCall", + "src": "9108:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9096:3:23", + "nodeType": "YulIdentifier", + "src": "9096:3:23" + }, + "nativeSrc": "9096:32:23", + "nodeType": "YulFunctionCall", + "src": "9096:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9069:6:23", + "nodeType": "YulIdentifier", + "src": "9069:6:23" + }, + "nativeSrc": "9069:60:23", + "nodeType": "YulFunctionCall", + "src": "9069:60:23" + }, + "nativeSrc": "9069:60:23", + "nodeType": "YulExpressionStatement", + "src": "9069:60:23" + } + ] + }, + "name": "abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed", + "nativeSrc": "8835:300:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "8925:9:23", + "nodeType": "YulTypedName", + "src": "8925:9:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "8936:6:23", + "nodeType": "YulTypedName", + "src": "8936:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "8944:6:23", + "nodeType": "YulTypedName", + "src": "8944:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "8955:4:23", + "nodeType": "YulTypedName", + "src": "8955:4:23", + "type": "" + } + ], + "src": "8835:300:23" + }, + { + "body": { + "nativeSrc": "9221:103:23", + "nodeType": "YulBlock", + "src": "9221:103:23", + "statements": [ + { + "body": { + "nativeSrc": "9267:16:23", + "nodeType": "YulBlock", + "src": "9267:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9276:1:23", + "nodeType": "YulLiteral", + "src": "9276:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "9279:1:23", + "nodeType": "YulLiteral", + "src": "9279:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9269:6:23", + "nodeType": "YulIdentifier", + "src": "9269:6:23" + }, + "nativeSrc": "9269:12:23", + "nodeType": "YulFunctionCall", + "src": "9269:12:23" + }, + "nativeSrc": "9269:12:23", + "nodeType": "YulExpressionStatement", + "src": "9269:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "9242:7:23", + "nodeType": "YulIdentifier", + "src": "9242:7:23" + }, + { + "name": "headStart", + "nativeSrc": "9251:9:23", + "nodeType": "YulIdentifier", + "src": "9251:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9238:3:23", + "nodeType": "YulIdentifier", + "src": "9238:3:23" + }, + "nativeSrc": "9238:23:23", + "nodeType": "YulFunctionCall", + "src": "9238:23:23" + }, + { + "kind": "number", + "nativeSrc": "9263:2:23", + "nodeType": "YulLiteral", + "src": "9263:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "9234:3:23", + "nodeType": "YulIdentifier", + "src": "9234:3:23" + }, + "nativeSrc": "9234:32:23", + "nodeType": "YulFunctionCall", + "src": "9234:32:23" + }, + "nativeSrc": "9231:52:23", + "nodeType": "YulIf", + "src": "9231:52:23" + }, + { + "nativeSrc": "9292:26:23", + "nodeType": "YulAssignment", + "src": "9292:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9308:9:23", + "nodeType": "YulIdentifier", + "src": "9308:9:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9302:5:23", + "nodeType": "YulIdentifier", + "src": "9302:5:23" + }, + "nativeSrc": "9302:16:23", + "nodeType": "YulFunctionCall", + "src": "9302:16:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "9292:6:23", + "nodeType": "YulIdentifier", + "src": "9292:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256_fromMemory", + "nativeSrc": "9140:184:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "9187:9:23", + "nodeType": "YulTypedName", + "src": "9187:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "9198:7:23", + "nodeType": "YulTypedName", + "src": "9198:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "9210:6:23", + "nodeType": "YulTypedName", + "src": "9210:6:23", + "type": "" + } + ], + "src": "9140:184:23" + }, + { + "body": { + "nativeSrc": "9503:230:23", + "nodeType": "YulBlock", + "src": "9503:230:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9520:9:23", + "nodeType": "YulIdentifier", + "src": "9520:9:23" + }, + { + "kind": "number", + "nativeSrc": "9531:2:23", + "nodeType": "YulLiteral", + "src": "9531:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9513:6:23", + "nodeType": "YulIdentifier", + "src": "9513:6:23" + }, + "nativeSrc": "9513:21:23", + "nodeType": "YulFunctionCall", + "src": "9513:21:23" + }, + "nativeSrc": "9513:21:23", + "nodeType": "YulExpressionStatement", + "src": "9513:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9554:9:23", + "nodeType": "YulIdentifier", + "src": "9554:9:23" + }, + { + "kind": "number", + "nativeSrc": "9565:2:23", + "nodeType": "YulLiteral", + "src": "9565:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9550:3:23", + "nodeType": "YulIdentifier", + "src": "9550:3:23" + }, + "nativeSrc": "9550:18:23", + "nodeType": "YulFunctionCall", + "src": "9550:18:23" + }, + { + "kind": "number", + "nativeSrc": "9570:2:23", + "nodeType": "YulLiteral", + "src": "9570:2:23", + "type": "", + "value": "40" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9543:6:23", + "nodeType": "YulIdentifier", + "src": "9543:6:23" + }, + "nativeSrc": "9543:30:23", + "nodeType": "YulFunctionCall", + "src": "9543:30:23" + }, + "nativeSrc": "9543:30:23", + "nodeType": "YulExpressionStatement", + "src": "9543:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9593:9:23", + "nodeType": "YulIdentifier", + "src": "9593:9:23" + }, + { + "kind": "number", + "nativeSrc": "9604:2:23", + "nodeType": "YulLiteral", + "src": "9604:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9589:3:23", + "nodeType": "YulIdentifier", + "src": "9589:3:23" + }, + "nativeSrc": "9589:18:23", + "nodeType": "YulFunctionCall", + "src": "9589:18:23" + }, + { + "hexValue": "5065726d6974206661696c656420616e6420696e73756666696369656e742061", + "kind": "string", + "nativeSrc": "9609:34:23", + "nodeType": "YulLiteral", + "src": "9609:34:23", + "type": "", + "value": "Permit failed and insufficient a" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9582:6:23", + "nodeType": "YulIdentifier", + "src": "9582:6:23" + }, + "nativeSrc": "9582:62:23", + "nodeType": "YulFunctionCall", + "src": "9582:62:23" + }, + "nativeSrc": "9582:62:23", + "nodeType": "YulExpressionStatement", + "src": "9582:62:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9664:9:23", + "nodeType": "YulIdentifier", + "src": "9664:9:23" + }, + { + "kind": "number", + "nativeSrc": "9675:2:23", + "nodeType": "YulLiteral", + "src": "9675:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9660:3:23", + "nodeType": "YulIdentifier", + "src": "9660:3:23" + }, + "nativeSrc": "9660:18:23", + "nodeType": "YulFunctionCall", + "src": "9660:18:23" + }, + { + "hexValue": "6c6c6f77616e6365", + "kind": "string", + "nativeSrc": "9680:10:23", + "nodeType": "YulLiteral", + "src": "9680:10:23", + "type": "", + "value": "llowance" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9653:6:23", + "nodeType": "YulIdentifier", + "src": "9653:6:23" + }, + "nativeSrc": "9653:38:23", + "nodeType": "YulFunctionCall", + "src": "9653:38:23" + }, + "nativeSrc": "9653:38:23", + "nodeType": "YulExpressionStatement", + "src": "9653:38:23" + }, + { + "nativeSrc": "9700:27:23", + "nodeType": "YulAssignment", + "src": "9700:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9712:9:23", + "nodeType": "YulIdentifier", + "src": "9712:9:23" + }, + { + "kind": "number", + "nativeSrc": "9723:3:23", + "nodeType": "YulLiteral", + "src": "9723:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9708:3:23", + "nodeType": "YulIdentifier", + "src": "9708:3:23" + }, + "nativeSrc": "9708:19:23", + "nodeType": "YulFunctionCall", + "src": "9708:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "9700:4:23", + "nodeType": "YulIdentifier", + "src": "9700:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "9329:404:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "9480:9:23", + "nodeType": "YulTypedName", + "src": "9480:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "9494:4:23", + "nodeType": "YulTypedName", + "src": "9494:4:23", + "type": "" + } + ], + "src": "9329:404:23" + }, + { + "body": { + "nativeSrc": "9875:164:23", + "nodeType": "YulBlock", + "src": "9875:164:23", + "statements": [ + { + "nativeSrc": "9885:27:23", + "nodeType": "YulVariableDeclaration", + "src": "9885:27:23", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9905:6:23", + "nodeType": "YulIdentifier", + "src": "9905:6:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9899:5:23", + "nodeType": "YulIdentifier", + "src": "9899:5:23" + }, + "nativeSrc": "9899:13:23", + "nodeType": "YulFunctionCall", + "src": "9899:13:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "9889:6:23", + "nodeType": "YulTypedName", + "src": "9889:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "9927:3:23", + "nodeType": "YulIdentifier", + "src": "9927:3:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9936:6:23", + "nodeType": "YulIdentifier", + "src": "9936:6:23" + }, + { + "kind": "number", + "nativeSrc": "9944:4:23", + "nodeType": "YulLiteral", + "src": "9944:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9932:3:23", + "nodeType": "YulIdentifier", + "src": "9932:3:23" + }, + "nativeSrc": "9932:17:23", + "nodeType": "YulFunctionCall", + "src": "9932:17:23" + }, + { + "name": "length", + "nativeSrc": "9951:6:23", + "nodeType": "YulIdentifier", + "src": "9951:6:23" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "9921:5:23", + "nodeType": "YulIdentifier", + "src": "9921:5:23" + }, + "nativeSrc": "9921:37:23", + "nodeType": "YulFunctionCall", + "src": "9921:37:23" + }, + "nativeSrc": "9921:37:23", + "nodeType": "YulExpressionStatement", + "src": "9921:37:23" + }, + { + "nativeSrc": "9967:26:23", + "nodeType": "YulVariableDeclaration", + "src": "9967:26:23", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "9981:3:23", + "nodeType": "YulIdentifier", + "src": "9981:3:23" + }, + { + "name": "length", + "nativeSrc": "9986:6:23", + "nodeType": "YulIdentifier", + "src": "9986:6:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9977:3:23", + "nodeType": "YulIdentifier", + "src": "9977:3:23" + }, + "nativeSrc": "9977:16:23", + "nodeType": "YulFunctionCall", + "src": "9977:16:23" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "9971:2:23", + "nodeType": "YulTypedName", + "src": "9971:2:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "10009:2:23", + "nodeType": "YulIdentifier", + "src": "10009:2:23" + }, + { + "kind": "number", + "nativeSrc": "10013:1:23", + "nodeType": "YulLiteral", + "src": "10013:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10002:6:23", + "nodeType": "YulIdentifier", + "src": "10002:6:23" + }, + "nativeSrc": "10002:13:23", + "nodeType": "YulFunctionCall", + "src": "10002:13:23" + }, + "nativeSrc": "10002:13:23", + "nodeType": "YulExpressionStatement", + "src": "10002:13:23" + }, + { + "nativeSrc": "10024:9:23", + "nodeType": "YulAssignment", + "src": "10024:9:23", + "value": { + "name": "_1", + "nativeSrc": "10031:2:23", + "nodeType": "YulIdentifier", + "src": "10031:2:23" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "10024:3:23", + "nodeType": "YulIdentifier", + "src": "10024:3:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "9738:301:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "9851:3:23", + "nodeType": "YulTypedName", + "src": "9851:3:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "9856:6:23", + "nodeType": "YulTypedName", + "src": "9856:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "9867:3:23", + "nodeType": "YulTypedName", + "src": "9867:3:23", + "type": "" + } + ], + "src": "9738:301:23" + }, + { + "body": { + "nativeSrc": "10225:217:23", + "nodeType": "YulBlock", + "src": "10225:217:23", + "statements": [ + { + "nativeSrc": "10235:27:23", + "nodeType": "YulAssignment", + "src": "10235:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10247:9:23", + "nodeType": "YulIdentifier", + "src": "10247:9:23" + }, + { + "kind": "number", + "nativeSrc": "10258:3:23", + "nodeType": "YulLiteral", + "src": "10258:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10243:3:23", + "nodeType": "YulIdentifier", + "src": "10243:3:23" + }, + "nativeSrc": "10243:19:23", + "nodeType": "YulFunctionCall", + "src": "10243:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "10235:4:23", + "nodeType": "YulIdentifier", + "src": "10235:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10278:9:23", + "nodeType": "YulIdentifier", + "src": "10278:9:23" + }, + { + "name": "value0", + "nativeSrc": "10289:6:23", + "nodeType": "YulIdentifier", + "src": "10289:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10271:6:23", + "nodeType": "YulIdentifier", + "src": "10271:6:23" + }, + "nativeSrc": "10271:25:23", + "nodeType": "YulFunctionCall", + "src": "10271:25:23" + }, + "nativeSrc": "10271:25:23", + "nodeType": "YulExpressionStatement", + "src": "10271:25:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10316:9:23", + "nodeType": "YulIdentifier", + "src": "10316:9:23" + }, + { + "kind": "number", + "nativeSrc": "10327:2:23", + "nodeType": "YulLiteral", + "src": "10327:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10312:3:23", + "nodeType": "YulIdentifier", + "src": "10312:3:23" + }, + "nativeSrc": "10312:18:23", + "nodeType": "YulFunctionCall", + "src": "10312:18:23" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "10336:6:23", + "nodeType": "YulIdentifier", + "src": "10336:6:23" + }, + { + "kind": "number", + "nativeSrc": "10344:4:23", + "nodeType": "YulLiteral", + "src": "10344:4:23", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10332:3:23", + "nodeType": "YulIdentifier", + "src": "10332:3:23" + }, + "nativeSrc": "10332:17:23", + "nodeType": "YulFunctionCall", + "src": "10332:17:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10305:6:23", + "nodeType": "YulIdentifier", + "src": "10305:6:23" + }, + "nativeSrc": "10305:45:23", + "nodeType": "YulFunctionCall", + "src": "10305:45:23" + }, + "nativeSrc": "10305:45:23", + "nodeType": "YulExpressionStatement", + "src": "10305:45:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10370:9:23", + "nodeType": "YulIdentifier", + "src": "10370:9:23" + }, + { + "kind": "number", + "nativeSrc": "10381:2:23", + "nodeType": "YulLiteral", + "src": "10381:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10366:3:23", + "nodeType": "YulIdentifier", + "src": "10366:3:23" + }, + "nativeSrc": "10366:18:23", + "nodeType": "YulFunctionCall", + "src": "10366:18:23" + }, + { + "name": "value2", + "nativeSrc": "10386:6:23", + "nodeType": "YulIdentifier", + "src": "10386:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10359:6:23", + "nodeType": "YulIdentifier", + "src": "10359:6:23" + }, + "nativeSrc": "10359:34:23", + "nodeType": "YulFunctionCall", + "src": "10359:34:23" + }, + "nativeSrc": "10359:34:23", + "nodeType": "YulExpressionStatement", + "src": "10359:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10413:9:23", + "nodeType": "YulIdentifier", + "src": "10413:9:23" + }, + { + "kind": "number", + "nativeSrc": "10424:2:23", + "nodeType": "YulLiteral", + "src": "10424:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10409:3:23", + "nodeType": "YulIdentifier", + "src": "10409:3:23" + }, + "nativeSrc": "10409:18:23", + "nodeType": "YulFunctionCall", + "src": "10409:18:23" + }, + { + "name": "value3", + "nativeSrc": "10429:6:23", + "nodeType": "YulIdentifier", + "src": "10429:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10402:6:23", + "nodeType": "YulIdentifier", + "src": "10402:6:23" + }, + "nativeSrc": "10402:34:23", + "nodeType": "YulFunctionCall", + "src": "10402:34:23" + }, + "nativeSrc": "10402:34:23", + "nodeType": "YulExpressionStatement", + "src": "10402:34:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed", + "nativeSrc": "10044:398:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "10170:9:23", + "nodeType": "YulTypedName", + "src": "10170:9:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "10181:6:23", + "nodeType": "YulTypedName", + "src": "10181:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "10189:6:23", + "nodeType": "YulTypedName", + "src": "10189:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "10197:6:23", + "nodeType": "YulTypedName", + "src": "10197:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "10205:6:23", + "nodeType": "YulTypedName", + "src": "10205:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "10216:4:23", + "nodeType": "YulTypedName", + "src": "10216:4:23", + "type": "" + } + ], + "src": "10044:398:23" + }, + { + "body": { + "nativeSrc": "10479:95:23", + "nodeType": "YulBlock", + "src": "10479:95:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10496:1:23", + "nodeType": "YulLiteral", + "src": "10496:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10503:3:23", + "nodeType": "YulLiteral", + "src": "10503:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "10508:10:23", + "nodeType": "YulLiteral", + "src": "10508:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "10499:3:23", + "nodeType": "YulIdentifier", + "src": "10499:3:23" + }, + "nativeSrc": "10499:20:23", + "nodeType": "YulFunctionCall", + "src": "10499:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10489:6:23", + "nodeType": "YulIdentifier", + "src": "10489:6:23" + }, + "nativeSrc": "10489:31:23", + "nodeType": "YulFunctionCall", + "src": "10489:31:23" + }, + "nativeSrc": "10489:31:23", + "nodeType": "YulExpressionStatement", + "src": "10489:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10536:1:23", + "nodeType": "YulLiteral", + "src": "10536:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "10539:4:23", + "nodeType": "YulLiteral", + "src": "10539:4:23", + "type": "", + "value": "0x21" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10529:6:23", + "nodeType": "YulIdentifier", + "src": "10529:6:23" + }, + "nativeSrc": "10529:15:23", + "nodeType": "YulFunctionCall", + "src": "10529:15:23" + }, + "nativeSrc": "10529:15:23", + "nodeType": "YulExpressionStatement", + "src": "10529:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10560:1:23", + "nodeType": "YulLiteral", + "src": "10560:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "10563:4:23", + "nodeType": "YulLiteral", + "src": "10563:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "10553:6:23", + "nodeType": "YulIdentifier", + "src": "10553:6:23" + }, + "nativeSrc": "10553:15:23", + "nodeType": "YulFunctionCall", + "src": "10553:15:23" + }, + "nativeSrc": "10553:15:23", + "nodeType": "YulExpressionStatement", + "src": "10553:15:23" + } + ] + }, + "name": "panic_error_0x21", + "nativeSrc": "10447:127:23", + "nodeType": "YulFunctionDefinition", + "src": "10447:127:23" + }, + { + "body": { + "nativeSrc": "10680:76:23", + "nodeType": "YulBlock", + "src": "10680:76:23", + "statements": [ + { + "nativeSrc": "10690:26:23", + "nodeType": "YulAssignment", + "src": "10690:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10702:9:23", + "nodeType": "YulIdentifier", + "src": "10702:9:23" + }, + { + "kind": "number", + "nativeSrc": "10713:2:23", + "nodeType": "YulLiteral", + "src": "10713:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10698:3:23", + "nodeType": "YulIdentifier", + "src": "10698:3:23" + }, + "nativeSrc": "10698:18:23", + "nodeType": "YulFunctionCall", + "src": "10698:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "10690:4:23", + "nodeType": "YulIdentifier", + "src": "10690:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10732:9:23", + "nodeType": "YulIdentifier", + "src": "10732:9:23" + }, + { + "name": "value0", + "nativeSrc": "10743:6:23", + "nodeType": "YulIdentifier", + "src": "10743:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10725:6:23", + "nodeType": "YulIdentifier", + "src": "10725:6:23" + }, + "nativeSrc": "10725:25:23", + "nodeType": "YulFunctionCall", + "src": "10725:25:23" + }, + "nativeSrc": "10725:25:23", + "nodeType": "YulExpressionStatement", + "src": "10725:25:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed", + "nativeSrc": "10579:177:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "10649:9:23", + "nodeType": "YulTypedName", + "src": "10649:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "10660:6:23", + "nodeType": "YulTypedName", + "src": "10660:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "10671:4:23", + "nodeType": "YulTypedName", + "src": "10671:4:23", + "type": "" + } + ], + "src": "10579:177:23" + }, + { + "body": { + "nativeSrc": "10816:325:23", + "nodeType": "YulBlock", + "src": "10816:325:23", + "statements": [ + { + "nativeSrc": "10826:22:23", + "nodeType": "YulAssignment", + "src": "10826:22:23", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10840:1:23", + "nodeType": "YulLiteral", + "src": "10840:1:23", + "type": "", + "value": "1" + }, + { + "name": "data", + "nativeSrc": "10843:4:23", + "nodeType": "YulIdentifier", + "src": "10843:4:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10836:3:23", + "nodeType": "YulIdentifier", + "src": "10836:3:23" + }, + "nativeSrc": "10836:12:23", + "nodeType": "YulFunctionCall", + "src": "10836:12:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "10826:6:23", + "nodeType": "YulIdentifier", + "src": "10826:6:23" + } + ] + }, + { + "nativeSrc": "10857:38:23", + "nodeType": "YulVariableDeclaration", + "src": "10857:38:23", + "value": { + "arguments": [ + { + "name": "data", + "nativeSrc": "10887:4:23", + "nodeType": "YulIdentifier", + "src": "10887:4:23" + }, + { + "kind": "number", + "nativeSrc": "10893:1:23", + "nodeType": "YulLiteral", + "src": "10893:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10883:3:23", + "nodeType": "YulIdentifier", + "src": "10883:3:23" + }, + "nativeSrc": "10883:12:23", + "nodeType": "YulFunctionCall", + "src": "10883:12:23" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "10861:18:23", + "nodeType": "YulTypedName", + "src": "10861:18:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "10934:31:23", + "nodeType": "YulBlock", + "src": "10934:31:23", + "statements": [ + { + "nativeSrc": "10936:27:23", + "nodeType": "YulAssignment", + "src": "10936:27:23", + "value": { + "arguments": [ + { + "name": "length", + "nativeSrc": "10950:6:23", + "nodeType": "YulIdentifier", + "src": "10950:6:23" + }, + { + "kind": "number", + "nativeSrc": "10958:4:23", + "nodeType": "YulLiteral", + "src": "10958:4:23", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10946:3:23", + "nodeType": "YulIdentifier", + "src": "10946:3:23" + }, + "nativeSrc": "10946:17:23", + "nodeType": "YulFunctionCall", + "src": "10946:17:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "10936:6:23", + "nodeType": "YulIdentifier", + "src": "10936:6:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "10914:18:23", + "nodeType": "YulIdentifier", + "src": "10914:18:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "10907:6:23", + "nodeType": "YulIdentifier", + "src": "10907:6:23" + }, + "nativeSrc": "10907:26:23", + "nodeType": "YulFunctionCall", + "src": "10907:26:23" + }, + "nativeSrc": "10904:61:23", + "nodeType": "YulIf", + "src": "10904:61:23" + }, + { + "body": { + "nativeSrc": "11024:111:23", + "nodeType": "YulBlock", + "src": "11024:111:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11045:1:23", + "nodeType": "YulLiteral", + "src": "11045:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11052:3:23", + "nodeType": "YulLiteral", + "src": "11052:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "11057:10:23", + "nodeType": "YulLiteral", + "src": "11057:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "11048:3:23", + "nodeType": "YulIdentifier", + "src": "11048:3:23" + }, + "nativeSrc": "11048:20:23", + "nodeType": "YulFunctionCall", + "src": "11048:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11038:6:23", + "nodeType": "YulIdentifier", + "src": "11038:6:23" + }, + "nativeSrc": "11038:31:23", + "nodeType": "YulFunctionCall", + "src": "11038:31:23" + }, + "nativeSrc": "11038:31:23", + "nodeType": "YulExpressionStatement", + "src": "11038:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11089:1:23", + "nodeType": "YulLiteral", + "src": "11089:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "11092:4:23", + "nodeType": "YulLiteral", + "src": "11092:4:23", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11082:6:23", + "nodeType": "YulIdentifier", + "src": "11082:6:23" + }, + "nativeSrc": "11082:15:23", + "nodeType": "YulFunctionCall", + "src": "11082:15:23" + }, + "nativeSrc": "11082:15:23", + "nodeType": "YulExpressionStatement", + "src": "11082:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11117:1:23", + "nodeType": "YulLiteral", + "src": "11117:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "11120:4:23", + "nodeType": "YulLiteral", + "src": "11120:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "11110:6:23", + "nodeType": "YulIdentifier", + "src": "11110:6:23" + }, + "nativeSrc": "11110:15:23", + "nodeType": "YulFunctionCall", + "src": "11110:15:23" + }, + "nativeSrc": "11110:15:23", + "nodeType": "YulExpressionStatement", + "src": "11110:15:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "10980:18:23", + "nodeType": "YulIdentifier", + "src": "10980:18:23" + }, + { + "arguments": [ + { + "name": "length", + "nativeSrc": "11003:6:23", + "nodeType": "YulIdentifier", + "src": "11003:6:23" + }, + { + "kind": "number", + "nativeSrc": "11011:2:23", + "nodeType": "YulLiteral", + "src": "11011:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "11000:2:23", + "nodeType": "YulIdentifier", + "src": "11000:2:23" + }, + "nativeSrc": "11000:14:23", + "nodeType": "YulFunctionCall", + "src": "11000:14:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "10977:2:23", + "nodeType": "YulIdentifier", + "src": "10977:2:23" + }, + "nativeSrc": "10977:38:23", + "nodeType": "YulFunctionCall", + "src": "10977:38:23" + }, + "nativeSrc": "10974:161:23", + "nodeType": "YulIf", + "src": "10974:161:23" + } + ] + }, + "name": "extract_byte_array_length", + "nativeSrc": "10761:380:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nativeSrc": "10796:4:23", + "nodeType": "YulTypedName", + "src": "10796:4:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nativeSrc": "10805:6:23", + "nodeType": "YulTypedName", + "src": "10805:6:23", + "type": "" + } + ], + "src": "10761:380:23" + }, + { + "body": { + "nativeSrc": "11359:276:23", + "nodeType": "YulBlock", + "src": "11359:276:23", + "statements": [ + { + "nativeSrc": "11369:27:23", + "nodeType": "YulAssignment", + "src": "11369:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11381:9:23", + "nodeType": "YulIdentifier", + "src": "11381:9:23" + }, + { + "kind": "number", + "nativeSrc": "11392:3:23", + "nodeType": "YulLiteral", + "src": "11392:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11377:3:23", + "nodeType": "YulIdentifier", + "src": "11377:3:23" + }, + "nativeSrc": "11377:19:23", + "nodeType": "YulFunctionCall", + "src": "11377:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "11369:4:23", + "nodeType": "YulIdentifier", + "src": "11369:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11412:9:23", + "nodeType": "YulIdentifier", + "src": "11412:9:23" + }, + { + "name": "value0", + "nativeSrc": "11423:6:23", + "nodeType": "YulIdentifier", + "src": "11423:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11405:6:23", + "nodeType": "YulIdentifier", + "src": "11405:6:23" + }, + "nativeSrc": "11405:25:23", + "nodeType": "YulFunctionCall", + "src": "11405:25:23" + }, + "nativeSrc": "11405:25:23", + "nodeType": "YulExpressionStatement", + "src": "11405:25:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11450:9:23", + "nodeType": "YulIdentifier", + "src": "11450:9:23" + }, + { + "kind": "number", + "nativeSrc": "11461:2:23", + "nodeType": "YulLiteral", + "src": "11461:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11446:3:23", + "nodeType": "YulIdentifier", + "src": "11446:3:23" + }, + "nativeSrc": "11446:18:23", + "nodeType": "YulFunctionCall", + "src": "11446:18:23" + }, + { + "name": "value1", + "nativeSrc": "11466:6:23", + "nodeType": "YulIdentifier", + "src": "11466:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11439:6:23", + "nodeType": "YulIdentifier", + "src": "11439:6:23" + }, + "nativeSrc": "11439:34:23", + "nodeType": "YulFunctionCall", + "src": "11439:34:23" + }, + "nativeSrc": "11439:34:23", + "nodeType": "YulExpressionStatement", + "src": "11439:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11493:9:23", + "nodeType": "YulIdentifier", + "src": "11493:9:23" + }, + { + "kind": "number", + "nativeSrc": "11504:2:23", + "nodeType": "YulLiteral", + "src": "11504:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11489:3:23", + "nodeType": "YulIdentifier", + "src": "11489:3:23" + }, + "nativeSrc": "11489:18:23", + "nodeType": "YulFunctionCall", + "src": "11489:18:23" + }, + { + "name": "value2", + "nativeSrc": "11509:6:23", + "nodeType": "YulIdentifier", + "src": "11509:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11482:6:23", + "nodeType": "YulIdentifier", + "src": "11482:6:23" + }, + "nativeSrc": "11482:34:23", + "nodeType": "YulFunctionCall", + "src": "11482:34:23" + }, + "nativeSrc": "11482:34:23", + "nodeType": "YulExpressionStatement", + "src": "11482:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11536:9:23", + "nodeType": "YulIdentifier", + "src": "11536:9:23" + }, + { + "kind": "number", + "nativeSrc": "11547:2:23", + "nodeType": "YulLiteral", + "src": "11547:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11532:3:23", + "nodeType": "YulIdentifier", + "src": "11532:3:23" + }, + "nativeSrc": "11532:18:23", + "nodeType": "YulFunctionCall", + "src": "11532:18:23" + }, + { + "name": "value3", + "nativeSrc": "11552:6:23", + "nodeType": "YulIdentifier", + "src": "11552:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11525:6:23", + "nodeType": "YulIdentifier", + "src": "11525:6:23" + }, + "nativeSrc": "11525:34:23", + "nodeType": "YulFunctionCall", + "src": "11525:34:23" + }, + "nativeSrc": "11525:34:23", + "nodeType": "YulExpressionStatement", + "src": "11525:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11579:9:23", + "nodeType": "YulIdentifier", + "src": "11579:9:23" + }, + { + "kind": "number", + "nativeSrc": "11590:3:23", + "nodeType": "YulLiteral", + "src": "11590:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11575:3:23", + "nodeType": "YulIdentifier", + "src": "11575:3:23" + }, + "nativeSrc": "11575:19:23", + "nodeType": "YulFunctionCall", + "src": "11575:19:23" + }, + { + "arguments": [ + { + "name": "value4", + "nativeSrc": "11600:6:23", + "nodeType": "YulIdentifier", + "src": "11600:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11616:3:23", + "nodeType": "YulLiteral", + "src": "11616:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "11621:1:23", + "nodeType": "YulLiteral", + "src": "11621:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "11612:3:23", + "nodeType": "YulIdentifier", + "src": "11612:3:23" + }, + "nativeSrc": "11612:11:23", + "nodeType": "YulFunctionCall", + "src": "11612:11:23" + }, + { + "kind": "number", + "nativeSrc": "11625:1:23", + "nodeType": "YulLiteral", + "src": "11625:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "11608:3:23", + "nodeType": "YulIdentifier", + "src": "11608:3:23" + }, + "nativeSrc": "11608:19:23", + "nodeType": "YulFunctionCall", + "src": "11608:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11596:3:23", + "nodeType": "YulIdentifier", + "src": "11596:3:23" + }, + "nativeSrc": "11596:32:23", + "nodeType": "YulFunctionCall", + "src": "11596:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11568:6:23", + "nodeType": "YulIdentifier", + "src": "11568:6:23" + }, + "nativeSrc": "11568:61:23", + "nodeType": "YulFunctionCall", + "src": "11568:61:23" + }, + "nativeSrc": "11568:61:23", + "nodeType": "YulExpressionStatement", + "src": "11568:61:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed", + "nativeSrc": "11146:489:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "11296:9:23", + "nodeType": "YulTypedName", + "src": "11296:9:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "11307:6:23", + "nodeType": "YulTypedName", + "src": "11307:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "11315:6:23", + "nodeType": "YulTypedName", + "src": "11315:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "11323:6:23", + "nodeType": "YulTypedName", + "src": "11323:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "11331:6:23", + "nodeType": "YulTypedName", + "src": "11331:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "11339:6:23", + "nodeType": "YulTypedName", + "src": "11339:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "11350:4:23", + "nodeType": "YulTypedName", + "src": "11350:4:23", + "type": "" + } + ], + "src": "11146:489:23" + } + ] + }, + "contents": "{\n { }\n function abi_decode_tuple_t_struct$_ExecuteParams_$8182_calldata_ptr(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let _1 := add(headStart, offset)\n if slt(sub(dataEnd, _1), 448) { revert(0, 0) }\n value0 := _1\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_string(value, pos) -> end\n {\n let length := mload(value)\n mstore(pos, length)\n mcopy(add(pos, 0x20), add(value, 0x20), length)\n mstore(add(add(pos, length), 0x20), 0)\n end := add(add(pos, and(add(length, 31), not(31))), 0x20)\n }\n function abi_encode_tuple_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__to_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed(headStart, value6, value5, value4, value3, value2, value1, value0) -> tail\n {\n mstore(headStart, and(value0, shl(248, 255)))\n mstore(add(headStart, 32), 224)\n let tail_1 := abi_encode_string(value1, add(headStart, 224))\n mstore(add(headStart, 64), sub(tail_1, headStart))\n let tail_2 := abi_encode_string(value2, tail_1)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), and(value4, sub(shl(160, 1), 1)))\n mstore(add(headStart, 160), value5)\n mstore(add(headStart, 192), sub(tail_2, headStart))\n let pos := tail_2\n let length := mload(value6)\n mstore(tail_2, length)\n pos := add(tail_2, 32)\n let srcPtr := add(value6, 32)\n let i := 0\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(pos, mload(srcPtr))\n pos := add(pos, 32)\n srcPtr := add(srcPtr, 32)\n }\n tail := pos\n }\n function abi_decode_address(offset) -> value\n {\n value := calldataload(offset)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_addresst_uint256(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n value0 := abi_decode_address(headStart)\n let value := 0\n value := calldataload(add(headStart, 32))\n value1 := value\n }\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, iszero(iszero(value0)))\n }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := 0\n value := calldataload(headStart)\n value0 := value\n }\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := abi_decode_address(headStart)\n }\n function abi_encode_tuple_t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 13)\n mstore(add(headStart, 64), \"Invalid owner\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 13)\n mstore(add(headStart, 64), \"Invalid token\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 10)\n mstore(add(headStart, 64), \"Nonce used\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 15)\n mstore(add(headStart, 64), \"Payload expired\")\n tail := add(headStart, 96)\n }\n function access_calldata_tail_t_bytes_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), length)) { revert(0, 0) }\n }\n function abi_decode_tuple_t_uint8(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, 0xff))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 11)\n mstore(add(headStart, 64), \"Invalid sig\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 28)\n mstore(add(headStart, 64), \"Incorrect ETH value provided\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 11)\n mstore(add(headStart, 64), \"Call failed\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos) -> end\n { end := pos }\n function abi_encode_tuple_t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 19)\n mstore(add(headStart, 64), \"ETH transfer failed\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__to_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__fromStack_reversed(headStart, value8, value7, value6, value5, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 288)\n mstore(headStart, value0)\n mstore(add(headStart, 32), and(value1, sub(shl(160, 1), 1)))\n mstore(add(headStart, 64), and(value2, sub(shl(160, 1), 1)))\n mstore(add(headStart, 96), and(value3, sub(shl(160, 1), 1)))\n mstore(add(headStart, 128), value4)\n mstore(add(headStart, 160), value5)\n mstore(add(headStart, 192), value6)\n mstore(add(headStart, 224), value7)\n mstore(add(headStart, 256), value8)\n }\n function abi_encode_tuple_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__to_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__fromStack_reversed(headStart, value6, value5, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 224)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n mstore(add(headStart, 32), and(value1, sub(shl(160, 1), 1)))\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), and(value4, 0xff))\n mstore(add(headStart, 160), value5)\n mstore(add(headStart, 192), value6)\n }\n function abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n mstore(add(headStart, 32), and(value1, sub(shl(160, 1), 1)))\n }\n function abi_decode_tuple_t_uint256_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := mload(headStart)\n }\n function abi_encode_tuple_t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 40)\n mstore(add(headStart, 64), \"Permit failed and insufficient a\")\n mstore(add(headStart, 96), \"llowance\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n let length := mload(value0)\n mcopy(pos, add(value0, 0x20), length)\n let _1 := add(pos, length)\n mstore(_1, 0)\n end := _1\n }\n function abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed(headStart, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 128)\n mstore(headStart, value0)\n mstore(add(headStart, 32), and(value1, 0xff))\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n }\n function panic_error_0x21()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x21)\n revert(0, 0x24)\n }\n function abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function extract_byte_array_length(data) -> length\n {\n length := shr(1, data)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) { length := and(length, 0x7f) }\n if eq(outOfPlaceEncoding, lt(length, 32))\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n }\n function abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed(headStart, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 160)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), and(value4, sub(shl(160, 1), 1)))\n }\n}", + "id": 23, + "language": "Yul", + "name": "#utility.yul" + } + ], + "immutableReferences": { + "4158": [ + { + "length": 32, + "start": 4419 + } + ], + "4160": [ + { + "length": 32, + "start": 4377 + } + ], + "4162": [ + { + "length": 32, + "start": 4335 + } + ], + "4164": [ + { + "length": 32, + "start": 4500 + } + ], + "4166": [ + { + "length": 32, + "start": 4540 + } + ], + "4169": [ + { + "length": 32, + "start": 3323 + } + ], + "4172": [ + { + "length": 32, + "start": 3373 + } + ], + "8147": [ + { + "length": 32, + "start": 215 + }, + { + "length": 32, + "start": 1317 + }, + { + "length": 32, + "start": 1524 + }, + { + "length": 32, + "start": 2384 + }, + { + "length": 32, + "start": 3064 + } + ] + }, + "linkReferences": {}, + "object": "608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x92 JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9E281A98 GT PUSH2 0x57 JUMPI DUP1 PUSH4 0x9E281A98 EQ PUSH2 0x159 JUMPI DUP1 PUSH4 0xD850124E EQ PUSH2 0x178 JUMPI DUP1 PUSH4 0xDCB79457 EQ PUSH2 0x1C1 JUMPI DUP1 PUSH4 0xF14210A6 EQ PUSH2 0x1E0 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x1FF JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP1 PUSH4 0x2AF83BFE EQ PUSH2 0x9D JUMPI DUP1 PUSH4 0x715018A6 EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0x75BD6863 EQ PUSH2 0xC6 JUMPI DUP1 PUSH4 0x84B0196E EQ PUSH2 0x116 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x13D JUMPI PUSH0 PUSH0 REVERT JUMPDEST CALLDATASIZE PUSH2 0x99 JUMPI STOP JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0xB0 PUSH2 0xAB CALLDATASIZE PUSH1 0x4 PUSH2 0x12DD JUMP JUMPDEST PUSH2 0x21E JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xBD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x6AE JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xD1 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xF9 PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x121 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x12A PUSH2 0x6C1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x10D SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x134A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x148 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xF9 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x164 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x173 CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH2 0x703 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x183 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x192 CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x10D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CC JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x1DB CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH2 0x78B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1EB JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x1FA CALLDATASIZE PUSH1 0x4 PUSH2 0x1423 JUMP JUMPDEST PUSH2 0x7B8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x20A JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x219 CALLDATASIZE PUSH1 0x4 PUSH2 0x143A JUMP JUMPDEST PUSH2 0x8A7 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x8E1 JUMP JUMPDEST PUSH0 PUSH2 0x237 PUSH1 0x40 DUP4 ADD PUSH1 0x20 DUP5 ADD PUSH2 0x143A JUMP JUMPDEST SWAP1 POP PUSH2 0x120 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x28A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x24B73B30B634B21037BBB732B9 PUSH1 0x99 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH2 0x298 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SUB PUSH2 0x2DE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x24B73B30B634B2103A37B5B2B7 PUSH1 0x99 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x33E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xA PUSH1 0x24 DUP3 ADD MSTORE PUSH10 0x139BDB98D9481D5CD959 PUSH1 0xB2 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST DUP3 PUSH2 0x140 ADD CALLDATALOAD TIMESTAMP GT ISZERO PUSH2 0x385 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xF PUSH1 0x24 DUP3 ADD MSTORE PUSH15 0x14185E5B1BD85908195E1C1A5C9959 PUSH1 0x8A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 PUSH2 0x3EE DUP4 PUSH2 0x397 PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH2 0x3A9 PUSH1 0xE0 DUP10 ADD DUP10 PUSH2 0x1453 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP POP POP POP PUSH2 0x100 DUP10 ADD CALLDATALOAD DUP8 PUSH2 0x140 DUP12 ADD CALLDATALOAD PUSH2 0x90F JUMP JUMPDEST SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x421 DUP3 PUSH2 0x410 PUSH2 0x180 DUP9 ADD PUSH2 0x160 DUP10 ADD PUSH2 0x149D JUMP JUMPDEST DUP8 PUSH2 0x180 ADD CALLDATALOAD DUP9 PUSH2 0x1A0 ADD CALLDATALOAD PUSH2 0x9DB JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x465 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xB PUSH1 0x24 DUP3 ADD MSTORE PUSH11 0x496E76616C696420736967 PUSH1 0xA8 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST DUP4 PUSH2 0x100 ADD CALLDATALOAD CALLVALUE EQ PUSH2 0x4B9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1C PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x496E636F7272656374204554482076616C75652070726F766964656400000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP6 DUP5 MSTORE DUP3 MSTORE SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH2 0x520 SWAP1 PUSH2 0x4F6 SWAP1 DUP7 ADD DUP7 PUSH2 0x143A JUMP JUMPDEST DUP5 PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH1 0x60 DUP9 ADD CALLDATALOAD PUSH2 0x511 PUSH1 0xA0 DUP11 ADD PUSH1 0x80 DUP12 ADD PUSH2 0x149D JUMP JUMPDEST DUP10 PUSH1 0xA0 ADD CALLDATALOAD DUP11 PUSH1 0xC0 ADD CALLDATALOAD PUSH2 0xA07 JUMP JUMPDEST PUSH2 0x566 PUSH32 0x0 PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH2 0x556 PUSH1 0x20 DUP9 ADD DUP9 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 SWAP1 PUSH2 0xB75 JUMP JUMPDEST PUSH0 PUSH2 0x5B2 PUSH2 0x577 PUSH1 0xE0 DUP8 ADD DUP8 PUSH2 0x1453 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP CALLVALUE SWAP3 POP PUSH2 0xBF4 SWAP2 POP POP JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x5EF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xB PUSH1 0x24 DUP3 ADD MSTORE PUSH11 0x10D85B1B0819985A5B1959 PUSH1 0xAA SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0x621 PUSH32 0x0 PUSH0 PUSH2 0x556 PUSH1 0x20 DUP10 ADD DUP10 PUSH2 0x143A JUMP JUMPDEST PUSH2 0x62E PUSH1 0x20 DUP7 ADD DUP7 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x78129A649632642D8E9F346C85D9EFB70D32D50A36774C4585491A9228BBD350 DUP8 PUSH1 0x40 ADD CALLDATALOAD PUSH1 0x40 MLOAD PUSH2 0x676 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP PUSH2 0x6AB PUSH1 0x1 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x6B6 PUSH2 0xC79 JUMP JUMPDEST PUSH2 0x6BF PUSH0 PUSH2 0xCA5 JUMP JUMPDEST JUMP JUMPDEST PUSH0 PUSH1 0x60 DUP1 PUSH0 PUSH0 PUSH0 PUSH1 0x60 PUSH2 0x6D2 PUSH2 0xCF4 JUMP JUMPDEST PUSH2 0x6DA PUSH2 0xD26 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 SWAP3 MSTORE PUSH1 0xF PUSH1 0xF8 SHL SWAP12 SWAP4 SWAP11 POP SWAP2 SWAP9 POP CHAINID SWAP8 POP ADDRESS SWAP7 POP SWAP5 POP SWAP3 POP SWAP1 POP JUMP JUMPDEST PUSH2 0x70B PUSH2 0xC79 JUMP JUMPDEST PUSH2 0x730 PUSH2 0x71F PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 DUP4 PUSH2 0xD53 JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0xA0524EE0FD8662D6C046D199DA2A6D3DC49445182CEC055873A5BB9C2843C8E0 DUP4 PUSH1 0x40 MLOAD PUSH2 0x77F SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x7C0 PUSH2 0xC79 JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 DUP4 SWAP1 DUP4 DUP2 DUP2 DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH0 DUP2 EQ PUSH2 0x80A JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x80F JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH2 0x856 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x115512081D1C985B9CD9995C8819985A5B1959 PUSH1 0x6A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x6148672A948A12B8E0BF92A9338349B9AC890FAD62A234ABAF0A4DA99F62CFCC DUP4 PUSH1 0x40 MLOAD PUSH2 0x89B SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH2 0x8AF PUSH2 0xC79 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x8D8 JUMPI PUSH1 0x40 MLOAD PUSH4 0x1E4FBDF7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH0 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0x6AB DUP2 PUSH2 0xCA5 JUMP JUMPDEST PUSH2 0x8E9 PUSH2 0xD60 JUMP JUMPDEST PUSH1 0x2 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE JUMP JUMPDEST DUP4 MLOAD PUSH1 0x20 DUP1 DUP7 ADD SWAP2 SWAP1 SWAP2 KECCAK256 PUSH1 0x40 DUP1 MLOAD PUSH32 0xF0543E2024FD0AE16CCB842686C2733758EC65ACFD69FB599C05B286F8DB8844 SWAP4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 DUP2 AND SWAP2 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP11 AND PUSH1 0x60 DUP5 ADD MSTORE DUP9 AND PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0xA0 DUP3 ADD DUP8 SWAP1 MSTORE PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xE0 DUP2 ADD DUP5 SWAP1 MSTORE PUSH2 0x100 DUP2 ADD DUP4 SWAP1 MSTORE PUSH2 0x120 DUP2 ADD DUP3 SWAP1 MSTORE PUSH0 SWAP1 PUSH2 0x9CF SWAP1 PUSH2 0x140 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH2 0xDA2 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH0 PUSH0 PUSH2 0x9EB DUP9 DUP9 DUP9 DUP9 PUSH2 0xDCE JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x9FB DUP3 DUP3 PUSH2 0xE96 JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xD505ACCF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE ADDRESS PUSH1 0x24 DUP4 ADD MSTORE PUSH1 0x44 DUP3 ADD DUP8 SWAP1 MSTORE PUSH1 0x64 DUP3 ADD DUP7 SWAP1 MSTORE PUSH1 0xFF DUP6 AND PUSH1 0x84 DUP4 ADD MSTORE PUSH1 0xA4 DUP3 ADD DUP5 SWAP1 MSTORE PUSH1 0xC4 DUP3 ADD DUP4 SWAP1 MSTORE DUP9 AND SWAP1 PUSH4 0xD505ACCF SWAP1 PUSH1 0xE4 ADD PUSH0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA72 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0xA83 JUMPI POP PUSH1 0x1 JUMPDEST PUSH2 0xB57 JUMPI PUSH1 0x40 MLOAD PUSH4 0x6EB1769F PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE ADDRESS PUSH1 0x24 DUP4 ADD MSTORE DUP7 SWAP2 SWAP1 DUP10 AND SWAP1 PUSH4 0xDD62ED3E SWAP1 PUSH1 0x44 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xAD4 JUMPI RETURNDATASIZE PUSH0 PUSH0 RETURNDATACOPY RETURNDATASIZE PUSH0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xAF8 SWAP2 SWAP1 PUSH2 0x14BD JUMP JUMPDEST LT ISZERO PUSH2 0xB57 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x28 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x5065726D6974206661696C656420616E6420696E73756666696369656E742061 PUSH1 0x44 DUP3 ADD MSTORE PUSH8 0x6C6C6F77616E6365 PUSH1 0xC0 SHL PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0xB6C PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP8 ADDRESS DUP9 PUSH2 0xF52 JUMP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0xB81 DUP4 DUP4 DUP4 PUSH0 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBEF JUMPI PUSH2 0xB92 DUP4 DUP4 PUSH0 PUSH1 0x1 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBBA JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0xBC7 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBEF JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 DUP6 PUSH1 0x40 MLOAD PUSH2 0xC2F SWAP2 SWAP1 PUSH2 0x14D4 JUMP JUMPDEST PUSH0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH0 DUP2 EQ PUSH2 0xC69 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0xC6E JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP1 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x6BF JUMPI PUSH1 0x40 MLOAD PUSH4 0x118CDAA7 PUSH1 0xE0 SHL DUP2 MSTORE CALLER PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP4 AND DUP2 OR DUP5 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP1 SWAP3 AND SWAP3 DUP4 SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0xD21 PUSH32 0x0 PUSH1 0x1 PUSH2 0xFF0 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0xD21 PUSH32 0x0 PUSH1 0x2 PUSH2 0xFF0 JUMP JUMPDEST PUSH2 0xBC7 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0x1099 JUMP JUMPDEST PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SLOAD PUSH1 0x2 SUB PUSH2 0x6BF JUMPI PUSH1 0x40 MLOAD PUSH4 0x3EE5AEB5 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH2 0x7B2 PUSH2 0xDAE PUSH2 0x10E3 JUMP JUMPDEST DUP4 PUSH1 0x40 MLOAD PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH0 DUP1 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP5 GT ISZERO PUSH2 0xE07 JUMPI POP PUSH0 SWAP2 POP PUSH1 0x3 SWAP1 POP DUP3 PUSH2 0xE8C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP11 SWAP1 MSTORE PUSH1 0xFF DUP10 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xE58 JUMPI RETURNDATASIZE PUSH0 PUSH0 RETURNDATACOPY RETURNDATASIZE PUSH0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0xE83 JUMPI POP PUSH0 SWAP3 POP PUSH1 0x1 SWAP2 POP DUP3 SWAP1 POP PUSH2 0xE8C JUMP JUMPDEST SWAP3 POP PUSH0 SWAP2 POP DUP2 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 POP SWAP5 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEA9 JUMPI PUSH2 0xEA9 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xEB2 JUMPI POP POP JUMP JUMPDEST PUSH1 0x1 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEC6 JUMPI PUSH2 0xEC6 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xEE4 JUMPI PUSH1 0x40 MLOAD PUSH4 0xF645EEDF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEF8 JUMPI PUSH2 0xEF8 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xF19 JUMPI PUSH1 0x40 MLOAD PUSH4 0xFCE698F7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x3 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xF2D JUMPI PUSH2 0xF2D PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xF4E JUMPI PUSH1 0x40 MLOAD PUSH4 0x35E2F383 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xF60 DUP5 DUP5 DUP5 DUP5 PUSH1 0x1 PUSH2 0x120C JUMP JUMPDEST PUSH2 0xF88 JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x95EA7B3 PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x44 DUP2 DUP1 DUP12 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0xFE4 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0xFD8 JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 DUP8 EXTCODESIZE GT RETURNDATASIZE ISZERO AND DUP4 AND SWAP3 POP JUMPDEST PUSH1 0x40 MSTORE POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0xFF DUP4 EQ PUSH2 0x100A JUMPI PUSH2 0x1003 DUP4 PUSH2 0x1279 JUMP JUMPDEST SWAP1 POP PUSH2 0x7B2 JUMP JUMPDEST DUP2 DUP1 SLOAD PUSH2 0x1016 SWAP1 PUSH2 0x14FE JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x1042 SWAP1 PUSH2 0x14FE JUMP JUMPDEST DUP1 ISZERO PUSH2 0x108D JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1064 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x108D JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1070 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP PUSH2 0x7B2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xA9059CBB PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x44 DUP2 DUP1 DUP12 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0xFE4 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0xFD8 JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND EQ DUP1 ISZERO PUSH2 0x113B JUMPI POP PUSH32 0x0 CHAINID EQ JUMPDEST ISZERO PUSH2 0x1165 JUMPI POP PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0xD21 PUSH1 0x40 DUP1 MLOAD PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH1 0x20 DUP3 ADD MSTORE PUSH32 0x0 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH32 0x0 PUSH1 0x60 DUP3 ADD MSTORE CHAINID PUSH1 0x80 DUP3 ADD MSTORE ADDRESS PUSH1 0xA0 DUP3 ADD MSTORE PUSH0 SWAP1 PUSH1 0xC0 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x23B872DD PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 MSTORE DUP7 AND PUSH1 0x24 MSTORE PUSH1 0x44 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x64 DUP2 DUP1 DUP13 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0x1268 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0x125C JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 DUP9 EXTCODESIZE GT RETURNDATASIZE ISZERO AND DUP4 AND SWAP3 POP JUMPDEST PUSH1 0x40 MSTORE POP PUSH0 PUSH1 0x60 MSTORE SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH0 PUSH2 0x1285 DUP4 PUSH2 0x12B6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE SWAP2 SWAP3 POP PUSH0 SWAP2 SWAP1 PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY POP POP POP SWAP2 DUP3 MSTORE POP PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE POP SWAP1 JUMP JUMPDEST PUSH0 PUSH1 0xFF DUP3 AND PUSH1 0x1F DUP2 GT ISZERO PUSH2 0x7B2 JUMPI PUSH1 0x40 MLOAD PUSH4 0x2CD44AC3 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x12ED JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1303 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP3 ADD PUSH2 0x1C0 DUP2 DUP6 SUB SLT ISZERO PUSH2 0x1315 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP7 ADD MCOPY PUSH0 PUSH1 0x20 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x20 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xFF PUSH1 0xF8 SHL DUP9 AND DUP2 MSTORE PUSH1 0xE0 PUSH1 0x20 DUP3 ADD MSTORE PUSH0 PUSH2 0x1368 PUSH1 0xE0 DUP4 ADD DUP10 PUSH2 0x131C JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x137A DUP2 DUP10 PUSH2 0x131C JUMP JUMPDEST PUSH1 0x60 DUP5 ADD DUP9 SWAP1 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0xA0 DUP5 ADD DUP7 SWAP1 MSTORE DUP4 DUP2 SUB PUSH1 0xC0 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE PUSH1 0x20 DUP1 DUP8 ADD SWAP4 POP SWAP1 SWAP2 ADD SWAP1 PUSH0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x13CF JUMPI DUP4 MLOAD DUP4 MSTORE PUSH1 0x20 SWAP4 DUP5 ADD SWAP4 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x13B1 JUMP JUMPDEST POP SWAP1 SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x13F6 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH0 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x140C JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x1415 DUP4 PUSH2 0x13E0 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1433 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x144A JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x1315 DUP3 PUSH2 0x13E0 JUMP JUMPDEST PUSH0 PUSH0 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1468 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1482 JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0x1496 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x14AD JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1315 JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x14CD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 MLOAD DUP1 PUSH1 0x20 DUP6 ADD DUP5 MCOPY PUSH0 SWAP3 ADD SWAP2 DUP3 MSTORE POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH1 0x1 DUP2 DUP2 SHR SWAP1 DUP3 AND DUP1 PUSH2 0x1512 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x1530 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP13 CALLVALUE 0xDB 0x2F PUSH16 0x83AF136A5340CCE7FE8EF554EA8EB633 PUSH6 0x6FBF9BFF3BD7 BALANCE 0xAE 0xC4 0xF PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "1158:6897:22:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2995:1996;;;;;;:::i;:::-;;:::i;:::-;;2293:101:0;;;;;;;;;;;;;:::i;1519:44:22:-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;576:32:23;;;558:51;;546:2;531:18;1519:44:22;;;;;;;;5228:557:16;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;1638:85:0:-;;;;;;;;;;-1:-1:-1;1684:7:0;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;7236:186:22;;;;;;;;;;-1:-1:-1;7236:186:22;;;;;:::i;:::-;;:::i;1570:69::-;;;;;;;;;;-1:-1:-1;1570:69:22;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2805:14:23;;2798:22;2780:41;;2768:2;2753:18;1570:69:22;2640:187:23;7907:146:22;;;;;;;;;;-1:-1:-1;7907:146:22;;;;;:::i;:::-;;:::i;7619:216::-;;;;;;;;;;-1:-1:-1;7619:216:22;;;;;:::i;:::-;;:::i;2543:215:0:-;;;;;;;;;;-1:-1:-1;2543:215:0;;;;;:::i;:::-;;:::i;2995:1996:22:-;3023:21:11;:19;:21::i;:::-;3083:13:22::1;3099:12;::::0;;;::::1;::::0;::::1;;:::i;:::-;3083:28:::0;-1:-1:-1;3137:19:22::1;::::0;::::1;;-1:-1:-1::0;;;;;3201:19:22;::::1;3193:45;;;::::0;-1:-1:-1;;;3193:45:22;;3456:2:23;3193:45:22::1;::::0;::::1;3438:21:23::0;3495:2;3475:18;;;3468:30;-1:-1:-1;;;3514:18:23;;;3507:43;3567:18;;3193:45:22::1;;;;;;;;;3280:1;3256:12;;::::0;::::1;:6:::0;:12:::1;:::i;:::-;-1:-1:-1::0;;;;;3256:26:22::1;::::0;3248:52:::1;;;::::0;-1:-1:-1;;;3248:52:22;;3798:2:23;3248:52:22::1;::::0;::::1;3780:21:23::0;3837:2;3817:18;;;3810:30;-1:-1:-1;;;3856:18:23;;;3849:43;3909:18;;3248:52:22::1;3596:337:23::0;3248:52:22::1;-1:-1:-1::0;;;;;3319:24:22;::::1;;::::0;;;:17:::1;:24;::::0;;;;;;;:31;;;;;;;;;::::1;;3318:32;3310:55;;;::::0;-1:-1:-1;;;3310:55:22;;4140:2:23;3310:55:22::1;::::0;::::1;4122:21:23::0;4179:2;4159:18;;;4152:30;-1:-1:-1;;;4198:18:23;;;4191:40;4248:18;;3310:55:22::1;3938:334:23::0;3310:55:22::1;3402:6;:22;;;3383:15;:41;;3375:69;;;::::0;-1:-1:-1;;;3375:69:22;;4479:2:23;3375:69:22::1;::::0;::::1;4461:21:23::0;4518:2;4498:18;;;4491:30;-1:-1:-1;;;4537:18:23;;;4530:45;4592:18;;3375:69:22::1;4277:339:23::0;3375:69:22::1;3523:14;3540:215;3568:5:::0;3587:12:::1;;::::0;::::1;:6:::0;:12:::1;:::i;:::-;3613;::::0;::::1;;3639:18;;::::0;::::1;3613:6:::0;3639:18:::1;:::i;:::-;3540:215;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;;;;3671:19:22::1;::::0;::::1;;3704:5:::0;3723:22:::1;::::0;::::1;;3540:14;:215::i;:::-;3523:232:::0;-1:-1:-1;;;;;;3850:81:22;::::1;:72;3523:232:::0;3872:15:::1;::::0;;;::::1;::::0;::::1;;:::i;:::-;3889:6;:15;;;3906:6;:15;;;3850:13;:72::i;:::-;-1:-1:-1::0;;;;;3850:81:22::1;;3842:105;;;::::0;-1:-1:-1;;;3842:105:22;;5623:2:23;3842:105:22::1;::::0;::::1;5605:21:23::0;5662:2;5642:18;;;5635:30;-1:-1:-1;;;5681:18:23;;;5674:41;5732:18;;3842:105:22::1;5421:335:23::0;3842:105:22::1;3979:6;:19;;;3966:9;:32;3958:73;;;::::0;-1:-1:-1;;;3958:73:22;;5963:2:23;3958:73:22::1;::::0;::::1;5945:21:23::0;6002:2;5982:18;;;5975:30;6041;6021:18;;;6014:58;6089:18;;3958:73:22::1;5761:352:23::0;3958:73:22::1;-1:-1:-1::0;;;;;4158:24:22;::::1;;::::0;;;:17:::1;:24;::::0;;;;;;;:31;;;;;;;;:38;;-1:-1:-1;;4158:38:22::1;4192:4;4158:38;::::0;;4303:219:::1;::::0;4342:12:::1;::::0;;::::1;:6:::0;:12:::1;:::i;:::-;4368:5:::0;4387:12:::1;::::0;::::1;;4413:15;::::0;::::1;;4442:14;::::0;;;::::1;::::0;::::1;;:::i;:::-;4470:6;:14;;;4498:6;:14;;;4303:25;:219::i;:::-;4592:68;4626:19;4647:12;::::0;::::1;;4599;;::::0;::::1;4647:6:::0;4599:12:::1;:::i;:::-;-1:-1:-1::0;;;;;4592:33:22::1;::::0;:68;:33:::1;:68::i;:::-;4671:16;4690:43;4703:18;;::::0;::::1;:6:::0;:18:::1;:::i;:::-;4690:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;4723:9:22::1;::::0;-1:-1:-1;4690:12:22::1;::::0;-1:-1:-1;;4690:43:22:i:1;:::-;4671:62;;4751:11;4743:35;;;::::0;-1:-1:-1;;;4743:35:22;;6320:2:23;4743:35:22::1;::::0;::::1;6302:21:23::0;6359:2;6339:18;;;6332:30;-1:-1:-1;;;6378:18:23;;;6371:41;6429:18;;4743:35:22::1;6118:335:23::0;4743:35:22::1;4861:57;4895:19;4916:1;4868:12;;::::0;::::1;:6:::0;:12:::1;:::i;4861:57::-;4957:12;;::::0;::::1;:6:::0;:12:::1;:::i;:::-;-1:-1:-1::0;;;;;4934:50:22::1;4950:5;-1:-1:-1::0;;;;;4934:50:22::1;;4971:6;:12;;;4934:50;;;;6604:25:23::0;;6592:2;6577:18;;6458:177;4934:50:22::1;;;;;;;;3073:1918;;;;3065:20:11::0;2365:1;1505:66;3972:62;3749:292;3065:20;2995:1996:22;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;5228:557:16:-;5326:13;5353:18;5385:21;5420:15;5449:25;5488:12;5514:27;5617:13;:11;:13::i;:::-;5644:16;:14;:16::i;:::-;5752;;;5736:1;5752:16;;;;;;;;;-1:-1:-1;;;5566:212:16;;;-1:-1:-1;5566:212:16;;-1:-1:-1;5674:13:16;;-1:-1:-1;5709:4:16;;-1:-1:-1;5736:1:16;-1:-1:-1;5752:16:16;-1:-1:-1;5566:212:16;-1:-1:-1;5228:557:16:o;7236:186:22:-;1531:13:0;:11;:13::i;:::-;7319:43:22::1;7346:7;1684::0::0;1710:6;-1:-1:-1;;;;;1710:6:0;;1638:85;7346:7:22::1;-1:-1:-1::0;;;;;7319:26:22;::::1;::::0;7355:6;7319:26:::1;:43::i;:::-;1684:7:0::0;1710:6;-1:-1:-1;;;;;1710:6:0;-1:-1:-1;;;;;7377:38:22::1;7392:5;-1:-1:-1::0;;;;;7377:38:22::1;;7399:6;7377:38;;;;6604:25:23::0;;6592:2;6577:18;;6458:177;7377:38:22::1;;;;;;;;7236:186:::0;;:::o;7907:146::-;-1:-1:-1;;;;;8014:25:22;;7991:4;8014:25;;;:17;:25;;;;;;;;:32;;;;;;;;;;;7907:146;;;;;:::o;7619:216::-;1531:13:0;:11;:13::i;:::-;7686:12:22::1;1710:6:0::0;;7704:31:22::1;::::0;-1:-1:-1;;;;;1710:6:0;;;;7724::22;;7686:12;7704:31;7686:12;7704:31;7724:6;1710::0;7704:31:22::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7685:50;;;7753:7;7745:39;;;::::0;-1:-1:-1;;;7745:39:22;;7184:2:23;7745:39:22::1;::::0;::::1;7166:21:23::0;7223:2;7203:18;;;7196:30;-1:-1:-1;;;7242:18:23;;;7235:49;7301:18;;7745:39:22::1;6982:343:23::0;7745:39:22::1;1684:7:0::0;1710:6;-1:-1:-1;;;;;1710:6:0;-1:-1:-1;;;;;7799:29:22::1;;7812:6;7799:29;;;;6604:25:23::0;;6592:2;6577:18;;6458:177;7799:29:22::1;;;;;;;;7675:160;7619:216:::0;:::o;2543:215:0:-;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;558:51:23::0;531:18;;2672:31:0::1;412:203:23::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;3749:292:11:-:0;3872:25;:23;:25::i;:::-;2407:1;1505:66;3972:62;3749:292::o;5053:632:22:-;5563:15;;;;;;;;;;5342:325;;;1356:156;5342:325;;;7701:25:23;;;;-1:-1:-1;;;;;5406:19:22;7762:32:23;;7742:18;;;7735:60;;;;7831:32;;;7811:18;;;7804:60;7900:32;;7880:18;;;7873:60;7949:19;;;7942:35;;;7993:19;;;7986:35;8037:19;;;8030:35;;;8081:19;;;8074:35;;;8125:19;;;8118:35;;;5276:7:22;;5302:376;;7673:19:23;;5342:325:22;;;;;;;;;;;;5332:336;;;;;;5302:16;:376::i;:::-;5295:383;5053:632;-1:-1:-1;;;;;;;;5053:632:22:o;8813:260:15:-;8898:7;8918:17;8937:18;8957:16;8977:25;8988:4;8994:1;8997;9000;8977:10;:25::i;:::-;8917:85;;;;;;9012:28;9024:5;9031:8;9012:11;:28::i;:::-;-1:-1:-1;9057:9:15;;8813:260;-1:-1:-1;;;;;;8813:260:15:o;5941:777:22:-;6216:74;;-1:-1:-1;;;6216:74:22;;-1:-1:-1;;;;;8493:32:23;;;6216:74:22;;;8475:51:23;6258:4:22;8542:18:23;;;8535:60;8611:18;;;8604:34;;;8654:18;;;8647:34;;;8730:4;8718:17;;8697:19;;;8690:46;8752:19;;;8745:35;;;8796:19;;;8789:35;;;6216:26:22;;;;;8447:19:23;;6216:74:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6212:375;;6448:45;;-1:-1:-1;;;6448:45:22;;-1:-1:-1;;;;;9027:32:23;;;6448:45:22;;;9009:51:23;6487:4:22;9076:18:23;;;9069:60;6497:5:22;;6448:23;;;;;;8982:18:23;;6448:45:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:54;;6423:153;;;;-1:-1:-1;;;6423:153:22;;9531:2:23;6423:153:22;;;9513:21:23;9570:2;9550:18;;;9543:30;9609:34;9589:18;;;9582:62;-1:-1:-1;;;9660:18:23;;;9653:38;9708:19;;6423:153:22;9329:404:23;6423:153:22;6652:59;-1:-1:-1;;;;;6652:30:22;;6683:5;6698:4;6705:5;6652:30;:59::i;:::-;5941:777;;;;;;;:::o;5098:367:7:-;5190:42;5203:5;5210:7;5219:5;5226;5190:12;:42::i;:::-;5185:274;;5253:37;5266:5;5273:7;5282:1;5285:4;5253:12;:37::i;:::-;5248:91;;5299:40;;-1:-1:-1;;;5299:40:7;;-1:-1:-1;;;;;576:32:23;;5299:40:7;;;558:51:23;531:18;;5299:40:7;412:203:23;5248:91:7;5358:41;5371:5;5378:7;5387:5;5394:4;5358:12;:41::i;:::-;5353:95;;5408:40;;-1:-1:-1;;;5408:40:7;;-1:-1:-1;;;;;576:32:23;;5408:40:7;;;558:51:23;531:18;;5408:40:7;412:203:23;5353:95:7;5098:367;;;:::o;6724:184:22:-;6798:4;6815:12;6833:19;-1:-1:-1;;;;;6833:24:22;6865:5;6872:4;6833:44;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6814:63:22;;6724:184;-1:-1:-1;;;;;6724:184:22:o;1796:162:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:9;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:9;1901:40:0;;;558:51:23;531:18;;1901:40:0;412:203:23;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;6105:126:16:-;6151:13;6183:41;:5;6210:13;6183:26;:41::i;:::-;6176:48;;6105:126;:::o;6557:135::-;6606:13;6638:47;:8;6668:16;6638:29;:47::i;1219:204:7:-;1306:37;1320:5;1327:2;1331:5;1338:4;1306:13;:37::i;3586:157:11:-;1505:66;4560:52;2407:1;4560:63;3644:93;;3696:30;;-1:-1:-1;;;3696:30:11;;;;;;;;;;;5017:176:16;5094:7;5120:66;5153:20;:18;:20::i;:::-;5175:10;4093:4:17;4087:11;-1:-1:-1;;;4111:23:17;;4163:4;4154:14;;4147:39;;;;4215:4;4206:14;;4199:34;4271:4;4256:20;;;3918:374;7129:1551:15;7255:17;;;8209:66;8196:79;;8192:164;;;-1:-1:-1;8307:1:15;;-1:-1:-1;8311:30:15;;-1:-1:-1;8343:1:15;8291:54;;8192:164;8467:24;;;8450:14;8467:24;;;;;;;;;10271:25:23;;;10344:4;10332:17;;10312:18;;;10305:45;;;;10366:18;;;10359:34;;;10409:18;;;10402:34;;;8467:24:15;;10243:19:23;;8467:24:15;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8467:24:15;;-1:-1:-1;;8467:24:15;;;-1:-1:-1;;;;;;;8505:20:15;;8501:113;;-1:-1:-1;8557:1:15;;-1:-1:-1;8561:29:15;;-1:-1:-1;8557:1:15;;-1:-1:-1;8541:62:15;;8501:113;8632:6;-1:-1:-1;8640:20:15;;-1:-1:-1;8640:20:15;;-1:-1:-1;7129:1551:15;;;;;;;;;:::o;11617:532::-;11712:20;11703:5;:29;;;;;;;;:::i;:::-;;11699:444;;11617:532;;:::o;11699:444::-;11808:29;11799:5;:38;;;;;;;;:::i;:::-;;11795:348;;11860:23;;-1:-1:-1;;;11860:23:15;;;;;;;;;;;11795:348;11913:35;11904:5;:44;;;;;;;;:::i;:::-;;11900:243;;11971:46;;-1:-1:-1;;;11971:46:15;;;;;6604:25:23;;;6577:18;;11971:46:15;6458:177:23;11900:243:15;12047:30;12038:5;:39;;;;;;;;:::i;:::-;;12034:109;;12100:32;;-1:-1:-1;;;12100:32:15;;;;;6604:25:23;;;6577:18;;12100:32:15;6458:177:23;12034:109:15;11617:532;;:::o;1662:232:7:-;1767:47;1785:5;1792:4;1798:2;1802:5;1809:4;1767:17;:47::i;:::-;1762:126;;1837:40;;-1:-1:-1;;;1837:40:7;;-1:-1:-1;;;;;576:32:23;;1837:40:7;;;558:51:23;531:18;;1837:40:7;412:203:23;1762:126:7;1662:232;;;;:::o;12059:1252::-;12289:4;12283:11;-1:-1:-1;;;12157:12:7;12307:22;;;-1:-1:-1;;;;;12355:29:7;;12349:4;12342:43;12405:4;12398:19;;;12157:12;12481:4;12157:12;12469:4;12157:12;;12453:5;12446;12441:45;12430:56;;12698:1;12691:4;12685:11;12682:18;12673:7;12669:32;12659:606;;12830:6;12820:7;12813:15;12809:28;12806:165;;;12886:16;12880:4;12875:3;12860:43;12936:16;12931:3;12924:29;12806:165;13247:1;13239:5;13227:18;13224:25;13205:16;13198:24;13194:56;13185:7;13181:70;13170:81;;12659:606;13285:4;13278:17;-1:-1:-1;12059:1252:7;;-1:-1:-1;;;;12059:1252:7:o;3376:267:12:-;3470:13;1390:66;3499:46;;3495:142;;3568:15;3577:5;3568:8;:15::i;:::-;3561:22;;;;3495:142;3621:5;3614:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8373:1244:7;8600:4;8594:11;-1:-1:-1;;;8467:12:7;8618:22;;;-1:-1:-1;;;;;8666:24:7;;8660:4;8653:38;8711:4;8704:19;;;8467:12;8787:4;8467:12;8775:4;8467:12;;8759:5;8752;8747:45;8736:56;;9004:1;8997:4;8991:11;8988:18;8979:7;8975:32;8965:606;;9136:6;9126:7;9119:15;9115:28;9112:165;;;9192:16;9186:4;9181:3;9166:43;9242:16;9237:3;9230:29;3945:262:16;3998:7;4029:4;-1:-1:-1;;;;;4038:11:16;4021:28;;:63;;;;;4070:14;4053:13;:31;4021:63;4017:184;;;-1:-1:-1;4107:22:16;;3945:262::o;4017:184::-;4167:23;4304:80;;;2079:95;4304:80;;;11405:25:23;4326:11:16;11446:18:23;;;11439:34;;;;4339:14:16;11489:18:23;;;11482:34;4355:13:16;11532:18:23;;;11525:34;4378:4:16;11575:19:23;;;11568:61;4268:7:16;;11377:19:23;;4304:80:16;;;;;;;;;;;;4294:91;;;;;;4287:98;;4213:179;;10165:1393:7;10460:4;10454:11;-1:-1:-1;;;10323:12:7;10478:22;;;-1:-1:-1;;;;;10526:26:7;;;10520:4;10513:40;10579:24;;10573:4;10566:38;10624:4;10617:19;;;10323:12;10700:4;10323:12;10688:4;10323:12;;10672:5;10665;10660:45;10649:56;;10917:1;10910:4;10904:11;10901:18;10892:7;10888:32;10878:606;;11049:6;11039:7;11032:15;11028:28;11025:165;;;11105:16;11099:4;11094:3;11079:43;11155:16;11150:3;11143:29;11025:165;11466:1;11458:5;11446:18;11443:25;11424:16;11417:24;11413:56;11404:7;11400:70;11389:81;;10878:606;11504:4;11497:17;-1:-1:-1;11540:1:7;11534:4;11527:15;10165:1393;;-1:-1:-1;;;;;10165:1393:7:o;2080:380:12:-;2139:13;2164:11;2178:16;2189:4;2178:10;:16::i;:::-;2302;;;2313:4;2302:16;;;;;;;;;2164:30;;-1:-1:-1;2282:17:12;;2302:16;;;;;;;;;-1:-1:-1;;;2367:16:12;;;-1:-1:-1;2412:4:12;2403:14;;2396:28;;;;-1:-1:-1;2367:16:12;2080:380::o;2532:247::-;2593:7;2665:4;2629:40;;2692:4;2683:13;;2679:71;;;2719:20;;-1:-1:-1;;;2719:20:12;;;;;;;;;;;14:393:23;106:6;159:2;147:9;138:7;134:23;130:32;127:52;;;175:1;172;165:12;127:52;215:9;202:23;248:18;240:6;237:30;234:50;;;280:1;277;270:12;234:50;303:22;;359:3;341:16;;;337:26;334:46;;;376:1;373;366:12;334:46;399:2;14:393;-1:-1:-1;;;14:393:23:o;620:289::-;662:3;700:5;694:12;727:6;722:3;715:19;783:6;776:4;769:5;765:16;758:4;753:3;749:14;743:47;835:1;828:4;819:6;814:3;810:16;806:27;799:38;898:4;891:2;887:7;882:2;874:6;870:15;866:29;861:3;857:39;853:50;846:57;;;620:289;;;;:::o;914:1238::-;1320:3;1315;1311:13;1303:6;1299:26;1288:9;1281:45;1362:3;1357:2;1346:9;1342:18;1335:31;1262:4;1389:46;1430:3;1419:9;1415:19;1407:6;1389:46;:::i;:::-;1483:9;1475:6;1471:22;1466:2;1455:9;1451:18;1444:50;1517:33;1543:6;1535;1517:33;:::i;:::-;1581:2;1566:18;;1559:34;;;-1:-1:-1;;;;;1630:32:23;;1624:3;1609:19;;1602:61;1650:3;1679:19;;1672:35;;;1744:22;;;1738:3;1723:19;;1716:51;1816:13;;1838:22;;;1888:2;1914:15;;;;-1:-1:-1;1876:15:23;;;;-1:-1:-1;1957:169:23;1971:6;1968:1;1965:13;1957:169;;;2032:13;;2020:26;;2075:2;2101:15;;;;2066:12;;;;1993:1;1986:9;1957:169;;;-1:-1:-1;2143:3:23;;914:1238;-1:-1:-1;;;;;;;;;;;914:1238:23:o;2157:173::-;2225:20;;-1:-1:-1;;;;;2274:31:23;;2264:42;;2254:70;;2320:1;2317;2310:12;2254:70;2157:173;;;:::o;2335:300::-;2403:6;2411;2464:2;2452:9;2443:7;2439:23;2435:32;2432:52;;;2480:1;2477;2470:12;2432:52;2503:29;2522:9;2503:29;:::i;:::-;2493:39;2601:2;2586:18;;;;2573:32;;-1:-1:-1;;;2335:300:23:o;2832:226::-;2891:6;2944:2;2932:9;2923:7;2919:23;2915:32;2912:52;;;2960:1;2957;2950:12;2912:52;-1:-1:-1;3005:23:23;;2832:226;-1:-1:-1;2832:226:23:o;3063:186::-;3122:6;3175:2;3163:9;3154:7;3150:23;3146:32;3143:52;;;3191:1;3188;3181:12;3143:52;3214:29;3233:9;3214:29;:::i;4621:521::-;4698:4;4704:6;4764:11;4751:25;4858:2;4854:7;4843:8;4827:14;4823:29;4819:43;4799:18;4795:68;4785:96;;4877:1;4874;4867:12;4785:96;4904:33;;4956:20;;;-1:-1:-1;4999:18:23;4988:30;;4985:50;;;5031:1;5028;5021:12;4985:50;5064:4;5052:17;;-1:-1:-1;5095:14:23;5091:27;;;5081:38;;5078:58;;;5132:1;5129;5122:12;5078:58;4621:521;;;;;:::o;5147:269::-;5204:6;5257:2;5245:9;5236:7;5232:23;5228:32;5225:52;;;5273:1;5270;5263:12;5225:52;5312:9;5299:23;5362:4;5355:5;5351:16;5344:5;5341:27;5331:55;;5382:1;5379;5372:12;9140:184;9210:6;9263:2;9251:9;9242:7;9238:23;9234:32;9231:52;;;9279:1;9276;9269:12;9231:52;-1:-1:-1;9302:16:23;;9140:184;-1:-1:-1;9140:184:23:o;9738:301::-;9867:3;9905:6;9899:13;9951:6;9944:4;9936:6;9932:17;9927:3;9921:37;10013:1;9977:16;;10002:13;;;-1:-1:-1;9977:16:23;9738:301;-1:-1:-1;9738:301:23:o;10447:127::-;10508:10;10503:3;10499:20;10496:1;10489:31;10539:4;10536:1;10529:15;10563:4;10560:1;10553:15;10761:380;10840:1;10836:12;;;;10883;;;10904:61;;10958:4;10950:6;10946:17;10936:27;;10904:61;11011:2;11003:6;11000:14;10980:18;10977:38;10974:161;;11057:10;11052:3;11048:20;11045:1;11038:31;11092:4;11089:1;11082:15;11120:4;11117:1;11110:15;10974:161;;10761:380;;;:::o" + }, + "methodIdentifiers": { + "destinationContract()": "75bd6863", + "eip712Domain()": "84b0196e", + "execute((address,address,uint256,uint256,uint8,bytes32,bytes32,bytes,uint256,uint256,uint256,uint8,bytes32,bytes32))": "2af83bfe", + "isExecutionCompleted(address,uint256)": "dcb79457", + "owner()": "8da5cb5b", + "renounceOwnership()": "715018a6", + "transferOwnership(address)": "f2fde38b", + "usedPayloadNonces(address,uint256)": "d850124e", + "withdrawETH(uint256)": "f14210a6", + "withdrawToken(address,uint256)": "9e281a98" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destinationContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidShortString\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"StringTooLong\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"ETHWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RelayerExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"TokenWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"destinationContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"permitV\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"permitR\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"permitS\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"payloadData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"payloadValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"payloadNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"payloadDeadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"payloadV\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"payloadR\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"payloadS\",\"type\":\"bytes32\"}],\"internalType\":\"struct TokenRelayer.ExecuteParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"isExecutionCompleted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"usedPayloadNonces\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature is invalid.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}],\"ReentrancyGuardReentrantCall()\":[{\"details\":\"Unauthorized reentrant call.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"events\":{\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"}},\"kind\":\"dev\",\"methods\":{\"eip712Domain()\":{\"details\":\"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"withdrawETH(uint256)\":{\"params\":{\"amount\":\"The amount of ETH to transfer to the owner.\"}},\"withdrawToken(address,uint256)\":{\"params\":{\"amount\":\"The amount of tokens to transfer to the owner.\",\"token\":\"The ERC20 token contract address.\"}}},\"title\":\"TokenRelayer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"withdrawETH(uint256)\":{\"notice\":\"Allows the owner to recover any native ETH held by this contract.\"},\"withdrawToken(address,uint256)\":{\"notice\":\"Allows the owner to recover any ERC20 tokens held by this contract.\"}},\"notice\":\"A relayer contract that accepts ERC20 permit signatures and executes arbitrary calls to a destination contract, both authorized via signature. Flow: 1. User signs a permit allowing the relayer to spend their tokens 2. User signs a payload (e.g., transfer from relayer to another user) 3. Relayer: a. Executes permit to approve the tokens b. Transfers tokens from user to relayer (via transferFrom) c. Forwards the payload call (transfer from relayer to another user)\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TokenRelayer.sol\":\"TokenRelayer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"@openzeppelin/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0xfb223a85dd0b2175cfbbaa325a744e2cd74ecd17c3df2b77b0722f991d2725ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84bf1dea0589ec49c8d15d559cc6d86ee493048a89b2d4adb60fbe705a3d89ae\",\"dweb:/ipfs/Qmd56n556d529wk2pRMhYhm5nhMDhviwereodDikjs68w1\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x53befc41288eaa87edcd3a7be7e8475a32e44c6a29f9bf52fae789781301d9ff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a1d7fab53c4ceaf42391b83d9b36d7e9cc524a8da125cffdcd32c56560f9d1c9\",\"dweb:/ipfs/QmaRZdVhQdqNXofeimibkBG65q9GVcXVZEGpycwwX3znC6\"]},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x304d732678032a9781ae85c8f204c8fba3d3a5e31c02616964e75cfdc5049098\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://299ced486011781dc98f638059678323c03079fefae1482abaa2135b22fa92d0\",\"dweb:/ipfs/QmbZNbcPTBxNvwChavN2kkZZs7xHhYL7mv51KrxMhsMs3j\"]},\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xa516cbf1c7d15d3517c2d668601ce016c54395bf5171918a14e2686977465f53\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1e1d079e8edfb58efd23a311e315a4807b01b5d1cf153f8fa2d0608b9dec3e99\",\"dweb:/ipfs/QmTBExeX2SDTkn5xbk5ssbYSx7VqRp9H4Ux1CY4uQM4b9N\"]},\"@openzeppelin/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x0768b3bdb701fe4994b3be932ca8635551dfebe04c645f77500322741bebf57c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a2059f9ca8d3c11c49ca49fc9c5fb070f18cc85d12a7688e45322ed0e2a1cb99\",\"dweb:/ipfs/QmS2gwX51RAvSw4tYbjHccY2CKbh2uvDzqHLAFXdsddgia\"]},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x1fdc2de9585ab0f1c417f02a873a2b6343cd64bb7ffec6b00ffa11a4a158d9e8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ab223a3d969c6cd7610049431dd42740960c477e45878f5d8b54411f7a32bdc\",\"dweb:/ipfs/QmWumhjvhpKcwx3vDPQninsNVTc3BGvqaihkQakFkQYpaS\"]},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xbeb5cad8aaabe0d35d2ec1a8414d91e81e5a8ca679add4cf57e2f33476861f40\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebb272a5ee2da4e8bd5551334e0ce8dce4e9c56a04570d6bf046d260fab3116a\",\"dweb:/ipfs/QmNw6RyM769qcqFocDq6HJMG2WiEnQbvizpRaUXsACHho2\"]},\"@openzeppelin/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0x8440117ea216b97a7bad690a67449fd372c840d073c8375822667e14702782b4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebb6645995b8290d0b9121825e2533e4e28977b2c6befee76e15e58f0feb61d4\",\"dweb:/ipfs/QmVR72j6kL5R2txuihieDev1FeTi4KWJS1Z6ABbwL3Qtph\"]},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0x6d8579873b9650426bfbd2a754092d1725049ca05e4e3c8c2c82dd9f3453129d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fa3127a8968d55096d37124a9e212013af112affa5e30b84a1d22263c31576c\",\"dweb:/ipfs/QmetxaVcn5Q6nkpF9yXzaxPQ7d3rgrhV13sTH9BgiuzGJL\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]},\"contracts/TokenRelayer.sol\":{\"keccak256\":\"0xa26c2b15e35622e16d260cc4de183ff686e24494dd64b25ef444068239a8eee4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f7e63a4f9e7b5f70ee521378c3009982c70603b25526a6dcc516a4761dfb3d2d\",\"dweb:/ipfs/QmSNc84AJ2RXBPx9rHrJkyPwAbgcqBdQUQ76cJV9qYWMTF\"]}},\"version\":1}" + } + } + } + } +} \ No newline at end of file diff --git a/contracts/relayer/ignition/deployments/chain-137/deployed_addresses.json b/contracts/relayer/ignition/deployments/chain-137/deployed_addresses.json new file mode 100644 index 000000000..84e85450f --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-137/deployed_addresses.json @@ -0,0 +1,3 @@ +{ + "TokenRelayer#TokenRelayer": "0xC9ECD03c89349B3EAe4613c7091c6c3029413785" +} diff --git a/contracts/relayer/ignition/deployments/chain-137/journal.jsonl b/contracts/relayer/ignition/deployments/chain-137/journal.jsonl new file mode 100644 index 000000000..fb7ed9bda --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-137/journal.jsonl @@ -0,0 +1,8 @@ + +{"chainId":137,"type":"DEPLOYMENT_INITIALIZE"} +{"artifactId":"TokenRelayer#TokenRelayer","constructorArgs":["0xce16F69375520ab01377ce7B88f5BA8C48F8D666"],"contractName":"TokenRelayer","dependencies":[],"from":"0x4f1876c3f7ee80be70a057511833b93d2ab2dfc4","futureId":"TokenRelayer#TokenRelayer","futureType":"NAMED_ARTIFACT_CONTRACT_DEPLOYMENT","libraries":{},"strategy":"basic","strategyConfig":{},"type":"DEPLOYMENT_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"TokenRelayer#TokenRelayer","networkInteraction":{"data":"0x610180604052348015610010575f5ffd5b50604051611a4d380380611a4d83398101604081905261002f91610294565b604080518082018252600c81526b2a37b5b2b72932b630bcb2b960a11b602080830191909152825180840190935260018352603160f81b9083015290338061009157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61009a816101d6565b5060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00556100ca826001610225565b610120526100d9816002610225565b61014052815160208084019190912060e052815190820120610100524660a05261016560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166101c45760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642064657374696e6174696f6e000000000000000000000000006044820152606401610088565b6001600160a01b03166101605261046b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6020835110156102405761023983610257565b9050610251565b8161024b8482610359565b5060ff90505b92915050565b5f5f829050601f81511115610281578260405163305a27a960e01b81526004016100889190610413565b805161028c82610448565b179392505050565b5f602082840312156102a4575f5ffd5b81516001600160a01b03811681146102ba575f5ffd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102e957607f821691505b60208210810361030757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561035457805f5260205f20601f840160051c810160208510156103325750805b601f840160051c820191505b81811015610351575f815560010161033e565b50505b505050565b81516001600160401b03811115610372576103726102c1565b6103868161038084546102d5565b8461030d565b6020601f8211600181146103b8575f83156103a15750848201515b5f19600385901b1c1916600184901b178455610351565b5f84815260208120601f198516915b828110156103e757878501518255602094850194600190920191016103c7565b508482101561040457868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610307575f1960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161156c6104e15f395f818160d701528181610525015281816105f4015281816109500152610bf801525f610d2d01525f610cfb01525f6111bc01525f61119401525f6110ef01525f61111901525f611143015261156c5ff3fe608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033000000000000000000000000ce16f69375520ab01377ce7b88f5ba8c48f8d666","id":1,"type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"TokenRelayer#TokenRelayer","networkInteractionId":1,"nonce":5,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"TokenRelayer#TokenRelayer","networkInteractionId":1,"nonce":5,"transaction":{"fees":{"gasPrice":{"_kind":"bigint","value":"210018645749"}},"hash":"0x8245345bb521ac9b32e981257c9eaa80536ef51e7c078e672e4b188777d4461b"},"type":"TRANSACTION_SEND"} +{"futureId":"TokenRelayer#TokenRelayer","hash":"0x8245345bb521ac9b32e981257c9eaa80536ef51e7c078e672e4b188777d4461b","networkInteractionId":1,"receipt":{"blockHash":"0xf317fff146dc003c2d6c735418be76ca67506349b20e0388aedfe7f2b14b8903","blockNumber":83757397,"contractAddress":"0xC9ECD03c89349B3EAe4613c7091c6c3029413785","logs":[{"address":"0xC9ECD03c89349B3EAe4613c7091c6c3029413785","data":"0x","logIndex":1985,"topics":["0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000004f1876c3f7ee80be70a057511833b93d2ab2dfc4"]},{"address":"0x0000000000000000000000000000000000001010","data":"0x00000000000000000000000000000000000000000000000000843d3a3b7ecb1a0000000000000000000000000000000000000000000000000eee8a694dbb7716000000000000000000000000000000000000000000105f417a8a3bd4ba596dee0000000000000000000000000000000000000000000000000e6a4d2f123cabfc000000000000000000000000000000000000000000105f417b0e790ef5d83908","logIndex":1986,"topics":["0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63","0x0000000000000000000000000000000000000000000000000000000000001010","0x0000000000000000000000004f1876c3f7ee80be70a057511833b93d2ab2dfc4","0x0000000000000000000000007ee41d8a25641000661b1ef5e6ae8a00400466b0"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"TokenRelayer#TokenRelayer","result":{"address":"0xC9ECD03c89349B3EAe4613c7091c6c3029413785","type":"SUCCESS"},"type":"DEPLOYMENT_EXECUTION_STATE_COMPLETE"} \ No newline at end of file diff --git a/contracts/relayer/ignition/deployments/chain-42161/artifacts/TokenRelayer#TokenRelayer.dbg.json b/contracts/relayer/ignition/deployments/chain-42161/artifacts/TokenRelayer#TokenRelayer.dbg.json new file mode 100644 index 000000000..14933beb6 --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-42161/artifacts/TokenRelayer#TokenRelayer.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/1f88a3ad5921d6bc8b511a85d672df5a.json" +} diff --git a/contracts/relayer/ignition/deployments/chain-42161/artifacts/TokenRelayer#TokenRelayer.json b/contracts/relayer/ignition/deployments/chain-42161/artifacts/TokenRelayer#TokenRelayer.json new file mode 100644 index 000000000..007aaf524 --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-42161/artifacts/TokenRelayer#TokenRelayer.json @@ -0,0 +1,454 @@ +{ + "_format": "hh-sol-artifact-1", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_destinationContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "ETHWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RelayerExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "TokenWithdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "destinationContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "permitV", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "permitR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "permitS", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "payloadData", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "payloadValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloadNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloadDeadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "payloadV", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "payloadR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "payloadS", + "type": "bytes32" + } + ], + "internalType": "struct TokenRelayer.ExecuteParams", + "name": "params", + "type": "tuple" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "isExecutionCompleted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "usedPayloadNonces", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x610180604052348015610010575f5ffd5b50604051611a4d380380611a4d83398101604081905261002f91610294565b604080518082018252600c81526b2a37b5b2b72932b630bcb2b960a11b602080830191909152825180840190935260018352603160f81b9083015290338061009157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61009a816101d6565b5060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00556100ca826001610225565b610120526100d9816002610225565b61014052815160208084019190912060e052815190820120610100524660a05261016560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166101c45760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642064657374696e6174696f6e000000000000000000000000006044820152606401610088565b6001600160a01b03166101605261046b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6020835110156102405761023983610257565b9050610251565b8161024b8482610359565b5060ff90505b92915050565b5f5f829050601f81511115610281578260405163305a27a960e01b81526004016100889190610413565b805161028c82610448565b179392505050565b5f602082840312156102a4575f5ffd5b81516001600160a01b03811681146102ba575f5ffd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102e957607f821691505b60208210810361030757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561035457805f5260205f20601f840160051c810160208510156103325750805b601f840160051c820191505b81811015610351575f815560010161033e565b50505b505050565b81516001600160401b03811115610372576103726102c1565b6103868161038084546102d5565b8461030d565b6020601f8211600181146103b8575f83156103a15750848201515b5f19600385901b1c1916600184901b178455610351565b5f84815260208120601f198516915b828110156103e757878501518255602094850194600190920191016103c7565b508482101561040457868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610307575f1960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161156c6104e15f395f818160d701528181610525015281816105f4015281816109500152610bf801525f610d2d01525f610cfb01525f6111bc01525f61119401525f6110ef01525f61111901525f611143015261156c5ff3fe608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033", + "contractName": "TokenRelayer", + "deployedBytecode": "0x608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033", + "deployedLinkReferences": {}, + "linkReferences": {}, + "sourceName": "contracts/TokenRelayer.sol" +} diff --git a/contracts/relayer/ignition/deployments/chain-42161/build-info/1f88a3ad5921d6bc8b511a85d672df5a.json b/contracts/relayer/ignition/deployments/chain-42161/build-info/1f88a3ad5921d6bc8b511a85d672df5a.json new file mode 100644 index 000000000..8b7c007e9 --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-42161/build-info/1f88a3ad5921d6bc8b511a85d672df5a.json @@ -0,0 +1,137942 @@ +{ + "id": "1f88a3ad5921d6bc8b511a85d672df5a", + "_format": "hh-sol-build-info-1", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "input": { + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1363.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n /*\n * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n * 0xb0202a11 ===\n * bytes4(keccak256('transferAndCall(address,uint256)')) ^\n * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256)')) ^\n * bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n */\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n * @param from The address which you want to send tokens from.\n * @param to The address which you want to transfer to.\n * @param value The amount of tokens to be transferred.\n * @param data Additional data with no specified format, sent in call to `to`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n * @param spender The address which will spend the funds.\n * @param value The amount of tokens to be spent.\n * @param data Additional data with no specified format, sent in call to `spender`.\n * @return A boolean value indicating whether the operation succeeded unless throwing.\n */\n function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n" + }, + "@openzeppelin/contracts/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n" + }, + "@openzeppelin/contracts/interfaces/IERC5267.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC5267.sol)\n\npragma solidity >=0.4.16;\n\ninterface IERC5267 {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also applies here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n /**\n * @dev An operation with an ERC-20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n if (!_safeTransfer(token, to, value, true)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n if (!_safeTransferFrom(token, from, to, value, true)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n return _safeTransfer(token, to, value, false);\n }\n\n /**\n * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n */\n function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n return _safeTransferFrom(token, from, to, value, false);\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n *\n * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n *\n * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n * set here.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n if (!_safeApprove(token, spender, value, false)) {\n if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));\n if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n safeTransfer(token, to, value);\n } else if (!token.transferAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n * has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n * targeting contracts.\n *\n * Reverts if the returned value is other than `true`.\n */\n function transferFromAndCallRelaxed(\n IERC1363 token,\n address from,\n address to,\n uint256 value,\n bytes memory data\n ) internal {\n if (to.code.length == 0) {\n safeTransferFrom(token, from, to, value);\n } else if (!token.transferFromAndCall(from, to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n * targeting contracts.\n *\n * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n * Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n * once without retrying, and relies on the returned value to be true.\n *\n * Reverts if the returned value is other than `true`.\n */\n function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n if (to.code.length == 0) {\n forceApprove(token, to, value);\n } else if (!token.approveAndCall(to, value, data)) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n * return value is optional (but if data is returned, it must not be false).\n *\n * @param token The token targeted by the call.\n * @param to The recipient of the tokens\n * @param value The amount of token to transfer\n * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n */\n function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {\n bytes4 selector = IERC20.transfer.selector;\n\n assembly (\"memory-safe\") {\n let fmp := mload(0x40)\n mstore(0x00, selector)\n mstore(0x04, and(to, shr(96, not(0))))\n mstore(0x24, value)\n success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n // if call success and return is true, all is good.\n // otherwise (not success or return is not true), we need to perform further checks\n if iszero(and(success, eq(mload(0x00), 1))) {\n // if the call was a failure and bubble is enabled, bubble the error\n if and(iszero(success), bubble) {\n returndatacopy(fmp, 0x00, returndatasize())\n revert(fmp, returndatasize())\n }\n // if the return value is not true, then the call is only successful if:\n // - the token address has code\n // - the returndata is empty\n success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n }\n mstore(0x40, fmp)\n }\n }\n\n /**\n * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n * value: the return value is optional (but if data is returned, it must not be false).\n *\n * @param token The token targeted by the call.\n * @param from The sender of the tokens\n * @param to The recipient of the tokens\n * @param value The amount of token to transfer\n * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n */\n function _safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value,\n bool bubble\n ) private returns (bool success) {\n bytes4 selector = IERC20.transferFrom.selector;\n\n assembly (\"memory-safe\") {\n let fmp := mload(0x40)\n mstore(0x00, selector)\n mstore(0x04, and(from, shr(96, not(0))))\n mstore(0x24, and(to, shr(96, not(0))))\n mstore(0x44, value)\n success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)\n // if call success and return is true, all is good.\n // otherwise (not success or return is not true), we need to perform further checks\n if iszero(and(success, eq(mload(0x00), 1))) {\n // if the call was a failure and bubble is enabled, bubble the error\n if and(iszero(success), bubble) {\n returndatacopy(fmp, 0x00, returndatasize())\n revert(fmp, returndatasize())\n }\n // if the return value is not true, then the call is only successful if:\n // - the token address has code\n // - the returndata is empty\n success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n }\n mstore(0x40, fmp)\n mstore(0x60, 0)\n }\n }\n\n /**\n * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n * the return value is optional (but if data is returned, it must not be false).\n *\n * @param token The token targeted by the call.\n * @param spender The spender of the tokens\n * @param value The amount of token to transfer\n * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n */\n function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {\n bytes4 selector = IERC20.approve.selector;\n\n assembly (\"memory-safe\") {\n let fmp := mload(0x40)\n mstore(0x00, selector)\n mstore(0x04, and(spender, shr(96, not(0))))\n mstore(0x24, value)\n success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)\n // if call success and return is true, all is good.\n // otherwise (not success or return is not true), we need to perform further checks\n if iszero(and(success, eq(mload(0x00), 1))) {\n // if the call was a failure and bubble is enabled, bubble the error\n if and(iszero(success), bubble) {\n returndatacopy(fmp, 0x00, returndatasize())\n revert(fmp, returndatasize())\n }\n // if the return value is not true, then the call is only successful if:\n // - the token address has code\n // - the returndata is empty\n success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n }\n mstore(0x40, fmp)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Bytes.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/Bytes.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\n\n/**\n * @dev Bytes operations.\n */\nlibrary Bytes {\n /**\n * @dev Forward search for `s` in `buffer`\n * * If `s` is present in the buffer, returns the index of the first instance\n * * If `s` is not present in the buffer, returns type(uint256).max\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n */\n function indexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n return indexOf(buffer, s, 0);\n }\n\n /**\n * @dev Forward search for `s` in `buffer` starting at position `pos`\n * * If `s` is present in the buffer (at or after `pos`), returns the index of the next instance\n * * If `s` is not present in the buffer (at or after `pos`), returns type(uint256).max\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n */\n function indexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n uint256 length = buffer.length;\n for (uint256 i = pos; i < length; ++i) {\n if (bytes1(_unsafeReadBytesOffset(buffer, i)) == s) {\n return i;\n }\n }\n return type(uint256).max;\n }\n\n /**\n * @dev Backward search for `s` in `buffer`\n * * If `s` is present in the buffer, returns the index of the last instance\n * * If `s` is not present in the buffer, returns type(uint256).max\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n */\n function lastIndexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n return lastIndexOf(buffer, s, type(uint256).max);\n }\n\n /**\n * @dev Backward search for `s` in `buffer` starting at position `pos`\n * * If `s` is present in the buffer (at or before `pos`), returns the index of the previous instance\n * * If `s` is not present in the buffer (at or before `pos`), returns type(uint256).max\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n */\n function lastIndexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n unchecked {\n uint256 length = buffer.length;\n for (uint256 i = Math.min(Math.saturatingAdd(pos, 1), length); i > 0; --i) {\n if (bytes1(_unsafeReadBytesOffset(buffer, i - 1)) == s) {\n return i - 1;\n }\n }\n return type(uint256).max;\n }\n }\n\n /**\n * @dev Copies the content of `buffer`, from `start` (included) to the end of `buffer` into a new bytes object in\n * memory.\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n */\n function slice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n return slice(buffer, start, buffer.length);\n }\n\n /**\n * @dev Copies the content of `buffer`, from `start` (included) to `end` (excluded) into a new bytes object in\n * memory. The `end` argument is truncated to the length of the `buffer`.\n *\n * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n */\n function slice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n // sanitize\n end = Math.min(end, buffer.length);\n start = Math.min(start, end);\n\n // allocate and copy\n bytes memory result = new bytes(end - start);\n assembly (\"memory-safe\") {\n mcopy(add(result, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n }\n\n return result;\n }\n\n /**\n * @dev Moves the content of `buffer`, from `start` (included) to the end of `buffer` to the start of that buffer,\n * and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:].\n *\n * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead\n */\n function splice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n return splice(buffer, start, buffer.length);\n }\n\n /**\n * @dev Moves the content of `buffer`, from `start` (included) to `end` (excluded) to the start of that buffer,\n * and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:end].\n * The `end` argument is truncated to the length of the `buffer`.\n *\n * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead\n */\n function splice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n // sanitize\n end = Math.min(end, buffer.length);\n start = Math.min(start, end);\n\n // move and resize\n assembly (\"memory-safe\") {\n mcopy(add(buffer, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n mstore(buffer, sub(end, start))\n }\n\n return buffer;\n }\n\n /**\n * @dev Replaces bytes in `buffer` starting at `pos` with all bytes from `replacement`.\n *\n * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`).\n * If `pos >= buffer.length`, no replacement occurs and the buffer is returned unchanged.\n *\n * NOTE: This function modifies the provided buffer in place.\n */\n function replace(bytes memory buffer, uint256 pos, bytes memory replacement) internal pure returns (bytes memory) {\n return replace(buffer, pos, replacement, 0, replacement.length);\n }\n\n /**\n * @dev Replaces bytes in `buffer` starting at `pos` with bytes from `replacement` starting at `offset`.\n * Copies at most `length` bytes from `replacement` to `buffer`.\n *\n * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`, `offset` is\n * clamped to `[0, replacement.length]`, and `length` is clamped to `min(length, replacement.length - offset,\n * buffer.length - pos))`. If `pos >= buffer.length` or `offset >= replacement.length`, no replacement occurs\n * and the buffer is returned unchanged.\n *\n * NOTE: This function modifies the provided buffer in place.\n */\n function replace(\n bytes memory buffer,\n uint256 pos,\n bytes memory replacement,\n uint256 offset,\n uint256 length\n ) internal pure returns (bytes memory) {\n // sanitize\n pos = Math.min(pos, buffer.length);\n offset = Math.min(offset, replacement.length);\n length = Math.min(length, Math.min(replacement.length - offset, buffer.length - pos));\n\n // replace\n assembly (\"memory-safe\") {\n mcopy(add(add(buffer, 0x20), pos), add(add(replacement, 0x20), offset), length)\n }\n\n return buffer;\n }\n\n /**\n * @dev Concatenate an array of bytes into a single bytes object.\n *\n * For fixed bytes types, we recommend using the solidity built-in `bytes.concat` or (equivalent)\n * `abi.encodePacked`.\n *\n * NOTE: this could be done in assembly with a single loop that expands starting at the FMP, but that would be\n * significantly less readable. It might be worth benchmarking the savings of the full-assembly approach.\n */\n function concat(bytes[] memory buffers) internal pure returns (bytes memory) {\n uint256 length = 0;\n for (uint256 i = 0; i < buffers.length; ++i) {\n length += buffers[i].length;\n }\n\n bytes memory result = new bytes(length);\n\n uint256 offset = 0x20;\n for (uint256 i = 0; i < buffers.length; ++i) {\n bytes memory input = buffers[i];\n assembly (\"memory-safe\") {\n mcopy(add(result, offset), add(input, 0x20), mload(input))\n }\n unchecked {\n offset += input.length;\n }\n }\n\n return result;\n }\n\n /**\n * @dev Split each byte in `input` into two nibbles (4 bits each)\n *\n * Example: hex\"01234567\" → hex\"0001020304050607\"\n */\n function toNibbles(bytes memory input) internal pure returns (bytes memory output) {\n assembly (\"memory-safe\") {\n let length := mload(input)\n output := mload(0x40)\n mstore(0x40, add(add(output, 0x20), mul(length, 2)))\n mstore(output, mul(length, 2))\n for {\n let i := 0\n } lt(i, length) {\n i := add(i, 0x10)\n } {\n let chunk := shr(128, mload(add(add(input, 0x20), i)))\n chunk := and(\n 0x0000000000000000ffffffffffffffff0000000000000000ffffffffffffffff,\n or(shl(64, chunk), chunk)\n )\n chunk := and(\n 0x00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff,\n or(shl(32, chunk), chunk)\n )\n chunk := and(\n 0x0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff,\n or(shl(16, chunk), chunk)\n )\n chunk := and(\n 0x00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff,\n or(shl(8, chunk), chunk)\n )\n chunk := and(\n 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f,\n or(shl(4, chunk), chunk)\n )\n mstore(add(add(output, 0x20), mul(i, 2)), chunk)\n }\n }\n }\n\n /**\n * @dev Returns true if the two byte buffers are equal.\n */\n function equal(bytes memory a, bytes memory b) internal pure returns (bool) {\n return a.length == b.length && keccak256(a) == keccak256(b);\n }\n\n /**\n * @dev Reverses the byte order of a bytes32 value, converting between little-endian and big-endian.\n * Inspired by https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel[Reverse Parallel]\n */\n function reverseBytes32(bytes32 value) internal pure returns (bytes32) {\n value = // swap bytes\n ((value >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\n ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\n value = // swap 2-byte long pairs\n ((value >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\n ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\n value = // swap 4-byte long pairs\n ((value >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\n ((value & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\n value = // swap 8-byte long pairs\n ((value >> 64) & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) |\n ((value & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) << 64);\n return (value >> 128) | (value << 128); // swap 16-byte long pairs\n }\n\n /// @dev Same as {reverseBytes32} but optimized for 128-bit values.\n function reverseBytes16(bytes16 value) internal pure returns (bytes16) {\n value = // swap bytes\n ((value & 0xFF00FF00FF00FF00FF00FF00FF00FF00) >> 8) |\n ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\n value = // swap 2-byte long pairs\n ((value & 0xFFFF0000FFFF0000FFFF0000FFFF0000) >> 16) |\n ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\n value = // swap 4-byte long pairs\n ((value & 0xFFFFFFFF00000000FFFFFFFF00000000) >> 32) |\n ((value & 0x00000000FFFFFFFF00000000FFFFFFFF) << 32);\n return (value >> 64) | (value << 64); // swap 8-byte long pairs\n }\n\n /// @dev Same as {reverseBytes32} but optimized for 64-bit values.\n function reverseBytes8(bytes8 value) internal pure returns (bytes8) {\n value = ((value & 0xFF00FF00FF00FF00) >> 8) | ((value & 0x00FF00FF00FF00FF) << 8); // swap bytes\n value = ((value & 0xFFFF0000FFFF0000) >> 16) | ((value & 0x0000FFFF0000FFFF) << 16); // swap 2-byte long pairs\n return (value >> 32) | (value << 32); // swap 4-byte long pairs\n }\n\n /// @dev Same as {reverseBytes32} but optimized for 32-bit values.\n function reverseBytes4(bytes4 value) internal pure returns (bytes4) {\n value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); // swap bytes\n return (value >> 16) | (value << 16); // swap 2-byte long pairs\n }\n\n /// @dev Same as {reverseBytes32} but optimized for 16-bit values.\n function reverseBytes2(bytes2 value) internal pure returns (bytes2) {\n return (value >> 8) | (value << 8);\n }\n\n /**\n * @dev Counts the number of leading zero bits a bytes array. Returns `8 * buffer.length`\n * if the buffer is all zeros.\n */\n function clz(bytes memory buffer) internal pure returns (uint256) {\n for (uint256 i = 0; i < buffer.length; i += 0x20) {\n bytes32 chunk = _unsafeReadBytesOffset(buffer, i);\n if (chunk != bytes32(0)) {\n return Math.min(8 * i + Math.clz(uint256(chunk)), 8 * buffer.length);\n }\n }\n return 8 * buffer.length;\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(add(buffer, 0x20), offset))\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature is invalid.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n * invalidation or nonces for replay protection.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n *\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(\n bytes32 hash,\n bytes memory signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly (\"memory-safe\") {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Variant of {tryRecover} that takes a signature in calldata\n */\n function tryRecoverCalldata(\n bytes32 hash,\n bytes calldata signature\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, calldata slices would work here, but are\n // significantly more expensive (length check) than using calldataload in assembly.\n assembly (\"memory-safe\") {\n r := calldataload(signature.offset)\n s := calldataload(add(signature.offset, 0x20))\n v := byte(0, calldataload(add(signature.offset, 0x40)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n * invalidation or nonces for replay protection.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Variant of {recover} that takes a signature in calldata\n */\n function recoverCalldata(bytes32 hash, bytes calldata signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecoverCalldata(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r` and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Parse a signature into its `v`, `r` and `s` components. Supports 65-byte and 64-byte (ERC-2098)\n * formats. Returns (0,0,0) for invalid signatures.\n *\n * For 64-byte signatures, `v` is automatically normalized to 27 or 28.\n * For 65-byte signatures, `v` is returned as-is and MUST already be 27 or 28 for use with ecrecover.\n *\n * Consider validating the result before use, or use {tryRecover}/{recover} which perform full validation.\n */\n function parse(bytes memory signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) {\n assembly (\"memory-safe\") {\n // Check the signature length\n switch mload(signature)\n // - case 65: r,s,v signature (standard)\n case 65 {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098)\n case 64 {\n let vs := mload(add(signature, 0x40))\n r := mload(add(signature, 0x20))\n s := and(vs, shr(1, not(0)))\n v := add(shr(255, vs), 27)\n }\n default {\n r := 0\n s := 0\n v := 0\n }\n }\n }\n\n /**\n * @dev Variant of {parse} that takes a signature in calldata\n */\n function parseCalldata(bytes calldata signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) {\n assembly (\"memory-safe\") {\n // Check the signature length\n switch signature.length\n // - case 65: r,s,v signature (standard)\n case 65 {\n r := calldataload(signature.offset)\n s := calldataload(add(signature.offset, 0x20))\n v := byte(0, calldataload(add(signature.offset, 0x40)))\n }\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098)\n case 64 {\n let vs := calldataload(add(signature.offset, 0x20))\n r := calldataload(signature.offset)\n s := and(vs, shr(1, not(0)))\n v := add(shr(255, vs), 27)\n }\n default {\n r := 0\n s := 0\n v := 0\n }\n }\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.24;\n\nimport {MessageHashUtils} from \"./MessageHashUtils.sol\";\nimport {ShortStrings, ShortString} from \"../ShortStrings.sol\";\nimport {IERC5267} from \"../../interfaces/IERC5267.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n *\n * @custom:oz-upgrades-unsafe-allow state-variable-immutable\n */\nabstract contract EIP712 is IERC5267 {\n using ShortStrings for *;\n\n bytes32 private constant TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n bytes32 private immutable _cachedDomainSeparator;\n uint256 private immutable _cachedChainId;\n address private immutable _cachedThis;\n\n bytes32 private immutable _hashedName;\n bytes32 private immutable _hashedVersion;\n\n ShortString private immutable _name;\n ShortString private immutable _version;\n // slither-disable-next-line constable-states\n string private _nameFallback;\n // slither-disable-next-line constable-states\n string private _versionFallback;\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor(string memory name, string memory version) {\n _name = name.toShortStringWithFallback(_nameFallback);\n _version = version.toShortStringWithFallback(_versionFallback);\n _hashedName = keccak256(bytes(name));\n _hashedVersion = keccak256(bytes(version));\n\n _cachedChainId = block.chainid;\n _cachedDomainSeparator = _buildDomainSeparator();\n _cachedThis = address(this);\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (address(this) == _cachedThis && block.chainid == _cachedChainId) {\n return _cachedDomainSeparator;\n } else {\n return _buildDomainSeparator();\n }\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /// @inheritdoc IERC5267\n function eip712Domain()\n public\n view\n virtual\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: By default this function reads _name which is an immutable value.\n * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n */\n // solhint-disable-next-line func-name-mixedcase\n function _EIP712Name() internal view returns (string memory) {\n return _name.toStringWithFallback(_nameFallback);\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: By default this function reads _version which is an immutable value.\n * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).\n */\n // solhint-disable-next-line func-name-mixedcase\n function _EIP712Version() internal view returns (string memory) {\n return _version.toStringWithFallback(_versionFallback);\n }\n}\n" + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.24;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n error ERC5267ExtensionsNotSupported();\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns the EIP-712 domain separator constructed from an `eip712Domain`. See {IERC5267-eip712Domain}\n *\n * This function dynamically constructs the domain separator based on which fields are present in the\n * `fields` parameter. It contains flags that indicate which domain fields are present:\n *\n * * Bit 0 (0x01): name\n * * Bit 1 (0x02): version\n * * Bit 2 (0x04): chainId\n * * Bit 3 (0x08): verifyingContract\n * * Bit 4 (0x10): salt\n *\n * Arguments that correspond to fields which are not present in `fields` are ignored. For example, if `fields` is\n * `0x0f` (`0b01111`), then the `salt` parameter is ignored.\n */\n function toDomainSeparator(\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt\n ) internal pure returns (bytes32 hash) {\n return\n toDomainSeparator(\n fields,\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId,\n verifyingContract,\n salt\n );\n }\n\n /// @dev Variant of {toDomainSeparator-bytes1-string-string-uint256-address-bytes32} that uses hashed name and version.\n function toDomainSeparator(\n bytes1 fields,\n bytes32 nameHash,\n bytes32 versionHash,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt\n ) internal pure returns (bytes32 hash) {\n bytes32 domainTypeHash = toDomainTypeHash(fields);\n\n assembly (\"memory-safe\") {\n // align fields to the right for easy processing\n fields := shr(248, fields)\n\n // FMP used as scratch space\n let fmp := mload(0x40)\n mstore(fmp, domainTypeHash)\n\n let ptr := add(fmp, 0x20)\n if and(fields, 0x01) {\n mstore(ptr, nameHash)\n ptr := add(ptr, 0x20)\n }\n if and(fields, 0x02) {\n mstore(ptr, versionHash)\n ptr := add(ptr, 0x20)\n }\n if and(fields, 0x04) {\n mstore(ptr, chainId)\n ptr := add(ptr, 0x20)\n }\n if and(fields, 0x08) {\n mstore(ptr, verifyingContract)\n ptr := add(ptr, 0x20)\n }\n if and(fields, 0x10) {\n mstore(ptr, salt)\n ptr := add(ptr, 0x20)\n }\n\n hash := keccak256(fmp, sub(ptr, fmp))\n }\n }\n\n /// @dev Builds an EIP-712 domain type hash depending on the `fields` provided, following https://eips.ethereum.org/EIPS/eip-5267[ERC-5267]\n function toDomainTypeHash(bytes1 fields) internal pure returns (bytes32 hash) {\n if (fields & 0x20 == 0x20) revert ERC5267ExtensionsNotSupported();\n\n assembly (\"memory-safe\") {\n // align fields to the right for easy processing\n fields := shr(248, fields)\n\n // FMP used as scratch space\n let fmp := mload(0x40)\n mstore(fmp, \"EIP712Domain(\")\n\n let ptr := add(fmp, 0x0d)\n // name field\n if and(fields, 0x01) {\n mstore(ptr, \"string name,\")\n ptr := add(ptr, 0x0c)\n }\n // version field\n if and(fields, 0x02) {\n mstore(ptr, \"string version,\")\n ptr := add(ptr, 0x0f)\n }\n // chainId field\n if and(fields, 0x04) {\n mstore(ptr, \"uint256 chainId,\")\n ptr := add(ptr, 0x10)\n }\n // verifyingContract field\n if and(fields, 0x08) {\n mstore(ptr, \"address verifyingContract,\")\n ptr := add(ptr, 0x1a)\n }\n // salt field\n if and(fields, 0x10) {\n mstore(ptr, \"bytes32 salt,\")\n ptr := add(ptr, 0x0d)\n }\n // if any field is enabled, remove the trailing comma\n ptr := sub(ptr, iszero(iszero(and(fields, 0x1f))))\n // add the closing brace\n mstore8(ptr, 0x29) // add closing brace\n ptr := add(ptr, 1)\n\n hash := keccak256(fmp, sub(ptr, fmp))\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Return the 512-bit addition of two uint256.\n *\n * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n */\n function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n assembly (\"memory-safe\") {\n low := add(a, b)\n high := lt(low, a)\n }\n }\n\n /**\n * @dev Return the 512-bit multiplication of two uint256.\n *\n * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n */\n function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = high * 2²⁵⁶ + low.\n assembly (\"memory-safe\") {\n let mm := mulmod(a, b, not(0))\n low := mul(a, b)\n high := sub(sub(mm, low), lt(mm, low))\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a + b;\n success = c >= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a - b;\n success = c <= a;\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n uint256 c = a * b;\n assembly (\"memory-safe\") {\n // Only true when the multiplication doesn't overflow\n // (c / a == b) || (a == 0)\n success := or(eq(div(c, a), b), iszero(a))\n }\n // equivalent to: success ? c : 0\n result = c * SafeCast.toUint(success);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `DIV` opcode returns zero when the denominator is 0.\n result := div(a, b)\n }\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n unchecked {\n success = b > 0;\n assembly (\"memory-safe\") {\n // The `MOD` opcode returns zero when the denominator is 0.\n result := mod(a, b)\n }\n }\n }\n\n /**\n * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryAdd(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n */\n function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n (, uint256 result) = trySub(a, b);\n return result;\n }\n\n /**\n * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n */\n function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n (bool success, uint256 result) = tryMul(a, b);\n return ternary(success, result, type(uint256).max);\n }\n\n /**\n * @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n unchecked {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n\n // The following calculation ensures accurate ceiling division without overflow.\n // Since a is non-zero, (a - 1) / b will not overflow.\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n // but the largest value we can obtain is type(uint256).max - 1, which happens\n // when a = type(uint256).max and b = 1.\n unchecked {\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n }\n }\n\n /**\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n *\n * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n\n // Handle non-overflow cases, 256 by 256 division.\n if (high == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return low / denominator;\n }\n\n // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n if (denominator <= high) {\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [high low].\n uint256 remainder;\n assembly (\"memory-safe\") {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n high := sub(high, gt(remainder, low))\n low := sub(low, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly (\"memory-safe\") {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [high low] by twos.\n low := div(low, twos)\n\n // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from high into low.\n low |= high * twos;\n\n // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n inverse *= 2 - denominator * inverse; // inverse mod 2³²\n inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n // is no longer required.\n result = low * inverse;\n return result;\n }\n }\n\n /**\n * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n }\n\n /**\n * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n */\n function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n unchecked {\n (uint256 high, uint256 low) = mul512(x, y);\n if (high >= 1 << n) {\n Panic.panic(Panic.UNDER_OVERFLOW);\n }\n return (high << (256 - n)) | (low >> n);\n }\n }\n\n /**\n * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n */\n function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n }\n\n /**\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n *\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n *\n * If the input value is not inversible, 0 is returned.\n *\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n */\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n unchecked {\n if (n == 0) return 0;\n\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n // ax + ny = 1\n // ax = 1 + (-y)n\n // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n // If the remainder is 0 the gcd is n right away.\n uint256 remainder = a % n;\n uint256 gcd = n;\n\n // Therefore the initial coefficients are:\n // ax + ny = gcd(a, n) = n\n // 0a + 1n = n\n int256 x = 0;\n int256 y = 1;\n\n while (remainder != 0) {\n uint256 quotient = gcd / remainder;\n\n (gcd, remainder) = (\n // The old remainder is the next gcd to try.\n remainder,\n // Compute the next remainder.\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n // where gcd is at most n (capped to type(uint256).max)\n gcd - remainder * quotient\n );\n\n (x, y) = (\n // Increment the coefficient of a.\n y,\n // Decrement the coefficient of n.\n // Can overflow, but the result is casted to uint256 so that the\n // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n x - y * int256(quotient)\n );\n }\n\n if (gcd != 1) return 0; // No inverse exists.\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n }\n }\n\n /**\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n *\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n *\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n */\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n unchecked {\n return Math.modExp(a, p - 2, p);\n }\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n *\n * Requirements:\n * - modulus can't be zero\n * - underlying staticcall to precompile must succeed\n *\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n * interpreted as 0.\n */\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n (bool success, uint256 result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n * to operate modulo 0 or if the underlying precompile reverted.\n *\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n * of a revert, but the result may be incorrectly interpreted as 0.\n */\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n if (m == 0) return (false, 0);\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n // | Offset | Content | Content (Hex) |\n // |-----------|------------|--------------------------------------------------------------------|\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n mstore(ptr, 0x20)\n mstore(add(ptr, 0x20), 0x20)\n mstore(add(ptr, 0x40), 0x20)\n mstore(add(ptr, 0x60), b)\n mstore(add(ptr, 0x80), e)\n mstore(add(ptr, 0xa0), m)\n\n // Given the result < m, it's guaranteed to fit in 32 bytes,\n // so we can use the memory scratch space located at offset 0.\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n result := mload(0x00)\n }\n }\n\n /**\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\n */\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n (bool success, bytes memory result) = tryModExp(b, e, m);\n if (!success) {\n Panic.panic(Panic.DIVISION_BY_ZERO);\n }\n return result;\n }\n\n /**\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n */\n function tryModExp(\n bytes memory b,\n bytes memory e,\n bytes memory m\n ) internal view returns (bool success, bytes memory result) {\n if (_zeroBytes(m)) return (false, new bytes(0));\n\n uint256 mLen = m.length;\n\n // Encode call args in result and move the free memory pointer\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n assembly (\"memory-safe\") {\n let dataPtr := add(result, 0x20)\n // Write result on top of args to avoid allocating extra memory.\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n // Overwrite the length.\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n mstore(result, mLen)\n // Set the memory pointer after the returned data.\n mstore(0x40, add(dataPtr, mLen))\n }\n }\n\n /**\n * @dev Returns whether the provided byte array is zero.\n */\n function _zeroBytes(bytes memory buffer) private pure returns (bool) {\n uint256 chunk;\n for (uint256 i = 0; i < buffer.length; i += 0x20) {\n // See _unsafeReadBytesOffset from utils/Bytes.sol\n assembly (\"memory-safe\") {\n chunk := mload(add(add(buffer, 0x20), i))\n }\n if (chunk >> (8 * saturatingSub(i + 0x20, buffer.length)) != 0) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n * using integer operations.\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n unchecked {\n // Take care of easy edge cases when a == 0 or a == 1\n if (a <= 1) {\n return a;\n }\n\n // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n // the current value as `ε_n = | x_n - sqrt(a) |`.\n //\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n // bigger than any uint256.\n //\n // By noticing that\n // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n // to the msb function.\n uint256 aa = a;\n uint256 xn = 1;\n\n if (aa >= (1 << 128)) {\n aa >>= 128;\n xn <<= 64;\n }\n if (aa >= (1 << 64)) {\n aa >>= 64;\n xn <<= 32;\n }\n if (aa >= (1 << 32)) {\n aa >>= 32;\n xn <<= 16;\n }\n if (aa >= (1 << 16)) {\n aa >>= 16;\n xn <<= 8;\n }\n if (aa >= (1 << 8)) {\n aa >>= 8;\n xn <<= 4;\n }\n if (aa >= (1 << 4)) {\n aa >>= 4;\n xn <<= 2;\n }\n if (aa >= (1 << 2)) {\n xn <<= 1;\n }\n\n // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n //\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n // This is going to be our x_0 (and ε_0)\n xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n // From here, Newton's method give us:\n // x_{n+1} = (x_n + a / x_n) / 2\n //\n // One should note that:\n // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n // = ((x_n² + a) / (2 * x_n))² - a\n // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n // = (x_n² - a)² / (2 * x_n)²\n // = ((x_n² - a) / (2 * x_n))²\n // ≥ 0\n // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n //\n // This gives us the proof of quadratic convergence of the sequence:\n // ε_{n+1} = | x_{n+1} - sqrt(a) |\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\n // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n // = | (x_n - sqrt(a))² / (2 * x_n) |\n // = | ε_n² / (2 * x_n) |\n // = ε_n² / | (2 * x_n) |\n //\n // For the first iteration, we have a special case where x_0 is known:\n // ε_1 = ε_0² / | (2 * x_0) |\n // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n // ≤ 2**(2*e-4) / (3 * 2**(e-1))\n // ≤ 2**(e-3) / 3\n // ≤ 2**(e-3-log2(3))\n // ≤ 2**(e-4.5)\n //\n // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n // ε_{n+1} = ε_n² / | (2 * x_n) |\n // ≤ (2**(e-k))² / (2 * 2**(e-1))\n // ≤ 2**(2*e-2*k) / 2**e\n // ≤ 2**(e-2*k)\n xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above\n xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5\n xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9\n xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18\n xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36\n xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72\n\n // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n // sqrt(a) or sqrt(a) + 1.\n return xn - SafeCast.toUint(xn > a / xn);\n }\n }\n\n /**\n * @dev Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // If upper 8 bits of 16-bit half set, add 8 to result\n r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n // If upper 4 bits of 8-bit half set, add 4 to result\n r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n // Shifts value right by the current result and use it as an index into this lookup table:\n //\n // | x (4 bits) | index | table[index] = MSB position |\n // |------------|---------|-----------------------------|\n // | 0000 | 0 | table[0] = 0 |\n // | 0001 | 1 | table[1] = 0 |\n // | 0010 | 2 | table[2] = 1 |\n // | 0011 | 3 | table[3] = 1 |\n // | 0100 | 4 | table[4] = 2 |\n // | 0101 | 5 | table[5] = 2 |\n // | 0110 | 6 | table[6] = 2 |\n // | 0111 | 7 | table[7] = 2 |\n // | 1000 | 8 | table[8] = 3 |\n // | 1001 | 9 | table[9] = 3 |\n // | 1010 | 10 | table[10] = 3 |\n // | 1011 | 11 | table[11] = 3 |\n // | 1100 | 12 | table[12] = 3 |\n // | 1101 | 13 | table[13] = 3 |\n // | 1110 | 14 | table[14] = 3 |\n // | 1111 | 15 | table[15] = 3 |\n //\n // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the first 16 bytes (most significant half).\n assembly (\"memory-safe\") {\n r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n }\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 x) internal pure returns (uint256 r) {\n // If value has upper 128 bits set, log2 result is at least 128\n r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n // If upper 64 bits of 128-bit half set, add 64 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n // If upper 32 bits of 64-bit half set, add 32 to result\n r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n // If upper 16 bits of 32-bit half set, add 16 to result\n r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n\n /**\n * @dev Counts the number of leading zero bits in a uint256.\n */\n function clz(uint256 x) internal pure returns (uint256) {\n return ternary(x == 0, 256, 255 - log2(x));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n /**\n * @dev Value doesn't fit in a uint of `bits` size.\n */\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n /**\n * @dev An int value doesn't fit in a uint of `bits` size.\n */\n error SafeCastOverflowedIntToUint(int256 value);\n\n /**\n * @dev Value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n /**\n * @dev A uint value doesn't fit in an int of `bits` size.\n */\n error SafeCastOverflowedUintToInt(uint256 value);\n\n /**\n * @dev Returns the downcasted uint248 from uint256, reverting on\n * overflow (when the input is greater than largest uint248).\n *\n * Counterpart to Solidity's `uint248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n */\n function toUint248(uint256 value) internal pure returns (uint248) {\n if (value > type(uint248).max) {\n revert SafeCastOverflowedUintDowncast(248, value);\n }\n return uint248(value);\n }\n\n /**\n * @dev Returns the downcasted uint240 from uint256, reverting on\n * overflow (when the input is greater than largest uint240).\n *\n * Counterpart to Solidity's `uint240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n */\n function toUint240(uint256 value) internal pure returns (uint240) {\n if (value > type(uint240).max) {\n revert SafeCastOverflowedUintDowncast(240, value);\n }\n return uint240(value);\n }\n\n /**\n * @dev Returns the downcasted uint232 from uint256, reverting on\n * overflow (when the input is greater than largest uint232).\n *\n * Counterpart to Solidity's `uint232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n */\n function toUint232(uint256 value) internal pure returns (uint232) {\n if (value > type(uint232).max) {\n revert SafeCastOverflowedUintDowncast(232, value);\n }\n return uint232(value);\n }\n\n /**\n * @dev Returns the downcasted uint224 from uint256, reverting on\n * overflow (when the input is greater than largest uint224).\n *\n * Counterpart to Solidity's `uint224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n */\n function toUint224(uint256 value) internal pure returns (uint224) {\n if (value > type(uint224).max) {\n revert SafeCastOverflowedUintDowncast(224, value);\n }\n return uint224(value);\n }\n\n /**\n * @dev Returns the downcasted uint216 from uint256, reverting on\n * overflow (when the input is greater than largest uint216).\n *\n * Counterpart to Solidity's `uint216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n */\n function toUint216(uint256 value) internal pure returns (uint216) {\n if (value > type(uint216).max) {\n revert SafeCastOverflowedUintDowncast(216, value);\n }\n return uint216(value);\n }\n\n /**\n * @dev Returns the downcasted uint208 from uint256, reverting on\n * overflow (when the input is greater than largest uint208).\n *\n * Counterpart to Solidity's `uint208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n */\n function toUint208(uint256 value) internal pure returns (uint208) {\n if (value > type(uint208).max) {\n revert SafeCastOverflowedUintDowncast(208, value);\n }\n return uint208(value);\n }\n\n /**\n * @dev Returns the downcasted uint200 from uint256, reverting on\n * overflow (when the input is greater than largest uint200).\n *\n * Counterpart to Solidity's `uint200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n */\n function toUint200(uint256 value) internal pure returns (uint200) {\n if (value > type(uint200).max) {\n revert SafeCastOverflowedUintDowncast(200, value);\n }\n return uint200(value);\n }\n\n /**\n * @dev Returns the downcasted uint192 from uint256, reverting on\n * overflow (when the input is greater than largest uint192).\n *\n * Counterpart to Solidity's `uint192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n */\n function toUint192(uint256 value) internal pure returns (uint192) {\n if (value > type(uint192).max) {\n revert SafeCastOverflowedUintDowncast(192, value);\n }\n return uint192(value);\n }\n\n /**\n * @dev Returns the downcasted uint184 from uint256, reverting on\n * overflow (when the input is greater than largest uint184).\n *\n * Counterpart to Solidity's `uint184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n */\n function toUint184(uint256 value) internal pure returns (uint184) {\n if (value > type(uint184).max) {\n revert SafeCastOverflowedUintDowncast(184, value);\n }\n return uint184(value);\n }\n\n /**\n * @dev Returns the downcasted uint176 from uint256, reverting on\n * overflow (when the input is greater than largest uint176).\n *\n * Counterpart to Solidity's `uint176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n */\n function toUint176(uint256 value) internal pure returns (uint176) {\n if (value > type(uint176).max) {\n revert SafeCastOverflowedUintDowncast(176, value);\n }\n return uint176(value);\n }\n\n /**\n * @dev Returns the downcasted uint168 from uint256, reverting on\n * overflow (when the input is greater than largest uint168).\n *\n * Counterpart to Solidity's `uint168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n */\n function toUint168(uint256 value) internal pure returns (uint168) {\n if (value > type(uint168).max) {\n revert SafeCastOverflowedUintDowncast(168, value);\n }\n return uint168(value);\n }\n\n /**\n * @dev Returns the downcasted uint160 from uint256, reverting on\n * overflow (when the input is greater than largest uint160).\n *\n * Counterpart to Solidity's `uint160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n */\n function toUint160(uint256 value) internal pure returns (uint160) {\n if (value > type(uint160).max) {\n revert SafeCastOverflowedUintDowncast(160, value);\n }\n return uint160(value);\n }\n\n /**\n * @dev Returns the downcasted uint152 from uint256, reverting on\n * overflow (when the input is greater than largest uint152).\n *\n * Counterpart to Solidity's `uint152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n */\n function toUint152(uint256 value) internal pure returns (uint152) {\n if (value > type(uint152).max) {\n revert SafeCastOverflowedUintDowncast(152, value);\n }\n return uint152(value);\n }\n\n /**\n * @dev Returns the downcasted uint144 from uint256, reverting on\n * overflow (when the input is greater than largest uint144).\n *\n * Counterpart to Solidity's `uint144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n */\n function toUint144(uint256 value) internal pure returns (uint144) {\n if (value > type(uint144).max) {\n revert SafeCastOverflowedUintDowncast(144, value);\n }\n return uint144(value);\n }\n\n /**\n * @dev Returns the downcasted uint136 from uint256, reverting on\n * overflow (when the input is greater than largest uint136).\n *\n * Counterpart to Solidity's `uint136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n */\n function toUint136(uint256 value) internal pure returns (uint136) {\n if (value > type(uint136).max) {\n revert SafeCastOverflowedUintDowncast(136, value);\n }\n return uint136(value);\n }\n\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n if (value > type(uint128).max) {\n revert SafeCastOverflowedUintDowncast(128, value);\n }\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint120 from uint256, reverting on\n * overflow (when the input is greater than largest uint120).\n *\n * Counterpart to Solidity's `uint120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n */\n function toUint120(uint256 value) internal pure returns (uint120) {\n if (value > type(uint120).max) {\n revert SafeCastOverflowedUintDowncast(120, value);\n }\n return uint120(value);\n }\n\n /**\n * @dev Returns the downcasted uint112 from uint256, reverting on\n * overflow (when the input is greater than largest uint112).\n *\n * Counterpart to Solidity's `uint112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n */\n function toUint112(uint256 value) internal pure returns (uint112) {\n if (value > type(uint112).max) {\n revert SafeCastOverflowedUintDowncast(112, value);\n }\n return uint112(value);\n }\n\n /**\n * @dev Returns the downcasted uint104 from uint256, reverting on\n * overflow (when the input is greater than largest uint104).\n *\n * Counterpart to Solidity's `uint104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n */\n function toUint104(uint256 value) internal pure returns (uint104) {\n if (value > type(uint104).max) {\n revert SafeCastOverflowedUintDowncast(104, value);\n }\n return uint104(value);\n }\n\n /**\n * @dev Returns the downcasted uint96 from uint256, reverting on\n * overflow (when the input is greater than largest uint96).\n *\n * Counterpart to Solidity's `uint96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n */\n function toUint96(uint256 value) internal pure returns (uint96) {\n if (value > type(uint96).max) {\n revert SafeCastOverflowedUintDowncast(96, value);\n }\n return uint96(value);\n }\n\n /**\n * @dev Returns the downcasted uint88 from uint256, reverting on\n * overflow (when the input is greater than largest uint88).\n *\n * Counterpart to Solidity's `uint88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n */\n function toUint88(uint256 value) internal pure returns (uint88) {\n if (value > type(uint88).max) {\n revert SafeCastOverflowedUintDowncast(88, value);\n }\n return uint88(value);\n }\n\n /**\n * @dev Returns the downcasted uint80 from uint256, reverting on\n * overflow (when the input is greater than largest uint80).\n *\n * Counterpart to Solidity's `uint80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n */\n function toUint80(uint256 value) internal pure returns (uint80) {\n if (value > type(uint80).max) {\n revert SafeCastOverflowedUintDowncast(80, value);\n }\n return uint80(value);\n }\n\n /**\n * @dev Returns the downcasted uint72 from uint256, reverting on\n * overflow (when the input is greater than largest uint72).\n *\n * Counterpart to Solidity's `uint72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n */\n function toUint72(uint256 value) internal pure returns (uint72) {\n if (value > type(uint72).max) {\n revert SafeCastOverflowedUintDowncast(72, value);\n }\n return uint72(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n if (value > type(uint64).max) {\n revert SafeCastOverflowedUintDowncast(64, value);\n }\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint56 from uint256, reverting on\n * overflow (when the input is greater than largest uint56).\n *\n * Counterpart to Solidity's `uint56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n */\n function toUint56(uint256 value) internal pure returns (uint56) {\n if (value > type(uint56).max) {\n revert SafeCastOverflowedUintDowncast(56, value);\n }\n return uint56(value);\n }\n\n /**\n * @dev Returns the downcasted uint48 from uint256, reverting on\n * overflow (when the input is greater than largest uint48).\n *\n * Counterpart to Solidity's `uint48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n */\n function toUint48(uint256 value) internal pure returns (uint48) {\n if (value > type(uint48).max) {\n revert SafeCastOverflowedUintDowncast(48, value);\n }\n return uint48(value);\n }\n\n /**\n * @dev Returns the downcasted uint40 from uint256, reverting on\n * overflow (when the input is greater than largest uint40).\n *\n * Counterpart to Solidity's `uint40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n */\n function toUint40(uint256 value) internal pure returns (uint40) {\n if (value > type(uint40).max) {\n revert SafeCastOverflowedUintDowncast(40, value);\n }\n return uint40(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n if (value > type(uint32).max) {\n revert SafeCastOverflowedUintDowncast(32, value);\n }\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint24 from uint256, reverting on\n * overflow (when the input is greater than largest uint24).\n *\n * Counterpart to Solidity's `uint24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n */\n function toUint24(uint256 value) internal pure returns (uint24) {\n if (value > type(uint24).max) {\n revert SafeCastOverflowedUintDowncast(24, value);\n }\n return uint24(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n if (value > type(uint16).max) {\n revert SafeCastOverflowedUintDowncast(16, value);\n }\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n if (value > type(uint8).max) {\n revert SafeCastOverflowedUintDowncast(8, value);\n }\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n if (value < 0) {\n revert SafeCastOverflowedIntToUint(value);\n }\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int248 from int256, reverting on\n * overflow (when the input is less than smallest int248 or\n * greater than largest int248).\n *\n * Counterpart to Solidity's `int248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n */\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(248, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int240 from int256, reverting on\n * overflow (when the input is less than smallest int240 or\n * greater than largest int240).\n *\n * Counterpart to Solidity's `int240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n */\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(240, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int232 from int256, reverting on\n * overflow (when the input is less than smallest int232 or\n * greater than largest int232).\n *\n * Counterpart to Solidity's `int232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n */\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(232, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int224 from int256, reverting on\n * overflow (when the input is less than smallest int224 or\n * greater than largest int224).\n *\n * Counterpart to Solidity's `int224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n */\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(224, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int216 from int256, reverting on\n * overflow (when the input is less than smallest int216 or\n * greater than largest int216).\n *\n * Counterpart to Solidity's `int216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n */\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(216, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int208 from int256, reverting on\n * overflow (when the input is less than smallest int208 or\n * greater than largest int208).\n *\n * Counterpart to Solidity's `int208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n */\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(208, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int200 from int256, reverting on\n * overflow (when the input is less than smallest int200 or\n * greater than largest int200).\n *\n * Counterpart to Solidity's `int200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n */\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(200, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int192 from int256, reverting on\n * overflow (when the input is less than smallest int192 or\n * greater than largest int192).\n *\n * Counterpart to Solidity's `int192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n */\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(192, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int184 from int256, reverting on\n * overflow (when the input is less than smallest int184 or\n * greater than largest int184).\n *\n * Counterpart to Solidity's `int184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n */\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(184, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int176 from int256, reverting on\n * overflow (when the input is less than smallest int176 or\n * greater than largest int176).\n *\n * Counterpart to Solidity's `int176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n */\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(176, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int168 from int256, reverting on\n * overflow (when the input is less than smallest int168 or\n * greater than largest int168).\n *\n * Counterpart to Solidity's `int168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n */\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(168, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int160 from int256, reverting on\n * overflow (when the input is less than smallest int160 or\n * greater than largest int160).\n *\n * Counterpart to Solidity's `int160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n */\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(160, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int152 from int256, reverting on\n * overflow (when the input is less than smallest int152 or\n * greater than largest int152).\n *\n * Counterpart to Solidity's `int152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n */\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(152, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int144 from int256, reverting on\n * overflow (when the input is less than smallest int144 or\n * greater than largest int144).\n *\n * Counterpart to Solidity's `int144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n */\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(144, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int136 from int256, reverting on\n * overflow (when the input is less than smallest int136 or\n * greater than largest int136).\n *\n * Counterpart to Solidity's `int136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n */\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(136, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(128, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int120 from int256, reverting on\n * overflow (when the input is less than smallest int120 or\n * greater than largest int120).\n *\n * Counterpart to Solidity's `int120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n */\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(120, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int112 from int256, reverting on\n * overflow (when the input is less than smallest int112 or\n * greater than largest int112).\n *\n * Counterpart to Solidity's `int112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n */\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(112, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int104 from int256, reverting on\n * overflow (when the input is less than smallest int104 or\n * greater than largest int104).\n *\n * Counterpart to Solidity's `int104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n */\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(104, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int96 from int256, reverting on\n * overflow (when the input is less than smallest int96 or\n * greater than largest int96).\n *\n * Counterpart to Solidity's `int96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n */\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(96, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int88 from int256, reverting on\n * overflow (when the input is less than smallest int88 or\n * greater than largest int88).\n *\n * Counterpart to Solidity's `int88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n */\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(88, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int80 from int256, reverting on\n * overflow (when the input is less than smallest int80 or\n * greater than largest int80).\n *\n * Counterpart to Solidity's `int80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n */\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(80, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int72 from int256, reverting on\n * overflow (when the input is less than smallest int72 or\n * greater than largest int72).\n *\n * Counterpart to Solidity's `int72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n */\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(72, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(64, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int56 from int256, reverting on\n * overflow (when the input is less than smallest int56 or\n * greater than largest int56).\n *\n * Counterpart to Solidity's `int56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n */\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(56, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int48 from int256, reverting on\n * overflow (when the input is less than smallest int48 or\n * greater than largest int48).\n *\n * Counterpart to Solidity's `int48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n */\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(48, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int40 from int256, reverting on\n * overflow (when the input is less than smallest int40 or\n * greater than largest int40).\n *\n * Counterpart to Solidity's `int40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n */\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(40, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(32, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int24 from int256, reverting on\n * overflow (when the input is less than smallest int24 or\n * greater than largest int24).\n *\n * Counterpart to Solidity's `int24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n */\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(24, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(16, value);\n }\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n */\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n if (downcasted != value) {\n revert SafeCastOverflowedIntDowncast(8, value);\n }\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n if (value > uint256(type(int256).max)) {\n revert SafeCastOverflowedUintToInt(value);\n }\n return int256(value);\n }\n\n /**\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n */\n function toUint(bool b) internal pure returns (uint256 u) {\n assembly (\"memory-safe\") {\n u := iszero(iszero(b))\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n *\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n * one branch when needed, making this function more expensive.\n */\n function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n unchecked {\n // branchless ternary works because:\n // b ^ (a ^ b) == a\n // b ^ 0 == b\n return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n }\n }\n\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return ternary(a > b, a, b);\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return ternary(a < b, a, b);\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n int256 mask = n >> 255;\n\n // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n return uint256((n + mask) ^ mask);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Panic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n * using Panic for uint256;\n *\n * // Use any of the declared internal constants\n * function foo() { Panic.GENERIC.panic(); }\n *\n * // Alternatively\n * function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n /// @dev generic / unspecified error\n uint256 internal constant GENERIC = 0x00;\n /// @dev used by the assert() builtin\n uint256 internal constant ASSERT = 0x01;\n /// @dev arithmetic underflow or overflow\n uint256 internal constant UNDER_OVERFLOW = 0x11;\n /// @dev division or modulo by zero\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\n /// @dev enum conversion error\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n /// @dev invalid encoding in storage\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n /// @dev empty array pop\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n /// @dev array out of bounds access\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n /// @dev resource error (too large allocation or too large array)\n uint256 internal constant RESOURCE_ERROR = 0x41;\n /// @dev calling invalid internal function\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n /// @dev Reverts with a panic code. Recommended to use with\n /// the internal constants with predefined codes.\n function panic(uint256 code) internal pure {\n assembly (\"memory-safe\") {\n mstore(0x00, 0x4e487b71)\n mstore(0x20, code)\n revert(0x1c, 0x24)\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\n\nimport {StorageSlot} from \"./StorageSlot.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n *\n * IMPORTANT: Deprecated. This storage-based reentrancy guard will be removed and replaced\n * by the {ReentrancyGuardTransient} variant in v6.0.\n *\n * @custom:stateless\n */\nabstract contract ReentrancyGuard {\n using StorageSlot for bytes32;\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant REENTRANCY_GUARD_STORAGE =\n 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant NOT_ENTERED = 1;\n uint256 private constant ENTERED = 2;\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n constructor() {\n _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n /**\n * @dev A `view` only version of {nonReentrant}. Use to block view functions\n * from being called, preventing reading from inconsistent contract state.\n *\n * CAUTION: This is a \"view\" modifier and does not change the reentrancy\n * status. Use it only on view functions. For payable or non-payable functions,\n * use the standard {nonReentrant} modifier instead.\n */\n modifier nonReentrantView() {\n _nonReentrantBeforeView();\n _;\n }\n\n function _nonReentrantBeforeView() private view {\n if (_reentrancyGuardEntered()) {\n revert ReentrancyGuardReentrantCall();\n }\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n _nonReentrantBeforeView();\n\n // Any calls to nonReentrant after this point will fail\n _reentrancyGuardStorageSlot().getUint256Slot().value = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _reentrancyGuardStorageSlot().getUint256Slot().value == ENTERED;\n }\n\n function _reentrancyGuardStorageSlot() internal pure virtual returns (bytes32) {\n return REENTRANCY_GUARD_STORAGE;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/ShortStrings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/ShortStrings.sol)\n\npragma solidity ^0.8.20;\n\nimport {StorageSlot} from \"./StorageSlot.sol\";\n\n// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |\n// | length | 0x BB |\ntype ShortString is bytes32;\n\n/**\n * @dev This library provides functions to convert short memory strings\n * into a `ShortString` type that can be used as an immutable variable.\n *\n * Strings of arbitrary length can be optimized using this library if\n * they are short enough (up to 31 bytes) by packing them with their\n * length (1 byte) in a single EVM word (32 bytes). Additionally, a\n * fallback mechanism can be used for every other case.\n *\n * Usage example:\n *\n * ```solidity\n * contract Named {\n * using ShortStrings for *;\n *\n * ShortString private immutable _name;\n * string private _nameFallback;\n *\n * constructor(string memory contractName) {\n * _name = contractName.toShortStringWithFallback(_nameFallback);\n * }\n *\n * function name() external view returns (string memory) {\n * return _name.toStringWithFallback(_nameFallback);\n * }\n * }\n * ```\n */\nlibrary ShortStrings {\n // Used as an identifier for strings longer than 31 bytes.\n bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;\n\n error StringTooLong(string str);\n error InvalidShortString();\n\n /**\n * @dev Encode a string of at most 31 chars into a `ShortString`.\n *\n * This will trigger a `StringTooLong` error is the input string is too long.\n */\n function toShortString(string memory str) internal pure returns (ShortString) {\n bytes memory bstr = bytes(str);\n if (bstr.length > 0x1f) {\n revert StringTooLong(str);\n }\n return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));\n }\n\n /**\n * @dev Decode a `ShortString` back to a \"normal\" string.\n */\n function toString(ShortString sstr) internal pure returns (string memory) {\n uint256 len = byteLength(sstr);\n // using `new string(len)` would work locally but is not memory safe.\n string memory str = new string(0x20);\n assembly (\"memory-safe\") {\n mstore(str, len)\n mstore(add(str, 0x20), sstr)\n }\n return str;\n }\n\n /**\n * @dev Return the length of a `ShortString`.\n */\n function byteLength(ShortString sstr) internal pure returns (uint256) {\n uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;\n if (result > 0x1f) {\n revert InvalidShortString();\n }\n return result;\n }\n\n /**\n * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.\n */\n function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {\n if (bytes(value).length < 0x20) {\n return toShortString(value);\n } else {\n StorageSlot.getStringSlot(store).value = value;\n return ShortString.wrap(FALLBACK_SENTINEL);\n }\n }\n\n /**\n * @dev Decode a string that was encoded to `ShortString` or written to storage using {toShortStringWithFallback}.\n */\n function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {\n if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n return toString(value);\n } else {\n return store;\n }\n }\n\n /**\n * @dev Return the length of a string that was encoded to `ShortString` or written to storage using\n * {toShortStringWithFallback}.\n *\n * WARNING: This will return the \"byte length\" of the string. This may not reflect the actual length in terms of\n * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.\n */\n function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {\n if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {\n return byteLength(value);\n } else {\n return bytes(store).length;\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(newImplementation.code.length > 0);\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n */\n function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns a `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/Strings.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\nimport {Bytes} from \"./Bytes.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n using SafeCast for *;\n\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n uint256 private constant SPECIAL_CHARS_LOOKUP =\n 0xffffffff | // first 32 bits corresponding to the control characters (U+0000 to U+001F)\n (1 << 0x22) | // double quote\n (1 << 0x5c); // backslash\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev The string being parsed contains characters that are not in scope of the given base.\n */\n error StringsInvalidChar();\n\n /**\n * @dev The string being parsed is not a properly formatted address.\n */\n error StringsInvalidAddressFormat();\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n assembly (\"memory-safe\") {\n ptr := add(add(buffer, 0x20), length)\n }\n while (true) {\n ptr--;\n assembly (\"memory-safe\") {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n * representation, according to EIP-55.\n */\n function toChecksumHexString(address addr) internal pure returns (string memory) {\n bytes memory buffer = bytes(toHexString(addr));\n\n // hash the hex part of buffer (skip length + 2 bytes, length 40)\n uint256 hashValue;\n assembly (\"memory-safe\") {\n hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n }\n\n for (uint256 i = 41; i > 1; --i) {\n // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n // case shift by xoring with 0x20\n buffer[i] ^= 0x20;\n }\n hashValue >>= 4;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `bytes` buffer to its ASCII `string` hexadecimal representation.\n */\n function toHexString(bytes memory input) internal pure returns (string memory) {\n unchecked {\n bytes memory buffer = new bytes(2 * input.length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 0; i < input.length; ++i) {\n uint8 v = uint8(input[i]);\n buffer[2 * i + 2] = HEX_DIGITS[v >> 4];\n buffer[2 * i + 3] = HEX_DIGITS[v & 0xf];\n }\n return string(buffer);\n }\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return Bytes.equal(bytes(a), bytes(b));\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input) internal pure returns (uint256) {\n return parseUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[0-9]*`\n * - The result must fit into an `uint256` type\n */\n function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n uint256 result = 0;\n for (uint256 i = begin; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 9) return (false, 0);\n result *= 10;\n result += chr;\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a decimal string and returns the value as a `int256`.\n *\n * Requirements:\n * - The string must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input) internal pure returns (int256) {\n return parseInt(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `[-+]?[0-9]*`\n * - The result must fit in an `int256` type.\n */\n function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n (bool success, int256 value) = tryParseInt(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n * the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n }\n\n uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n /**\n * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n * character or if the result does not fit in a `int256`.\n *\n * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n */\n function tryParseInt(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, int256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseIntUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseIntUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, int256 value) {\n bytes memory buffer = bytes(input);\n\n // Check presence of a negative sign.\n bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n bool positiveSign = sign == bytes1(\"+\");\n bool negativeSign = sign == bytes1(\"-\");\n uint256 offset = (positiveSign || negativeSign).toUint();\n\n (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n if (absSuccess && absValue < ABS_MIN_INT256) {\n return (true, negativeSign ? -int256(absValue) : int256(absValue));\n } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n return (true, type(int256).min);\n } else return (false, 0);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input) internal pure returns (uint256) {\n return parseHexUint(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n * - The result must fit in an `uint256` type.\n */\n function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n if (!success) revert StringsInvalidChar();\n return value;\n }\n\n /**\n * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n * invalid character.\n *\n * NOTE: This function will revert if the result does not fit in a `uint256`.\n */\n function tryParseHexUint(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, uint256 value) {\n if (end > bytes(input).length || begin > end) return (false, 0);\n return _tryParseHexUintUncheckedBounds(input, begin, end);\n }\n\n /**\n * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n */\n function _tryParseHexUintUncheckedBounds(\n string memory input,\n uint256 begin,\n uint256 end\n ) private pure returns (bool success, uint256 value) {\n bytes memory buffer = bytes(input);\n\n // skip 0x prefix if present\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 offset = hasPrefix.toUint() * 2;\n\n uint256 result = 0;\n for (uint256 i = begin + offset; i < end; ++i) {\n uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (chr > 15) return (false, 0);\n result *= 16;\n unchecked {\n // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n result += chr;\n }\n }\n return (true, result);\n }\n\n /**\n * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n *\n * Requirements:\n * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input) internal pure returns (address) {\n return parseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n * `end` (excluded).\n *\n * Requirements:\n * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n */\n function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n (bool success, address value) = tryParseAddress(input, begin, end);\n if (!success) revert StringsInvalidAddressFormat();\n return value;\n }\n\n /**\n * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n * formatted address. See {parseAddress-string} requirements.\n */\n function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n return tryParseAddress(input, 0, bytes(input).length);\n }\n\n /**\n * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n */\n function tryParseAddress(\n string memory input,\n uint256 begin,\n uint256 end\n ) internal pure returns (bool success, address value) {\n if (end > bytes(input).length || begin > end) return (false, address(0));\n\n bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n // check that input is the correct length\n if (end - begin == expectedLength) {\n // length guarantees that this does not overflow, and value is at most type(uint160).max\n (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n return (s, address(uint160(v)));\n } else {\n return (false, address(0));\n }\n }\n\n function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n uint8 value = uint8(chr);\n\n // Try to parse `chr`:\n // - Case 1: [0-9]\n // - Case 2: [a-f]\n // - Case 3: [A-F]\n // - otherwise not supported\n unchecked {\n if (value > 47 && value < 58) value -= 48;\n else if (value > 96 && value < 103) value -= 87;\n else if (value > 64 && value < 71) value -= 55;\n else return type(uint8).max;\n }\n\n return value;\n }\n\n /**\n * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n *\n * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n *\n * NOTE: This function escapes backslashes (including those in \\uXXXX sequences) and the characters in ranges\n * defined in section 2.5 of RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). All control characters in U+0000\n * to U+001F are escaped (\\b, \\t, \\n, \\f, \\r use short form; others use \\u00XX). ECMAScript's `JSON.parse` does\n * recover escaped unicode characters that are not in this range, but other tooling may provide different results.\n */\n function escapeJSON(string memory input) internal pure returns (string memory) {\n bytes memory buffer = bytes(input);\n\n // Put output at the FMP. Memory will be reserved later when we figure out the actual length of the escaped\n // string. All write are done using _unsafeWriteBytesOffset, which avoid the (expensive) length checks for\n // each character written.\n bytes memory output;\n assembly (\"memory-safe\") {\n output := mload(0x40)\n }\n uint256 outputLength = 0;\n\n for (uint256 i = 0; i < buffer.length; ++i) {\n uint8 char = uint8(bytes1(_unsafeReadBytesOffset(buffer, i)));\n if (((SPECIAL_CHARS_LOOKUP & (1 << char)) != 0)) {\n _unsafeWriteBytesOffset(output, outputLength++, \"\\\\\");\n if (char == 0x08) _unsafeWriteBytesOffset(output, outputLength++, \"b\");\n else if (char == 0x09) _unsafeWriteBytesOffset(output, outputLength++, \"t\");\n else if (char == 0x0a) _unsafeWriteBytesOffset(output, outputLength++, \"n\");\n else if (char == 0x0c) _unsafeWriteBytesOffset(output, outputLength++, \"f\");\n else if (char == 0x0d) _unsafeWriteBytesOffset(output, outputLength++, \"r\");\n else if (char == 0x5c) _unsafeWriteBytesOffset(output, outputLength++, \"\\\\\");\n else if (char == 0x22) {\n // solhint-disable-next-line quotes\n _unsafeWriteBytesOffset(output, outputLength++, '\"');\n } else {\n // U+0000 to U+001F without short form: output \\u00XX\n _unsafeWriteBytesOffset(output, outputLength++, \"u\");\n _unsafeWriteBytesOffset(output, outputLength++, \"0\");\n _unsafeWriteBytesOffset(output, outputLength++, \"0\");\n _unsafeWriteBytesOffset(output, outputLength++, HEX_DIGITS[char >> 4]);\n _unsafeWriteBytesOffset(output, outputLength++, HEX_DIGITS[char & 0x0f]);\n }\n } else {\n _unsafeWriteBytesOffset(output, outputLength++, bytes1(char));\n }\n }\n // write the actual length and reserve memory\n assembly (\"memory-safe\") {\n mstore(output, outputLength)\n mstore(0x40, add(output, add(outputLength, 0x20)))\n }\n\n return string(output);\n }\n\n /**\n * @dev Reads a bytes32 from a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n value := mload(add(add(buffer, 0x20), offset))\n }\n }\n\n /**\n * @dev Write a bytes1 to a bytes array without bounds checking.\n *\n * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n * assembly block as such would prevent some optimizations.\n */\n function _unsafeWriteBytesOffset(bytes memory buffer, uint256 offset, bytes1 value) private pure {\n // This is not memory safe in the general case, but all calls to this private function are within bounds.\n assembly (\"memory-safe\") {\n mstore8(add(add(buffer, 0x20), offset), shr(248, value))\n }\n }\n}\n" + }, + "contracts/TokenRelayer.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IERC20Permit} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {EIP712} from \"@openzeppelin/contracts/utils/cryptography/EIP712.sol\";\n\n/**\n * @title TokenRelayer\n * @notice A relayer contract that accepts ERC20 permit signatures and executes\n * arbitrary calls to a destination contract, both authorized via signature.\n * \n * Flow:\n * 1. User signs a permit allowing the relayer to spend their tokens\n * 2. User signs a payload (e.g., transfer from relayer to another user)\n * 3. Relayer:\n * a. Executes permit to approve the tokens\n * b. Transfers tokens from user to relayer (via transferFrom)\n * c. Forwards the payload call (transfer from relayer to another user)\n */\ncontract TokenRelayer is Ownable, ReentrancyGuard, EIP712 {\n using SafeERC20 for IERC20;\n\n // Using OZ EIP712 for domain separator management\n bytes32 private constant _TYPE_HASH_PAYLOAD = keccak256(\n \"Payload(address destination,address owner,address token,uint256 value,bytes data,uint256 ethValue,uint256 nonce,uint256 deadline)\"\n );\n\n address public immutable destinationContract;\n\n mapping(address => mapping(uint256 => bool)) public usedPayloadNonces;\n // Removed redundant executedCalls mapping — usedPayloadNonces is sufficient\n\n struct ExecuteParams {\n address token;\n address owner;\n uint256 value;\n uint256 deadline;\n uint8 permitV;\n bytes32 permitR;\n bytes32 permitS;\n bytes payloadData;\n uint256 payloadValue;\n uint256 payloadNonce;\n uint256 payloadDeadline;\n uint8 payloadV;\n bytes32 payloadR;\n bytes32 payloadS;\n }\n\n event RelayerExecuted(\n address indexed signer,\n address indexed token,\n uint256 amount\n );\n\n // Events for withdrawal operations\n event TokenWithdrawn(address indexed token, uint256 amount, address indexed to);\n event ETHWithdrawn(uint256 amount, address indexed to);\n\n // Ownable constructor sets deployer as owner; EIP712 constructor\n constructor(address _destinationContract)\n Ownable(msg.sender)\n EIP712(\"TokenRelayer\", \"1\")\n {\n require(_destinationContract != address(0), \"Invalid destination\");\n destinationContract = _destinationContract;\n }\n\n // Allow contract to receive ETH (e.g., refunds from destination)\n receive() external payable {}\n\n // nonReentrant modifier prevents reentrancy via _forwardCall\n // Removed redundant bool return — function reverts on failure\n function execute(ExecuteParams calldata params) external payable nonReentrant {\n address owner = params.owner;\n uint256 nonce = params.payloadNonce;\n\n // --- Checks ---\n require(owner != address(0), \"Invalid owner\");\n require(params.token != address(0), \"Invalid token\");\n require(!usedPayloadNonces[owner][nonce], \"Nonce used\");\n require(block.timestamp <= params.payloadDeadline, \"Payload expired\");\n\n // Verify payload signature and validate signed destination\n bytes32 digest = _computeDigest(\n owner,\n params.token,\n params.value,\n params.payloadData,\n params.payloadValue,\n nonce,\n params.payloadDeadline\n );\n // Using ECDSA.recover() which enforces low-s and rejects address(0)\n require(ECDSA.recover(digest, params.payloadV, params.payloadR, params.payloadS) == owner, \"Invalid sig\");\n\n require(msg.value == params.payloadValue, \"Incorrect ETH value provided\");\n\n // --- Effects (before interactions per CEI pattern) ---\n // State changes before any external calls\n usedPayloadNonces[owner][nonce] = true;\n\n // --- Interactions ---\n // permit wrapped in try-catch for front-run resilience\n _executePermitAndTransfer(\n params.token,\n owner,\n params.value,\n params.deadline,\n params.permitV,\n params.permitR,\n params.permitS\n );\n\n // Approve exact amount, forward call, then revoke\n IERC20(params.token).forceApprove(destinationContract, params.value);\n\n bool callSuccess = _forwardCall(params.payloadData, msg.value);\n require(callSuccess, \"Call failed\");\n\n // Revoke approval after the call to prevent residual allowance\n IERC20(params.token).forceApprove(destinationContract, 0);\n\n emit RelayerExecuted(owner, params.token, params.value);\n }\n\n // Using inherited _hashTypedDataV4 from OZ EIP712\n function _computeDigest(\n address owner,\n address token,\n uint256 value,\n bytes memory data,\n uint256 ethValue,\n uint256 nonce,\n uint256 deadline\n ) private view returns (bytes32) {\n return _hashTypedDataV4(\n keccak256(abi.encode(\n _TYPE_HASH_PAYLOAD,\n destinationContract, // [H-2] destination is always destinationContract\n owner,\n token,\n value,\n keccak256(data),\n ethValue,\n nonce,\n deadline\n ))\n );\n }\n\n /**\n * @dev Execute permit approval and then transfer tokens from owner to self (relayer).\n * Permit is wrapped in try-catch: if it was front-run, we check\n * that the allowance is already sufficient before proceeding.\n */\n function _executePermitAndTransfer(\n address token,\n address owner,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n // Wrap permit in try-catch for front-run resilience\n try IERC20Permit(token).permit(owner, address(this), value, deadline, v, r, s) {\n // permit succeeded\n } catch {\n // permit was front-run, verify allowance is sufficient\n require(\n IERC20(token).allowance(owner, address(this)) >= value,\n \"Permit failed and insufficient allowance\"\n );\n }\n\n // Transfer tokens from owner to this contract\n IERC20(token).safeTransferFrom(owner, address(this), value);\n }\n\n function _forwardCall(bytes memory data, uint256 value) internal returns (bool) {\n (bool success, ) = destinationContract.call{value: value}(data);\n return success;\n }\n\n /**\n * @notice Allows the owner to recover any ERC20 tokens held by this contract.\n * @param token The ERC20 token contract address.\n * @param amount The amount of tokens to transfer to the owner.\n */\n // Using Ownable's onlyOwner instead of manual deployer check\n // Added TokenWithdrawn event\n function withdrawToken(address token, uint256 amount) external onlyOwner {\n IERC20(token).safeTransfer(owner(), amount);\n emit TokenWithdrawn(token, amount, owner());\n }\n\n /**\n * @notice Allows the owner to recover any native ETH held by this contract.\n * @param amount The amount of ETH to transfer to the owner.\n */\n // ETH recovery function\n function withdrawETH(uint256 amount) external onlyOwner {\n (bool success, ) = owner().call{value: amount}(\"\");\n require(success, \"ETH transfer failed\");\n emit ETHWithdrawn(amount, owner());\n }\n\n // Using usedPayloadNonces instead of redundant executedCalls\n function isExecutionCompleted(address signer, uint256 nonce) external view returns (bool) {\n return usedPayloadNonces[signer][nonce];\n }\n}\n" + } + }, + "settings": { + "evmVersion": "cancun", + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ], + "": [ + "ast" + ] + } + } + } + }, + "output": { + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "exportedSymbols": { + "Context": [ + 1662 + ], + "Ownable": [ + 147 + ] + }, + "id": 148, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "102:24:0" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Context.sol", + "file": "../utils/Context.sol", + "id": 3, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 148, + "sourceUnit": 1663, + "src": "128:45:0", + "symbolAliases": [ + { + "foreign": { + "id": 2, + "name": "Context", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1662, + "src": "136:7:0", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "baseName": { + "id": 5, + "name": "Context", + "nameLocations": [ + "692:7:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1662, + "src": "692:7:0" + }, + "id": 6, + "nodeType": "InheritanceSpecifier", + "src": "692:7:0" + } + ], + "canonicalName": "Ownable", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4, + "nodeType": "StructuredDocumentation", + "src": "175:487:0", + "text": " @dev Contract module which provides a basic access control mechanism, where\n there is an account (an owner) that can be granted exclusive access to\n specific functions.\n The initial owner is set to the address provided by the deployer. This can\n later be changed with {transferOwnership}.\n This module is used through inheritance. It will make available the modifier\n `onlyOwner`, which can be applied to your functions to restrict their use to\n the owner." + }, + "fullyImplemented": true, + "id": 147, + "linearizedBaseContracts": [ + 147, + 1662 + ], + "name": "Ownable", + "nameLocation": "681:7:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "mutability": "mutable", + "name": "_owner", + "nameLocation": "722:6:0", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "706:22:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "706:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "documentation": { + "id": 9, + "nodeType": "StructuredDocumentation", + "src": "735:85:0", + "text": " @dev The caller account is not authorized to perform an operation." + }, + "errorSelector": "118cdaa7", + "id": 13, + "name": "OwnableUnauthorizedAccount", + "nameLocation": "831:26:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 12, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11, + "mutability": "mutable", + "name": "account", + "nameLocation": "866:7:0", + "nodeType": "VariableDeclaration", + "scope": 13, + "src": "858:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "858:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "857:17:0" + }, + "src": "825:50:0" + }, + { + "documentation": { + "id": 14, + "nodeType": "StructuredDocumentation", + "src": "881:82:0", + "text": " @dev The owner is not a valid owner account. (eg. `address(0)`)" + }, + "errorSelector": "1e4fbdf7", + "id": 18, + "name": "OwnableInvalidOwner", + "nameLocation": "974:19:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16, + "mutability": "mutable", + "name": "owner", + "nameLocation": "1002:5:0", + "nodeType": "VariableDeclaration", + "scope": 18, + "src": "994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "994:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "993:15:0" + }, + "src": "968:41:0" + }, + { + "anonymous": false, + "eventSelector": "8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "id": 24, + "name": "OwnershipTransferred", + "nameLocation": "1021:20:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20, + "indexed": true, + "mutability": "mutable", + "name": "previousOwner", + "nameLocation": "1058:13:0", + "nodeType": "VariableDeclaration", + "scope": 24, + "src": "1042:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1042:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 22, + "indexed": true, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "1089:8:0", + "nodeType": "VariableDeclaration", + "scope": 24, + "src": "1073:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1073:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1041:57:0" + }, + "src": "1015:84:0" + }, + { + "body": { + "id": 49, + "nodeType": "Block", + "src": "1259:153:0", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 30, + "name": "initialOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1273:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 33, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1297:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 32, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1289:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 31, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1289:7:0", + "typeDescriptions": {} + } + }, + "id": 34, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1289:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1273:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 44, + "nodeType": "IfStatement", + "src": "1269:95:0", + "trueBody": { + "id": 43, + "nodeType": "Block", + "src": "1301:63:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1350:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1342:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 37, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1342:7:0", + "typeDescriptions": {} + } + }, + "id": 40, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1342:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 36, + "name": "OwnableInvalidOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "1322:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 41, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1322:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 42, + "nodeType": "RevertStatement", + "src": "1315:38:0" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 46, + "name": "initialOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1392:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 45, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 146, + "src": "1373:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1373:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 48, + "nodeType": "ExpressionStatement", + "src": "1373:32:0" + } + ] + }, + "documentation": { + "id": 25, + "nodeType": "StructuredDocumentation", + "src": "1105:115:0", + "text": " @dev Initializes the contract setting the address provided by the deployer as the initial owner." + }, + "id": 50, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 28, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "1245:12:0", + "nodeType": "VariableDeclaration", + "scope": 50, + "src": "1237:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 26, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1237:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1236:22:0" + }, + "returnParameters": { + "id": 29, + "nodeType": "ParameterList", + "parameters": [], + "src": "1259:0:0" + }, + "scope": 147, + "src": "1225:187:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 57, + "nodeType": "Block", + "src": "1521:41:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 53, + "name": "_checkOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "1531:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 54, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1531:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 55, + "nodeType": "ExpressionStatement", + "src": "1531:13:0" + }, + { + "id": 56, + "nodeType": "PlaceholderStatement", + "src": "1554:1:0" + } + ] + }, + "documentation": { + "id": 51, + "nodeType": "StructuredDocumentation", + "src": "1418:77:0", + "text": " @dev Throws if called by any account other than the owner." + }, + "id": 58, + "name": "onlyOwner", + "nameLocation": "1509:9:0", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [], + "src": "1518:2:0" + }, + "src": "1500:62:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 66, + "nodeType": "Block", + "src": "1693:30:0", + "statements": [ + { + "expression": { + "id": 64, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1710:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 63, + "id": 65, + "nodeType": "Return", + "src": "1703:13:0" + } + ] + }, + "documentation": { + "id": 59, + "nodeType": "StructuredDocumentation", + "src": "1568:65:0", + "text": " @dev Returns the address of the current owner." + }, + "functionSelector": "8da5cb5b", + "id": 67, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "1647:5:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 60, + "nodeType": "ParameterList", + "parameters": [], + "src": "1652:2:0" + }, + "returnParameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "1684:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 61, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1684:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1683:9:0" + }, + "scope": 147, + "src": "1638:85:0", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 83, + "nodeType": "Block", + "src": "1841:117:0", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 71, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "1855:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1855:7:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 73, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1644, + "src": "1866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1866:12:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1855:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 82, + "nodeType": "IfStatement", + "src": "1851:101:0", + "trueBody": { + "id": 81, + "nodeType": "Block", + "src": "1880:72:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 77, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1644, + "src": "1928:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1928:12:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 76, + "name": "OwnableUnauthorizedAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1901:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1901:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 80, + "nodeType": "RevertStatement", + "src": "1894:47:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 68, + "nodeType": "StructuredDocumentation", + "src": "1729:62:0", + "text": " @dev Throws if the sender is not the owner." + }, + "id": 84, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_checkOwner", + "nameLocation": "1805:11:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 69, + "nodeType": "ParameterList", + "parameters": [], + "src": "1816:2:0" + }, + "returnParameters": { + "id": 70, + "nodeType": "ParameterList", + "parameters": [], + "src": "1841:0:0" + }, + "scope": 147, + "src": "1796:162:0", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 97, + "nodeType": "Block", + "src": "2347:47:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2384:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 91, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2376:7:0", + "typeDescriptions": {} + } + }, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2376:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 90, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 146, + "src": "2357:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2357:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 96, + "nodeType": "ExpressionStatement", + "src": "2357:30:0" + } + ] + }, + "documentation": { + "id": 85, + "nodeType": "StructuredDocumentation", + "src": "1964:324:0", + "text": " @dev Leaves the contract without owner. It will not be possible to call\n `onlyOwner` functions. Can only be called by the current owner.\n NOTE: Renouncing ownership will leave the contract without an owner,\n thereby disabling any functionality that is only available to the owner." + }, + "functionSelector": "715018a6", + "id": 98, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 88, + "kind": "modifierInvocation", + "modifierName": { + "id": 87, + "name": "onlyOwner", + "nameLocations": [ + "2337:9:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58, + "src": "2337:9:0" + }, + "nodeType": "ModifierInvocation", + "src": "2337:9:0" + } + ], + "name": "renounceOwnership", + "nameLocation": "2302:17:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 86, + "nodeType": "ParameterList", + "parameters": [], + "src": "2319:2:0" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [], + "src": "2347:0:0" + }, + "scope": 147, + "src": "2293:101:0", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 125, + "nodeType": "Block", + "src": "2613:145:0", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 106, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "2627:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2647:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2639:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 107, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2639:7:0", + "typeDescriptions": {} + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2639:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2627:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "IfStatement", + "src": "2623:91:0", + "trueBody": { + "id": 119, + "nodeType": "Block", + "src": "2651:63:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2700:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 113, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2692:7:0", + "typeDescriptions": {} + } + }, + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2692:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 112, + "name": "OwnableInvalidOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "2672:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2672:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 118, + "nodeType": "RevertStatement", + "src": "2665:38:0" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 122, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 101, + "src": "2742:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 121, + "name": "_transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 146, + "src": "2723:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2723:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 124, + "nodeType": "ExpressionStatement", + "src": "2723:28:0" + } + ] + }, + "documentation": { + "id": 99, + "nodeType": "StructuredDocumentation", + "src": "2400:138:0", + "text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Can only be called by the current owner." + }, + "functionSelector": "f2fde38b", + "id": 126, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 104, + "kind": "modifierInvocation", + "modifierName": { + "id": 103, + "name": "onlyOwner", + "nameLocations": [ + "2603:9:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58, + "src": "2603:9:0" + }, + "nodeType": "ModifierInvocation", + "src": "2603:9:0" + } + ], + "name": "transferOwnership", + "nameLocation": "2552:17:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 101, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "2578:8:0", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "2570:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2570:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2569:18:0" + }, + "returnParameters": { + "id": 105, + "nodeType": "ParameterList", + "parameters": [], + "src": "2613:0:0" + }, + "scope": 147, + "src": "2543:215:0", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 145, + "nodeType": "Block", + "src": "2975:124:0", + "statements": [ + { + "assignments": [ + 133 + ], + "declarations": [ + { + "constant": false, + "id": 133, + "mutability": "mutable", + "name": "oldOwner", + "nameLocation": "2993:8:0", + "nodeType": "VariableDeclaration", + "scope": 145, + "src": "2985:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2985:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 135, + "initialValue": { + "id": 134, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "3004:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2985:25:0" + }, + { + "expression": { + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 136, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "3020:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 137, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 129, + "src": "3029:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3020:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "3020:17:0" + }, + { + "eventCall": { + "arguments": [ + { + "id": 141, + "name": "oldOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 133, + "src": "3073:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 142, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 129, + "src": "3083:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 140, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "3052:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3052:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 144, + "nodeType": "EmitStatement", + "src": "3047:45:0" + } + ] + }, + "documentation": { + "id": 127, + "nodeType": "StructuredDocumentation", + "src": "2764:143:0", + "text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Internal function without access restriction." + }, + "id": 146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transferOwnership", + "nameLocation": "2921:18:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 129, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "2948:8:0", + "nodeType": "VariableDeclaration", + "scope": 146, + "src": "2940:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2940:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2939:18:0" + }, + "returnParameters": { + "id": 131, + "nodeType": "ParameterList", + "parameters": [], + "src": "2975:0:0" + }, + "scope": 147, + "src": "2912:187:0", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 148, + "src": "663:2438:0", + "usedErrors": [ + 13, + 18 + ], + "usedEvents": [ + 24 + ] + } + ], + "src": "102:3000:0" + }, + "id": 0 + }, + "@openzeppelin/contracts/interfaces/IERC1363.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC1363.sol", + "exportedSymbols": { + "IERC1363": [ + 229 + ], + "IERC165": [ + 4547 + ], + "IERC20": [ + 340 + ] + }, + "id": 230, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 149, + "literals": [ + "solidity", + ">=", + "0.6", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "107:24:1" + }, + { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC20.sol", + "file": "./IERC20.sol", + "id": 151, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 230, + "sourceUnit": 238, + "src": "133:36:1", + "symbolAliases": [ + { + "foreign": { + "id": 150, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "141:6:1", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 153, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 230, + "sourceUnit": 234, + "src": "170:38:1", + "symbolAliases": [ + { + "foreign": { + "id": 152, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4547, + "src": "178:7:1", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 155, + "name": "IERC20", + "nameLocations": [ + "590:6:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "590:6:1" + }, + "id": 156, + "nodeType": "InheritanceSpecifier", + "src": "590:6:1" + }, + { + "baseName": { + "id": 157, + "name": "IERC165", + "nameLocations": [ + "598:7:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4547, + "src": "598:7:1" + }, + "id": 158, + "nodeType": "InheritanceSpecifier", + "src": "598:7:1" + } + ], + "canonicalName": "IERC1363", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 154, + "nodeType": "StructuredDocumentation", + "src": "210:357:1", + "text": " @title IERC1363\n @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction." + }, + "fullyImplemented": false, + "id": 229, + "linearizedBaseContracts": [ + 229, + 4547, + 340 + ], + "name": "IERC1363", + "nameLocation": "578:8:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 159, + "nodeType": "StructuredDocumentation", + "src": "1148:370:1", + "text": " @dev Moves a `value` amount of tokens from the caller's account to `to`\n and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n @param to The address which you want to transfer to.\n @param value The amount of tokens to be transferred.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "1296ee62", + "id": 168, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferAndCall", + "nameLocation": "1532:15:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 161, + "mutability": "mutable", + "name": "to", + "nameLocation": "1556:2:1", + "nodeType": "VariableDeclaration", + "scope": 168, + "src": "1548:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 163, + "mutability": "mutable", + "name": "value", + "nameLocation": "1568:5:1", + "nodeType": "VariableDeclaration", + "scope": 168, + "src": "1560:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 162, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1560:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1547:27:1" + }, + "returnParameters": { + "id": 167, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 166, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 168, + "src": "1593:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 165, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1593:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1592:6:1" + }, + "scope": 229, + "src": "1523:76:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 169, + "nodeType": "StructuredDocumentation", + "src": "1605:453:1", + "text": " @dev Moves a `value` amount of tokens from the caller's account to `to`\n and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n @param to The address which you want to transfer to.\n @param value The amount of tokens to be transferred.\n @param data Additional data with no specified format, sent in call to `to`.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "4000aea0", + "id": 180, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferAndCall", + "nameLocation": "2072:15:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 171, + "mutability": "mutable", + "name": "to", + "nameLocation": "2096:2:1", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "2088:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 170, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2088:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 173, + "mutability": "mutable", + "name": "value", + "nameLocation": "2108:5:1", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "2100:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2100:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 175, + "mutability": "mutable", + "name": "data", + "nameLocation": "2130:4:1", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "2115:19:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 174, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2115:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2087:48:1" + }, + "returnParameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 178, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "2154:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 177, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2154:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2153:6:1" + }, + "scope": 229, + "src": "2063:97:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 181, + "nodeType": "StructuredDocumentation", + "src": "2166:453:1", + "text": " @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n @param from The address which you want to send tokens from.\n @param to The address which you want to transfer to.\n @param value The amount of tokens to be transferred.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "d8fbe994", + "id": 192, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFromAndCall", + "nameLocation": "2633:19:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 183, + "mutability": "mutable", + "name": "from", + "nameLocation": "2661:4:1", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "2653:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2653:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 185, + "mutability": "mutable", + "name": "to", + "nameLocation": "2675:2:1", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "2667:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 184, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2667:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 187, + "mutability": "mutable", + "name": "value", + "nameLocation": "2687:5:1", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "2679:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2679:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2652:41:1" + }, + "returnParameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "2712:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 189, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2712:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2711:6:1" + }, + "scope": 229, + "src": "2624:94:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 193, + "nodeType": "StructuredDocumentation", + "src": "2724:536:1", + "text": " @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n @param from The address which you want to send tokens from.\n @param to The address which you want to transfer to.\n @param value The amount of tokens to be transferred.\n @param data Additional data with no specified format, sent in call to `to`.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "c1d34b89", + "id": 206, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFromAndCall", + "nameLocation": "3274:19:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 195, + "mutability": "mutable", + "name": "from", + "nameLocation": "3302:4:1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3294:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 197, + "mutability": "mutable", + "name": "to", + "nameLocation": "3316:2:1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3308:10:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 196, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3308:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 199, + "mutability": "mutable", + "name": "value", + "nameLocation": "3328:5:1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3320:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 198, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3320:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 201, + "mutability": "mutable", + "name": "data", + "nameLocation": "3350:4:1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3335:19:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 200, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3335:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3293:62:1" + }, + "returnParameters": { + "id": 205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 204, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "3374:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 203, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3374:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3373:6:1" + }, + "scope": 229, + "src": "3265:115:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 207, + "nodeType": "StructuredDocumentation", + "src": "3386:390:1", + "text": " @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n @param spender The address which will spend the funds.\n @param value The amount of tokens to be spent.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "3177029f", + "id": 216, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approveAndCall", + "nameLocation": "3790:14:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 209, + "mutability": "mutable", + "name": "spender", + "nameLocation": "3813:7:1", + "nodeType": "VariableDeclaration", + "scope": 216, + "src": "3805:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3805:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 211, + "mutability": "mutable", + "name": "value", + "nameLocation": "3830:5:1", + "nodeType": "VariableDeclaration", + "scope": 216, + "src": "3822:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 210, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3822:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3804:32:1" + }, + "returnParameters": { + "id": 215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 214, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 216, + "src": "3855:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3855:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3854:6:1" + }, + "scope": 229, + "src": "3781:80:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 217, + "nodeType": "StructuredDocumentation", + "src": "3867:478:1", + "text": " @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n @param spender The address which will spend the funds.\n @param value The amount of tokens to be spent.\n @param data Additional data with no specified format, sent in call to `spender`.\n @return A boolean value indicating whether the operation succeeded unless throwing." + }, + "functionSelector": "cae9ca51", + "id": 228, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approveAndCall", + "nameLocation": "4359:14:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 224, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "mutability": "mutable", + "name": "spender", + "nameLocation": "4382:7:1", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "4374:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 218, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4374:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 221, + "mutability": "mutable", + "name": "value", + "nameLocation": "4399:5:1", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "4391:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4391:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 223, + "mutability": "mutable", + "name": "data", + "nameLocation": "4421:4:1", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "4406:19:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 222, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4406:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4373:53:1" + }, + "returnParameters": { + "id": 227, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "4445:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 225, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4445:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4444:6:1" + }, + "scope": 229, + "src": "4350:101:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 230, + "src": "568:3885:1", + "usedErrors": [], + "usedEvents": [ + 274, + 283 + ] + } + ], + "src": "107:4347:1" + }, + "id": 1 + }, + "@openzeppelin/contracts/interfaces/IERC165.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC165.sol", + "exportedSymbols": { + "IERC165": [ + 4547 + ] + }, + "id": 234, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 231, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "106:25:2" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol", + "file": "../utils/introspection/IERC165.sol", + "id": 233, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 234, + "sourceUnit": 4548, + "src": "133:59:2", + "symbolAliases": [ + { + "foreign": { + "id": 232, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4547, + "src": "141:7:2", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + } + ], + "src": "106:87:2" + }, + "id": 2 + }, + "@openzeppelin/contracts/interfaces/IERC20.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 340 + ] + }, + "id": 238, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 235, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "105:25:3" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "../token/ERC20/IERC20.sol", + "id": 237, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 238, + "sourceUnit": 341, + "src": "132:49:3", + "symbolAliases": [ + { + "foreign": { + "id": 236, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "140:6:3", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + } + ], + "src": "105:77:3" + }, + "id": 3 + }, + "@openzeppelin/contracts/interfaces/IERC5267.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC5267.sol", + "exportedSymbols": { + "IERC5267": [ + 262 + ] + }, + "id": 263, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 239, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "107:25:4" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC5267", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 262, + "linearizedBaseContracts": [ + 262 + ], + "name": "IERC5267", + "nameLocation": "144:8:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 240, + "nodeType": "StructuredDocumentation", + "src": "159:84:4", + "text": " @dev MAY be emitted to signal that the domain could have changed." + }, + "eventSelector": "0a6387c9ea3628b88a633bb4f3b151770f70085117a15f9bf3787cda53f13d31", + "id": 242, + "name": "EIP712DomainChanged", + "nameLocation": "254:19:4", + "nodeType": "EventDefinition", + "parameters": { + "id": 241, + "nodeType": "ParameterList", + "parameters": [], + "src": "273:2:4" + }, + "src": "248:28:4" + }, + { + "documentation": { + "id": 243, + "nodeType": "StructuredDocumentation", + "src": "282:140:4", + "text": " @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n signature." + }, + "functionSelector": "84b0196e", + "id": 261, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "eip712Domain", + "nameLocation": "436:12:4", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [], + "src": "448:2:4" + }, + "returnParameters": { + "id": 260, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 246, + "mutability": "mutable", + "name": "fields", + "nameLocation": "518:6:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "511:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 245, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "511:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 248, + "mutability": "mutable", + "name": "name", + "nameLocation": "552:4:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "538:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 247, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "538:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 250, + "mutability": "mutable", + "name": "version", + "nameLocation": "584:7:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "570:21:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 249, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "570:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "mutability": "mutable", + "name": "chainId", + "nameLocation": "613:7:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "605:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "605:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "mutability": "mutable", + "name": "verifyingContract", + "nameLocation": "642:17:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "634:25:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "634:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 256, + "mutability": "mutable", + "name": "salt", + "nameLocation": "681:4:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "673:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 255, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "673:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 259, + "mutability": "mutable", + "name": "extensions", + "nameLocation": "716:10:4", + "nodeType": "VariableDeclaration", + "scope": 261, + "src": "699:27:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "699:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 258, + "nodeType": "ArrayTypeName", + "src": "699:9:4", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "497:239:4" + }, + "scope": 262, + "src": "427:310:4", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 263, + "src": "134:605:4", + "usedErrors": [], + "usedEvents": [ + 242 + ] + } + ], + "src": "107:633:4" + }, + "id": 4 + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 340 + ] + }, + "id": 341, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 264, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "106:25:5" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 265, + "nodeType": "StructuredDocumentation", + "src": "133:71:5", + "text": " @dev Interface of the ERC-20 standard as defined in the ERC." + }, + "fullyImplemented": false, + "id": 340, + "linearizedBaseContracts": [ + 340 + ], + "name": "IERC20", + "nameLocation": "215:6:5", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 266, + "nodeType": "StructuredDocumentation", + "src": "228:158:5", + "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero." + }, + "eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "id": 274, + "name": "Transfer", + "nameLocation": "397:8:5", + "nodeType": "EventDefinition", + "parameters": { + "id": 273, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 268, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "422:4:5", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "406:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 267, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "406:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "444:2:5", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "428:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 269, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "428:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 272, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "456:5:5", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "448:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 271, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "448:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "405:57:5" + }, + "src": "391:72:5" + }, + { + "anonymous": false, + "documentation": { + "id": 275, + "nodeType": "StructuredDocumentation", + "src": "469:148:5", + "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance." + }, + "eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "id": 283, + "name": "Approval", + "nameLocation": "628:8:5", + "nodeType": "EventDefinition", + "parameters": { + "id": 282, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 277, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "653:5:5", + "nodeType": "VariableDeclaration", + "scope": 283, + "src": "637:21:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "637:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 279, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nameLocation": "676:7:5", + "nodeType": "VariableDeclaration", + "scope": 283, + "src": "660:23:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "660:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 281, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nameLocation": "693:5:5", + "nodeType": "VariableDeclaration", + "scope": 283, + "src": "685:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 280, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "685:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "636:63:5" + }, + "src": "622:78:5" + }, + { + "documentation": { + "id": 284, + "nodeType": "StructuredDocumentation", + "src": "706:65:5", + "text": " @dev Returns the value of tokens in existence." + }, + "functionSelector": "18160ddd", + "id": 289, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nameLocation": "785:11:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [], + "src": "796:2:5" + }, + "returnParameters": { + "id": 288, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 287, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 289, + "src": "822:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "822:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "821:9:5" + }, + "scope": 340, + "src": "776:55:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 290, + "nodeType": "StructuredDocumentation", + "src": "837:71:5", + "text": " @dev Returns the value of tokens owned by `account`." + }, + "functionSelector": "70a08231", + "id": 297, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "922:9:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 292, + "mutability": "mutable", + "name": "account", + "nameLocation": "940:7:5", + "nodeType": "VariableDeclaration", + "scope": 297, + "src": "932:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 291, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "932:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "931:17:5" + }, + "returnParameters": { + "id": 296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 295, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 297, + "src": "972:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "972:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "971:9:5" + }, + "scope": 340, + "src": "913:68:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 298, + "nodeType": "StructuredDocumentation", + "src": "987:213:5", + "text": " @dev Moves a `value` amount of tokens from the caller's account to `to`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." + }, + "functionSelector": "a9059cbb", + "id": 307, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "1214:8:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 300, + "mutability": "mutable", + "name": "to", + "nameLocation": "1231:2:5", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "1223:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 299, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1223:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "mutability": "mutable", + "name": "value", + "nameLocation": "1243:5:5", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "1235:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1235:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1222:27:5" + }, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 305, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 307, + "src": "1268:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 304, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1268:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1267:6:5" + }, + "scope": 340, + "src": "1205:69:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 308, + "nodeType": "StructuredDocumentation", + "src": "1280:264:5", + "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called." + }, + "functionSelector": "dd62ed3e", + "id": 317, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nameLocation": "1558:9:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 310, + "mutability": "mutable", + "name": "owner", + "nameLocation": "1576:5:5", + "nodeType": "VariableDeclaration", + "scope": 317, + "src": "1568:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1568:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 312, + "mutability": "mutable", + "name": "spender", + "nameLocation": "1591:7:5", + "nodeType": "VariableDeclaration", + "scope": 317, + "src": "1583:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1583:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1567:32:5" + }, + "returnParameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 315, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 317, + "src": "1623:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 314, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1623:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1622:9:5" + }, + "scope": 340, + "src": "1549:83:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 318, + "nodeType": "StructuredDocumentation", + "src": "1638:667:5", + "text": " @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event." + }, + "functionSelector": "095ea7b3", + "id": 327, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2319:7:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 323, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 320, + "mutability": "mutable", + "name": "spender", + "nameLocation": "2335:7:5", + "nodeType": "VariableDeclaration", + "scope": 327, + "src": "2327:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 319, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2327:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 322, + "mutability": "mutable", + "name": "value", + "nameLocation": "2352:5:5", + "nodeType": "VariableDeclaration", + "scope": 327, + "src": "2344:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 321, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2344:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2326:32:5" + }, + "returnParameters": { + "id": 326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 325, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 327, + "src": "2377:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 324, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2377:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2376:6:5" + }, + "scope": 340, + "src": "2310:73:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 328, + "nodeType": "StructuredDocumentation", + "src": "2389:297:5", + "text": " @dev Moves a `value` amount of tokens from `from` to `to` using the\n allowance mechanism. `value` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." + }, + "functionSelector": "23b872dd", + "id": 339, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "2700:12:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 330, + "mutability": "mutable", + "name": "from", + "nameLocation": "2721:4:5", + "nodeType": "VariableDeclaration", + "scope": 339, + "src": "2713:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 329, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2713:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 332, + "mutability": "mutable", + "name": "to", + "nameLocation": "2735:2:5", + "nodeType": "VariableDeclaration", + "scope": 339, + "src": "2727:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 331, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2727:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 334, + "mutability": "mutable", + "name": "value", + "nameLocation": "2747:5:5", + "nodeType": "VariableDeclaration", + "scope": 339, + "src": "2739:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 333, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2739:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2712:41:5" + }, + "returnParameters": { + "id": 338, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 337, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 339, + "src": "2772:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 336, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2772:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2771:6:5" + }, + "scope": 340, + "src": "2691:87:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 341, + "src": "205:2575:5", + "usedErrors": [], + "usedEvents": [ + 274, + 283 + ] + } + ], + "src": "106:2675:5" + }, + "id": 5 + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol", + "exportedSymbols": { + "IERC20Permit": [ + 376 + ] + }, + "id": 377, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 342, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "123:25:6" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC20Permit", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 343, + "nodeType": "StructuredDocumentation", + "src": "150:1965:6", + "text": " @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in\n https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].\n Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by\n presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n need to send a transaction, and thus is not required to hold Ether at all.\n ==== Security Considerations\n There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n considered as an intention to spend the allowance in any specific way. The second is that because permits have\n built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n generally recommended is:\n ```solidity\n function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n doThing(..., value);\n }\n function doThing(..., uint256 value) public {\n token.safeTransferFrom(msg.sender, address(this), value);\n ...\n }\n ```\n Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n {SafeERC20-safeTransferFrom}).\n Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n contracts should have entry points that don't rely on permit." + }, + "fullyImplemented": false, + "id": 376, + "linearizedBaseContracts": [ + 376 + ], + "name": "IERC20Permit", + "nameLocation": "2126:12:6", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 344, + "nodeType": "StructuredDocumentation", + "src": "2145:852:6", + "text": " @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n given ``owner``'s signed approval.\n IMPORTANT: The same issues {IERC20-approve} has related to transaction\n ordering also applies here.\n Emits an {Approval} event.\n Requirements:\n - `spender` cannot be the zero address.\n - `deadline` must be a timestamp in the future.\n - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n over the EIP712-formatted function arguments.\n - the signature must use ``owner``'s current nonce (see {nonces}).\n For more information on the signature format, see the\n https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n section].\n CAUTION: See Security Considerations above." + }, + "functionSelector": "d505accf", + "id": 361, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "permit", + "nameLocation": "3011:6:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 359, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 346, + "mutability": "mutable", + "name": "owner", + "nameLocation": "3035:5:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3027:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 345, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3027:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 348, + "mutability": "mutable", + "name": "spender", + "nameLocation": "3058:7:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3050:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 347, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3050:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 350, + "mutability": "mutable", + "name": "value", + "nameLocation": "3083:5:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3075:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 349, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3075:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 352, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "3106:8:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3098:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3098:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 354, + "mutability": "mutable", + "name": "v", + "nameLocation": "3130:1:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3124:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 353, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3124:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 356, + "mutability": "mutable", + "name": "r", + "nameLocation": "3149:1:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3141:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 355, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3141:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 358, + "mutability": "mutable", + "name": "s", + "nameLocation": "3168:1:6", + "nodeType": "VariableDeclaration", + "scope": 361, + "src": "3160:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 357, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3160:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3017:158:6" + }, + "returnParameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [], + "src": "3184:0:6" + }, + "scope": 376, + "src": "3002:183:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 362, + "nodeType": "StructuredDocumentation", + "src": "3191:294:6", + "text": " @dev Returns the current nonce for `owner`. This value must be\n included whenever a signature is generated for {permit}.\n Every successful call to {permit} increases ``owner``'s nonce by one. This\n prevents a signature from being used multiple times." + }, + "functionSelector": "7ecebe00", + "id": 369, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nonces", + "nameLocation": "3499:6:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 365, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 364, + "mutability": "mutable", + "name": "owner", + "nameLocation": "3514:5:6", + "nodeType": "VariableDeclaration", + "scope": 369, + "src": "3506:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 363, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3506:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3505:15:6" + }, + "returnParameters": { + "id": 368, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 367, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 369, + "src": "3544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 366, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3543:9:6" + }, + "scope": 376, + "src": "3490:63:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 370, + "nodeType": "StructuredDocumentation", + "src": "3559:128:6", + "text": " @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}." + }, + "functionSelector": "3644e515", + "id": 375, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "DOMAIN_SEPARATOR", + "nameLocation": "3754:16:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "3770:2:6" + }, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "3796:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 372, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3795:9:6" + }, + "scope": 376, + "src": "3745:60:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 377, + "src": "2116:1691:6", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "123:3685:6" + }, + "id": 6 + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "exportedSymbols": { + "IERC1363": [ + 229 + ], + "IERC20": [ + 340 + ], + "SafeERC20": [ + 831 + ] + }, + "id": 832, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 378, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "115:24:7" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "../IERC20.sol", + "id": 380, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 832, + "sourceUnit": 341, + "src": "141:37:7", + "symbolAliases": [ + { + "foreign": { + "id": 379, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "149:6:7", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC1363.sol", + "file": "../../../interfaces/IERC1363.sol", + "id": 382, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 832, + "sourceUnit": 230, + "src": "179:58:7", + "symbolAliases": [ + { + "foreign": { + "id": 381, + "name": "IERC1363", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "187:8:7", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SafeERC20", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 383, + "nodeType": "StructuredDocumentation", + "src": "239:458:7", + "text": " @title SafeERC20\n @dev Wrappers around ERC-20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc." + }, + "fullyImplemented": true, + "id": 831, + "linearizedBaseContracts": [ + 831 + ], + "name": "SafeERC20", + "nameLocation": "706:9:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 384, + "nodeType": "StructuredDocumentation", + "src": "722:65:7", + "text": " @dev An operation with an ERC-20 token failed." + }, + "errorSelector": "5274afe7", + "id": 388, + "name": "SafeERC20FailedOperation", + "nameLocation": "798:24:7", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 386, + "mutability": "mutable", + "name": "token", + "nameLocation": "831:5:7", + "nodeType": "VariableDeclaration", + "scope": 388, + "src": "823:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "823:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "822:15:7" + }, + "src": "792:46:7" + }, + { + "documentation": { + "id": 389, + "nodeType": "StructuredDocumentation", + "src": "844:71:7", + "text": " @dev Indicates a failed `decreaseAllowance` request." + }, + "errorSelector": "e570110f", + "id": 397, + "name": "SafeERC20FailedDecreaseAllowance", + "nameLocation": "926:32:7", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 391, + "mutability": "mutable", + "name": "spender", + "nameLocation": "967:7:7", + "nodeType": "VariableDeclaration", + "scope": 397, + "src": "959:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 390, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "959:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 393, + "mutability": "mutable", + "name": "currentAllowance", + "nameLocation": "984:16:7", + "nodeType": "VariableDeclaration", + "scope": 397, + "src": "976:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 392, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "976:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 395, + "mutability": "mutable", + "name": "requestedDecrease", + "nameLocation": "1010:17:7", + "nodeType": "VariableDeclaration", + "scope": 397, + "src": "1002:25:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 394, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1002:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "958:70:7" + }, + "src": "920:109:7" + }, + { + "body": { + "id": 424, + "nodeType": "Block", + "src": "1291:132:7", + "statements": [ + { + "condition": { + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1305:38:7", + "subExpression": { + "arguments": [ + { + "id": 409, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "1320:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 410, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 403, + "src": "1327:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 411, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "1331:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "74727565", + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1338:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 408, + "name": "_safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "1306:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1306:37:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 423, + "nodeType": "IfStatement", + "src": "1301:116:7", + "trueBody": { + "id": 422, + "nodeType": "Block", + "src": "1345:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 418, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "1399:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + ], + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1391:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 416, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1391:7:7", + "typeDescriptions": {} + } + }, + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1391:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 415, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "1366:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1366:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 421, + "nodeType": "RevertStatement", + "src": "1359:47:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 398, + "nodeType": "StructuredDocumentation", + "src": "1035:179:7", + "text": " @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n non-reverting calls are assumed to be successful." + }, + "id": 425, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransfer", + "nameLocation": "1228:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 401, + "mutability": "mutable", + "name": "token", + "nameLocation": "1248:5:7", + "nodeType": "VariableDeclaration", + "scope": 425, + "src": "1241:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 400, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 399, + "name": "IERC20", + "nameLocations": [ + "1241:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "1241:6:7" + }, + "referencedDeclaration": 340, + "src": "1241:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 403, + "mutability": "mutable", + "name": "to", + "nameLocation": "1263:2:7", + "nodeType": "VariableDeclaration", + "scope": 425, + "src": "1255:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 402, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1255:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 405, + "mutability": "mutable", + "name": "value", + "nameLocation": "1275:5:7", + "nodeType": "VariableDeclaration", + "scope": 425, + "src": "1267:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 404, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1267:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1240:41:7" + }, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [], + "src": "1291:0:7" + }, + "scope": 831, + "src": "1219:204:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 455, + "nodeType": "Block", + "src": "1752:142:7", + "statements": [ + { + "condition": { + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1766:48:7", + "subExpression": { + "arguments": [ + { + "id": 439, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "1785:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 440, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 431, + "src": "1792:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 441, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "1798:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 442, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 435, + "src": "1802:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "74727565", + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1809:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 438, + "name": "_safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 807, + "src": "1767:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,address,uint256,bool) returns (bool)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1767:47:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 454, + "nodeType": "IfStatement", + "src": "1762:126:7", + "trueBody": { + "id": 453, + "nodeType": "Block", + "src": "1816:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 449, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "1870:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + ], + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1862:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1862:7:7", + "typeDescriptions": {} + } + }, + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1862:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 446, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "1837:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1837:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 452, + "nodeType": "RevertStatement", + "src": "1830:47:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 426, + "nodeType": "StructuredDocumentation", + "src": "1429:228:7", + "text": " @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n calling contract. If `token` returns no value, non-reverting calls are assumed to be successful." + }, + "id": 456, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "1671:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 429, + "mutability": "mutable", + "name": "token", + "nameLocation": "1695:5:7", + "nodeType": "VariableDeclaration", + "scope": 456, + "src": "1688:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 428, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 427, + "name": "IERC20", + "nameLocations": [ + "1688:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "1688:6:7" + }, + "referencedDeclaration": 340, + "src": "1688:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 431, + "mutability": "mutable", + "name": "from", + "nameLocation": "1710:4:7", + "nodeType": "VariableDeclaration", + "scope": 456, + "src": "1702:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 430, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1702:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 433, + "mutability": "mutable", + "name": "to", + "nameLocation": "1724:2:7", + "nodeType": "VariableDeclaration", + "scope": 456, + "src": "1716:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 432, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1716:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 435, + "mutability": "mutable", + "name": "value", + "nameLocation": "1736:5:7", + "nodeType": "VariableDeclaration", + "scope": 456, + "src": "1728:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 434, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1728:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1687:55:7" + }, + "returnParameters": { + "id": 437, + "nodeType": "ParameterList", + "parameters": [], + "src": "1752:0:7" + }, + "scope": 831, + "src": "1662:232:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 476, + "nodeType": "Block", + "src": "2121:62:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 470, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "2152:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 471, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "2159:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 472, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "2163:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "66616c7365", + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2170:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 469, + "name": "_safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "2138:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2138:38:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 468, + "id": 475, + "nodeType": "Return", + "src": "2131:45:7" + } + ] + }, + "documentation": { + "id": 457, + "nodeType": "StructuredDocumentation", + "src": "1900:126:7", + "text": " @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful." + }, + "id": 477, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "trySafeTransfer", + "nameLocation": "2040:15:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 460, + "mutability": "mutable", + "name": "token", + "nameLocation": "2063:5:7", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "2056:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 459, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 458, + "name": "IERC20", + "nameLocations": [ + "2056:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "2056:6:7" + }, + "referencedDeclaration": 340, + "src": "2056:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 462, + "mutability": "mutable", + "name": "to", + "nameLocation": "2078:2:7", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "2070:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2070:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 464, + "mutability": "mutable", + "name": "value", + "nameLocation": "2090:5:7", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "2082:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 463, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2082:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2055:41:7" + }, + "returnParameters": { + "id": 468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 467, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "2115:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 466, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2115:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2114:6:7" + }, + "scope": 831, + "src": "2031:152:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 500, + "nodeType": "Block", + "src": "2432:72:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 493, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 481, + "src": "2467:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 494, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 483, + "src": "2474:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 495, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 485, + "src": "2480:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 496, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 487, + "src": "2484:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "66616c7365", + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2491:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 492, + "name": "_safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 807, + "src": "2449:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,address,uint256,bool) returns (bool)" + } + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2449:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 491, + "id": 499, + "nodeType": "Return", + "src": "2442:55:7" + } + ] + }, + "documentation": { + "id": 478, + "nodeType": "StructuredDocumentation", + "src": "2189:130:7", + "text": " @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful." + }, + "id": 501, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "trySafeTransferFrom", + "nameLocation": "2333:19:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 488, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 481, + "mutability": "mutable", + "name": "token", + "nameLocation": "2360:5:7", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2353:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 480, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 479, + "name": "IERC20", + "nameLocations": [ + "2353:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "2353:6:7" + }, + "referencedDeclaration": 340, + "src": "2353:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 483, + "mutability": "mutable", + "name": "from", + "nameLocation": "2375:4:7", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2367:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2367:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 485, + "mutability": "mutable", + "name": "to", + "nameLocation": "2389:2:7", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2381:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 484, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2381:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 487, + "mutability": "mutable", + "name": "value", + "nameLocation": "2401:5:7", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2393:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 486, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2393:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2352:55:7" + }, + "returnParameters": { + "id": 491, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 490, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 501, + "src": "2426:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 489, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2426:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2425:6:7" + }, + "scope": 831, + "src": "2324:180:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 531, + "nodeType": "Block", + "src": "3246:139:7", + "statements": [ + { + "assignments": [ + 513 + ], + "declarations": [ + { + "constant": false, + "id": 513, + "mutability": "mutable", + "name": "oldAllowance", + "nameLocation": "3264:12:7", + "nodeType": "VariableDeclaration", + "scope": 531, + "src": "3256:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 512, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3256:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 522, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 518, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3303:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$831", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$831", + "typeString": "library SafeERC20" + } + ], + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3295:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 516, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3295:7:7", + "typeDescriptions": {} + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3295:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 520, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 507, + "src": "3310:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 514, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 505, + "src": "3279:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3285:9:7", + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 317, + "src": "3279:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3279:39:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3256:62:7" + }, + { + "expression": { + "arguments": [ + { + "id": 524, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 505, + "src": "3341:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 525, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 507, + "src": "3348:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 526, + "name": "oldAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "3357:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 527, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 509, + "src": "3372:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3357:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 523, + "name": "forceApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "3328:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3328:50:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 530, + "nodeType": "ExpressionStatement", + "src": "3328:50:7" + } + ] + }, + "documentation": { + "id": 502, + "nodeType": "StructuredDocumentation", + "src": "2510:645:7", + "text": " @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n non-reverting calls are assumed to be successful.\n IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior." + }, + "id": 532, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeIncreaseAllowance", + "nameLocation": "3169:21:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 510, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 505, + "mutability": "mutable", + "name": "token", + "nameLocation": "3198:5:7", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "3191:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 504, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 503, + "name": "IERC20", + "nameLocations": [ + "3191:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "3191:6:7" + }, + "referencedDeclaration": 340, + "src": "3191:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 507, + "mutability": "mutable", + "name": "spender", + "nameLocation": "3213:7:7", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "3205:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 506, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3205:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 509, + "mutability": "mutable", + "name": "value", + "nameLocation": "3230:5:7", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "3222:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 508, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3222:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3190:46:7" + }, + "returnParameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [], + "src": "3246:0:7" + }, + "scope": 831, + "src": "3160:225:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 574, + "nodeType": "Block", + "src": "4151:370:7", + "statements": [ + { + "id": 573, + "nodeType": "UncheckedBlock", + "src": "4161:354:7", + "statements": [ + { + "assignments": [ + 544 + ], + "declarations": [ + { + "constant": false, + "id": 544, + "mutability": "mutable", + "name": "currentAllowance", + "nameLocation": "4193:16:7", + "nodeType": "VariableDeclaration", + "scope": 573, + "src": "4185:24:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4185:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 553, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 549, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4236:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$831", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$831", + "typeString": "library SafeERC20" + } + ], + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4228:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 547, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4228:7:7", + "typeDescriptions": {} + } + }, + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4228:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 551, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "4243:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 545, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "4212:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4218:9:7", + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 317, + "src": "4212:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4212:39:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4185:66:7" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 554, + "name": "currentAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 544, + "src": "4269:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 555, + "name": "requestedDecrease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 540, + "src": "4288:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4269:36:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 564, + "nodeType": "IfStatement", + "src": "4265:160:7", + "trueBody": { + "id": 563, + "nodeType": "Block", + "src": "4307:118:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 558, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "4365:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 559, + "name": "currentAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 544, + "src": "4374:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 560, + "name": "requestedDecrease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 540, + "src": "4392:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 557, + "name": "SafeERC20FailedDecreaseAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 397, + "src": "4332:32:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$_t_uint256_$_t_uint256_$returns$_t_error_$", + "typeString": "function (address,uint256,uint256) pure returns (error)" + } + }, + "id": 561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4332:78:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 562, + "nodeType": "RevertStatement", + "src": "4325:85:7" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 566, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "4451:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 567, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "4458:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 568, + "name": "currentAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 544, + "src": "4467:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 569, + "name": "requestedDecrease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 540, + "src": "4486:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4467:36:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 565, + "name": "forceApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "4438:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4438:66:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 572, + "nodeType": "ExpressionStatement", + "src": "4438:66:7" + } + ] + } + ] + }, + "documentation": { + "id": 533, + "nodeType": "StructuredDocumentation", + "src": "3391:657:7", + "text": " @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n value, non-reverting calls are assumed to be successful.\n IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior." + }, + "id": 575, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeDecreaseAllowance", + "nameLocation": "4062:21:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 541, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 536, + "mutability": "mutable", + "name": "token", + "nameLocation": "4091:5:7", + "nodeType": "VariableDeclaration", + "scope": 575, + "src": "4084:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 535, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 534, + "name": "IERC20", + "nameLocations": [ + "4084:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "4084:6:7" + }, + "referencedDeclaration": 340, + "src": "4084:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 538, + "mutability": "mutable", + "name": "spender", + "nameLocation": "4106:7:7", + "nodeType": "VariableDeclaration", + "scope": 575, + "src": "4098:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 537, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4098:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 540, + "mutability": "mutable", + "name": "requestedDecrease", + "nameLocation": "4123:17:7", + "nodeType": "VariableDeclaration", + "scope": 575, + "src": "4115:25:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 539, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4115:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4083:58:7" + }, + "returnParameters": { + "id": 542, + "nodeType": "ParameterList", + "parameters": [], + "src": "4151:0:7" + }, + "scope": 831, + "src": "4053:468:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 625, + "nodeType": "Block", + "src": "5175:290:7", + "statements": [ + { + "condition": { + "id": 592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5189:43:7", + "subExpression": { + "arguments": [ + { + "id": 587, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5203:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 588, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 581, + "src": "5210:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 589, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 583, + "src": "5219:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "66616c7365", + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5226:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 586, + "name": "_safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "5190:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5190:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 624, + "nodeType": "IfStatement", + "src": "5185:274:7", + "trueBody": { + "id": 623, + "nodeType": "Block", + "src": "5234:225:7", + "statements": [ + { + "condition": { + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5252:38:7", + "subExpression": { + "arguments": [ + { + "id": 594, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5266:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 595, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 581, + "src": "5273:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "30", + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5282:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "hexValue": "74727565", + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5285:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 593, + "name": "_safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "5253:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5253:37:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 607, + "nodeType": "IfStatement", + "src": "5248:91:7", + "trueBody": { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 603, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5332:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + ], + "id": 602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5324:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 601, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5324:7:7", + "typeDescriptions": {} + } + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5324:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 600, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5299:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5299:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 606, + "nodeType": "RevertStatement", + "src": "5292:47:7" + } + }, + { + "condition": { + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5357:42:7", + "subExpression": { + "arguments": [ + { + "id": 609, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5371:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + { + "id": 610, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 581, + "src": "5378:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 611, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 583, + "src": "5387:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "74727565", + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5394:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 608, + "name": "_safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 830, + "src": "5358:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$_t_bool_$returns$_t_bool_$", + "typeString": "function (contract IERC20,address,uint256,bool) returns (bool)" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5358:41:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 622, + "nodeType": "IfStatement", + "src": "5353:95:7", + "trueBody": { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 618, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 579, + "src": "5441:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + ], + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5433:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5433:7:7", + "typeDescriptions": {} + } + }, + "id": 619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5433:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 615, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5408:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5408:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 621, + "nodeType": "RevertStatement", + "src": "5401:47:7" + } + } + ] + } + } + ] + }, + "documentation": { + "id": 576, + "nodeType": "StructuredDocumentation", + "src": "4527:566:7", + "text": " @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n to be set to zero before setting it to a non-zero value, such as USDT.\n NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n set here." + }, + "id": 626, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "forceApprove", + "nameLocation": "5107:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 584, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 579, + "mutability": "mutable", + "name": "token", + "nameLocation": "5127:5:7", + "nodeType": "VariableDeclaration", + "scope": 626, + "src": "5120:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 578, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 577, + "name": "IERC20", + "nameLocations": [ + "5120:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "5120:6:7" + }, + "referencedDeclaration": 340, + "src": "5120:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 581, + "mutability": "mutable", + "name": "spender", + "nameLocation": "5142:7:7", + "nodeType": "VariableDeclaration", + "scope": 626, + "src": "5134:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 580, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5134:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 583, + "mutability": "mutable", + "name": "value", + "nameLocation": "5159:5:7", + "nodeType": "VariableDeclaration", + "scope": 626, + "src": "5151:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 582, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5151:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5119:46:7" + }, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "5175:0:7" + }, + "scope": 831, + "src": "5098:367:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 668, + "nodeType": "Block", + "src": "5914:219:7", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 639, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 632, + "src": "5928:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5931:4:7", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "5928:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5936:6:7", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5928:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5946:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5928:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6014:39:7", + "subExpression": { + "arguments": [ + { + "id": 653, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 632, + "src": "6037:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 654, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 634, + "src": "6041:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 655, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "6048:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 651, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 630, + "src": "6015:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6021:15:7", + "memberName": "transferAndCall", + "nodeType": "MemberAccess", + "referencedDeclaration": 180, + "src": "6015:21:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes memory) external returns (bool)" + } + }, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6015:38:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 666, + "nodeType": "IfStatement", + "src": "6010:117:7", + "trueBody": { + "id": 665, + "nodeType": "Block", + "src": "6055:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 661, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 630, + "src": "6109:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + ], + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6101:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6101:7:7", + "typeDescriptions": {} + } + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6101:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 658, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "6076:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6076:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 664, + "nodeType": "RevertStatement", + "src": "6069:47:7" + } + ] + } + }, + "id": 667, + "nodeType": "IfStatement", + "src": "5924:203:7", + "trueBody": { + "id": 650, + "nodeType": "Block", + "src": "5949:55:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 645, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 630, + "src": "5976:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + { + "id": 646, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 632, + "src": "5983:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 647, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 634, + "src": "5987:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 644, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 425, + "src": "5963:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5963:30:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 649, + "nodeType": "ExpressionStatement", + "src": "5963:30:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 627, + "nodeType": "StructuredDocumentation", + "src": "5471:335:7", + "text": " @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n targeting contracts.\n Reverts if the returned value is other than `true`." + }, + "id": 669, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferAndCallRelaxed", + "nameLocation": "5820:22:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 630, + "mutability": "mutable", + "name": "token", + "nameLocation": "5852:5:7", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "5843:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + "typeName": { + "id": 629, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 628, + "name": "IERC1363", + "nameLocations": [ + "5843:8:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 229, + "src": "5843:8:7" + }, + "referencedDeclaration": 229, + "src": "5843:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 632, + "mutability": "mutable", + "name": "to", + "nameLocation": "5867:2:7", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "5859:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 631, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5859:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 634, + "mutability": "mutable", + "name": "value", + "nameLocation": "5879:5:7", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "5871:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 633, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5871:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 636, + "mutability": "mutable", + "name": "data", + "nameLocation": "5899:4:7", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "5886:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 635, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5886:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "5842:62:7" + }, + "returnParameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [], + "src": "5914:0:7" + }, + "scope": 831, + "src": "5811:322:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 715, + "nodeType": "Block", + "src": "6654:239:7", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 684, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 677, + "src": "6668:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6671:4:7", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "6668:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6676:6:7", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6668:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6686:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6668:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "id": 704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6764:49:7", + "subExpression": { + "arguments": [ + { + "id": 699, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 675, + "src": "6791:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 700, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 677, + "src": "6797:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 701, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "6801:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 702, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "6808:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 697, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 673, + "src": "6765:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "id": 698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6771:19:7", + "memberName": "transferFromAndCall", + "nodeType": "MemberAccess", + "referencedDeclaration": 206, + "src": "6765:25:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bool)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6765:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 713, + "nodeType": "IfStatement", + "src": "6760:127:7", + "trueBody": { + "id": 712, + "nodeType": "Block", + "src": "6815:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 708, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 673, + "src": "6869:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + ], + "id": 707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6861:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 706, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6861:7:7", + "typeDescriptions": {} + } + }, + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6861:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 705, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "6836:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6836:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 711, + "nodeType": "RevertStatement", + "src": "6829:47:7" + } + ] + } + }, + "id": 714, + "nodeType": "IfStatement", + "src": "6664:223:7", + "trueBody": { + "id": 696, + "nodeType": "Block", + "src": "6689:65:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 690, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 673, + "src": "6720:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + { + "id": 691, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 675, + "src": "6727:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 692, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 677, + "src": "6733:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 693, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "6737:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 689, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6703:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,address,uint256)" + } + }, + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6703:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 695, + "nodeType": "ExpressionStatement", + "src": "6703:40:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 670, + "nodeType": "StructuredDocumentation", + "src": "6139:343:7", + "text": " @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when\n targeting contracts.\n Reverts if the returned value is other than `true`." + }, + "id": 716, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFromAndCallRelaxed", + "nameLocation": "6496:26:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 673, + "mutability": "mutable", + "name": "token", + "nameLocation": "6541:5:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6532:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + "typeName": { + "id": 672, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 671, + "name": "IERC1363", + "nameLocations": [ + "6532:8:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 229, + "src": "6532:8:7" + }, + "referencedDeclaration": 229, + "src": "6532:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 675, + "mutability": "mutable", + "name": "from", + "nameLocation": "6564:4:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6556:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6556:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 677, + "mutability": "mutable", + "name": "to", + "nameLocation": "6586:2:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6578:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 676, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6578:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 679, + "mutability": "mutable", + "name": "value", + "nameLocation": "6606:5:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6598:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 678, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6598:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 681, + "mutability": "mutable", + "name": "data", + "nameLocation": "6634:4:7", + "nodeType": "VariableDeclaration", + "scope": 716, + "src": "6621:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 680, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6621:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "6522:122:7" + }, + "returnParameters": { + "id": 683, + "nodeType": "ParameterList", + "parameters": [], + "src": "6654:0:7" + }, + "scope": 831, + "src": "6487:406:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 758, + "nodeType": "Block", + "src": "7661:218:7", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 729, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 722, + "src": "7675:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7678:4:7", + "memberName": "code", + "nodeType": "MemberAccess", + "src": "7675:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7683:6:7", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7675:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7693:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7675:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7761:38:7", + "subExpression": { + "arguments": [ + { + "id": 743, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 722, + "src": "7783:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 744, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 724, + "src": "7787:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 745, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 726, + "src": "7794:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 741, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 720, + "src": "7762:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "id": 742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7768:14:7", + "memberName": "approveAndCall", + "nodeType": "MemberAccess", + "referencedDeclaration": 228, + "src": "7762:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,uint256,bytes memory) external returns (bool)" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7762:37:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 756, + "nodeType": "IfStatement", + "src": "7757:116:7", + "trueBody": { + "id": 755, + "nodeType": "Block", + "src": "7801:72:7", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 751, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 720, + "src": "7855:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + ], + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7847:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 749, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7847:7:7", + "typeDescriptions": {} + } + }, + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7847:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 748, + "name": "SafeERC20FailedOperation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "7822:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$_t_error_$", + "typeString": "function (address) pure returns (error)" + } + }, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7822:40:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 754, + "nodeType": "RevertStatement", + "src": "7815:47:7" + } + ] + } + }, + "id": 757, + "nodeType": "IfStatement", + "src": "7671:202:7", + "trueBody": { + "id": 740, + "nodeType": "Block", + "src": "7696:55:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 735, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 720, + "src": "7723:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + { + "id": 736, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 722, + "src": "7730:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 737, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 724, + "src": "7734:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 734, + "name": "forceApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "7710:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7710:30:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "7710:30:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 717, + "nodeType": "StructuredDocumentation", + "src": "6899:655:7", + "text": " @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n targeting contracts.\n NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n once without retrying, and relies on the returned value to be true.\n Reverts if the returned value is other than `true`." + }, + "id": 759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approveAndCallRelaxed", + "nameLocation": "7568:21:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 720, + "mutability": "mutable", + "name": "token", + "nameLocation": "7599:5:7", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "7590:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + }, + "typeName": { + "id": 719, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 718, + "name": "IERC1363", + "nameLocations": [ + "7590:8:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 229, + "src": "7590:8:7" + }, + "referencedDeclaration": 229, + "src": "7590:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1363_$229", + "typeString": "contract IERC1363" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 722, + "mutability": "mutable", + "name": "to", + "nameLocation": "7614:2:7", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "7606:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 721, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7606:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 724, + "mutability": "mutable", + "name": "value", + "nameLocation": "7626:5:7", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "7618:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 723, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7618:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 726, + "mutability": "mutable", + "name": "data", + "nameLocation": "7646:4:7", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "7633:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 725, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7633:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "7589:62:7" + }, + "returnParameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [], + "src": "7661:0:7" + }, + "scope": 831, + "src": "7559:320:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 781, + "nodeType": "Block", + "src": "8481:1136:7", + "statements": [ + { + "assignments": [ + 775 + ], + "declarations": [ + { + "constant": false, + "id": 775, + "mutability": "mutable", + "name": "selector", + "nameLocation": "8498:8:7", + "nodeType": "VariableDeclaration", + "scope": 781, + "src": "8491:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 774, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "8491:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 779, + "initialValue": { + "expression": { + "expression": { + "id": 776, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "8509:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8516:8:7", + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 307, + "src": "8509:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function IERC20.transfer(address,uint256) returns (bool)" + } + }, + "id": 778, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8525:8:7", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "8509:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8491:42:7" + }, + { + "AST": { + "nativeSrc": "8569:1042:7", + "nodeType": "YulBlock", + "src": "8569:1042:7", + "statements": [ + { + "nativeSrc": "8583:22:7", + "nodeType": "YulVariableDeclaration", + "src": "8583:22:7", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8600:4:7", + "nodeType": "YulLiteral", + "src": "8600:4:7", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8594:5:7", + "nodeType": "YulIdentifier", + "src": "8594:5:7" + }, + "nativeSrc": "8594:11:7", + "nodeType": "YulFunctionCall", + "src": "8594:11:7" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "8587:3:7", + "nodeType": "YulTypedName", + "src": "8587:3:7", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8625:4:7", + "nodeType": "YulLiteral", + "src": "8625:4:7", + "type": "", + "value": "0x00" + }, + { + "name": "selector", + "nativeSrc": "8631:8:7", + "nodeType": "YulIdentifier", + "src": "8631:8:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8618:6:7", + "nodeType": "YulIdentifier", + "src": "8618:6:7" + }, + "nativeSrc": "8618:22:7", + "nodeType": "YulFunctionCall", + "src": "8618:22:7" + }, + "nativeSrc": "8618:22:7", + "nodeType": "YulExpressionStatement", + "src": "8618:22:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8660:4:7", + "nodeType": "YulLiteral", + "src": "8660:4:7", + "type": "", + "value": "0x04" + }, + { + "arguments": [ + { + "name": "to", + "nativeSrc": "8670:2:7", + "nodeType": "YulIdentifier", + "src": "8670:2:7" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8678:2:7", + "nodeType": "YulLiteral", + "src": "8678:2:7", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8686:1:7", + "nodeType": "YulLiteral", + "src": "8686:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "8682:3:7", + "nodeType": "YulIdentifier", + "src": "8682:3:7" + }, + "nativeSrc": "8682:6:7", + "nodeType": "YulFunctionCall", + "src": "8682:6:7" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "8674:3:7", + "nodeType": "YulIdentifier", + "src": "8674:3:7" + }, + "nativeSrc": "8674:15:7", + "nodeType": "YulFunctionCall", + "src": "8674:15:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8666:3:7", + "nodeType": "YulIdentifier", + "src": "8666:3:7" + }, + "nativeSrc": "8666:24:7", + "nodeType": "YulFunctionCall", + "src": "8666:24:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8653:6:7", + "nodeType": "YulIdentifier", + "src": "8653:6:7" + }, + "nativeSrc": "8653:38:7", + "nodeType": "YulFunctionCall", + "src": "8653:38:7" + }, + "nativeSrc": "8653:38:7", + "nodeType": "YulExpressionStatement", + "src": "8653:38:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8711:4:7", + "nodeType": "YulLiteral", + "src": "8711:4:7", + "type": "", + "value": "0x24" + }, + { + "name": "value", + "nativeSrc": "8717:5:7", + "nodeType": "YulIdentifier", + "src": "8717:5:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8704:6:7", + "nodeType": "YulIdentifier", + "src": "8704:6:7" + }, + "nativeSrc": "8704:19:7", + "nodeType": "YulFunctionCall", + "src": "8704:19:7" + }, + "nativeSrc": "8704:19:7", + "nodeType": "YulExpressionStatement", + "src": "8704:19:7" + }, + { + "nativeSrc": "8736:56:7", + "nodeType": "YulAssignment", + "src": "8736:56:7", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "8752:3:7", + "nodeType": "YulIdentifier", + "src": "8752:3:7" + }, + "nativeSrc": "8752:5:7", + "nodeType": "YulFunctionCall", + "src": "8752:5:7" + }, + { + "name": "token", + "nativeSrc": "8759:5:7", + "nodeType": "YulIdentifier", + "src": "8759:5:7" + }, + { + "kind": "number", + "nativeSrc": "8766:1:7", + "nodeType": "YulLiteral", + "src": "8766:1:7", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "8769:4:7", + "nodeType": "YulLiteral", + "src": "8769:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "8775:4:7", + "nodeType": "YulLiteral", + "src": "8775:4:7", + "type": "", + "value": "0x44" + }, + { + "kind": "number", + "nativeSrc": "8781:4:7", + "nodeType": "YulLiteral", + "src": "8781:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "8787:4:7", + "nodeType": "YulLiteral", + "src": "8787:4:7", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "call", + "nativeSrc": "8747:4:7", + "nodeType": "YulIdentifier", + "src": "8747:4:7" + }, + "nativeSrc": "8747:45:7", + "nodeType": "YulFunctionCall", + "src": "8747:45:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "8736:7:7", + "nodeType": "YulIdentifier", + "src": "8736:7:7" + } + ] + }, + { + "body": { + "nativeSrc": "9009:562:7", + "nodeType": "YulBlock", + "src": "9009:562:7", + "statements": [ + { + "body": { + "nativeSrc": "9144:133:7", + "nodeType": "YulBlock", + "src": "9144:133:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "9181:3:7", + "nodeType": "YulIdentifier", + "src": "9181:3:7" + }, + { + "kind": "number", + "nativeSrc": "9186:4:7", + "nodeType": "YulLiteral", + "src": "9186:4:7", + "type": "", + "value": "0x00" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "9192:14:7", + "nodeType": "YulIdentifier", + "src": "9192:14:7" + }, + "nativeSrc": "9192:16:7", + "nodeType": "YulFunctionCall", + "src": "9192:16:7" + } + ], + "functionName": { + "name": "returndatacopy", + "nativeSrc": "9166:14:7", + "nodeType": "YulIdentifier", + "src": "9166:14:7" + }, + "nativeSrc": "9166:43:7", + "nodeType": "YulFunctionCall", + "src": "9166:43:7" + }, + "nativeSrc": "9166:43:7", + "nodeType": "YulExpressionStatement", + "src": "9166:43:7" + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "9237:3:7", + "nodeType": "YulIdentifier", + "src": "9237:3:7" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "9242:14:7", + "nodeType": "YulIdentifier", + "src": "9242:14:7" + }, + "nativeSrc": "9242:16:7", + "nodeType": "YulFunctionCall", + "src": "9242:16:7" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9230:6:7", + "nodeType": "YulIdentifier", + "src": "9230:6:7" + }, + "nativeSrc": "9230:29:7", + "nodeType": "YulFunctionCall", + "src": "9230:29:7" + }, + "nativeSrc": "9230:29:7", + "nodeType": "YulExpressionStatement", + "src": "9230:29:7" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "9126:7:7", + "nodeType": "YulIdentifier", + "src": "9126:7:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "9119:6:7", + "nodeType": "YulIdentifier", + "src": "9119:6:7" + }, + "nativeSrc": "9119:15:7", + "nodeType": "YulFunctionCall", + "src": "9119:15:7" + }, + { + "name": "bubble", + "nativeSrc": "9136:6:7", + "nodeType": "YulIdentifier", + "src": "9136:6:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9115:3:7", + "nodeType": "YulIdentifier", + "src": "9115:3:7" + }, + "nativeSrc": "9115:28:7", + "nodeType": "YulFunctionCall", + "src": "9115:28:7" + }, + "nativeSrc": "9112:165:7", + "nodeType": "YulIf", + "src": "9112:165:7" + }, + { + "nativeSrc": "9476:81:7", + "nodeType": "YulAssignment", + "src": "9476:81:7", + "value": { + "arguments": [ + { + "name": "success", + "nativeSrc": "9491:7:7", + "nodeType": "YulIdentifier", + "src": "9491:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "9511:14:7", + "nodeType": "YulIdentifier", + "src": "9511:14:7" + }, + "nativeSrc": "9511:16:7", + "nodeType": "YulFunctionCall", + "src": "9511:16:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "9504:6:7", + "nodeType": "YulIdentifier", + "src": "9504:6:7" + }, + "nativeSrc": "9504:24:7", + "nodeType": "YulFunctionCall", + "src": "9504:24:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "token", + "nativeSrc": "9545:5:7", + "nodeType": "YulIdentifier", + "src": "9545:5:7" + } + ], + "functionName": { + "name": "extcodesize", + "nativeSrc": "9533:11:7", + "nodeType": "YulIdentifier", + "src": "9533:11:7" + }, + "nativeSrc": "9533:18:7", + "nodeType": "YulFunctionCall", + "src": "9533:18:7" + }, + { + "kind": "number", + "nativeSrc": "9553:1:7", + "nodeType": "YulLiteral", + "src": "9553:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "9530:2:7", + "nodeType": "YulIdentifier", + "src": "9530:2:7" + }, + "nativeSrc": "9530:25:7", + "nodeType": "YulFunctionCall", + "src": "9530:25:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9500:3:7", + "nodeType": "YulIdentifier", + "src": "9500:3:7" + }, + "nativeSrc": "9500:56:7", + "nodeType": "YulFunctionCall", + "src": "9500:56:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9487:3:7", + "nodeType": "YulIdentifier", + "src": "9487:3:7" + }, + "nativeSrc": "9487:70:7", + "nodeType": "YulFunctionCall", + "src": "9487:70:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "9476:7:7", + "nodeType": "YulIdentifier", + "src": "9476:7:7" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "8979:7:7", + "nodeType": "YulIdentifier", + "src": "8979:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8997:4:7", + "nodeType": "YulLiteral", + "src": "8997:4:7", + "type": "", + "value": "0x00" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8991:5:7", + "nodeType": "YulIdentifier", + "src": "8991:5:7" + }, + "nativeSrc": "8991:11:7", + "nodeType": "YulFunctionCall", + "src": "8991:11:7" + }, + { + "kind": "number", + "nativeSrc": "9004:1:7", + "nodeType": "YulLiteral", + "src": "9004:1:7", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "8988:2:7", + "nodeType": "YulIdentifier", + "src": "8988:2:7" + }, + "nativeSrc": "8988:18:7", + "nodeType": "YulFunctionCall", + "src": "8988:18:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8975:3:7", + "nodeType": "YulIdentifier", + "src": "8975:3:7" + }, + "nativeSrc": "8975:32:7", + "nodeType": "YulFunctionCall", + "src": "8975:32:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "8968:6:7", + "nodeType": "YulIdentifier", + "src": "8968:6:7" + }, + "nativeSrc": "8968:40:7", + "nodeType": "YulFunctionCall", + "src": "8968:40:7" + }, + "nativeSrc": "8965:606:7", + "nodeType": "YulIf", + "src": "8965:606:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9591:4:7", + "nodeType": "YulLiteral", + "src": "9591:4:7", + "type": "", + "value": "0x40" + }, + { + "name": "fmp", + "nativeSrc": "9597:3:7", + "nodeType": "YulIdentifier", + "src": "9597:3:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9584:6:7", + "nodeType": "YulIdentifier", + "src": "9584:6:7" + }, + "nativeSrc": "9584:17:7", + "nodeType": "YulFunctionCall", + "src": "9584:17:7" + }, + "nativeSrc": "9584:17:7", + "nodeType": "YulExpressionStatement", + "src": "9584:17:7" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 769, + "isOffset": false, + "isSlot": false, + "src": "9136:6:7", + "valueSize": 1 + }, + { + "declaration": 775, + "isOffset": false, + "isSlot": false, + "src": "8631:8:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "8736:7:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "8979:7:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "9126:7:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "9476:7:7", + "valueSize": 1 + }, + { + "declaration": 772, + "isOffset": false, + "isSlot": false, + "src": "9491:7:7", + "valueSize": 1 + }, + { + "declaration": 765, + "isOffset": false, + "isSlot": false, + "src": "8670:2:7", + "valueSize": 1 + }, + { + "declaration": 763, + "isOffset": false, + "isSlot": false, + "src": "8759:5:7", + "valueSize": 1 + }, + { + "declaration": 763, + "isOffset": false, + "isSlot": false, + "src": "9545:5:7", + "valueSize": 1 + }, + { + "declaration": 767, + "isOffset": false, + "isSlot": false, + "src": "8717:5:7", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 780, + "nodeType": "InlineAssembly", + "src": "8544:1067:7" + } + ] + }, + "documentation": { + "id": 760, + "nodeType": "StructuredDocumentation", + "src": "7885:483:7", + "text": " @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param to The recipient of the tokens\n @param value The amount of token to transfer\n @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean." + }, + "id": 782, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeTransfer", + "nameLocation": "8382:13:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 763, + "mutability": "mutable", + "name": "token", + "nameLocation": "8403:5:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8396:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 762, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 761, + "name": "IERC20", + "nameLocations": [ + "8396:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "8396:6:7" + }, + "referencedDeclaration": 340, + "src": "8396:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 765, + "mutability": "mutable", + "name": "to", + "nameLocation": "8418:2:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8410:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 764, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8410:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 767, + "mutability": "mutable", + "name": "value", + "nameLocation": "8430:5:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8422:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 766, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8422:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 769, + "mutability": "mutable", + "name": "bubble", + "nameLocation": "8442:6:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8437:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 768, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8437:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "8395:54:7" + }, + "returnParameters": { + "id": 773, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 772, + "mutability": "mutable", + "name": "success", + "nameLocation": "8472:7:7", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "8467:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 771, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8467:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "8466:14:7" + }, + "scope": 831, + "src": "8373:1244:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 806, + "nodeType": "Block", + "src": "10337:1221:7", + "statements": [ + { + "assignments": [ + 800 + ], + "declarations": [ + { + "constant": false, + "id": 800, + "mutability": "mutable", + "name": "selector", + "nameLocation": "10354:8:7", + "nodeType": "VariableDeclaration", + "scope": 806, + "src": "10347:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 799, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "10347:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 804, + "initialValue": { + "expression": { + "expression": { + "id": 801, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "10365:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10372:12:7", + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 339, + "src": "10365:19:7", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function IERC20.transferFrom(address,address,uint256) returns (bool)" + } + }, + "id": 803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10385:8:7", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "10365:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10347:46:7" + }, + { + "AST": { + "nativeSrc": "10429:1123:7", + "nodeType": "YulBlock", + "src": "10429:1123:7", + "statements": [ + { + "nativeSrc": "10443:22:7", + "nodeType": "YulVariableDeclaration", + "src": "10443:22:7", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10460:4:7", + "nodeType": "YulLiteral", + "src": "10460:4:7", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10454:5:7", + "nodeType": "YulIdentifier", + "src": "10454:5:7" + }, + "nativeSrc": "10454:11:7", + "nodeType": "YulFunctionCall", + "src": "10454:11:7" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "10447:3:7", + "nodeType": "YulTypedName", + "src": "10447:3:7", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10485:4:7", + "nodeType": "YulLiteral", + "src": "10485:4:7", + "type": "", + "value": "0x00" + }, + { + "name": "selector", + "nativeSrc": "10491:8:7", + "nodeType": "YulIdentifier", + "src": "10491:8:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10478:6:7", + "nodeType": "YulIdentifier", + "src": "10478:6:7" + }, + "nativeSrc": "10478:22:7", + "nodeType": "YulFunctionCall", + "src": "10478:22:7" + }, + "nativeSrc": "10478:22:7", + "nodeType": "YulExpressionStatement", + "src": "10478:22:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10520:4:7", + "nodeType": "YulLiteral", + "src": "10520:4:7", + "type": "", + "value": "0x04" + }, + { + "arguments": [ + { + "name": "from", + "nativeSrc": "10530:4:7", + "nodeType": "YulIdentifier", + "src": "10530:4:7" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10540:2:7", + "nodeType": "YulLiteral", + "src": "10540:2:7", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10548:1:7", + "nodeType": "YulLiteral", + "src": "10548:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "10544:3:7", + "nodeType": "YulIdentifier", + "src": "10544:3:7" + }, + "nativeSrc": "10544:6:7", + "nodeType": "YulFunctionCall", + "src": "10544:6:7" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10536:3:7", + "nodeType": "YulIdentifier", + "src": "10536:3:7" + }, + "nativeSrc": "10536:15:7", + "nodeType": "YulFunctionCall", + "src": "10536:15:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10526:3:7", + "nodeType": "YulIdentifier", + "src": "10526:3:7" + }, + "nativeSrc": "10526:26:7", + "nodeType": "YulFunctionCall", + "src": "10526:26:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10513:6:7", + "nodeType": "YulIdentifier", + "src": "10513:6:7" + }, + "nativeSrc": "10513:40:7", + "nodeType": "YulFunctionCall", + "src": "10513:40:7" + }, + "nativeSrc": "10513:40:7", + "nodeType": "YulExpressionStatement", + "src": "10513:40:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10573:4:7", + "nodeType": "YulLiteral", + "src": "10573:4:7", + "type": "", + "value": "0x24" + }, + { + "arguments": [ + { + "name": "to", + "nativeSrc": "10583:2:7", + "nodeType": "YulIdentifier", + "src": "10583:2:7" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10591:2:7", + "nodeType": "YulLiteral", + "src": "10591:2:7", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10599:1:7", + "nodeType": "YulLiteral", + "src": "10599:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "10595:3:7", + "nodeType": "YulIdentifier", + "src": "10595:3:7" + }, + "nativeSrc": "10595:6:7", + "nodeType": "YulFunctionCall", + "src": "10595:6:7" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10587:3:7", + "nodeType": "YulIdentifier", + "src": "10587:3:7" + }, + "nativeSrc": "10587:15:7", + "nodeType": "YulFunctionCall", + "src": "10587:15:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10579:3:7", + "nodeType": "YulIdentifier", + "src": "10579:3:7" + }, + "nativeSrc": "10579:24:7", + "nodeType": "YulFunctionCall", + "src": "10579:24:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10566:6:7", + "nodeType": "YulIdentifier", + "src": "10566:6:7" + }, + "nativeSrc": "10566:38:7", + "nodeType": "YulFunctionCall", + "src": "10566:38:7" + }, + "nativeSrc": "10566:38:7", + "nodeType": "YulExpressionStatement", + "src": "10566:38:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10624:4:7", + "nodeType": "YulLiteral", + "src": "10624:4:7", + "type": "", + "value": "0x44" + }, + { + "name": "value", + "nativeSrc": "10630:5:7", + "nodeType": "YulIdentifier", + "src": "10630:5:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10617:6:7", + "nodeType": "YulIdentifier", + "src": "10617:6:7" + }, + "nativeSrc": "10617:19:7", + "nodeType": "YulFunctionCall", + "src": "10617:19:7" + }, + "nativeSrc": "10617:19:7", + "nodeType": "YulExpressionStatement", + "src": "10617:19:7" + }, + { + "nativeSrc": "10649:56:7", + "nodeType": "YulAssignment", + "src": "10649:56:7", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "10665:3:7", + "nodeType": "YulIdentifier", + "src": "10665:3:7" + }, + "nativeSrc": "10665:5:7", + "nodeType": "YulFunctionCall", + "src": "10665:5:7" + }, + { + "name": "token", + "nativeSrc": "10672:5:7", + "nodeType": "YulIdentifier", + "src": "10672:5:7" + }, + { + "kind": "number", + "nativeSrc": "10679:1:7", + "nodeType": "YulLiteral", + "src": "10679:1:7", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "10682:4:7", + "nodeType": "YulLiteral", + "src": "10682:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "10688:4:7", + "nodeType": "YulLiteral", + "src": "10688:4:7", + "type": "", + "value": "0x64" + }, + { + "kind": "number", + "nativeSrc": "10694:4:7", + "nodeType": "YulLiteral", + "src": "10694:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "10700:4:7", + "nodeType": "YulLiteral", + "src": "10700:4:7", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "call", + "nativeSrc": "10660:4:7", + "nodeType": "YulIdentifier", + "src": "10660:4:7" + }, + "nativeSrc": "10660:45:7", + "nodeType": "YulFunctionCall", + "src": "10660:45:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "10649:7:7", + "nodeType": "YulIdentifier", + "src": "10649:7:7" + } + ] + }, + { + "body": { + "nativeSrc": "10922:562:7", + "nodeType": "YulBlock", + "src": "10922:562:7", + "statements": [ + { + "body": { + "nativeSrc": "11057:133:7", + "nodeType": "YulBlock", + "src": "11057:133:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "11094:3:7", + "nodeType": "YulIdentifier", + "src": "11094:3:7" + }, + { + "kind": "number", + "nativeSrc": "11099:4:7", + "nodeType": "YulLiteral", + "src": "11099:4:7", + "type": "", + "value": "0x00" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "11105:14:7", + "nodeType": "YulIdentifier", + "src": "11105:14:7" + }, + "nativeSrc": "11105:16:7", + "nodeType": "YulFunctionCall", + "src": "11105:16:7" + } + ], + "functionName": { + "name": "returndatacopy", + "nativeSrc": "11079:14:7", + "nodeType": "YulIdentifier", + "src": "11079:14:7" + }, + "nativeSrc": "11079:43:7", + "nodeType": "YulFunctionCall", + "src": "11079:43:7" + }, + "nativeSrc": "11079:43:7", + "nodeType": "YulExpressionStatement", + "src": "11079:43:7" + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "11150:3:7", + "nodeType": "YulIdentifier", + "src": "11150:3:7" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "11155:14:7", + "nodeType": "YulIdentifier", + "src": "11155:14:7" + }, + "nativeSrc": "11155:16:7", + "nodeType": "YulFunctionCall", + "src": "11155:16:7" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "11143:6:7", + "nodeType": "YulIdentifier", + "src": "11143:6:7" + }, + "nativeSrc": "11143:29:7", + "nodeType": "YulFunctionCall", + "src": "11143:29:7" + }, + "nativeSrc": "11143:29:7", + "nodeType": "YulExpressionStatement", + "src": "11143:29:7" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "11039:7:7", + "nodeType": "YulIdentifier", + "src": "11039:7:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "11032:6:7", + "nodeType": "YulIdentifier", + "src": "11032:6:7" + }, + "nativeSrc": "11032:15:7", + "nodeType": "YulFunctionCall", + "src": "11032:15:7" + }, + { + "name": "bubble", + "nativeSrc": "11049:6:7", + "nodeType": "YulIdentifier", + "src": "11049:6:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11028:3:7", + "nodeType": "YulIdentifier", + "src": "11028:3:7" + }, + "nativeSrc": "11028:28:7", + "nodeType": "YulFunctionCall", + "src": "11028:28:7" + }, + "nativeSrc": "11025:165:7", + "nodeType": "YulIf", + "src": "11025:165:7" + }, + { + "nativeSrc": "11389:81:7", + "nodeType": "YulAssignment", + "src": "11389:81:7", + "value": { + "arguments": [ + { + "name": "success", + "nativeSrc": "11404:7:7", + "nodeType": "YulIdentifier", + "src": "11404:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "11424:14:7", + "nodeType": "YulIdentifier", + "src": "11424:14:7" + }, + "nativeSrc": "11424:16:7", + "nodeType": "YulFunctionCall", + "src": "11424:16:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "11417:6:7", + "nodeType": "YulIdentifier", + "src": "11417:6:7" + }, + "nativeSrc": "11417:24:7", + "nodeType": "YulFunctionCall", + "src": "11417:24:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "token", + "nativeSrc": "11458:5:7", + "nodeType": "YulIdentifier", + "src": "11458:5:7" + } + ], + "functionName": { + "name": "extcodesize", + "nativeSrc": "11446:11:7", + "nodeType": "YulIdentifier", + "src": "11446:11:7" + }, + "nativeSrc": "11446:18:7", + "nodeType": "YulFunctionCall", + "src": "11446:18:7" + }, + { + "kind": "number", + "nativeSrc": "11466:1:7", + "nodeType": "YulLiteral", + "src": "11466:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "11443:2:7", + "nodeType": "YulIdentifier", + "src": "11443:2:7" + }, + "nativeSrc": "11443:25:7", + "nodeType": "YulFunctionCall", + "src": "11443:25:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11413:3:7", + "nodeType": "YulIdentifier", + "src": "11413:3:7" + }, + "nativeSrc": "11413:56:7", + "nodeType": "YulFunctionCall", + "src": "11413:56:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11400:3:7", + "nodeType": "YulIdentifier", + "src": "11400:3:7" + }, + "nativeSrc": "11400:70:7", + "nodeType": "YulFunctionCall", + "src": "11400:70:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "11389:7:7", + "nodeType": "YulIdentifier", + "src": "11389:7:7" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "10892:7:7", + "nodeType": "YulIdentifier", + "src": "10892:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10910:4:7", + "nodeType": "YulLiteral", + "src": "10910:4:7", + "type": "", + "value": "0x00" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10904:5:7", + "nodeType": "YulIdentifier", + "src": "10904:5:7" + }, + "nativeSrc": "10904:11:7", + "nodeType": "YulFunctionCall", + "src": "10904:11:7" + }, + { + "kind": "number", + "nativeSrc": "10917:1:7", + "nodeType": "YulLiteral", + "src": "10917:1:7", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "10901:2:7", + "nodeType": "YulIdentifier", + "src": "10901:2:7" + }, + "nativeSrc": "10901:18:7", + "nodeType": "YulFunctionCall", + "src": "10901:18:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10888:3:7", + "nodeType": "YulIdentifier", + "src": "10888:3:7" + }, + "nativeSrc": "10888:32:7", + "nodeType": "YulFunctionCall", + "src": "10888:32:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "10881:6:7", + "nodeType": "YulIdentifier", + "src": "10881:6:7" + }, + "nativeSrc": "10881:40:7", + "nodeType": "YulFunctionCall", + "src": "10881:40:7" + }, + "nativeSrc": "10878:606:7", + "nodeType": "YulIf", + "src": "10878:606:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11504:4:7", + "nodeType": "YulLiteral", + "src": "11504:4:7", + "type": "", + "value": "0x40" + }, + { + "name": "fmp", + "nativeSrc": "11510:3:7", + "nodeType": "YulIdentifier", + "src": "11510:3:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11497:6:7", + "nodeType": "YulIdentifier", + "src": "11497:6:7" + }, + "nativeSrc": "11497:17:7", + "nodeType": "YulFunctionCall", + "src": "11497:17:7" + }, + "nativeSrc": "11497:17:7", + "nodeType": "YulExpressionStatement", + "src": "11497:17:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11534:4:7", + "nodeType": "YulLiteral", + "src": "11534:4:7", + "type": "", + "value": "0x60" + }, + { + "kind": "number", + "nativeSrc": "11540:1:7", + "nodeType": "YulLiteral", + "src": "11540:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11527:6:7", + "nodeType": "YulIdentifier", + "src": "11527:6:7" + }, + "nativeSrc": "11527:15:7", + "nodeType": "YulFunctionCall", + "src": "11527:15:7" + }, + "nativeSrc": "11527:15:7", + "nodeType": "YulExpressionStatement", + "src": "11527:15:7" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 794, + "isOffset": false, + "isSlot": false, + "src": "11049:6:7", + "valueSize": 1 + }, + { + "declaration": 788, + "isOffset": false, + "isSlot": false, + "src": "10530:4:7", + "valueSize": 1 + }, + { + "declaration": 800, + "isOffset": false, + "isSlot": false, + "src": "10491:8:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "10649:7:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "10892:7:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "11039:7:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "11389:7:7", + "valueSize": 1 + }, + { + "declaration": 797, + "isOffset": false, + "isSlot": false, + "src": "11404:7:7", + "valueSize": 1 + }, + { + "declaration": 790, + "isOffset": false, + "isSlot": false, + "src": "10583:2:7", + "valueSize": 1 + }, + { + "declaration": 786, + "isOffset": false, + "isSlot": false, + "src": "10672:5:7", + "valueSize": 1 + }, + { + "declaration": 786, + "isOffset": false, + "isSlot": false, + "src": "11458:5:7", + "valueSize": 1 + }, + { + "declaration": 792, + "isOffset": false, + "isSlot": false, + "src": "10630:5:7", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 805, + "nodeType": "InlineAssembly", + "src": "10404:1148:7" + } + ] + }, + "documentation": { + "id": 783, + "nodeType": "StructuredDocumentation", + "src": "9623:537:7", + "text": " @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n value: the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param from The sender of the tokens\n @param to The recipient of the tokens\n @param value The amount of token to transfer\n @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean." + }, + "id": 807, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeTransferFrom", + "nameLocation": "10174:17:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 795, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 786, + "mutability": "mutable", + "name": "token", + "nameLocation": "10208:5:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10201:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 785, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 784, + "name": "IERC20", + "nameLocations": [ + "10201:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "10201:6:7" + }, + "referencedDeclaration": 340, + "src": "10201:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 788, + "mutability": "mutable", + "name": "from", + "nameLocation": "10231:4:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10223:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10223:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 790, + "mutability": "mutable", + "name": "to", + "nameLocation": "10253:2:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10245:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10245:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 792, + "mutability": "mutable", + "name": "value", + "nameLocation": "10273:5:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10265:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10265:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 794, + "mutability": "mutable", + "name": "bubble", + "nameLocation": "10293:6:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10288:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 793, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10288:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "10191:114:7" + }, + "returnParameters": { + "id": 798, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 797, + "mutability": "mutable", + "name": "success", + "nameLocation": "10328:7:7", + "nodeType": "VariableDeclaration", + "scope": 807, + "src": "10323:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 796, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10323:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "10322:14:7" + }, + "scope": 831, + "src": "10165:1393:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 829, + "nodeType": "Block", + "src": "12171:1140:7", + "statements": [ + { + "assignments": [ + 823 + ], + "declarations": [ + { + "constant": false, + "id": 823, + "mutability": "mutable", + "name": "selector", + "nameLocation": "12188:8:7", + "nodeType": "VariableDeclaration", + "scope": 829, + "src": "12181:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 822, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "12181:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 827, + "initialValue": { + "expression": { + "expression": { + "id": 824, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "12199:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 825, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12206:7:7", + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 327, + "src": "12199:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function IERC20.approve(address,uint256) returns (bool)" + } + }, + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12214:8:7", + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "12199:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12181:41:7" + }, + { + "AST": { + "nativeSrc": "12258:1047:7", + "nodeType": "YulBlock", + "src": "12258:1047:7", + "statements": [ + { + "nativeSrc": "12272:22:7", + "nodeType": "YulVariableDeclaration", + "src": "12272:22:7", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12289:4:7", + "nodeType": "YulLiteral", + "src": "12289:4:7", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "12283:5:7", + "nodeType": "YulIdentifier", + "src": "12283:5:7" + }, + "nativeSrc": "12283:11:7", + "nodeType": "YulFunctionCall", + "src": "12283:11:7" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "12276:3:7", + "nodeType": "YulTypedName", + "src": "12276:3:7", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12314:4:7", + "nodeType": "YulLiteral", + "src": "12314:4:7", + "type": "", + "value": "0x00" + }, + { + "name": "selector", + "nativeSrc": "12320:8:7", + "nodeType": "YulIdentifier", + "src": "12320:8:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12307:6:7", + "nodeType": "YulIdentifier", + "src": "12307:6:7" + }, + "nativeSrc": "12307:22:7", + "nodeType": "YulFunctionCall", + "src": "12307:22:7" + }, + "nativeSrc": "12307:22:7", + "nodeType": "YulExpressionStatement", + "src": "12307:22:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12349:4:7", + "nodeType": "YulLiteral", + "src": "12349:4:7", + "type": "", + "value": "0x04" + }, + { + "arguments": [ + { + "name": "spender", + "nativeSrc": "12359:7:7", + "nodeType": "YulIdentifier", + "src": "12359:7:7" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12372:2:7", + "nodeType": "YulLiteral", + "src": "12372:2:7", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12380:1:7", + "nodeType": "YulLiteral", + "src": "12380:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "12376:3:7", + "nodeType": "YulIdentifier", + "src": "12376:3:7" + }, + "nativeSrc": "12376:6:7", + "nodeType": "YulFunctionCall", + "src": "12376:6:7" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "12368:3:7", + "nodeType": "YulIdentifier", + "src": "12368:3:7" + }, + "nativeSrc": "12368:15:7", + "nodeType": "YulFunctionCall", + "src": "12368:15:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "12355:3:7", + "nodeType": "YulIdentifier", + "src": "12355:3:7" + }, + "nativeSrc": "12355:29:7", + "nodeType": "YulFunctionCall", + "src": "12355:29:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12342:6:7", + "nodeType": "YulIdentifier", + "src": "12342:6:7" + }, + "nativeSrc": "12342:43:7", + "nodeType": "YulFunctionCall", + "src": "12342:43:7" + }, + "nativeSrc": "12342:43:7", + "nodeType": "YulExpressionStatement", + "src": "12342:43:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12405:4:7", + "nodeType": "YulLiteral", + "src": "12405:4:7", + "type": "", + "value": "0x24" + }, + { + "name": "value", + "nativeSrc": "12411:5:7", + "nodeType": "YulIdentifier", + "src": "12411:5:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "12398:6:7", + "nodeType": "YulIdentifier", + "src": "12398:6:7" + }, + "nativeSrc": "12398:19:7", + "nodeType": "YulFunctionCall", + "src": "12398:19:7" + }, + "nativeSrc": "12398:19:7", + "nodeType": "YulExpressionStatement", + "src": "12398:19:7" + }, + { + "nativeSrc": "12430:56:7", + "nodeType": "YulAssignment", + "src": "12430:56:7", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "12446:3:7", + "nodeType": "YulIdentifier", + "src": "12446:3:7" + }, + "nativeSrc": "12446:5:7", + "nodeType": "YulFunctionCall", + "src": "12446:5:7" + }, + { + "name": "token", + "nativeSrc": "12453:5:7", + "nodeType": "YulIdentifier", + "src": "12453:5:7" + }, + { + "kind": "number", + "nativeSrc": "12460:1:7", + "nodeType": "YulLiteral", + "src": "12460:1:7", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "12463:4:7", + "nodeType": "YulLiteral", + "src": "12463:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "12469:4:7", + "nodeType": "YulLiteral", + "src": "12469:4:7", + "type": "", + "value": "0x44" + }, + { + "kind": "number", + "nativeSrc": "12475:4:7", + "nodeType": "YulLiteral", + "src": "12475:4:7", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "12481:4:7", + "nodeType": "YulLiteral", + "src": "12481:4:7", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "call", + "nativeSrc": "12441:4:7", + "nodeType": "YulIdentifier", + "src": "12441:4:7" + }, + "nativeSrc": "12441:45:7", + "nodeType": "YulFunctionCall", + "src": "12441:45:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "12430:7:7", + "nodeType": "YulIdentifier", + "src": "12430:7:7" + } + ] + }, + { + "body": { + "nativeSrc": "12703:562:7", + "nodeType": "YulBlock", + "src": "12703:562:7", + "statements": [ + { + "body": { + "nativeSrc": "12838:133:7", + "nodeType": "YulBlock", + "src": "12838:133:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "12875:3:7", + "nodeType": "YulIdentifier", + "src": "12875:3:7" + }, + { + "kind": "number", + "nativeSrc": "12880:4:7", + "nodeType": "YulLiteral", + "src": "12880:4:7", + "type": "", + "value": "0x00" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "12886:14:7", + "nodeType": "YulIdentifier", + "src": "12886:14:7" + }, + "nativeSrc": "12886:16:7", + "nodeType": "YulFunctionCall", + "src": "12886:16:7" + } + ], + "functionName": { + "name": "returndatacopy", + "nativeSrc": "12860:14:7", + "nodeType": "YulIdentifier", + "src": "12860:14:7" + }, + "nativeSrc": "12860:43:7", + "nodeType": "YulFunctionCall", + "src": "12860:43:7" + }, + "nativeSrc": "12860:43:7", + "nodeType": "YulExpressionStatement", + "src": "12860:43:7" + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "12931:3:7", + "nodeType": "YulIdentifier", + "src": "12931:3:7" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "12936:14:7", + "nodeType": "YulIdentifier", + "src": "12936:14:7" + }, + "nativeSrc": "12936:16:7", + "nodeType": "YulFunctionCall", + "src": "12936:16:7" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "12924:6:7", + "nodeType": "YulIdentifier", + "src": "12924:6:7" + }, + "nativeSrc": "12924:29:7", + "nodeType": "YulFunctionCall", + "src": "12924:29:7" + }, + "nativeSrc": "12924:29:7", + "nodeType": "YulExpressionStatement", + "src": "12924:29:7" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "12820:7:7", + "nodeType": "YulIdentifier", + "src": "12820:7:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "12813:6:7", + "nodeType": "YulIdentifier", + "src": "12813:6:7" + }, + "nativeSrc": "12813:15:7", + "nodeType": "YulFunctionCall", + "src": "12813:15:7" + }, + { + "name": "bubble", + "nativeSrc": "12830:6:7", + "nodeType": "YulIdentifier", + "src": "12830:6:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "12809:3:7", + "nodeType": "YulIdentifier", + "src": "12809:3:7" + }, + "nativeSrc": "12809:28:7", + "nodeType": "YulFunctionCall", + "src": "12809:28:7" + }, + "nativeSrc": "12806:165:7", + "nodeType": "YulIf", + "src": "12806:165:7" + }, + { + "nativeSrc": "13170:81:7", + "nodeType": "YulAssignment", + "src": "13170:81:7", + "value": { + "arguments": [ + { + "name": "success", + "nativeSrc": "13185:7:7", + "nodeType": "YulIdentifier", + "src": "13185:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nativeSrc": "13205:14:7", + "nodeType": "YulIdentifier", + "src": "13205:14:7" + }, + "nativeSrc": "13205:16:7", + "nodeType": "YulFunctionCall", + "src": "13205:16:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "13198:6:7", + "nodeType": "YulIdentifier", + "src": "13198:6:7" + }, + "nativeSrc": "13198:24:7", + "nodeType": "YulFunctionCall", + "src": "13198:24:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "token", + "nativeSrc": "13239:5:7", + "nodeType": "YulIdentifier", + "src": "13239:5:7" + } + ], + "functionName": { + "name": "extcodesize", + "nativeSrc": "13227:11:7", + "nodeType": "YulIdentifier", + "src": "13227:11:7" + }, + "nativeSrc": "13227:18:7", + "nodeType": "YulFunctionCall", + "src": "13227:18:7" + }, + { + "kind": "number", + "nativeSrc": "13247:1:7", + "nodeType": "YulLiteral", + "src": "13247:1:7", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "13224:2:7", + "nodeType": "YulIdentifier", + "src": "13224:2:7" + }, + "nativeSrc": "13224:25:7", + "nodeType": "YulFunctionCall", + "src": "13224:25:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "13194:3:7", + "nodeType": "YulIdentifier", + "src": "13194:3:7" + }, + "nativeSrc": "13194:56:7", + "nodeType": "YulFunctionCall", + "src": "13194:56:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "13181:3:7", + "nodeType": "YulIdentifier", + "src": "13181:3:7" + }, + "nativeSrc": "13181:70:7", + "nodeType": "YulFunctionCall", + "src": "13181:70:7" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "13170:7:7", + "nodeType": "YulIdentifier", + "src": "13170:7:7" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "success", + "nativeSrc": "12673:7:7", + "nodeType": "YulIdentifier", + "src": "12673:7:7" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "12691:4:7", + "nodeType": "YulLiteral", + "src": "12691:4:7", + "type": "", + "value": "0x00" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "12685:5:7", + "nodeType": "YulIdentifier", + "src": "12685:5:7" + }, + "nativeSrc": "12685:11:7", + "nodeType": "YulFunctionCall", + "src": "12685:11:7" + }, + { + "kind": "number", + "nativeSrc": "12698:1:7", + "nodeType": "YulLiteral", + "src": "12698:1:7", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "12682:2:7", + "nodeType": "YulIdentifier", + "src": "12682:2:7" + }, + "nativeSrc": "12682:18:7", + "nodeType": "YulFunctionCall", + "src": "12682:18:7" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "12669:3:7", + "nodeType": "YulIdentifier", + "src": "12669:3:7" + }, + "nativeSrc": "12669:32:7", + "nodeType": "YulFunctionCall", + "src": "12669:32:7" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "12662:6:7", + "nodeType": "YulIdentifier", + "src": "12662:6:7" + }, + "nativeSrc": "12662:40:7", + "nodeType": "YulFunctionCall", + "src": "12662:40:7" + }, + "nativeSrc": "12659:606:7", + "nodeType": "YulIf", + "src": "12659:606:7" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "13285:4:7", + "nodeType": "YulLiteral", + "src": "13285:4:7", + "type": "", + "value": "0x40" + }, + { + "name": "fmp", + "nativeSrc": "13291:3:7", + "nodeType": "YulIdentifier", + "src": "13291:3:7" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "13278:6:7", + "nodeType": "YulIdentifier", + "src": "13278:6:7" + }, + "nativeSrc": "13278:17:7", + "nodeType": "YulFunctionCall", + "src": "13278:17:7" + }, + "nativeSrc": "13278:17:7", + "nodeType": "YulExpressionStatement", + "src": "13278:17:7" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 817, + "isOffset": false, + "isSlot": false, + "src": "12830:6:7", + "valueSize": 1 + }, + { + "declaration": 823, + "isOffset": false, + "isSlot": false, + "src": "12320:8:7", + "valueSize": 1 + }, + { + "declaration": 813, + "isOffset": false, + "isSlot": false, + "src": "12359:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "12430:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "12673:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "12820:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "13170:7:7", + "valueSize": 1 + }, + { + "declaration": 820, + "isOffset": false, + "isSlot": false, + "src": "13185:7:7", + "valueSize": 1 + }, + { + "declaration": 811, + "isOffset": false, + "isSlot": false, + "src": "12453:5:7", + "valueSize": 1 + }, + { + "declaration": 811, + "isOffset": false, + "isSlot": false, + "src": "13239:5:7", + "valueSize": 1 + }, + { + "declaration": 815, + "isOffset": false, + "isSlot": false, + "src": "12411:5:7", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 828, + "nodeType": "InlineAssembly", + "src": "12233:1072:7" + } + ] + }, + "documentation": { + "id": 808, + "nodeType": "StructuredDocumentation", + "src": "11564:490:7", + "text": " @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param spender The spender of the tokens\n @param value The amount of token to transfer\n @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean." + }, + "id": 830, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_safeApprove", + "nameLocation": "12068:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 818, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 811, + "mutability": "mutable", + "name": "token", + "nameLocation": "12088:5:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12081:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + }, + "typeName": { + "id": 810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 809, + "name": "IERC20", + "nameLocations": [ + "12081:6:7" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "12081:6:7" + }, + "referencedDeclaration": 340, + "src": "12081:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 813, + "mutability": "mutable", + "name": "spender", + "nameLocation": "12103:7:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12095:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 812, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12095:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 815, + "mutability": "mutable", + "name": "value", + "nameLocation": "12120:5:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12112:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 814, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12112:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 817, + "mutability": "mutable", + "name": "bubble", + "nameLocation": "12132:6:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12127:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 816, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12127:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12080:59:7" + }, + "returnParameters": { + "id": 821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 820, + "mutability": "mutable", + "name": "success", + "nameLocation": "12162:7:7", + "nodeType": "VariableDeclaration", + "scope": 830, + "src": "12157:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 819, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12157:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12156:14:7" + }, + "scope": 831, + "src": "12059:1252:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 832, + "src": "698:12615:7", + "usedErrors": [ + 388, + 397 + ], + "usedEvents": [] + } + ], + "src": "115:13199:7" + }, + "id": 7 + }, + "@openzeppelin/contracts/utils/Bytes.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/Bytes.sol", + "exportedSymbols": { + "Bytes": [ + 1632 + ], + "Math": [ + 6204 + ] + }, + "id": 1633, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 833, + "literals": [ + "solidity", + "^", + "0.8", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "99:24:8" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/Math.sol", + "file": "./math/Math.sol", + "id": 835, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1633, + "sourceUnit": 6205, + "src": "125:37:8", + "symbolAliases": [ + { + "foreign": { + "id": 834, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "133:4:8", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Bytes", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 836, + "nodeType": "StructuredDocumentation", + "src": "164:33:8", + "text": " @dev Bytes operations." + }, + "fullyImplemented": true, + "id": 1632, + "linearizedBaseContracts": [ + 1632 + ], + "name": "Bytes", + "nameLocation": "206:5:8", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 852, + "nodeType": "Block", + "src": "687:45:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 847, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 839, + "src": "712:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 848, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "720:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + { + "hexValue": "30", + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "723:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 846, + "name": "indexOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 853, + 902 + ], + "referencedDeclaration": 902, + "src": "704:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes1_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bytes memory,bytes1,uint256) pure returns (uint256)" + } + }, + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "704:21:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 845, + "id": 851, + "nodeType": "Return", + "src": "697:28:8" + } + ] + }, + "documentation": { + "id": 837, + "nodeType": "StructuredDocumentation", + "src": "218:384:8", + "text": " @dev Forward search for `s` in `buffer`\n * If `s` is present in the buffer, returns the index of the first instance\n * If `s` is not present in the buffer, returns type(uint256).max\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]" + }, + "id": 853, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "indexOf", + "nameLocation": "616:7:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 839, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "637:6:8", + "nodeType": "VariableDeclaration", + "scope": 853, + "src": "624:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 838, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "624:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 841, + "mutability": "mutable", + "name": "s", + "nameLocation": "652:1:8", + "nodeType": "VariableDeclaration", + "scope": 853, + "src": "645:8:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 840, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "645:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "623:31:8" + }, + "returnParameters": { + "id": 845, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 844, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 853, + "src": "678:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "678:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "677:9:8" + }, + "scope": 1632, + "src": "607:125:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 901, + "nodeType": "Block", + "src": "1286:246:8", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "mutability": "mutable", + "name": "length", + "nameLocation": "1304:6:8", + "nodeType": "VariableDeclaration", + "scope": 901, + "src": "1296:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1296:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 869, + "initialValue": { + "expression": { + "id": 867, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "1313:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1320:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1313:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1296:30:8" + }, + { + "body": { + "id": 893, + "nodeType": "Block", + "src": "1375:117:8", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 883, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "1423:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 884, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "1431:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 882, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "1400:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1400:33:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1393:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 880, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "1393:6:8", + "typeDescriptions": {} + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1393:41:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 887, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "1438:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "1393:46:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 892, + "nodeType": "IfStatement", + "src": "1389:93:8", + "trueBody": { + "id": 891, + "nodeType": "Block", + "src": "1441:41:8", + "statements": [ + { + "expression": { + "id": 889, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "1466:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 864, + "id": 890, + "nodeType": "Return", + "src": "1459:8:8" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 874, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "1358:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 875, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "1362:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1358:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 894, + "initializationExpression": { + "assignments": [ + 871 + ], + "declarations": [ + { + "constant": false, + "id": 871, + "mutability": "mutable", + "name": "i", + "nameLocation": "1349:1:8", + "nodeType": "VariableDeclaration", + "scope": 894, + "src": "1341:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1341:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 873, + "initialValue": { + "id": 872, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "1353:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1341:15:8" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "1370:3:8", + "subExpression": { + "id": 877, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 871, + "src": "1372:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 879, + "nodeType": "ExpressionStatement", + "src": "1370:3:8" + }, + "nodeType": "ForStatement", + "src": "1336:156:8" + }, + { + "expression": { + "expression": { + "arguments": [ + { + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1513:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1513:7:8", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 895, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1508:4:8", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1508:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1522:3:8", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "1508:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 864, + "id": 900, + "nodeType": "Return", + "src": "1501:24:8" + } + ] + }, + "documentation": { + "id": 854, + "nodeType": "StructuredDocumentation", + "src": "738:450:8", + "text": " @dev Forward search for `s` in `buffer` starting at position `pos`\n * If `s` is present in the buffer (at or after `pos`), returns the index of the next instance\n * If `s` is not present in the buffer (at or after `pos`), returns type(uint256).max\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]" + }, + "id": 902, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "indexOf", + "nameLocation": "1202:7:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 861, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 856, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "1223:6:8", + "nodeType": "VariableDeclaration", + "scope": 902, + "src": "1210:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 855, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1210:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 858, + "mutability": "mutable", + "name": "s", + "nameLocation": "1238:1:8", + "nodeType": "VariableDeclaration", + "scope": 902, + "src": "1231:8:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 857, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "1231:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 860, + "mutability": "mutable", + "name": "pos", + "nameLocation": "1249:3:8", + "nodeType": "VariableDeclaration", + "scope": 902, + "src": "1241:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1241:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1209:44:8" + }, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 863, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 902, + "src": "1277:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 862, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1277:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1276:9:8" + }, + "scope": 1632, + "src": "1193:339:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 922, + "nodeType": "Block", + "src": "2019:65:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 913, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "2048:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 914, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 907, + "src": "2056:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + { + "expression": { + "arguments": [ + { + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2064:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 916, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2064:7:8", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 915, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "2059:4:8", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2059:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2073:3:8", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "2059:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 912, + "name": "lastIndexOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 923, + 985 + ], + "referencedDeclaration": 985, + "src": "2036:11:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes1_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bytes memory,bytes1,uint256) pure returns (uint256)" + } + }, + "id": 920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2036:41:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 911, + "id": 921, + "nodeType": "Return", + "src": "2029:48:8" + } + ] + }, + "documentation": { + "id": 903, + "nodeType": "StructuredDocumentation", + "src": "1538:392:8", + "text": " @dev Backward search for `s` in `buffer`\n * If `s` is present in the buffer, returns the index of the last instance\n * If `s` is not present in the buffer, returns type(uint256).max\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]" + }, + "id": 923, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lastIndexOf", + "nameLocation": "1944:11:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 908, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 905, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "1969:6:8", + "nodeType": "VariableDeclaration", + "scope": 923, + "src": "1956:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 904, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1956:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 907, + "mutability": "mutable", + "name": "s", + "nameLocation": "1984:1:8", + "nodeType": "VariableDeclaration", + "scope": 923, + "src": "1977:8:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 906, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "1977:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "1955:31:8" + }, + "returnParameters": { + "id": 911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 910, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 923, + "src": "2010:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 909, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2009:9:8" + }, + "scope": 1632, + "src": "1935:149:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 984, + "nodeType": "Block", + "src": "2657:348:8", + "statements": [ + { + "id": 983, + "nodeType": "UncheckedBlock", + "src": "2667:332:8", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "mutability": "mutable", + "name": "length", + "nameLocation": "2699:6:8", + "nodeType": "VariableDeclaration", + "scope": 983, + "src": "2691:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2691:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 939, + "initialValue": { + "expression": { + "id": 937, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "2708:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2715:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2708:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2691:30:8" + }, + { + "body": { + "id": 975, + "nodeType": "Block", + "src": "2810:141:8", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 961, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "2862:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 962, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2870:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2874:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2870:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 960, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "2839:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2839:37:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2832:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 958, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "2832:6:8", + "typeDescriptions": {} + } + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2832:45:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 967, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "2881:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "2832:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 974, + "nodeType": "IfStatement", + "src": "2828:109:8", + "trueBody": { + "id": 973, + "nodeType": "Block", + "src": "2884:53:8", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 969, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2913:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 970, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2917:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2913:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 934, + "id": 972, + "nodeType": "Return", + "src": "2906:12:8" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 952, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2798:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2802:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2798:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 976, + "initializationExpression": { + "assignments": [ + 941 + ], + "declarations": [ + { + "constant": false, + "id": 941, + "mutability": "mutable", + "name": "i", + "nameLocation": "2748:1:8", + "nodeType": "VariableDeclaration", + "scope": 976, + "src": "2740:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 940, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2740:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 951, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 946, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 930, + "src": "2780:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2785:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 944, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "2761:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2766:13:8", + "memberName": "saturatingAdd", + "nodeType": "MemberAccess", + "referencedDeclaration": 4759, + "src": "2761:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2761:26:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 949, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "2789:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 942, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "2752:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2757:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "2752:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2752:44:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2740:56:8" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": true, + "src": "2805:3:8", + "subExpression": { + "id": 955, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 941, + "src": "2807:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "2805:3:8" + }, + "nodeType": "ForStatement", + "src": "2735:216:8" + }, + { + "expression": { + "expression": { + "arguments": [ + { + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2976:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 978, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2976:7:8", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 977, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "2971:4:8", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2971:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2985:3:8", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "2971:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 934, + "id": 982, + "nodeType": "Return", + "src": "2964:24:8" + } + ] + } + ] + }, + "documentation": { + "id": 924, + "nodeType": "StructuredDocumentation", + "src": "2090:465:8", + "text": " @dev Backward search for `s` in `buffer` starting at position `pos`\n * If `s` is present in the buffer (at or before `pos`), returns the index of the previous instance\n * If `s` is not present in the buffer (at or before `pos`), returns type(uint256).max\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]" + }, + "id": 985, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lastIndexOf", + "nameLocation": "2569:11:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "2594:6:8", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "2581:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 925, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2581:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "mutability": "mutable", + "name": "s", + "nameLocation": "2609:1:8", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "2602:8:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 927, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "2602:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 930, + "mutability": "mutable", + "name": "pos", + "nameLocation": "2620:3:8", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "2612:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2612:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2580:44:8" + }, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 933, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "2648:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2648:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2647:9:8" + }, + "scope": 1632, + "src": "2560:445:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1002, + "nodeType": "Block", + "src": "3416:59:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 996, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "3439:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 997, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 990, + "src": "3447:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 998, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 988, + "src": "3454:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3461:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3454:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 995, + "name": "slice", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1003, + 1045 + ], + "referencedDeclaration": 1045, + "src": "3433:5:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" + } + }, + "id": 1000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3433:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 994, + "id": 1001, + "nodeType": "Return", + "src": "3426:42:8" + } + ] + }, + "documentation": { + "id": 986, + "nodeType": "StructuredDocumentation", + "src": "3011:312:8", + "text": " @dev Copies the content of `buffer`, from `start` (included) to the end of `buffer` into a new bytes object in\n memory.\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]" + }, + "id": 1003, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "slice", + "nameLocation": "3337:5:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 988, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "3356:6:8", + "nodeType": "VariableDeclaration", + "scope": 1003, + "src": "3343:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 987, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3343:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 990, + "mutability": "mutable", + "name": "start", + "nameLocation": "3372:5:8", + "nodeType": "VariableDeclaration", + "scope": 1003, + "src": "3364:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 989, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3364:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3342:36:8" + }, + "returnParameters": { + "id": 994, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 993, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1003, + "src": "3402:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 992, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3402:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3401:14:8" + }, + "scope": 1632, + "src": "3328:147:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1044, + "nodeType": "Block", + "src": "3959:347:8", + "statements": [ + { + "expression": { + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1015, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "3989:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1018, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "4004:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1019, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1006, + "src": "4009:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4016:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4009:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1016, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "3995:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4000:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "3995:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3995:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3989:34:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1023, + "nodeType": "ExpressionStatement", + "src": "3989:34:8" + }, + { + "expression": { + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1024, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1008, + "src": "4033:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1027, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1008, + "src": "4050:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1028, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "4057:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1025, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "4041:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4046:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "4041:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4041:20:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4033:28:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "nodeType": "ExpressionStatement", + "src": "4033:28:8" + }, + { + "assignments": [ + 1033 + ], + "declarations": [ + { + "constant": false, + "id": 1033, + "mutability": "mutable", + "name": "result", + "nameLocation": "4114:6:8", + "nodeType": "VariableDeclaration", + "scope": 1044, + "src": "4101:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1032, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4101:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 1040, + "initialValue": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1036, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "4133:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 1037, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1008, + "src": "4139:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4133:11:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4123:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 1034, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4127:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4123:22:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4101:44:8" + }, + { + "AST": { + "nativeSrc": "4180:96:8", + "nodeType": "YulBlock", + "src": "4180:96:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "result", + "nativeSrc": "4204:6:8", + "nodeType": "YulIdentifier", + "src": "4204:6:8" + }, + { + "kind": "number", + "nativeSrc": "4212:4:8", + "nodeType": "YulLiteral", + "src": "4212:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4200:3:8", + "nodeType": "YulIdentifier", + "src": "4200:3:8" + }, + "nativeSrc": "4200:17:8", + "nodeType": "YulFunctionCall", + "src": "4200:17:8" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "4227:6:8", + "nodeType": "YulIdentifier", + "src": "4227:6:8" + }, + { + "kind": "number", + "nativeSrc": "4235:4:8", + "nodeType": "YulLiteral", + "src": "4235:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4223:3:8", + "nodeType": "YulIdentifier", + "src": "4223:3:8" + }, + "nativeSrc": "4223:17:8", + "nodeType": "YulFunctionCall", + "src": "4223:17:8" + }, + { + "name": "start", + "nativeSrc": "4242:5:8", + "nodeType": "YulIdentifier", + "src": "4242:5:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4219:3:8", + "nodeType": "YulIdentifier", + "src": "4219:3:8" + }, + "nativeSrc": "4219:29:8", + "nodeType": "YulFunctionCall", + "src": "4219:29:8" + }, + { + "arguments": [ + { + "name": "end", + "nativeSrc": "4254:3:8", + "nodeType": "YulIdentifier", + "src": "4254:3:8" + }, + { + "name": "start", + "nativeSrc": "4259:5:8", + "nodeType": "YulIdentifier", + "src": "4259:5:8" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4250:3:8", + "nodeType": "YulIdentifier", + "src": "4250:3:8" + }, + "nativeSrc": "4250:15:8", + "nodeType": "YulFunctionCall", + "src": "4250:15:8" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "4194:5:8", + "nodeType": "YulIdentifier", + "src": "4194:5:8" + }, + "nativeSrc": "4194:72:8", + "nodeType": "YulFunctionCall", + "src": "4194:72:8" + }, + "nativeSrc": "4194:72:8", + "nodeType": "YulExpressionStatement", + "src": "4194:72:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1006, + "isOffset": false, + "isSlot": false, + "src": "4227:6:8", + "valueSize": 1 + }, + { + "declaration": 1010, + "isOffset": false, + "isSlot": false, + "src": "4254:3:8", + "valueSize": 1 + }, + { + "declaration": 1033, + "isOffset": false, + "isSlot": false, + "src": "4204:6:8", + "valueSize": 1 + }, + { + "declaration": 1008, + "isOffset": false, + "isSlot": false, + "src": "4242:5:8", + "valueSize": 1 + }, + { + "declaration": 1008, + "isOffset": false, + "isSlot": false, + "src": "4259:5:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1041, + "nodeType": "InlineAssembly", + "src": "4155:121:8" + }, + { + "expression": { + "id": 1042, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1033, + "src": "4293:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1014, + "id": 1043, + "nodeType": "Return", + "src": "4286:13:8" + } + ] + }, + "documentation": { + "id": 1004, + "nodeType": "StructuredDocumentation", + "src": "3481:372:8", + "text": " @dev Copies the content of `buffer`, from `start` (included) to `end` (excluded) into a new bytes object in\n memory. The `end` argument is truncated to the length of the `buffer`.\n NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]" + }, + "id": 1045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "slice", + "nameLocation": "3867:5:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1006, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "3886:6:8", + "nodeType": "VariableDeclaration", + "scope": 1045, + "src": "3873:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1005, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3873:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1008, + "mutability": "mutable", + "name": "start", + "nameLocation": "3902:5:8", + "nodeType": "VariableDeclaration", + "scope": 1045, + "src": "3894:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1007, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3894:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1010, + "mutability": "mutable", + "name": "end", + "nameLocation": "3917:3:8", + "nodeType": "VariableDeclaration", + "scope": 1045, + "src": "3909:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1009, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3909:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3872:49:8" + }, + "returnParameters": { + "id": 1014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1013, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1045, + "src": "3945:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1012, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3945:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3944:14:8" + }, + "scope": 1632, + "src": "3858:448:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1062, + "nodeType": "Block", + "src": "4790:60:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1056, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1048, + "src": "4814:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 1057, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "4822:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1058, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1048, + "src": "4829:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4836:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4829:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1055, + "name": "splice", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1063, + 1096 + ], + "referencedDeclaration": 1096, + "src": "4807:6:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory,uint256,uint256) pure returns (bytes memory)" + } + }, + "id": 1060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4807:36:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1054, + "id": 1061, + "nodeType": "Return", + "src": "4800:43:8" + } + ] + }, + "documentation": { + "id": 1046, + "nodeType": "StructuredDocumentation", + "src": "4312:384:8", + "text": " @dev Moves the content of `buffer`, from `start` (included) to the end of `buffer` to the start of that buffer,\n and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:].\n NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead" + }, + "id": 1063, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "splice", + "nameLocation": "4710:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1048, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "4730:6:8", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "4717:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1047, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4717:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1050, + "mutability": "mutable", + "name": "start", + "nameLocation": "4746:5:8", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "4738:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1049, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4738:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4716:36:8" + }, + "returnParameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "4776:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1052, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4776:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4775:14:8" + }, + "scope": 1632, + "src": "4701:149:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1095, + "nodeType": "Block", + "src": "5417:335:8", + "statements": [ + { + "expression": { + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1075, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5447:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1078, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5462:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1079, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1066, + "src": "5467:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5474:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5467:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1076, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "5453:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5458:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "5453:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5453:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5447:34:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1083, + "nodeType": "ExpressionStatement", + "src": "5447:34:8" + }, + { + "expression": { + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1084, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1068, + "src": "5491:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1087, + "name": "start", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1068, + "src": "5508:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1088, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "5515:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1085, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "5499:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5504:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "5499:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5499:20:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5491:28:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1091, + "nodeType": "ExpressionStatement", + "src": "5491:28:8" + }, + { + "AST": { + "nativeSrc": "5582:140:8", + "nodeType": "YulBlock", + "src": "5582:140:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "5606:6:8", + "nodeType": "YulIdentifier", + "src": "5606:6:8" + }, + { + "kind": "number", + "nativeSrc": "5614:4:8", + "nodeType": "YulLiteral", + "src": "5614:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5602:3:8", + "nodeType": "YulIdentifier", + "src": "5602:3:8" + }, + "nativeSrc": "5602:17:8", + "nodeType": "YulFunctionCall", + "src": "5602:17:8" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "5629:6:8", + "nodeType": "YulIdentifier", + "src": "5629:6:8" + }, + { + "kind": "number", + "nativeSrc": "5637:4:8", + "nodeType": "YulLiteral", + "src": "5637:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5625:3:8", + "nodeType": "YulIdentifier", + "src": "5625:3:8" + }, + "nativeSrc": "5625:17:8", + "nodeType": "YulFunctionCall", + "src": "5625:17:8" + }, + { + "name": "start", + "nativeSrc": "5644:5:8", + "nodeType": "YulIdentifier", + "src": "5644:5:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5621:3:8", + "nodeType": "YulIdentifier", + "src": "5621:3:8" + }, + "nativeSrc": "5621:29:8", + "nodeType": "YulFunctionCall", + "src": "5621:29:8" + }, + { + "arguments": [ + { + "name": "end", + "nativeSrc": "5656:3:8", + "nodeType": "YulIdentifier", + "src": "5656:3:8" + }, + { + "name": "start", + "nativeSrc": "5661:5:8", + "nodeType": "YulIdentifier", + "src": "5661:5:8" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5652:3:8", + "nodeType": "YulIdentifier", + "src": "5652:3:8" + }, + "nativeSrc": "5652:15:8", + "nodeType": "YulFunctionCall", + "src": "5652:15:8" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "5596:5:8", + "nodeType": "YulIdentifier", + "src": "5596:5:8" + }, + "nativeSrc": "5596:72:8", + "nodeType": "YulFunctionCall", + "src": "5596:72:8" + }, + "nativeSrc": "5596:72:8", + "nodeType": "YulExpressionStatement", + "src": "5596:72:8" + }, + { + "expression": { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "5688:6:8", + "nodeType": "YulIdentifier", + "src": "5688:6:8" + }, + { + "arguments": [ + { + "name": "end", + "nativeSrc": "5700:3:8", + "nodeType": "YulIdentifier", + "src": "5700:3:8" + }, + { + "name": "start", + "nativeSrc": "5705:5:8", + "nodeType": "YulIdentifier", + "src": "5705:5:8" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5696:3:8", + "nodeType": "YulIdentifier", + "src": "5696:3:8" + }, + "nativeSrc": "5696:15:8", + "nodeType": "YulFunctionCall", + "src": "5696:15:8" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5681:6:8", + "nodeType": "YulIdentifier", + "src": "5681:6:8" + }, + "nativeSrc": "5681:31:8", + "nodeType": "YulFunctionCall", + "src": "5681:31:8" + }, + "nativeSrc": "5681:31:8", + "nodeType": "YulExpressionStatement", + "src": "5681:31:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1066, + "isOffset": false, + "isSlot": false, + "src": "5606:6:8", + "valueSize": 1 + }, + { + "declaration": 1066, + "isOffset": false, + "isSlot": false, + "src": "5629:6:8", + "valueSize": 1 + }, + { + "declaration": 1066, + "isOffset": false, + "isSlot": false, + "src": "5688:6:8", + "valueSize": 1 + }, + { + "declaration": 1070, + "isOffset": false, + "isSlot": false, + "src": "5656:3:8", + "valueSize": 1 + }, + { + "declaration": 1070, + "isOffset": false, + "isSlot": false, + "src": "5700:3:8", + "valueSize": 1 + }, + { + "declaration": 1068, + "isOffset": false, + "isSlot": false, + "src": "5644:5:8", + "valueSize": 1 + }, + { + "declaration": 1068, + "isOffset": false, + "isSlot": false, + "src": "5661:5:8", + "valueSize": 1 + }, + { + "declaration": 1068, + "isOffset": false, + "isSlot": false, + "src": "5705:5:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1092, + "nodeType": "InlineAssembly", + "src": "5557:165:8" + }, + { + "expression": { + "id": 1093, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1066, + "src": "5739:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1074, + "id": 1094, + "nodeType": "Return", + "src": "5732:13:8" + } + ] + }, + "documentation": { + "id": 1064, + "nodeType": "StructuredDocumentation", + "src": "4856:454:8", + "text": " @dev Moves the content of `buffer`, from `start` (included) to `end` (excluded) to the start of that buffer,\n and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:end].\n The `end` argument is truncated to the length of the `buffer`.\n NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead" + }, + "id": 1096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "splice", + "nameLocation": "5324:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1071, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1066, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "5344:6:8", + "nodeType": "VariableDeclaration", + "scope": 1096, + "src": "5331:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1065, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5331:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1068, + "mutability": "mutable", + "name": "start", + "nameLocation": "5360:5:8", + "nodeType": "VariableDeclaration", + "scope": 1096, + "src": "5352:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1067, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5352:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1070, + "mutability": "mutable", + "name": "end", + "nameLocation": "5375:3:8", + "nodeType": "VariableDeclaration", + "scope": 1096, + "src": "5367:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5367:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5330:49:8" + }, + "returnParameters": { + "id": 1074, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1073, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1096, + "src": "5403:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1072, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5403:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "5402:14:8" + }, + "scope": 1632, + "src": "5315:437:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1117, + "nodeType": "Block", + "src": "6249:80:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1109, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1099, + "src": "6274:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 1110, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1101, + "src": "6282:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1111, + "name": "replacement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1103, + "src": "6287:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "hexValue": "30", + "id": 1112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6300:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "id": 1113, + "name": "replacement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1103, + "src": "6303:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6315:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6303:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1108, + "name": "replace", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1118, + 1174 + ], + "referencedDeclaration": 1174, + "src": "6266:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory,uint256,bytes memory,uint256,uint256) pure returns (bytes memory)" + } + }, + "id": 1115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6266:56:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1107, + "id": 1116, + "nodeType": "Return", + "src": "6259:63:8" + } + ] + }, + "documentation": { + "id": 1097, + "nodeType": "StructuredDocumentation", + "src": "5758:372:8", + "text": " @dev Replaces bytes in `buffer` starting at `pos` with all bytes from `replacement`.\n Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`).\n If `pos >= buffer.length`, no replacement occurs and the buffer is returned unchanged.\n NOTE: This function modifies the provided buffer in place." + }, + "id": 1118, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "6144:7:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1099, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "6165:6:8", + "nodeType": "VariableDeclaration", + "scope": 1118, + "src": "6152:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1098, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6152:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1101, + "mutability": "mutable", + "name": "pos", + "nameLocation": "6181:3:8", + "nodeType": "VariableDeclaration", + "scope": 1118, + "src": "6173:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1100, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6173:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1103, + "mutability": "mutable", + "name": "replacement", + "nameLocation": "6199:11:8", + "nodeType": "VariableDeclaration", + "scope": 1118, + "src": "6186:24:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1102, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6186:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "6151:60:8" + }, + "returnParameters": { + "id": 1107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1106, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1118, + "src": "6235:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1105, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6235:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "6234:14:8" + }, + "scope": 1632, + "src": "6135:194:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1173, + "nodeType": "Block", + "src": "7180:402:8", + "statements": [ + { + "expression": { + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1134, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "7210:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1137, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "7225:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1138, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7230:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7237:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7230:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1135, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "7216:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7221:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "7216:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7216:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7210:34:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1142, + "nodeType": "ExpressionStatement", + "src": "7210:34:8" + }, + { + "expression": { + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1143, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1127, + "src": "7254:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1146, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1127, + "src": "7272:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1147, + "name": "replacement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1125, + "src": "7280:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7292:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7280:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1144, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "7263:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7268:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "7263:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7263:36:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7254:45:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1151, + "nodeType": "ExpressionStatement", + "src": "7254:45:8" + }, + { + "expression": { + "id": 1168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1152, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1129, + "src": "7309:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1155, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1129, + "src": "7327:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1158, + "name": "replacement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1125, + "src": "7344:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7356:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7344:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 1160, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1127, + "src": "7365:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7344:27:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1162, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7373:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7380:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7373:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 1164, + "name": "pos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "7389:3:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7373:19:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1156, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "7335:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7340:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "7335:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7335:58:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1153, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "7318:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7323:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "7318:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7318:76:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7309:85:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1169, + "nodeType": "ExpressionStatement", + "src": "7309:85:8" + }, + { + "AST": { + "nativeSrc": "7449:103:8", + "nodeType": "YulBlock", + "src": "7449:103:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "7477:6:8", + "nodeType": "YulIdentifier", + "src": "7477:6:8" + }, + { + "kind": "number", + "nativeSrc": "7485:4:8", + "nodeType": "YulLiteral", + "src": "7485:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7473:3:8", + "nodeType": "YulIdentifier", + "src": "7473:3:8" + }, + "nativeSrc": "7473:17:8", + "nodeType": "YulFunctionCall", + "src": "7473:17:8" + }, + { + "name": "pos", + "nativeSrc": "7492:3:8", + "nodeType": "YulIdentifier", + "src": "7492:3:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7469:3:8", + "nodeType": "YulIdentifier", + "src": "7469:3:8" + }, + "nativeSrc": "7469:27:8", + "nodeType": "YulFunctionCall", + "src": "7469:27:8" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "replacement", + "nativeSrc": "7506:11:8", + "nodeType": "YulIdentifier", + "src": "7506:11:8" + }, + { + "kind": "number", + "nativeSrc": "7519:4:8", + "nodeType": "YulLiteral", + "src": "7519:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7502:3:8", + "nodeType": "YulIdentifier", + "src": "7502:3:8" + }, + "nativeSrc": "7502:22:8", + "nodeType": "YulFunctionCall", + "src": "7502:22:8" + }, + { + "name": "offset", + "nativeSrc": "7526:6:8", + "nodeType": "YulIdentifier", + "src": "7526:6:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7498:3:8", + "nodeType": "YulIdentifier", + "src": "7498:3:8" + }, + "nativeSrc": "7498:35:8", + "nodeType": "YulFunctionCall", + "src": "7498:35:8" + }, + { + "name": "length", + "nativeSrc": "7535:6:8", + "nodeType": "YulIdentifier", + "src": "7535:6:8" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "7463:5:8", + "nodeType": "YulIdentifier", + "src": "7463:5:8" + }, + "nativeSrc": "7463:79:8", + "nodeType": "YulFunctionCall", + "src": "7463:79:8" + }, + "nativeSrc": "7463:79:8", + "nodeType": "YulExpressionStatement", + "src": "7463:79:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1121, + "isOffset": false, + "isSlot": false, + "src": "7477:6:8", + "valueSize": 1 + }, + { + "declaration": 1129, + "isOffset": false, + "isSlot": false, + "src": "7535:6:8", + "valueSize": 1 + }, + { + "declaration": 1127, + "isOffset": false, + "isSlot": false, + "src": "7526:6:8", + "valueSize": 1 + }, + { + "declaration": 1123, + "isOffset": false, + "isSlot": false, + "src": "7492:3:8", + "valueSize": 1 + }, + { + "declaration": 1125, + "isOffset": false, + "isSlot": false, + "src": "7506:11:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1170, + "nodeType": "InlineAssembly", + "src": "7424:128:8" + }, + { + "expression": { + "id": 1171, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7569:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1133, + "id": 1172, + "nodeType": "Return", + "src": "7562:13:8" + } + ] + }, + "documentation": { + "id": 1119, + "nodeType": "StructuredDocumentation", + "src": "6335:648:8", + "text": " @dev Replaces bytes in `buffer` starting at `pos` with bytes from `replacement` starting at `offset`.\n Copies at most `length` bytes from `replacement` to `buffer`.\n Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`, `offset` is\n clamped to `[0, replacement.length]`, and `length` is clamped to `min(length, replacement.length - offset,\n buffer.length - pos))`. If `pos >= buffer.length` or `offset >= replacement.length`, no replacement occurs\n and the buffer is returned unchanged.\n NOTE: This function modifies the provided buffer in place." + }, + "id": 1174, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "6997:7:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1121, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "7027:6:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7014:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1120, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7014:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1123, + "mutability": "mutable", + "name": "pos", + "nameLocation": "7051:3:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7043:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7043:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1125, + "mutability": "mutable", + "name": "replacement", + "nameLocation": "7077:11:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7064:24:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1124, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7064:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1127, + "mutability": "mutable", + "name": "offset", + "nameLocation": "7106:6:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7098:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1126, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7098:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1129, + "mutability": "mutable", + "name": "length", + "nameLocation": "7130:6:8", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7122:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1128, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7122:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7004:138:8" + }, + "returnParameters": { + "id": 1133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1132, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1174, + "src": "7166:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1131, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7166:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "7165:14:8" + }, + "scope": 1632, + "src": "6988:594:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1246, + "nodeType": "Block", + "src": "8119:563:8", + "statements": [ + { + "assignments": [ + 1184 + ], + "declarations": [ + { + "constant": false, + "id": 1184, + "mutability": "mutable", + "name": "length", + "nameLocation": "8137:6:8", + "nodeType": "VariableDeclaration", + "scope": 1246, + "src": "8129:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8129:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1186, + "initialValue": { + "hexValue": "30", + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8146:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8129:18:8" + }, + { + "body": { + "id": 1205, + "nodeType": "Block", + "src": "8202:52:8", + "statements": [ + { + "expression": { + "id": 1203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1198, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1184, + "src": "8216:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "expression": { + "baseExpression": { + "id": 1199, + "name": "buffers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "8226:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "id": 1201, + "indexExpression": { + "id": 1200, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "8234:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8226:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8237:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8226:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8216:27:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1204, + "nodeType": "ExpressionStatement", + "src": "8216:27:8" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1191, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "8177:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1192, + "name": "buffers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "8181:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8189:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8181:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8177:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1206, + "initializationExpression": { + "assignments": [ + 1188 + ], + "declarations": [ + { + "constant": false, + "id": 1188, + "mutability": "mutable", + "name": "i", + "nameLocation": "8170:1:8", + "nodeType": "VariableDeclaration", + "scope": 1206, + "src": "8162:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8162:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1190, + "initialValue": { + "hexValue": "30", + "id": 1189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8174:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8162:13:8" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 1196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "8197:3:8", + "subExpression": { + "id": 1195, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "8199:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1197, + "nodeType": "ExpressionStatement", + "src": "8197:3:8" + }, + "nodeType": "ForStatement", + "src": "8157:97:8" + }, + { + "assignments": [ + 1208 + ], + "declarations": [ + { + "constant": false, + "id": 1208, + "mutability": "mutable", + "name": "result", + "nameLocation": "8277:6:8", + "nodeType": "VariableDeclaration", + "scope": 1246, + "src": "8264:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1207, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8264:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 1213, + "initialValue": { + "arguments": [ + { + "id": 1211, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1184, + "src": "8296:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "8286:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 1209, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8290:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 1212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8286:17:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8264:39:8" + }, + { + "assignments": [ + 1215 + ], + "declarations": [ + { + "constant": false, + "id": 1215, + "mutability": "mutable", + "name": "offset", + "nameLocation": "8322:6:8", + "nodeType": "VariableDeclaration", + "scope": 1246, + "src": "8314:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1214, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8314:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1217, + "initialValue": { + "hexValue": "30783230", + "id": 1216, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8331:4:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8314:21:8" + }, + { + "body": { + "id": 1242, + "nodeType": "Block", + "src": "8390:262:8", + "statements": [ + { + "assignments": [ + 1230 + ], + "declarations": [ + { + "constant": false, + "id": 1230, + "mutability": "mutable", + "name": "input", + "nameLocation": "8417:5:8", + "nodeType": "VariableDeclaration", + "scope": 1242, + "src": "8404:18:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1229, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8404:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 1234, + "initialValue": { + "baseExpression": { + "id": 1231, + "name": "buffers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "8425:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "id": 1233, + "indexExpression": { + "id": 1232, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1219, + "src": "8433:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8425:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8404:31:8" + }, + { + "AST": { + "nativeSrc": "8474:90:8", + "nodeType": "YulBlock", + "src": "8474:90:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "result", + "nativeSrc": "8502:6:8", + "nodeType": "YulIdentifier", + "src": "8502:6:8" + }, + { + "name": "offset", + "nativeSrc": "8510:6:8", + "nodeType": "YulIdentifier", + "src": "8510:6:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8498:3:8", + "nodeType": "YulIdentifier", + "src": "8498:3:8" + }, + "nativeSrc": "8498:19:8", + "nodeType": "YulFunctionCall", + "src": "8498:19:8" + }, + { + "arguments": [ + { + "name": "input", + "nativeSrc": "8523:5:8", + "nodeType": "YulIdentifier", + "src": "8523:5:8" + }, + { + "kind": "number", + "nativeSrc": "8530:4:8", + "nodeType": "YulLiteral", + "src": "8530:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8519:3:8", + "nodeType": "YulIdentifier", + "src": "8519:3:8" + }, + "nativeSrc": "8519:16:8", + "nodeType": "YulFunctionCall", + "src": "8519:16:8" + }, + { + "arguments": [ + { + "name": "input", + "nativeSrc": "8543:5:8", + "nodeType": "YulIdentifier", + "src": "8543:5:8" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8537:5:8", + "nodeType": "YulIdentifier", + "src": "8537:5:8" + }, + "nativeSrc": "8537:12:8", + "nodeType": "YulFunctionCall", + "src": "8537:12:8" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "8492:5:8", + "nodeType": "YulIdentifier", + "src": "8492:5:8" + }, + "nativeSrc": "8492:58:8", + "nodeType": "YulFunctionCall", + "src": "8492:58:8" + }, + "nativeSrc": "8492:58:8", + "nodeType": "YulExpressionStatement", + "src": "8492:58:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1230, + "isOffset": false, + "isSlot": false, + "src": "8523:5:8", + "valueSize": 1 + }, + { + "declaration": 1230, + "isOffset": false, + "isSlot": false, + "src": "8543:5:8", + "valueSize": 1 + }, + { + "declaration": 1215, + "isOffset": false, + "isSlot": false, + "src": "8510:6:8", + "valueSize": 1 + }, + { + "declaration": 1208, + "isOffset": false, + "isSlot": false, + "src": "8502:6:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1235, + "nodeType": "InlineAssembly", + "src": "8449:115:8" + }, + { + "id": 1241, + "nodeType": "UncheckedBlock", + "src": "8577:65:8", + "statements": [ + { + "expression": { + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1236, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1215, + "src": "8605:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "expression": { + "id": 1237, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1230, + "src": "8615:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8621:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8615:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8605:22:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1240, + "nodeType": "ExpressionStatement", + "src": "8605:22:8" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1222, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1219, + "src": "8365:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1223, + "name": "buffers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "8369:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes memory[] memory" + } + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8377:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8369:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8365:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1243, + "initializationExpression": { + "assignments": [ + 1219 + ], + "declarations": [ + { + "constant": false, + "id": 1219, + "mutability": "mutable", + "name": "i", + "nameLocation": "8358:1:8", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "8350:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8350:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1221, + "initialValue": { + "hexValue": "30", + "id": 1220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8362:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8350:13:8" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 1227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "8385:3:8", + "subExpression": { + "id": 1226, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1219, + "src": "8387:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1228, + "nodeType": "ExpressionStatement", + "src": "8385:3:8" + }, + "nodeType": "ForStatement", + "src": "8345:307:8" + }, + { + "expression": { + "id": 1244, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1208, + "src": "8669:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 1182, + "id": 1245, + "nodeType": "Return", + "src": "8662:13:8" + } + ] + }, + "documentation": { + "id": 1175, + "nodeType": "StructuredDocumentation", + "src": "7588:449:8", + "text": " @dev Concatenate an array of bytes into a single bytes object.\n For fixed bytes types, we recommend using the solidity built-in `bytes.concat` or (equivalent)\n `abi.encodePacked`.\n NOTE: this could be done in assembly with a single loop that expands starting at the FMP, but that would be\n significantly less readable. It might be worth benchmarking the savings of the full-assembly approach." + }, + "id": 1247, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "concat", + "nameLocation": "8051:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1178, + "mutability": "mutable", + "name": "buffers", + "nameLocation": "8073:7:8", + "nodeType": "VariableDeclaration", + "scope": 1247, + "src": "8058:22:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_memory_ptr_$dyn_memory_ptr", + "typeString": "bytes[]" + }, + "typeName": { + "baseType": { + "id": 1176, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8058:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "id": 1177, + "nodeType": "ArrayTypeName", + "src": "8058:7:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes_storage_$dyn_storage_ptr", + "typeString": "bytes[]" + } + }, + "visibility": "internal" + } + ], + "src": "8057:24:8" + }, + "returnParameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1181, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1247, + "src": "8105:12:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1180, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8105:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "8104:14:8" + }, + "scope": 1632, + "src": "8042:640:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1256, + "nodeType": "Block", + "src": "8920:1416:8", + "statements": [ + { + "AST": { + "nativeSrc": "8955:1375:8", + "nodeType": "YulBlock", + "src": "8955:1375:8", + "statements": [ + { + "nativeSrc": "8969:26:8", + "nodeType": "YulVariableDeclaration", + "src": "8969:26:8", + "value": { + "arguments": [ + { + "name": "input", + "nativeSrc": "8989:5:8", + "nodeType": "YulIdentifier", + "src": "8989:5:8" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "8983:5:8", + "nodeType": "YulIdentifier", + "src": "8983:5:8" + }, + "nativeSrc": "8983:12:8", + "nodeType": "YulFunctionCall", + "src": "8983:12:8" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "8973:6:8", + "nodeType": "YulTypedName", + "src": "8973:6:8", + "type": "" + } + ] + }, + { + "nativeSrc": "9008:21:8", + "nodeType": "YulAssignment", + "src": "9008:21:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9024:4:8", + "nodeType": "YulLiteral", + "src": "9024:4:8", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9018:5:8", + "nodeType": "YulIdentifier", + "src": "9018:5:8" + }, + "nativeSrc": "9018:11:8", + "nodeType": "YulFunctionCall", + "src": "9018:11:8" + }, + "variableNames": [ + { + "name": "output", + "nativeSrc": "9008:6:8", + "nodeType": "YulIdentifier", + "src": "9008:6:8" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9049:4:8", + "nodeType": "YulLiteral", + "src": "9049:4:8", + "type": "", + "value": "0x40" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "output", + "nativeSrc": "9063:6:8", + "nodeType": "YulIdentifier", + "src": "9063:6:8" + }, + { + "kind": "number", + "nativeSrc": "9071:4:8", + "nodeType": "YulLiteral", + "src": "9071:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9059:3:8", + "nodeType": "YulIdentifier", + "src": "9059:3:8" + }, + "nativeSrc": "9059:17:8", + "nodeType": "YulFunctionCall", + "src": "9059:17:8" + }, + { + "arguments": [ + { + "name": "length", + "nativeSrc": "9082:6:8", + "nodeType": "YulIdentifier", + "src": "9082:6:8" + }, + { + "kind": "number", + "nativeSrc": "9090:1:8", + "nodeType": "YulLiteral", + "src": "9090:1:8", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "9078:3:8", + "nodeType": "YulIdentifier", + "src": "9078:3:8" + }, + "nativeSrc": "9078:14:8", + "nodeType": "YulFunctionCall", + "src": "9078:14:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9055:3:8", + "nodeType": "YulIdentifier", + "src": "9055:3:8" + }, + "nativeSrc": "9055:38:8", + "nodeType": "YulFunctionCall", + "src": "9055:38:8" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9042:6:8", + "nodeType": "YulIdentifier", + "src": "9042:6:8" + }, + "nativeSrc": "9042:52:8", + "nodeType": "YulFunctionCall", + "src": "9042:52:8" + }, + "nativeSrc": "9042:52:8", + "nodeType": "YulExpressionStatement", + "src": "9042:52:8" + }, + { + "expression": { + "arguments": [ + { + "name": "output", + "nativeSrc": "9114:6:8", + "nodeType": "YulIdentifier", + "src": "9114:6:8" + }, + { + "arguments": [ + { + "name": "length", + "nativeSrc": "9126:6:8", + "nodeType": "YulIdentifier", + "src": "9126:6:8" + }, + { + "kind": "number", + "nativeSrc": "9134:1:8", + "nodeType": "YulLiteral", + "src": "9134:1:8", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "9122:3:8", + "nodeType": "YulIdentifier", + "src": "9122:3:8" + }, + "nativeSrc": "9122:14:8", + "nodeType": "YulFunctionCall", + "src": "9122:14:8" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9107:6:8", + "nodeType": "YulIdentifier", + "src": "9107:6:8" + }, + "nativeSrc": "9107:30:8", + "nodeType": "YulFunctionCall", + "src": "9107:30:8" + }, + "nativeSrc": "9107:30:8", + "nodeType": "YulExpressionStatement", + "src": "9107:30:8" + }, + { + "body": { + "nativeSrc": "9261:1059:8", + "nodeType": "YulBlock", + "src": "9261:1059:8", + "statements": [ + { + "nativeSrc": "9279:54:8", + "nodeType": "YulVariableDeclaration", + "src": "9279:54:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9296:3:8", + "nodeType": "YulLiteral", + "src": "9296:3:8", + "type": "", + "value": "128" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "input", + "nativeSrc": "9315:5:8", + "nodeType": "YulIdentifier", + "src": "9315:5:8" + }, + { + "kind": "number", + "nativeSrc": "9322:4:8", + "nodeType": "YulLiteral", + "src": "9322:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9311:3:8", + "nodeType": "YulIdentifier", + "src": "9311:3:8" + }, + "nativeSrc": "9311:16:8", + "nodeType": "YulFunctionCall", + "src": "9311:16:8" + }, + { + "name": "i", + "nativeSrc": "9329:1:8", + "nodeType": "YulIdentifier", + "src": "9329:1:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9307:3:8", + "nodeType": "YulIdentifier", + "src": "9307:3:8" + }, + "nativeSrc": "9307:24:8", + "nodeType": "YulFunctionCall", + "src": "9307:24:8" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9301:5:8", + "nodeType": "YulIdentifier", + "src": "9301:5:8" + }, + "nativeSrc": "9301:31:8", + "nodeType": "YulFunctionCall", + "src": "9301:31:8" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "9292:3:8", + "nodeType": "YulIdentifier", + "src": "9292:3:8" + }, + "nativeSrc": "9292:41:8", + "nodeType": "YulFunctionCall", + "src": "9292:41:8" + }, + "variables": [ + { + "name": "chunk", + "nativeSrc": "9283:5:8", + "nodeType": "YulTypedName", + "src": "9283:5:8", + "type": "" + } + ] + }, + { + "nativeSrc": "9350:165:8", + "nodeType": "YulAssignment", + "src": "9350:165:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9384:66:8", + "nodeType": "YulLiteral", + "src": "9384:66:8", + "type": "", + "value": "0x0000000000000000ffffffffffffffff0000000000000000ffffffffffffffff" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9479:2:8", + "nodeType": "YulLiteral", + "src": "9479:2:8", + "type": "", + "value": "64" + }, + { + "name": "chunk", + "nativeSrc": "9483:5:8", + "nodeType": "YulIdentifier", + "src": "9483:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9475:3:8", + "nodeType": "YulIdentifier", + "src": "9475:3:8" + }, + "nativeSrc": "9475:14:8", + "nodeType": "YulFunctionCall", + "src": "9475:14:8" + }, + { + "name": "chunk", + "nativeSrc": "9491:5:8", + "nodeType": "YulIdentifier", + "src": "9491:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "9472:2:8", + "nodeType": "YulIdentifier", + "src": "9472:2:8" + }, + "nativeSrc": "9472:25:8", + "nodeType": "YulFunctionCall", + "src": "9472:25:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9359:3:8", + "nodeType": "YulIdentifier", + "src": "9359:3:8" + }, + "nativeSrc": "9359:156:8", + "nodeType": "YulFunctionCall", + "src": "9359:156:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "9350:5:8", + "nodeType": "YulIdentifier", + "src": "9350:5:8" + } + ] + }, + { + "nativeSrc": "9532:165:8", + "nodeType": "YulAssignment", + "src": "9532:165:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9566:66:8", + "nodeType": "YulLiteral", + "src": "9566:66:8", + "type": "", + "value": "0x00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9661:2:8", + "nodeType": "YulLiteral", + "src": "9661:2:8", + "type": "", + "value": "32" + }, + { + "name": "chunk", + "nativeSrc": "9665:5:8", + "nodeType": "YulIdentifier", + "src": "9665:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9657:3:8", + "nodeType": "YulIdentifier", + "src": "9657:3:8" + }, + "nativeSrc": "9657:14:8", + "nodeType": "YulFunctionCall", + "src": "9657:14:8" + }, + { + "name": "chunk", + "nativeSrc": "9673:5:8", + "nodeType": "YulIdentifier", + "src": "9673:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "9654:2:8", + "nodeType": "YulIdentifier", + "src": "9654:2:8" + }, + "nativeSrc": "9654:25:8", + "nodeType": "YulFunctionCall", + "src": "9654:25:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9541:3:8", + "nodeType": "YulIdentifier", + "src": "9541:3:8" + }, + "nativeSrc": "9541:156:8", + "nodeType": "YulFunctionCall", + "src": "9541:156:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "9532:5:8", + "nodeType": "YulIdentifier", + "src": "9532:5:8" + } + ] + }, + { + "nativeSrc": "9714:165:8", + "nodeType": "YulAssignment", + "src": "9714:165:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9748:66:8", + "nodeType": "YulLiteral", + "src": "9748:66:8", + "type": "", + "value": "0x0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9843:2:8", + "nodeType": "YulLiteral", + "src": "9843:2:8", + "type": "", + "value": "16" + }, + { + "name": "chunk", + "nativeSrc": "9847:5:8", + "nodeType": "YulIdentifier", + "src": "9847:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9839:3:8", + "nodeType": "YulIdentifier", + "src": "9839:3:8" + }, + "nativeSrc": "9839:14:8", + "nodeType": "YulFunctionCall", + "src": "9839:14:8" + }, + { + "name": "chunk", + "nativeSrc": "9855:5:8", + "nodeType": "YulIdentifier", + "src": "9855:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "9836:2:8", + "nodeType": "YulIdentifier", + "src": "9836:2:8" + }, + "nativeSrc": "9836:25:8", + "nodeType": "YulFunctionCall", + "src": "9836:25:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9723:3:8", + "nodeType": "YulIdentifier", + "src": "9723:3:8" + }, + "nativeSrc": "9723:156:8", + "nodeType": "YulFunctionCall", + "src": "9723:156:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "9714:5:8", + "nodeType": "YulIdentifier", + "src": "9714:5:8" + } + ] + }, + { + "nativeSrc": "9896:164:8", + "nodeType": "YulAssignment", + "src": "9896:164:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9930:66:8", + "nodeType": "YulLiteral", + "src": "9930:66:8", + "type": "", + "value": "0x00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10025:1:8", + "nodeType": "YulLiteral", + "src": "10025:1:8", + "type": "", + "value": "8" + }, + { + "name": "chunk", + "nativeSrc": "10028:5:8", + "nodeType": "YulIdentifier", + "src": "10028:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "10021:3:8", + "nodeType": "YulIdentifier", + "src": "10021:3:8" + }, + "nativeSrc": "10021:13:8", + "nodeType": "YulFunctionCall", + "src": "10021:13:8" + }, + { + "name": "chunk", + "nativeSrc": "10036:5:8", + "nodeType": "YulIdentifier", + "src": "10036:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "10018:2:8", + "nodeType": "YulIdentifier", + "src": "10018:2:8" + }, + "nativeSrc": "10018:24:8", + "nodeType": "YulFunctionCall", + "src": "10018:24:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9905:3:8", + "nodeType": "YulIdentifier", + "src": "9905:3:8" + }, + "nativeSrc": "9905:155:8", + "nodeType": "YulFunctionCall", + "src": "9905:155:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "9896:5:8", + "nodeType": "YulIdentifier", + "src": "9896:5:8" + } + ] + }, + { + "nativeSrc": "10077:164:8", + "nodeType": "YulAssignment", + "src": "10077:164:8", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10111:66:8", + "nodeType": "YulLiteral", + "src": "10111:66:8", + "type": "", + "value": "0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10206:1:8", + "nodeType": "YulLiteral", + "src": "10206:1:8", + "type": "", + "value": "4" + }, + { + "name": "chunk", + "nativeSrc": "10209:5:8", + "nodeType": "YulIdentifier", + "src": "10209:5:8" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "10202:3:8", + "nodeType": "YulIdentifier", + "src": "10202:3:8" + }, + "nativeSrc": "10202:13:8", + "nodeType": "YulFunctionCall", + "src": "10202:13:8" + }, + { + "name": "chunk", + "nativeSrc": "10217:5:8", + "nodeType": "YulIdentifier", + "src": "10217:5:8" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "10199:2:8", + "nodeType": "YulIdentifier", + "src": "10199:2:8" + }, + "nativeSrc": "10199:24:8", + "nodeType": "YulFunctionCall", + "src": "10199:24:8" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10086:3:8", + "nodeType": "YulIdentifier", + "src": "10086:3:8" + }, + "nativeSrc": "10086:155:8", + "nodeType": "YulFunctionCall", + "src": "10086:155:8" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "10077:5:8", + "nodeType": "YulIdentifier", + "src": "10077:5:8" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "output", + "nativeSrc": "10273:6:8", + "nodeType": "YulIdentifier", + "src": "10273:6:8" + }, + { + "kind": "number", + "nativeSrc": "10281:4:8", + "nodeType": "YulLiteral", + "src": "10281:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10269:3:8", + "nodeType": "YulIdentifier", + "src": "10269:3:8" + }, + "nativeSrc": "10269:17:8", + "nodeType": "YulFunctionCall", + "src": "10269:17:8" + }, + { + "arguments": [ + { + "name": "i", + "nativeSrc": "10292:1:8", + "nodeType": "YulIdentifier", + "src": "10292:1:8" + }, + { + "kind": "number", + "nativeSrc": "10295:1:8", + "nodeType": "YulLiteral", + "src": "10295:1:8", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "10288:3:8", + "nodeType": "YulIdentifier", + "src": "10288:3:8" + }, + "nativeSrc": "10288:9:8", + "nodeType": "YulFunctionCall", + "src": "10288:9:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10265:3:8", + "nodeType": "YulIdentifier", + "src": "10265:3:8" + }, + "nativeSrc": "10265:33:8", + "nodeType": "YulFunctionCall", + "src": "10265:33:8" + }, + { + "name": "chunk", + "nativeSrc": "10300:5:8", + "nodeType": "YulIdentifier", + "src": "10300:5:8" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10258:6:8", + "nodeType": "YulIdentifier", + "src": "10258:6:8" + }, + "nativeSrc": "10258:48:8", + "nodeType": "YulFunctionCall", + "src": "10258:48:8" + }, + "nativeSrc": "10258:48:8", + "nodeType": "YulExpressionStatement", + "src": "10258:48:8" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "9200:1:8", + "nodeType": "YulIdentifier", + "src": "9200:1:8" + }, + { + "name": "length", + "nativeSrc": "9203:6:8", + "nodeType": "YulIdentifier", + "src": "9203:6:8" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "9197:2:8", + "nodeType": "YulIdentifier", + "src": "9197:2:8" + }, + "nativeSrc": "9197:13:8", + "nodeType": "YulFunctionCall", + "src": "9197:13:8" + }, + "nativeSrc": "9150:1170:8", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "9211:49:8", + "nodeType": "YulBlock", + "src": "9211:49:8", + "statements": [ + { + "nativeSrc": "9229:17:8", + "nodeType": "YulAssignment", + "src": "9229:17:8", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "9238:1:8", + "nodeType": "YulIdentifier", + "src": "9238:1:8" + }, + { + "kind": "number", + "nativeSrc": "9241:4:8", + "nodeType": "YulLiteral", + "src": "9241:4:8", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9234:3:8", + "nodeType": "YulIdentifier", + "src": "9234:3:8" + }, + "nativeSrc": "9234:12:8", + "nodeType": "YulFunctionCall", + "src": "9234:12:8" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "9229:1:8", + "nodeType": "YulIdentifier", + "src": "9229:1:8" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "9154:42:8", + "nodeType": "YulBlock", + "src": "9154:42:8", + "statements": [ + { + "nativeSrc": "9172:10:8", + "nodeType": "YulVariableDeclaration", + "src": "9172:10:8", + "value": { + "kind": "number", + "nativeSrc": "9181:1:8", + "nodeType": "YulLiteral", + "src": "9181:1:8", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "9176:1:8", + "nodeType": "YulTypedName", + "src": "9176:1:8", + "type": "" + } + ] + } + ] + }, + "src": "9150:1170:8" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1250, + "isOffset": false, + "isSlot": false, + "src": "8989:5:8", + "valueSize": 1 + }, + { + "declaration": 1250, + "isOffset": false, + "isSlot": false, + "src": "9315:5:8", + "valueSize": 1 + }, + { + "declaration": 1253, + "isOffset": false, + "isSlot": false, + "src": "10273:6:8", + "valueSize": 1 + }, + { + "declaration": 1253, + "isOffset": false, + "isSlot": false, + "src": "9008:6:8", + "valueSize": 1 + }, + { + "declaration": 1253, + "isOffset": false, + "isSlot": false, + "src": "9063:6:8", + "valueSize": 1 + }, + { + "declaration": 1253, + "isOffset": false, + "isSlot": false, + "src": "9114:6:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1255, + "nodeType": "InlineAssembly", + "src": "8930:1400:8" + } + ] + }, + "documentation": { + "id": 1248, + "nodeType": "StructuredDocumentation", + "src": "8688:144:8", + "text": " @dev Split each byte in `input` into two nibbles (4 bits each)\n Example: hex\"01234567\" → hex\"0001020304050607\"" + }, + "id": 1257, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toNibbles", + "nameLocation": "8846:9:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "mutability": "mutable", + "name": "input", + "nameLocation": "8869:5:8", + "nodeType": "VariableDeclaration", + "scope": 1257, + "src": "8856:18:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1249, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8856:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "8855:20:8" + }, + "returnParameters": { + "id": 1254, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1253, + "mutability": "mutable", + "name": "output", + "nameLocation": "8912:6:8", + "nodeType": "VariableDeclaration", + "scope": 1257, + "src": "8899:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1252, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8899:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "8898:21:8" + }, + "scope": 1632, + "src": "8837:1499:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1281, + "nodeType": "Block", + "src": "10494:76:8", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1267, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1260, + "src": "10511:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10513:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10511:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 1269, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "10523:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10525:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10523:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10511:20:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1273, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1260, + "src": "10545:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1272, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "10535:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10535:12:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "id": 1276, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "10561:1:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1275, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "10551:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10551:12:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "10535:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10511:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1266, + "id": 1280, + "nodeType": "Return", + "src": "10504:59:8" + } + ] + }, + "documentation": { + "id": 1258, + "nodeType": "StructuredDocumentation", + "src": "10342:71:8", + "text": " @dev Returns true if the two byte buffers are equal." + }, + "id": 1282, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "equal", + "nameLocation": "10427:5:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1260, + "mutability": "mutable", + "name": "a", + "nameLocation": "10446:1:8", + "nodeType": "VariableDeclaration", + "scope": 1282, + "src": "10433:14:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1259, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10433:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1262, + "mutability": "mutable", + "name": "b", + "nameLocation": "10462:1:8", + "nodeType": "VariableDeclaration", + "scope": 1282, + "src": "10449:14:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1261, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10449:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "10432:32:8" + }, + "returnParameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1265, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1282, + "src": "10488:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1264, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10488:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "10487:6:8" + }, + "scope": 1632, + "src": "10418:152:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1372, + "nodeType": "Block", + "src": "10874:1024:8", + "statements": [ + { + "expression": { + "id": 1306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1290, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "10884:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1291, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "10920:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1292, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10929:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "10920:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1294, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10919:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830304646303046463030464630304646303046463030464630304646303046463030464630304646303046463030464630304646303046463030464630304646", + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10934:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_450552876409790643671482431940419874915447411150352389258589821042463539455_by_1", + "typeString": "int_const 4505...(67 digits omitted)...9455" + }, + "value": "0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF" + }, + "src": "10919:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1297, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10918:83:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1298, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11018:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830304646303046463030464630304646303046463030464630304646303046463030464630304646303046463030464630304646303046463030464630304646", + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11026:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_450552876409790643671482431940419874915447411150352389258589821042463539455_by_1", + "typeString": "int_const 4505...(67 digits omitted)...9455" + }, + "value": "0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF" + }, + "src": "11018:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1301, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11017:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1302, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11097:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "11017:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1304, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11016:83:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "10918:181:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "10884:215:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1307, + "nodeType": "ExpressionStatement", + "src": "10884:215:8" + }, + { + "expression": { + "id": 1324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1308, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11109:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1309, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11157:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3136", + "id": 1310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11166:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "11157:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1312, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11156:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030464646463030303046464646303030304646464630303030464646463030303046464646303030304646464630303030464646463030303046464646", + "id": 1313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11172:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1766820105243087041267848467410591083712559083657179364930612997358944255_by_1", + "typeString": "int_const 1766...(65 digits omitted)...4255" + }, + "value": "0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF" + }, + "src": "11156:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1315, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11155:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1316, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11256:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030464646463030303046464646303030304646464630303030464646463030303046464646303030304646464630303030464646463030303046464646", + "id": 1317, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11264:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1766820105243087041267848467410591083712559083657179364930612997358944255_by_1", + "typeString": "int_const 1766...(65 digits omitted)...4255" + }, + "value": "0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF" + }, + "src": "11256:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1319, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11255:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 1320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11335:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "11255:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1322, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11254:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11155:183:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11109:229:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1325, + "nodeType": "ExpressionStatement", + "src": "11109:229:8" + }, + { + "expression": { + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1326, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11348:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1327, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11396:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3332", + "id": 1328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11405:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "11396:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1330, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11395:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030303030304646464646464646303030303030303046464646464646463030303030303030464646464646464630303030303030304646464646464646", + "id": 1331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11411:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_26959946660873538060741835960174461801791452538186943042387869433855_by_1", + "typeString": "int_const 2695...(60 digits omitted)...3855" + }, + "value": "0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF" + }, + "src": "11395:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1333, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11394:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1334, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11495:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030303030304646464646464646303030303030303046464646464646463030303030303030464646464646464630303030303030304646464646464646", + "id": 1335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11503:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_26959946660873538060741835960174461801791452538186943042387869433855_by_1", + "typeString": "int_const 2695...(60 digits omitted)...3855" + }, + "value": "0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF" + }, + "src": "11495:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1337, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11494:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3332", + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11574:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "11494:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1340, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11493:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11394:183:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11348:229:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1343, + "nodeType": "ExpressionStatement", + "src": "11348:229:8" + }, + { + "expression": { + "id": 1360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1344, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11587:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1345, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11635:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3634", + "id": 1346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11644:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "11635:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1348, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11634:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030303030303030303030303030464646464646464646464646464646463030303030303030303030303030303046464646464646464646464646464646", + "id": 1349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11650:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_6277101735386680763495507056286727952657427581105975853055_by_1", + "typeString": "int_const 6277...(50 digits omitted)...3055" + }, + "value": "0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF" + }, + "src": "11634:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1351, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11633:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1352, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11734:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030303030303030303030303030464646464646464646464646464646463030303030303030303030303030303046464646464646464646464646464646", + "id": 1353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11742:66:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_6277101735386680763495507056286727952657427581105975853055_by_1", + "typeString": "int_const 6277...(50 digits omitted)...3055" + }, + "value": "0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF" + }, + "src": "11734:74:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1355, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11733:76:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3634", + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11813:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "11733:82:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1358, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11732:84:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11633:183:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11587:229:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1361, + "nodeType": "ExpressionStatement", + "src": "11587:229:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1362, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11834:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "313238", + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11843:3:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "11834:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1365, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11833:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1366, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "11851:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 1367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11860:3:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "11851:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 1369, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11850:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "11833:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1289, + "id": 1371, + "nodeType": "Return", + "src": "11826:38:8" + } + ] + }, + "documentation": { + "id": 1283, + "nodeType": "StructuredDocumentation", + "src": "10576:222:8", + "text": " @dev Reverses the byte order of a bytes32 value, converting between little-endian and big-endian.\n Inspired by https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel[Reverse Parallel]" + }, + "id": 1373, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes32", + "nameLocation": "10812:14:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1285, + "mutability": "mutable", + "name": "value", + "nameLocation": "10835:5:8", + "nodeType": "VariableDeclaration", + "scope": 1373, + "src": "10827:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1284, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10827:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "10826:15:8" + }, + "returnParameters": { + "id": 1289, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1288, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1373, + "src": "10865:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1287, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10865:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "10864:9:8" + }, + "scope": 1632, + "src": "10803:1095:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1445, + "nodeType": "Block", + "src": "12047:590:8", + "statements": [ + { + "expression": { + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1381, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12057:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1382, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12093:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646303046463030464630304646303046463030464630304646303046463030", + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12101:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_338958311018522360492699998064329424640_by_1", + "typeString": "int_const 3389...(31 digits omitted)...4640" + }, + "value": "0xFF00FF00FF00FF00FF00FF00FF00FF00" + }, + "src": "12093:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1385, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12092:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12140:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "12092:49:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1388, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12091:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1389, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12159:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783030464630304646303046463030464630304646303046463030464630304646", + "id": 1390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12167:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_1324055902416102970674609367438786815_by_1", + "typeString": "int_const 1324...(29 digits omitted)...6815" + }, + "value": "0x00FF00FF00FF00FF00FF00FF00FF00FF" + }, + "src": "12159:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1392, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12158:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12206:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "12158:49:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1395, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12157:51:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12091:117:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12057:151:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 1398, + "nodeType": "ExpressionStatement", + "src": "12057:151:8" + }, + { + "expression": { + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1399, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12218:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1400, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12266:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646464630303030464646463030303046464646303030304646464630303030", + "id": 1401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12274:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_340277174703306882242637262502835978240_by_1", + "typeString": "int_const 3402...(31 digits omitted)...8240" + }, + "value": "0xFFFF0000FFFF0000FFFF0000FFFF0000" + }, + "src": "12266:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1403, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12265:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3136", + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12313:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "12265:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1406, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12264:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1407, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12333:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783030303046464646303030304646464630303030464646463030303046464646", + "id": 1408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12341:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_5192217631581220737344928932233215_by_1", + "typeString": "int_const 5192...(26 digits omitted)...3215" + }, + "value": "0x0000FFFF0000FFFF0000FFFF0000FFFF" + }, + "src": "12333:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1410, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12332:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12380:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "12332:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1413, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12331:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12264:119:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12218:165:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 1416, + "nodeType": "ExpressionStatement", + "src": "12218:165:8" + }, + { + "expression": { + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1417, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12393:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1418, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12441:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646464646464646303030303030303046464646464646463030303030303030", + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12449:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366841710300967557013907638845440_by_1", + "typeString": "int_const 3402...(31 digits omitted)...5440" + }, + "value": "0xFFFFFFFF00000000FFFFFFFF00000000" + }, + "src": "12441:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1421, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12440:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3332", + "id": 1422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12488:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "12440:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1424, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12439:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1425, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12508:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783030303030303030464646464646464630303030303030304646464646464646", + "id": 1426, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12516:34:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_79228162495817593524129366015_by_1", + "typeString": "int_const 79228162495817593524129366015" + }, + "value": "0x00000000FFFFFFFF00000000FFFFFFFF" + }, + "src": "12508:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1428, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12507:44:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3332", + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12555:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "12507:50:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1431, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12506:52:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12439:119:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12393:165:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 1434, + "nodeType": "ExpressionStatement", + "src": "12393:165:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1435, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12576:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3634", + "id": 1436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12585:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "12576:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1438, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12575:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1439, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1376, + "src": "12592:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3634", + "id": 1440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12601:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "12592:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + } + ], + "id": 1442, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12591:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "src": "12575:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "functionReturnParameters": 1380, + "id": 1444, + "nodeType": "Return", + "src": "12568:36:8" + } + ] + }, + "documentation": { + "id": 1374, + "nodeType": "StructuredDocumentation", + "src": "11904:67:8", + "text": "@dev Same as {reverseBytes32} but optimized for 128-bit values." + }, + "id": 1446, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes16", + "nameLocation": "11985:14:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1377, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1376, + "mutability": "mutable", + "name": "value", + "nameLocation": "12008:5:8", + "nodeType": "VariableDeclaration", + "scope": 1446, + "src": "12000:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 1375, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "12000:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "visibility": "internal" + } + ], + "src": "11999:15:8" + }, + "returnParameters": { + "id": 1380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1379, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1446, + "src": "12038:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 1378, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "12038:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "visibility": "internal" + } + ], + "src": "12037:9:8" + }, + "scope": 1632, + "src": "11976:661:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1500, + "nodeType": "Block", + "src": "12782:303:8", + "statements": [ + { + "expression": { + "id": 1470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1454, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12792:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1455, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12802:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307846463030464630304646303046463030", + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12810:18:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_18374966859414961920_by_1", + "typeString": "int_const 18374966859414961920" + }, + "value": "0xFF00FF00FF00FF00" + }, + "src": "12802:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1458, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12801:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12833:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "12801:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1461, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12800:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1462, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12840:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830304646303046463030464630304646", + "id": 1463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12848:18:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_71777214294589695_by_1", + "typeString": "int_const 71777214294589695" + }, + "value": "0x00FF00FF00FF00FF" + }, + "src": "12840:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1465, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12839:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12871:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "12839:33:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1468, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12838:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "12800:73:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "12792:81:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "id": 1471, + "nodeType": "ExpressionStatement", + "src": "12792:81:8" + }, + { + "expression": { + "id": 1488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1472, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12897:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1473, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12907:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307846464646303030304646464630303030", + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12915:18:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446462603027742720_by_1", + "typeString": "int_const 18446462603027742720" + }, + "value": "0xFFFF0000FFFF0000" + }, + "src": "12907:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1476, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12906:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3136", + "id": 1477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12938:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "12906:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1479, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12905:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1480, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "12946:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307830303030464646463030303046464646", + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12954:18:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_281470681808895_by_1", + "typeString": "int_const 281470681808895" + }, + "value": "0x0000FFFF0000FFFF" + }, + "src": "12946:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1483, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12945:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 1484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12977:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "12945:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1486, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12944:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "12905:75:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "12897:83:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "id": 1489, + "nodeType": "ExpressionStatement", + "src": "12897:83:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1490, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "13024:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3332", + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13033:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "13024:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1493, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13023:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "id": 1496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1494, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1449, + "src": "13040:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3332", + "id": 1495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13049:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "13040:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + } + ], + "id": 1497, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13039:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "src": "13023:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "functionReturnParameters": 1453, + "id": 1499, + "nodeType": "Return", + "src": "13016:36:8" + } + ] + }, + "documentation": { + "id": 1447, + "nodeType": "StructuredDocumentation", + "src": "12643:66:8", + "text": "@dev Same as {reverseBytes32} but optimized for 64-bit values." + }, + "id": 1501, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes8", + "nameLocation": "12723:13:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1449, + "mutability": "mutable", + "name": "value", + "nameLocation": "12744:5:8", + "nodeType": "VariableDeclaration", + "scope": 1501, + "src": "12737:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "typeName": { + "id": 1448, + "name": "bytes8", + "nodeType": "ElementaryTypeName", + "src": "12737:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "visibility": "internal" + } + ], + "src": "12736:14:8" + }, + "returnParameters": { + "id": 1453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1452, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1501, + "src": "12774:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + }, + "typeName": { + "id": 1451, + "name": "bytes8", + "nodeType": "ElementaryTypeName", + "src": "12774:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes8", + "typeString": "bytes8" + } + }, + "visibility": "internal" + } + ], + "src": "12773:8:8" + }, + "scope": 1632, + "src": "12714:371:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1537, + "nodeType": "Block", + "src": "13230:168:8", + "statements": [ + { + "expression": { + "id": 1525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1509, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13240:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1510, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13250:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646303046463030", + "id": 1511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13258:10:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_4278255360_by_1", + "typeString": "int_const 4278255360" + }, + "value": "0xFF00FF00" + }, + "src": "13250:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1513, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13249:20:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13273:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13249:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1516, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13248:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1517, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13280:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783030464630304646", + "id": 1518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13288:10:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16711935_by_1", + "typeString": "int_const 16711935" + }, + "value": "0x00FF00FF" + }, + "src": "13280:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1520, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13279:20:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13303:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13279:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1523, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13278:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "13248:57:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "13240:65:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "id": 1526, + "nodeType": "ExpressionStatement", + "src": "13240:65:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1527, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13337:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "3136", + "id": 1528, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13346:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "13337:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1530, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13336:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1531, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1504, + "src": "13353:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 1532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13362:2:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "13353:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "id": 1534, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13352:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "13336:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "functionReturnParameters": 1508, + "id": 1536, + "nodeType": "Return", + "src": "13329:36:8" + } + ] + }, + "documentation": { + "id": 1502, + "nodeType": "StructuredDocumentation", + "src": "13091:66:8", + "text": "@dev Same as {reverseBytes32} but optimized for 32-bit values." + }, + "id": 1538, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes4", + "nameLocation": "13171:13:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1505, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1504, + "mutability": "mutable", + "name": "value", + "nameLocation": "13192:5:8", + "nodeType": "VariableDeclaration", + "scope": 1538, + "src": "13185:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1503, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "13185:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "13184:14:8" + }, + "returnParameters": { + "id": 1508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1507, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1538, + "src": "13222:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1506, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "13222:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "13221:8:8" + }, + "scope": 1632, + "src": "13162:236:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1556, + "nodeType": "Block", + "src": "13543:51:8", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 1554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1546, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1541, + "src": "13561:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "38", + "id": 1547, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13570:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13561:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + } + ], + "id": 1549, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13560:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 1552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1550, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1541, + "src": "13576:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13585:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13576:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + } + ], + "id": 1553, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13575:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "src": "13560:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "functionReturnParameters": 1545, + "id": 1555, + "nodeType": "Return", + "src": "13553:34:8" + } + ] + }, + "documentation": { + "id": 1539, + "nodeType": "StructuredDocumentation", + "src": "13404:66:8", + "text": "@dev Same as {reverseBytes32} but optimized for 16-bit values." + }, + "id": 1557, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reverseBytes2", + "nameLocation": "13484:13:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1541, + "mutability": "mutable", + "name": "value", + "nameLocation": "13505:5:8", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "13498:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "typeName": { + "id": 1540, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "13498:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "visibility": "internal" + } + ], + "src": "13497:14:8" + }, + "returnParameters": { + "id": 1545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1557, + "src": "13535:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "typeName": { + "id": 1543, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "13535:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "visibility": "internal" + } + ], + "src": "13534:8:8" + }, + "scope": 1632, + "src": "13475:119:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1618, + "nodeType": "Block", + "src": "13811:313:8", + "statements": [ + { + "body": { + "id": 1611, + "nodeType": "Block", + "src": "13871:213:8", + "statements": [ + { + "assignments": [ + 1578 + ], + "declarations": [ + { + "constant": false, + "id": 1578, + "mutability": "mutable", + "name": "chunk", + "nameLocation": "13893:5:8", + "nodeType": "VariableDeclaration", + "scope": 1611, + "src": "13885:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1577, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13885:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1583, + "initialValue": { + "arguments": [ + { + "id": 1580, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1560, + "src": "13924:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 1581, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "13932:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1579, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "13901:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13901:33:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13885:49:8" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1584, + "name": "chunk", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "13952:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1587, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13969:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13961:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1585, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13961:7:8", + "typeDescriptions": {} + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13961:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "13952:19:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1610, + "nodeType": "IfStatement", + "src": "13948:126:8", + "trueBody": { + "id": 1609, + "nodeType": "Block", + "src": "13973:101:8", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "38", + "id": 1592, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14007:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 1593, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "14011:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14007:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1599, + "name": "chunk", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1578, + "src": "14032:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14024:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14024:7:8", + "typeDescriptions": {} + } + }, + "id": 1600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14024:14:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1595, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "14015:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14020:3:8", + "memberName": "clz", + "nodeType": "MemberAccess", + "referencedDeclaration": 6203, + "src": "14015:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 1601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14015:24:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14007:32:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "38", + "id": 1603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14041:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "expression": { + "id": 1604, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1560, + "src": "14045:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14052:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "14045:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14041:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1590, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "13998:4:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 1591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14003:3:8", + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 4874, + "src": "13998:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13998:61:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1564, + "id": 1608, + "nodeType": "Return", + "src": "13991:68:8" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1569, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "13841:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1570, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1560, + "src": "13845:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13852:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "13845:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13841:17:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1612, + "initializationExpression": { + "assignments": [ + 1566 + ], + "declarations": [ + { + "constant": false, + "id": 1566, + "mutability": "mutable", + "name": "i", + "nameLocation": "13834:1:8", + "nodeType": "VariableDeclaration", + "scope": 1612, + "src": "13826:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13826:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1568, + "initialValue": { + "hexValue": "30", + "id": 1567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13838:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13826:13:8" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 1575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1573, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "13860:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "30783230", + "id": 1574, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13865:4:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "13860:9:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1576, + "nodeType": "ExpressionStatement", + "src": "13860:9:8" + }, + "nodeType": "ForStatement", + "src": "13821:263:8" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "38", + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14100:1:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "expression": { + "id": 1614, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1560, + "src": "14104:6:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14111:6:8", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "14104:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14100:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1564, + "id": 1617, + "nodeType": "Return", + "src": "14093:24:8" + } + ] + }, + "documentation": { + "id": 1558, + "nodeType": "StructuredDocumentation", + "src": "13600:140:8", + "text": " @dev Counts the number of leading zero bits a bytes array. Returns `8 * buffer.length`\n if the buffer is all zeros." + }, + "id": 1619, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "clz", + "nameLocation": "13754:3:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1560, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "13771:6:8", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "13758:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1559, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13758:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "13757:21:8" + }, + "returnParameters": { + "id": 1564, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1563, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1619, + "src": "13802:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13802:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13801:9:8" + }, + "scope": 1632, + "src": "13745:379:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1630, + "nodeType": "Block", + "src": "14509:225:8", + "statements": [ + { + "AST": { + "nativeSrc": "14658:70:8", + "nodeType": "YulBlock", + "src": "14658:70:8", + "statements": [ + { + "nativeSrc": "14672:46:8", + "nodeType": "YulAssignment", + "src": "14672:46:8", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "14695:6:8", + "nodeType": "YulIdentifier", + "src": "14695:6:8" + }, + { + "kind": "number", + "nativeSrc": "14703:4:8", + "nodeType": "YulLiteral", + "src": "14703:4:8", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14691:3:8", + "nodeType": "YulIdentifier", + "src": "14691:3:8" + }, + "nativeSrc": "14691:17:8", + "nodeType": "YulFunctionCall", + "src": "14691:17:8" + }, + { + "name": "offset", + "nativeSrc": "14710:6:8", + "nodeType": "YulIdentifier", + "src": "14710:6:8" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "14687:3:8", + "nodeType": "YulIdentifier", + "src": "14687:3:8" + }, + "nativeSrc": "14687:30:8", + "nodeType": "YulFunctionCall", + "src": "14687:30:8" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "14681:5:8", + "nodeType": "YulIdentifier", + "src": "14681:5:8" + }, + "nativeSrc": "14681:37:8", + "nodeType": "YulFunctionCall", + "src": "14681:37:8" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "14672:5:8", + "nodeType": "YulIdentifier", + "src": "14672:5:8" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1622, + "isOffset": false, + "isSlot": false, + "src": "14695:6:8", + "valueSize": 1 + }, + { + "declaration": 1624, + "isOffset": false, + "isSlot": false, + "src": "14710:6:8", + "valueSize": 1 + }, + { + "declaration": 1627, + "isOffset": false, + "isSlot": false, + "src": "14672:5:8", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1629, + "nodeType": "InlineAssembly", + "src": "14633:95:8" + } + ] + }, + "documentation": { + "id": 1620, + "nodeType": "StructuredDocumentation", + "src": "14130:268:8", + "text": " @dev Reads a bytes32 from a bytes array without bounds checking.\n NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n assembly block as such would prevent some optimizations." + }, + "id": 1631, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_unsafeReadBytesOffset", + "nameLocation": "14412:22:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1625, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1622, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "14448:6:8", + "nodeType": "VariableDeclaration", + "scope": 1631, + "src": "14435:19:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1621, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "14435:5:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1624, + "mutability": "mutable", + "name": "offset", + "nameLocation": "14464:6:8", + "nodeType": "VariableDeclaration", + "scope": 1631, + "src": "14456:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1623, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14456:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14434:37:8" + }, + "returnParameters": { + "id": 1628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1627, + "mutability": "mutable", + "name": "value", + "nameLocation": "14502:5:8", + "nodeType": "VariableDeclaration", + "scope": 1631, + "src": "14494:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1626, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "14494:7:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "14493:15:8" + }, + "scope": 1632, + "src": "14403:331:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1633, + "src": "198:14538:8", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "99:14638:8" + }, + "id": 8 + }, + "@openzeppelin/contracts/utils/Context.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/Context.sol", + "exportedSymbols": { + "Context": [ + 1662 + ] + }, + "id": 1663, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1634, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "101:24:9" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "Context", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 1635, + "nodeType": "StructuredDocumentation", + "src": "127:496:9", + "text": " @dev Provides information about the current execution context, including the\n sender of the transaction and its data. While these are generally available\n via msg.sender and msg.data, they should not be accessed in such a direct\n manner, since when dealing with meta-transactions the account sending and\n paying for execution may not be the actual sender (as far as an application\n is concerned).\n This contract is only required for intermediate, library-like contracts." + }, + "fullyImplemented": true, + "id": 1662, + "linearizedBaseContracts": [ + 1662 + ], + "name": "Context", + "nameLocation": "642:7:9", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1643, + "nodeType": "Block", + "src": "718:34:9", + "statements": [ + { + "expression": { + "expression": { + "id": 1640, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "735:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "739:6:9", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "735:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1639, + "id": 1642, + "nodeType": "Return", + "src": "728:17:9" + } + ] + }, + "id": 1644, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgSender", + "nameLocation": "665:10:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1636, + "nodeType": "ParameterList", + "parameters": [], + "src": "675:2:9" + }, + "returnParameters": { + "id": 1639, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1638, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1644, + "src": "709:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1637, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "709:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "708:9:9" + }, + "scope": 1662, + "src": "656:96:9", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1652, + "nodeType": "Block", + "src": "825:32:9", + "statements": [ + { + "expression": { + "expression": { + "id": 1649, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "842:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "846:4:9", + "memberName": "data", + "nodeType": "MemberAccess", + "src": "842:8:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "functionReturnParameters": 1648, + "id": 1651, + "nodeType": "Return", + "src": "835:15:9" + } + ] + }, + "id": 1653, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgData", + "nameLocation": "767:8:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1645, + "nodeType": "ParameterList", + "parameters": [], + "src": "775:2:9" + }, + "returnParameters": { + "id": 1648, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1647, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1653, + "src": "809:14:9", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1646, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "809:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "808:16:9" + }, + "scope": 1662, + "src": "758:99:9", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1660, + "nodeType": "Block", + "src": "935:25:9", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 1658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "952:1:9", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1657, + "id": 1659, + "nodeType": "Return", + "src": "945:8:9" + } + ] + }, + "id": 1661, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_contextSuffixLength", + "nameLocation": "872:20:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1654, + "nodeType": "ParameterList", + "parameters": [], + "src": "892:2:9" + }, + "returnParameters": { + "id": 1657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1656, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1661, + "src": "926:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "926:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "925:9:9" + }, + "scope": 1662, + "src": "863:97:9", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 1663, + "src": "624:338:9", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "101:862:9" + }, + "id": 9 + }, + "@openzeppelin/contracts/utils/Panic.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/Panic.sol", + "exportedSymbols": { + "Panic": [ + 1714 + ] + }, + "id": 1715, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1664, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "99:24:10" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Panic", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 1665, + "nodeType": "StructuredDocumentation", + "src": "125:489:10", + "text": " @dev Helper library for emitting standardized panic codes.\n ```solidity\n contract Example {\n using Panic for uint256;\n // Use any of the declared internal constants\n function foo() { Panic.GENERIC.panic(); }\n // Alternatively\n function foo() { Panic.panic(Panic.GENERIC); }\n }\n ```\n Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n _Available since v5.1._" + }, + "fullyImplemented": true, + "id": 1714, + "linearizedBaseContracts": [ + 1714 + ], + "name": "Panic", + "nameLocation": "665:5:10", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "documentation": { + "id": 1666, + "nodeType": "StructuredDocumentation", + "src": "677:36:10", + "text": "@dev generic / unspecified error" + }, + "id": 1669, + "mutability": "constant", + "name": "GENERIC", + "nameLocation": "744:7:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "718:40:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1667, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783030", + "id": 1668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "754:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x00" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1670, + "nodeType": "StructuredDocumentation", + "src": "764:37:10", + "text": "@dev used by the assert() builtin" + }, + "id": 1673, + "mutability": "constant", + "name": "ASSERT", + "nameLocation": "832:6:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "806:39:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "806:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783031", + "id": 1672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "841:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "0x01" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1674, + "nodeType": "StructuredDocumentation", + "src": "851:41:10", + "text": "@dev arithmetic underflow or overflow" + }, + "id": 1677, + "mutability": "constant", + "name": "UNDER_OVERFLOW", + "nameLocation": "923:14:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "897:47:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1675, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "897:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783131", + "id": 1676, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "940:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_17_by_1", + "typeString": "int_const 17" + }, + "value": "0x11" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1678, + "nodeType": "StructuredDocumentation", + "src": "950:35:10", + "text": "@dev division or modulo by zero" + }, + "id": 1681, + "mutability": "constant", + "name": "DIVISION_BY_ZERO", + "nameLocation": "1016:16:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "990:49:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "990:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783132", + "id": 1680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1035:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "0x12" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1682, + "nodeType": "StructuredDocumentation", + "src": "1045:30:10", + "text": "@dev enum conversion error" + }, + "id": 1685, + "mutability": "constant", + "name": "ENUM_CONVERSION_ERROR", + "nameLocation": "1106:21:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1080:54:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1683, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1080:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783231", + "id": 1684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1130:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_33_by_1", + "typeString": "int_const 33" + }, + "value": "0x21" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1686, + "nodeType": "StructuredDocumentation", + "src": "1140:36:10", + "text": "@dev invalid encoding in storage" + }, + "id": 1689, + "mutability": "constant", + "name": "STORAGE_ENCODING_ERROR", + "nameLocation": "1207:22:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1181:55:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1181:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783232", + "id": 1688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1232:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "0x22" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1690, + "nodeType": "StructuredDocumentation", + "src": "1242:24:10", + "text": "@dev empty array pop" + }, + "id": 1693, + "mutability": "constant", + "name": "EMPTY_ARRAY_POP", + "nameLocation": "1297:15:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1271:48:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1691, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1271:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783331", + "id": 1692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1315:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_49_by_1", + "typeString": "int_const 49" + }, + "value": "0x31" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1694, + "nodeType": "StructuredDocumentation", + "src": "1325:35:10", + "text": "@dev array out of bounds access" + }, + "id": 1697, + "mutability": "constant", + "name": "ARRAY_OUT_OF_BOUNDS", + "nameLocation": "1391:19:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1365:52:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1695, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1365:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783332", + "id": 1696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1413:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "0x32" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1698, + "nodeType": "StructuredDocumentation", + "src": "1423:65:10", + "text": "@dev resource error (too large allocation or too large array)" + }, + "id": 1701, + "mutability": "constant", + "name": "RESOURCE_ERROR", + "nameLocation": "1519:14:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1493:47:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1493:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783431", + "id": 1700, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1536:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "0x41" + }, + "visibility": "internal" + }, + { + "constant": true, + "documentation": { + "id": 1702, + "nodeType": "StructuredDocumentation", + "src": "1546:42:10", + "text": "@dev calling invalid internal function" + }, + "id": 1705, + "mutability": "constant", + "name": "INVALID_INTERNAL_FUNCTION", + "nameLocation": "1619:25:10", + "nodeType": "VariableDeclaration", + "scope": 1714, + "src": "1593:58:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1703, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1593:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "30783531", + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1647:4:10", + "typeDescriptions": { + "typeIdentifier": "t_rational_81_by_1", + "typeString": "int_const 81" + }, + "value": "0x51" + }, + "visibility": "internal" + }, + { + "body": { + "id": 1712, + "nodeType": "Block", + "src": "1819:151:10", + "statements": [ + { + "AST": { + "nativeSrc": "1854:110:10", + "nodeType": "YulBlock", + "src": "1854:110:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1875:4:10", + "nodeType": "YulLiteral", + "src": "1875:4:10", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "1881:10:10", + "nodeType": "YulLiteral", + "src": "1881:10:10", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1868:6:10", + "nodeType": "YulIdentifier", + "src": "1868:6:10" + }, + "nativeSrc": "1868:24:10", + "nodeType": "YulFunctionCall", + "src": "1868:24:10" + }, + "nativeSrc": "1868:24:10", + "nodeType": "YulExpressionStatement", + "src": "1868:24:10" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1912:4:10", + "nodeType": "YulLiteral", + "src": "1912:4:10", + "type": "", + "value": "0x20" + }, + { + "name": "code", + "nativeSrc": "1918:4:10", + "nodeType": "YulIdentifier", + "src": "1918:4:10" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1905:6:10", + "nodeType": "YulIdentifier", + "src": "1905:6:10" + }, + "nativeSrc": "1905:18:10", + "nodeType": "YulFunctionCall", + "src": "1905:18:10" + }, + "nativeSrc": "1905:18:10", + "nodeType": "YulExpressionStatement", + "src": "1905:18:10" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1943:4:10", + "nodeType": "YulLiteral", + "src": "1943:4:10", + "type": "", + "value": "0x1c" + }, + { + "kind": "number", + "nativeSrc": "1949:4:10", + "nodeType": "YulLiteral", + "src": "1949:4:10", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1936:6:10", + "nodeType": "YulIdentifier", + "src": "1936:6:10" + }, + "nativeSrc": "1936:18:10", + "nodeType": "YulFunctionCall", + "src": "1936:18:10" + }, + "nativeSrc": "1936:18:10", + "nodeType": "YulExpressionStatement", + "src": "1936:18:10" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1708, + "isOffset": false, + "isSlot": false, + "src": "1918:4:10", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1711, + "nodeType": "InlineAssembly", + "src": "1829:135:10" + } + ] + }, + "documentation": { + "id": 1706, + "nodeType": "StructuredDocumentation", + "src": "1658:113:10", + "text": "@dev Reverts with a panic code. Recommended to use with\n the internal constants with predefined codes." + }, + "id": 1713, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "panic", + "nameLocation": "1785:5:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1708, + "mutability": "mutable", + "name": "code", + "nameLocation": "1799:4:10", + "nodeType": "VariableDeclaration", + "scope": 1713, + "src": "1791:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1707, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1791:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1790:14:10" + }, + "returnParameters": { + "id": 1710, + "nodeType": "ParameterList", + "parameters": [], + "src": "1819:0:10" + }, + "scope": 1714, + "src": "1776:194:10", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1715, + "src": "657:1315:10", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "99:1874:10" + }, + "id": 10 + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "exportedSymbols": { + "ReentrancyGuard": [ + 1827 + ], + "StorageSlot": [ + 2168 + ] + }, + "id": 1828, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1716, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "109:24:11" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/StorageSlot.sol", + "file": "./StorageSlot.sol", + "id": 1718, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1828, + "sourceUnit": 2169, + "src": "135:46:11", + "symbolAliases": [ + { + "foreign": { + "id": 1717, + "name": "StorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "143:11:11", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "ReentrancyGuard", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 1719, + "nodeType": "StructuredDocumentation", + "src": "183:1066:11", + "text": " @dev Contract module that helps prevent reentrant calls to a function.\n Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n available, which can be applied to functions to make sure there are no nested\n (reentrant) calls to them.\n Note that because there is a single `nonReentrant` guard, functions marked as\n `nonReentrant` may not call one another. This can be worked around by making\n those functions `private`, and then adding `external` `nonReentrant` entry\n points to them.\n TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,\n consider using {ReentrancyGuardTransient} instead.\n TIP: If you would like to learn more about reentrancy and alternative ways\n to protect against it, check out our blog post\n https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n IMPORTANT: Deprecated. This storage-based reentrancy guard will be removed and replaced\n by the {ReentrancyGuardTransient} variant in v6.0.\n @custom:stateless" + }, + "fullyImplemented": true, + "id": 1827, + "linearizedBaseContracts": [ + 1827 + ], + "name": "ReentrancyGuard", + "nameLocation": "1268:15:11", + "nodeType": "ContractDefinition", + "nodes": [ + { + "global": false, + "id": 1722, + "libraryName": { + "id": 1720, + "name": "StorageSlot", + "nameLocations": [ + "1296:11:11" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2168, + "src": "1296:11:11" + }, + "nodeType": "UsingForDirective", + "src": "1290:30:11", + "typeName": { + "id": 1721, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1312:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + { + "constant": true, + "id": 1725, + "mutability": "constant", + "name": "REENTRANCY_GUARD_STORAGE", + "nameLocation": "1470:24:11", + "nodeType": "VariableDeclaration", + "scope": 1827, + "src": "1445:126:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1723, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1445:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "hexValue": "307839623737396231373432326430646639323232333031386233326234643166613436653037313732336436383137653234383664303033626563633535663030", + "id": 1724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1505:66:11", + "typeDescriptions": { + "typeIdentifier": "t_rational_70319816728846589445362000750570655803700195216363692647688146666176345628416_by_1", + "typeString": "int_const 7031...(69 digits omitted)...8416" + }, + "value": "0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 1728, + "mutability": "constant", + "name": "NOT_ENTERED", + "nameLocation": "2351:11:11", + "nodeType": "VariableDeclaration", + "scope": 1827, + "src": "2326:40:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2326:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "31", + "id": 1727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2365:1:11", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 1731, + "mutability": "constant", + "name": "ENTERED", + "nameLocation": "2397:7:11", + "nodeType": "VariableDeclaration", + "scope": 1827, + "src": "2372:36:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1729, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2372:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "32", + "id": 1730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2407:1:11", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "visibility": "private" + }, + { + "documentation": { + "id": 1732, + "nodeType": "StructuredDocumentation", + "src": "2415:52:11", + "text": " @dev Unauthorized reentrant call." + }, + "errorSelector": "3ee5aeb5", + "id": 1734, + "name": "ReentrancyGuardReentrantCall", + "nameLocation": "2478:28:11", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1733, + "nodeType": "ParameterList", + "parameters": [], + "src": "2506:2:11" + }, + "src": "2472:37:11" + }, + { + "body": { + "id": 1745, + "nodeType": "Block", + "src": "2529:83:11", + "statements": [ + { + "expression": { + "id": 1743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1737, + "name": "_reentrancyGuardStorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1826, + "src": "2539:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2539:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2569:14:11", + "memberName": "getUint256Slot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2112, + "src": "2539:44:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_Uint256Slot_$2059_storage_ptr_$attached_to$_t_bytes32_$", + "typeString": "function (bytes32) pure returns (struct StorageSlot.Uint256Slot storage pointer)" + } + }, + "id": 1740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2539:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot storage pointer" + } + }, + "id": 1741, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "2586:5:11", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2058, + "src": "2539:52:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1742, + "name": "NOT_ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1728, + "src": "2594:11:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2539:66:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1744, + "nodeType": "ExpressionStatement", + "src": "2539:66:11" + } + ] + }, + "id": 1746, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1735, + "nodeType": "ParameterList", + "parameters": [], + "src": "2526:2:11" + }, + "returnParameters": { + "id": 1736, + "nodeType": "ParameterList", + "parameters": [], + "src": "2529:0:11" + }, + "scope": 1827, + "src": "2515:97:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1756, + "nodeType": "Block", + "src": "3013:79:11", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1749, + "name": "_nonReentrantBefore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1791, + "src": "3023:19:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3023:21:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1751, + "nodeType": "ExpressionStatement", + "src": "3023:21:11" + }, + { + "id": 1752, + "nodeType": "PlaceholderStatement", + "src": "3054:1:11" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1753, + "name": "_nonReentrantAfter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1803, + "src": "3065:18:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3065:20:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1755, + "nodeType": "ExpressionStatement", + "src": "3065:20:11" + } + ] + }, + "documentation": { + "id": 1747, + "nodeType": "StructuredDocumentation", + "src": "2618:366:11", + "text": " @dev Prevents a contract from calling itself, directly or indirectly.\n Calling a `nonReentrant` function from another `nonReentrant`\n function is not supported. It is possible to prevent this from happening\n by making the `nonReentrant` function external, and making it call a\n `private` function that does the actual work." + }, + "id": 1757, + "name": "nonReentrant", + "nameLocation": "2998:12:11", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1748, + "nodeType": "ParameterList", + "parameters": [], + "src": "3010:2:11" + }, + "src": "2989:103:11", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1764, + "nodeType": "Block", + "src": "3527:53:11", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1760, + "name": "_nonReentrantBeforeView", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1776, + "src": "3537:23:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 1761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3537:25:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1762, + "nodeType": "ExpressionStatement", + "src": "3537:25:11" + }, + { + "id": 1763, + "nodeType": "PlaceholderStatement", + "src": "3572:1:11" + } + ] + }, + "documentation": { + "id": 1758, + "nodeType": "StructuredDocumentation", + "src": "3098:396:11", + "text": " @dev A `view` only version of {nonReentrant}. Use to block view functions\n from being called, preventing reading from inconsistent contract state.\n CAUTION: This is a \"view\" modifier and does not change the reentrancy\n status. Use it only on view functions. For payable or non-payable functions,\n use the standard {nonReentrant} modifier instead." + }, + "id": 1765, + "name": "nonReentrantView", + "nameLocation": "3508:16:11", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1759, + "nodeType": "ParameterList", + "parameters": [], + "src": "3524:2:11" + }, + "src": "3499:81:11", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1775, + "nodeType": "Block", + "src": "3634:109:11", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1768, + "name": "_reentrancyGuardEntered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1818, + "src": "3648:23:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 1769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3648:25:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1774, + "nodeType": "IfStatement", + "src": "3644:93:11", + "trueBody": { + "id": 1773, + "nodeType": "Block", + "src": "3675:62:11", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1770, + "name": "ReentrancyGuardReentrantCall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1734, + "src": "3696:28:11", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 1771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3696:30:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 1772, + "nodeType": "RevertStatement", + "src": "3689:37:11" + } + ] + } + } + ] + }, + "id": 1776, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_nonReentrantBeforeView", + "nameLocation": "3595:23:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1766, + "nodeType": "ParameterList", + "parameters": [], + "src": "3618:2:11" + }, + "returnParameters": { + "id": 1767, + "nodeType": "ParameterList", + "parameters": [], + "src": "3634:0:11" + }, + "scope": 1827, + "src": "3586:157:11", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1790, + "nodeType": "Block", + "src": "3788:253:11", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1779, + "name": "_nonReentrantBeforeView", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1776, + "src": "3872:23:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 1780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3872:25:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1781, + "nodeType": "ExpressionStatement", + "src": "3872:25:11" + }, + { + "expression": { + "id": 1788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1782, + "name": "_reentrancyGuardStorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1826, + "src": "3972:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3972:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4002:14:11", + "memberName": "getUint256Slot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2112, + "src": "3972:44:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_Uint256Slot_$2059_storage_ptr_$attached_to$_t_bytes32_$", + "typeString": "function (bytes32) pure returns (struct StorageSlot.Uint256Slot storage pointer)" + } + }, + "id": 1785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3972:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot storage pointer" + } + }, + "id": 1786, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "4019:5:11", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2058, + "src": "3972:52:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1787, + "name": "ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1731, + "src": "4027:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3972:62:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1789, + "nodeType": "ExpressionStatement", + "src": "3972:62:11" + } + ] + }, + "id": 1791, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_nonReentrantBefore", + "nameLocation": "3758:19:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1777, + "nodeType": "ParameterList", + "parameters": [], + "src": "3777:2:11" + }, + "returnParameters": { + "id": 1778, + "nodeType": "ParameterList", + "parameters": [], + "src": "3788:0:11" + }, + "scope": 1827, + "src": "3749:292:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1802, + "nodeType": "Block", + "src": "4085:215:11", + "statements": [ + { + "expression": { + "id": 1800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1794, + "name": "_reentrancyGuardStorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1826, + "src": "4227:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4227:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4257:14:11", + "memberName": "getUint256Slot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2112, + "src": "4227:44:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_Uint256Slot_$2059_storage_ptr_$attached_to$_t_bytes32_$", + "typeString": "function (bytes32) pure returns (struct StorageSlot.Uint256Slot storage pointer)" + } + }, + "id": 1797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4227:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot storage pointer" + } + }, + "id": 1798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "4274:5:11", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2058, + "src": "4227:52:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1799, + "name": "NOT_ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1728, + "src": "4282:11:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4227:66:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1801, + "nodeType": "ExpressionStatement", + "src": "4227:66:11" + } + ] + }, + "id": 1803, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_nonReentrantAfter", + "nameLocation": "4056:18:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1792, + "nodeType": "ParameterList", + "parameters": [], + "src": "4074:2:11" + }, + "returnParameters": { + "id": 1793, + "nodeType": "ParameterList", + "parameters": [], + "src": "4085:0:11" + }, + "scope": 1827, + "src": "4047:253:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1817, + "nodeType": "Block", + "src": "4543:87:11", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1809, + "name": "_reentrancyGuardStorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1826, + "src": "4560:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 1810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4560:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4590:14:11", + "memberName": "getUint256Slot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2112, + "src": "4560:44:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_struct$_Uint256Slot_$2059_storage_ptr_$attached_to$_t_bytes32_$", + "typeString": "function (bytes32) pure returns (struct StorageSlot.Uint256Slot storage pointer)" + } + }, + "id": 1812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4560:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot storage pointer" + } + }, + "id": 1813, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4607:5:11", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2058, + "src": "4560:52:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1814, + "name": "ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1731, + "src": "4616:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4560:63:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1808, + "id": 1816, + "nodeType": "Return", + "src": "4553:70:11" + } + ] + }, + "documentation": { + "id": 1804, + "nodeType": "StructuredDocumentation", + "src": "4306:168:11", + "text": " @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n `nonReentrant` function in the call stack." + }, + "id": 1818, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reentrancyGuardEntered", + "nameLocation": "4488:23:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1805, + "nodeType": "ParameterList", + "parameters": [], + "src": "4511:2:11" + }, + "returnParameters": { + "id": 1808, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1807, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1818, + "src": "4537:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1806, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4537:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4536:6:11" + }, + "scope": 1827, + "src": "4479:151:11", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1825, + "nodeType": "Block", + "src": "4715:48:11", + "statements": [ + { + "expression": { + "id": 1823, + "name": "REENTRANCY_GUARD_STORAGE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1725, + "src": "4732:24:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 1822, + "id": 1824, + "nodeType": "Return", + "src": "4725:31:11" + } + ] + }, + "id": 1826, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reentrancyGuardStorageSlot", + "nameLocation": "4645:27:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1819, + "nodeType": "ParameterList", + "parameters": [], + "src": "4672:2:11" + }, + "returnParameters": { + "id": 1822, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1821, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1826, + "src": "4706:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1820, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4706:7:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4705:9:11" + }, + "scope": 1827, + "src": "4636:127:11", + "stateMutability": "pure", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 1828, + "src": "1250:3515:11", + "usedErrors": [ + 1734 + ], + "usedEvents": [] + } + ], + "src": "109:4657:11" + }, + "id": 11 + }, + "@openzeppelin/contracts/utils/ShortStrings.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/ShortStrings.sol", + "exportedSymbols": { + "ShortString": [ + 1833 + ], + "ShortStrings": [ + 2044 + ], + "StorageSlot": [ + 2168 + ] + }, + "id": 2045, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1829, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "106:24:12" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/StorageSlot.sol", + "file": "./StorageSlot.sol", + "id": 1831, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 2045, + "sourceUnit": 2169, + "src": "132:46:12", + "symbolAliases": [ + { + "foreign": { + "id": 1830, + "name": "StorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "140:11:12", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "canonicalName": "ShortString", + "id": 1833, + "name": "ShortString", + "nameLocation": "353:11:12", + "nodeType": "UserDefinedValueTypeDefinition", + "src": "348:28:12", + "underlyingType": { + "id": 1832, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "368:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ShortStrings", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 1834, + "nodeType": "StructuredDocumentation", + "src": "378:876:12", + "text": " @dev This library provides functions to convert short memory strings\n into a `ShortString` type that can be used as an immutable variable.\n Strings of arbitrary length can be optimized using this library if\n they are short enough (up to 31 bytes) by packing them with their\n length (1 byte) in a single EVM word (32 bytes). Additionally, a\n fallback mechanism can be used for every other case.\n Usage example:\n ```solidity\n contract Named {\n using ShortStrings for *;\n ShortString private immutable _name;\n string private _nameFallback;\n constructor(string memory contractName) {\n _name = contractName.toShortStringWithFallback(_nameFallback);\n }\n function name() external view returns (string memory) {\n return _name.toStringWithFallback(_nameFallback);\n }\n }\n ```" + }, + "fullyImplemented": true, + "id": 2044, + "linearizedBaseContracts": [ + 2044 + ], + "name": "ShortStrings", + "nameLocation": "1263:12:12", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 1837, + "mutability": "constant", + "name": "FALLBACK_SENTINEL", + "nameLocation": "1370:17:12", + "nodeType": "VariableDeclaration", + "scope": 2044, + "src": "1345:111:12", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1835, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1345:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "hexValue": "307830303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030304646", + "id": 1836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1390:66:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0x00000000000000000000000000000000000000000000000000000000000000FF" + }, + "visibility": "private" + }, + { + "errorSelector": "305a27a9", + "id": 1841, + "name": "StringTooLong", + "nameLocation": "1469:13:12", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1840, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "str", + "nameLocation": "1490:3:12", + "nodeType": "VariableDeclaration", + "scope": 1841, + "src": "1483:10:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1838, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1483:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1482:12:12" + }, + "src": "1463:32:12" + }, + { + "errorSelector": "b3512b0c", + "id": 1843, + "name": "InvalidShortString", + "nameLocation": "1506:18:12", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1842, + "nodeType": "ParameterList", + "parameters": [], + "src": "1524:2:12" + }, + "src": "1500:27:12" + }, + { + "body": { + "id": 1886, + "nodeType": "Block", + "src": "1786:210:12", + "statements": [ + { + "assignments": [ + 1853 + ], + "declarations": [ + { + "constant": false, + "id": 1853, + "mutability": "mutable", + "name": "bstr", + "nameLocation": "1809:4:12", + "nodeType": "VariableDeclaration", + "scope": 1886, + "src": "1796:17:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1852, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1796:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 1858, + "initialValue": { + "arguments": [ + { + "id": 1856, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1846, + "src": "1822:3:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1816:5:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 1854, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1816:5:12", + "typeDescriptions": {} + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1816:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1796:30:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1859, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1853, + "src": "1840:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1845:6:12", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1840:11:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30783166", + "id": 1861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1854:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_31_by_1", + "typeString": "int_const 31" + }, + "value": "0x1f" + }, + "src": "1840:18:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1868, + "nodeType": "IfStatement", + "src": "1836:74:12", + "trueBody": { + "id": 1867, + "nodeType": "Block", + "src": "1860:50:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1864, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1846, + "src": "1895:3:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1863, + "name": "StringTooLong", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "1881:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_string_memory_ptr_$returns$_t_error_$", + "typeString": "function (string memory) pure returns (error)" + } + }, + "id": 1865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1881:18:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 1866, + "nodeType": "RevertStatement", + "src": "1874:25:12" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1877, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1853, + "src": "1967:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1959:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1875, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1959:7:12", + "typeDescriptions": {} + } + }, + "id": 1878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1959:13:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1874, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1951:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1873, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1951:7:12", + "typeDescriptions": {} + } + }, + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1951:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "expression": { + "id": 1880, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1853, + "src": "1976:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1981:6:12", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1976:11:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1951:36:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1943:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1871, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1943:7:12", + "typeDescriptions": {} + } + }, + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1943:45:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 1869, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "1926:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 1870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1938:4:12", + "memberName": "wrap", + "nodeType": "MemberAccess", + "src": "1926:16:12", + "typeDescriptions": { + "typeIdentifier": "t_function_wrap_pure$_t_bytes32_$returns$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (bytes32) pure returns (ShortString)" + } + }, + "id": 1884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1926:63:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "functionReturnParameters": 1851, + "id": 1885, + "nodeType": "Return", + "src": "1919:70:12" + } + ] + }, + "documentation": { + "id": 1844, + "nodeType": "StructuredDocumentation", + "src": "1533:170:12", + "text": " @dev Encode a string of at most 31 chars into a `ShortString`.\n This will trigger a `StringTooLong` error is the input string is too long." + }, + "id": 1887, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toShortString", + "nameLocation": "1717:13:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1847, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1846, + "mutability": "mutable", + "name": "str", + "nameLocation": "1745:3:12", + "nodeType": "VariableDeclaration", + "scope": 1887, + "src": "1731:17:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1845, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1731:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1730:19:12" + }, + "returnParameters": { + "id": 1851, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1850, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1887, + "src": "1773:11:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1849, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1848, + "name": "ShortString", + "nameLocations": [ + "1773:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "1773:11:12" + }, + "referencedDeclaration": 1833, + "src": "1773:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + } + ], + "src": "1772:13:12" + }, + "scope": 2044, + "src": "1708:288:12", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1912, + "nodeType": "Block", + "src": "2154:306:12", + "statements": [ + { + "assignments": [ + 1897 + ], + "declarations": [ + { + "constant": false, + "id": 1897, + "mutability": "mutable", + "name": "len", + "nameLocation": "2172:3:12", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2164:11:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2164:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1901, + "initialValue": { + "arguments": [ + { + "id": 1899, + "name": "sstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1891, + "src": "2189:4:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "id": 1898, + "name": "byteLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1945, + "src": "2178:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_uint256_$", + "typeString": "function (ShortString) pure returns (uint256)" + } + }, + "id": 1900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2178:16:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2164:30:12" + }, + { + "assignments": [ + 1903 + ], + "declarations": [ + { + "constant": false, + "id": 1903, + "mutability": "mutable", + "name": "str", + "nameLocation": "2296:3:12", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "2282:17:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1902, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2282:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "id": 1908, + "initialValue": { + "arguments": [ + { + "hexValue": "30783230", + "id": 1906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2313:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + } + ], + "id": 1905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2302:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + }, + "typeName": { + "id": 1904, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2306:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + "id": 1907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2302:16:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2282:36:12" + }, + { + "AST": { + "nativeSrc": "2353:81:12", + "nodeType": "YulBlock", + "src": "2353:81:12", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "str", + "nativeSrc": "2374:3:12", + "nodeType": "YulIdentifier", + "src": "2374:3:12" + }, + { + "name": "len", + "nativeSrc": "2379:3:12", + "nodeType": "YulIdentifier", + "src": "2379:3:12" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2367:6:12", + "nodeType": "YulIdentifier", + "src": "2367:6:12" + }, + "nativeSrc": "2367:16:12", + "nodeType": "YulFunctionCall", + "src": "2367:16:12" + }, + "nativeSrc": "2367:16:12", + "nodeType": "YulExpressionStatement", + "src": "2367:16:12" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "str", + "nativeSrc": "2407:3:12", + "nodeType": "YulIdentifier", + "src": "2407:3:12" + }, + { + "kind": "number", + "nativeSrc": "2412:4:12", + "nodeType": "YulLiteral", + "src": "2412:4:12", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2403:3:12", + "nodeType": "YulIdentifier", + "src": "2403:3:12" + }, + "nativeSrc": "2403:14:12", + "nodeType": "YulFunctionCall", + "src": "2403:14:12" + }, + { + "name": "sstr", + "nativeSrc": "2419:4:12", + "nodeType": "YulIdentifier", + "src": "2419:4:12" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2396:6:12", + "nodeType": "YulIdentifier", + "src": "2396:6:12" + }, + "nativeSrc": "2396:28:12", + "nodeType": "YulFunctionCall", + "src": "2396:28:12" + }, + "nativeSrc": "2396:28:12", + "nodeType": "YulExpressionStatement", + "src": "2396:28:12" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 1897, + "isOffset": false, + "isSlot": false, + "src": "2379:3:12", + "valueSize": 1 + }, + { + "declaration": 1891, + "isOffset": false, + "isSlot": false, + "src": "2419:4:12", + "valueSize": 1 + }, + { + "declaration": 1903, + "isOffset": false, + "isSlot": false, + "src": "2374:3:12", + "valueSize": 1 + }, + { + "declaration": 1903, + "isOffset": false, + "isSlot": false, + "src": "2407:3:12", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 1909, + "nodeType": "InlineAssembly", + "src": "2328:106:12" + }, + { + "expression": { + "id": 1910, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1903, + "src": "2450:3:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1895, + "id": 1911, + "nodeType": "Return", + "src": "2443:10:12" + } + ] + }, + "documentation": { + "id": 1888, + "nodeType": "StructuredDocumentation", + "src": "2002:73:12", + "text": " @dev Decode a `ShortString` back to a \"normal\" string." + }, + "id": 1913, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toString", + "nameLocation": "2089:8:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1892, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "sstr", + "nameLocation": "2110:4:12", + "nodeType": "VariableDeclaration", + "scope": 1913, + "src": "2098:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1890, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1889, + "name": "ShortString", + "nameLocations": [ + "2098:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2098:11:12" + }, + "referencedDeclaration": 1833, + "src": "2098:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + } + ], + "src": "2097:18:12" + }, + "returnParameters": { + "id": 1895, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1894, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1913, + "src": "2139:13:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1893, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2139:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2138:15:12" + }, + "scope": 2044, + "src": "2080:380:12", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1944, + "nodeType": "Block", + "src": "2602:177:12", + "statements": [ + { + "assignments": [ + 1923 + ], + "declarations": [ + { + "constant": false, + "id": 1923, + "mutability": "mutable", + "name": "result", + "nameLocation": "2620:6:12", + "nodeType": "VariableDeclaration", + "scope": 1944, + "src": "2612:14:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1922, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2612:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1933, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1928, + "name": "sstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1917, + "src": "2656:4:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "expression": { + "id": 1926, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "2637:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2649:6:12", + "memberName": "unwrap", + "nodeType": "MemberAccess", + "src": "2637:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_bytes32_$", + "typeString": "function (ShortString) pure returns (bytes32)" + } + }, + "id": 1929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2637:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2629:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1924, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2629:7:12", + "typeDescriptions": {} + } + }, + "id": 1930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2629:33:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30784646", + "id": 1931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2665:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0xFF" + }, + "src": "2629:40:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2612:57:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1934, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1923, + "src": "2683:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30783166", + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2692:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_31_by_1", + "typeString": "int_const 31" + }, + "value": "0x1f" + }, + "src": "2683:13:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1941, + "nodeType": "IfStatement", + "src": "2679:71:12", + "trueBody": { + "id": 1940, + "nodeType": "Block", + "src": "2698:52:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1937, + "name": "InvalidShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1843, + "src": "2719:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 1938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2719:20:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 1939, + "nodeType": "RevertStatement", + "src": "2712:27:12" + } + ] + } + }, + { + "expression": { + "id": 1942, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1923, + "src": "2766:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1921, + "id": 1943, + "nodeType": "Return", + "src": "2759:13:12" + } + ] + }, + "documentation": { + "id": 1914, + "nodeType": "StructuredDocumentation", + "src": "2466:61:12", + "text": " @dev Return the length of a `ShortString`." + }, + "id": 1945, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "byteLength", + "nameLocation": "2541:10:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1917, + "mutability": "mutable", + "name": "sstr", + "nameLocation": "2564:4:12", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2552:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1916, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1915, + "name": "ShortString", + "nameLocations": [ + "2552:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2552:11:12" + }, + "referencedDeclaration": 1833, + "src": "2552:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + } + ], + "src": "2551:18:12" + }, + "returnParameters": { + "id": 1921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1920, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1945, + "src": "2593:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1919, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2593:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2592:9:12" + }, + "scope": 2044, + "src": "2532:247:12", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1984, + "nodeType": "Block", + "src": "3002:233:12", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 1958, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1948, + "src": "3022:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3016:5:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 1956, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3016:5:12", + "typeDescriptions": {} + } + }, + "id": 1959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3016:12:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3029:6:12", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3016:19:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "30783230", + "id": 1961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3038:4:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "3016:26:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1982, + "nodeType": "Block", + "src": "3102:127:12", + "statements": [ + { + "expression": { + "id": 1975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [ + { + "id": 1971, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1950, + "src": "3142:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + ], + "expression": { + "id": 1968, + "name": "StorageSlot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2168, + "src": "3116:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_StorageSlot_$2168_$", + "typeString": "type(library StorageSlot)" + } + }, + "id": 1970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3128:13:12", + "memberName": "getStringSlot", + "nodeType": "MemberAccess", + "referencedDeclaration": 2145, + "src": "3116:25:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_storage_ptr_$returns$_t_struct$_StringSlot_$2065_storage_ptr_$", + "typeString": "function (string storage pointer) pure returns (struct StorageSlot.StringSlot storage pointer)" + } + }, + "id": 1972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3116:32:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot storage pointer" + } + }, + "id": 1973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "3149:5:12", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 2064, + "src": "3116:38:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1974, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1948, + "src": "3157:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3116:46:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 1976, + "nodeType": "ExpressionStatement", + "src": "3116:46:12" + }, + { + "expression": { + "arguments": [ + { + "id": 1979, + "name": "FALLBACK_SENTINEL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "3200:17:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 1977, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "3183:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 1978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3195:4:12", + "memberName": "wrap", + "nodeType": "MemberAccess", + "src": "3183:16:12", + "typeDescriptions": { + "typeIdentifier": "t_function_wrap_pure$_t_bytes32_$returns$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (bytes32) pure returns (ShortString)" + } + }, + "id": 1980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3183:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "functionReturnParameters": 1955, + "id": 1981, + "nodeType": "Return", + "src": "3176:42:12" + } + ] + }, + "id": 1983, + "nodeType": "IfStatement", + "src": "3012:217:12", + "trueBody": { + "id": 1967, + "nodeType": "Block", + "src": "3044:52:12", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1964, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1948, + "src": "3079:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1963, + "name": "toShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1887, + "src": "3065:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (string memory) pure returns (ShortString)" + } + }, + "id": 1965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3065:20:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "functionReturnParameters": 1955, + "id": 1966, + "nodeType": "Return", + "src": "3058:27:12" + } + ] + } + } + ] + }, + "documentation": { + "id": 1946, + "nodeType": "StructuredDocumentation", + "src": "2785:103:12", + "text": " @dev Encode a string into a `ShortString`, or write it to storage if it is too long." + }, + "id": 1985, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toShortStringWithFallback", + "nameLocation": "2902:25:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1951, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1948, + "mutability": "mutable", + "name": "value", + "nameLocation": "2942:5:12", + "nodeType": "VariableDeclaration", + "scope": 1985, + "src": "2928:19:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1947, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2928:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1950, + "mutability": "mutable", + "name": "store", + "nameLocation": "2964:5:12", + "nodeType": "VariableDeclaration", + "scope": 1985, + "src": "2949:20:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1949, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2949:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2927:43:12" + }, + "returnParameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1985, + "src": "2989:11:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1953, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1952, + "name": "ShortString", + "nameLocations": [ + "2989:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2989:11:12" + }, + "referencedDeclaration": 1833, + "src": "2989:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + } + ], + "src": "2988:13:12" + }, + "scope": 2044, + "src": "2893:342:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2011, + "nodeType": "Block", + "src": "3485:158:12", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 2001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1998, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1989, + "src": "3518:5:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "expression": { + "id": 1996, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "3499:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 1997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3511:6:12", + "memberName": "unwrap", + "nodeType": "MemberAccess", + "src": "3499:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_bytes32_$", + "typeString": "function (ShortString) pure returns (bytes32)" + } + }, + "id": 1999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3499:25:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 2000, + "name": "FALLBACK_SENTINEL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "3528:17:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3499:46:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2009, + "nodeType": "Block", + "src": "3600:37:12", + "statements": [ + { + "expression": { + "id": 2007, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1991, + "src": "3621:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + }, + "functionReturnParameters": 1995, + "id": 2008, + "nodeType": "Return", + "src": "3614:12:12" + } + ] + }, + "id": 2010, + "nodeType": "IfStatement", + "src": "3495:142:12", + "trueBody": { + "id": 2006, + "nodeType": "Block", + "src": "3547:47:12", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2003, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1989, + "src": "3577:5:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "id": 2002, + "name": "toString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1913, + "src": "3568:8:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_string_memory_ptr_$", + "typeString": "function (ShortString) pure returns (string memory)" + } + }, + "id": 2004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3568:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1995, + "id": 2005, + "nodeType": "Return", + "src": "3561:22:12" + } + ] + } + } + ] + }, + "documentation": { + "id": 1986, + "nodeType": "StructuredDocumentation", + "src": "3241:130:12", + "text": " @dev Decode a string that was encoded to `ShortString` or written to storage using {toShortStringWithFallback}." + }, + "id": 2012, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toStringWithFallback", + "nameLocation": "3385:20:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1989, + "mutability": "mutable", + "name": "value", + "nameLocation": "3418:5:12", + "nodeType": "VariableDeclaration", + "scope": 2012, + "src": "3406:17:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 1988, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1987, + "name": "ShortString", + "nameLocations": [ + "3406:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "3406:11:12" + }, + "referencedDeclaration": 1833, + "src": "3406:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1991, + "mutability": "mutable", + "name": "store", + "nameLocation": "3440:5:12", + "nodeType": "VariableDeclaration", + "scope": 2012, + "src": "3425:20:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1990, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3425:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3405:41:12" + }, + "returnParameters": { + "id": 1995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1994, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2012, + "src": "3470:13:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1993, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3470:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3469:15:12" + }, + "scope": 2044, + "src": "3376:267:12", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2042, + "nodeType": "Block", + "src": "4133:174:12", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2025, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2016, + "src": "4166:5:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "expression": { + "id": 2023, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "4147:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "type(ShortString)" + } + }, + "id": 2024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4159:6:12", + "memberName": "unwrap", + "nodeType": "MemberAccess", + "src": "4147:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_unwrap_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_bytes32_$", + "typeString": "function (ShortString) pure returns (bytes32)" + } + }, + "id": 2026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4147:25:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 2027, + "name": "FALLBACK_SENTINEL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "4176:17:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "4147:46:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2040, + "nodeType": "Block", + "src": "4250:51:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2036, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2018, + "src": "4277:5:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string storage pointer" + } + ], + "id": 2035, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4271:5:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2034, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4271:5:12", + "typeDescriptions": {} + } + }, + "id": 2037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4271:12:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 2038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4284:6:12", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4271:19:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2022, + "id": 2039, + "nodeType": "Return", + "src": "4264:26:12" + } + ] + }, + "id": 2041, + "nodeType": "IfStatement", + "src": "4143:158:12", + "trueBody": { + "id": 2033, + "nodeType": "Block", + "src": "4195:49:12", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2030, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2016, + "src": "4227:5:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + ], + "id": 2029, + "name": "byteLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1945, + "src": "4216:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$returns$_t_uint256_$", + "typeString": "function (ShortString) pure returns (uint256)" + } + }, + "id": 2031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4216:17:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2022, + "id": 2032, + "nodeType": "Return", + "src": "4209:24:12" + } + ] + } + } + ] + }, + "documentation": { + "id": 2013, + "nodeType": "StructuredDocumentation", + "src": "3649:374:12", + "text": " @dev Return the length of a string that was encoded to `ShortString` or written to storage using\n {toShortStringWithFallback}.\n WARNING: This will return the \"byte length\" of the string. This may not reflect the actual length in terms of\n actual characters as the UTF-8 encoding of a single character can span over multiple bytes." + }, + "id": 2043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "byteLengthWithFallback", + "nameLocation": "4037:22:12", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2016, + "mutability": "mutable", + "name": "value", + "nameLocation": "4072:5:12", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "4060:17:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 2015, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2014, + "name": "ShortString", + "nameLocations": [ + "4060:11:12" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "4060:11:12" + }, + "referencedDeclaration": 1833, + "src": "4060:11:12", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2018, + "mutability": "mutable", + "name": "store", + "nameLocation": "4094:5:12", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "4079:20:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2017, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4079:6:12", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "4059:41:12" + }, + "returnParameters": { + "id": 2022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "4124:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2020, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4124:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4123:9:12" + }, + "scope": 2044, + "src": "4028:279:12", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2045, + "src": "1255:3054:12", + "usedErrors": [ + 1841, + 1843 + ], + "usedEvents": [] + } + ], + "src": "106:4204:12" + }, + "id": 12 + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/StorageSlot.sol", + "exportedSymbols": { + "StorageSlot": [ + 2168 + ] + }, + "id": 2169, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2046, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "193:24:13" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "StorageSlot", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 2047, + "nodeType": "StructuredDocumentation", + "src": "219:1187:13", + "text": " @dev Library for reading and writing primitive types to specific storage slots.\n Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n This library helps with reading and writing to such slots without the need for inline assembly.\n The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n Example usage to set ERC-1967 implementation slot:\n ```solidity\n contract ERC1967 {\n // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n function _setImplementation(address newImplementation) internal {\n require(newImplementation.code.length > 0);\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n }\n ```\n TIP: Consider using this library along with {SlotDerivation}." + }, + "fullyImplemented": true, + "id": 2168, + "linearizedBaseContracts": [ + 2168 + ], + "name": "StorageSlot", + "nameLocation": "1415:11:13", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "StorageSlot.AddressSlot", + "id": 2050, + "members": [ + { + "constant": false, + "id": 2049, + "mutability": "mutable", + "name": "value", + "nameLocation": "1470:5:13", + "nodeType": "VariableDeclaration", + "scope": 2050, + "src": "1462:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2048, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1462:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "AddressSlot", + "nameLocation": "1440:11:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1433:49:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.BooleanSlot", + "id": 2053, + "members": [ + { + "constant": false, + "id": 2052, + "mutability": "mutable", + "name": "value", + "nameLocation": "1522:5:13", + "nodeType": "VariableDeclaration", + "scope": 2053, + "src": "1517:10:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2051, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1517:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "name": "BooleanSlot", + "nameLocation": "1495:11:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1488:46:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.Bytes32Slot", + "id": 2056, + "members": [ + { + "constant": false, + "id": 2055, + "mutability": "mutable", + "name": "value", + "nameLocation": "1577:5:13", + "nodeType": "VariableDeclaration", + "scope": 2056, + "src": "1569:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2054, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1569:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "name": "Bytes32Slot", + "nameLocation": "1547:11:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1540:49:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.Uint256Slot", + "id": 2059, + "members": [ + { + "constant": false, + "id": 2058, + "mutability": "mutable", + "name": "value", + "nameLocation": "1632:5:13", + "nodeType": "VariableDeclaration", + "scope": 2059, + "src": "1624:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2057, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1624:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Uint256Slot", + "nameLocation": "1602:11:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1595:49:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.Int256Slot", + "id": 2062, + "members": [ + { + "constant": false, + "id": 2061, + "mutability": "mutable", + "name": "value", + "nameLocation": "1685:5:13", + "nodeType": "VariableDeclaration", + "scope": 2062, + "src": "1678:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2060, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1678:6:13", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "name": "Int256Slot", + "nameLocation": "1657:10:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1650:47:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.StringSlot", + "id": 2065, + "members": [ + { + "constant": false, + "id": 2064, + "mutability": "mutable", + "name": "value", + "nameLocation": "1738:5:13", + "nodeType": "VariableDeclaration", + "scope": 2065, + "src": "1731:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2063, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1731:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "name": "StringSlot", + "nameLocation": "1710:10:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1703:47:13", + "visibility": "public" + }, + { + "canonicalName": "StorageSlot.BytesSlot", + "id": 2068, + "members": [ + { + "constant": false, + "id": 2067, + "mutability": "mutable", + "name": "value", + "nameLocation": "1789:5:13", + "nodeType": "VariableDeclaration", + "scope": 2068, + "src": "1783:11:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2066, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1783:5:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "name": "BytesSlot", + "nameLocation": "1763:9:13", + "nodeType": "StructDefinition", + "scope": 2168, + "src": "1756:45:13", + "visibility": "public" + }, + { + "body": { + "id": 2078, + "nodeType": "Block", + "src": "1983:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "2018:38:13", + "nodeType": "YulBlock", + "src": "2018:38:13", + "statements": [ + { + "nativeSrc": "2032:14:13", + "nodeType": "YulAssignment", + "src": "2032:14:13", + "value": { + "name": "slot", + "nativeSrc": "2042:4:13", + "nodeType": "YulIdentifier", + "src": "2042:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "2032:6:13", + "nodeType": "YulIdentifier", + "src": "2032:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2075, + "isOffset": false, + "isSlot": true, + "src": "2032:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2071, + "isOffset": false, + "isSlot": false, + "src": "2042:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2077, + "nodeType": "InlineAssembly", + "src": "1993:63:13" + } + ] + }, + "documentation": { + "id": 2069, + "nodeType": "StructuredDocumentation", + "src": "1807:87:13", + "text": " @dev Returns an `AddressSlot` with member `value` located at `slot`." + }, + "id": 2079, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAddressSlot", + "nameLocation": "1908:14:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2072, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2071, + "mutability": "mutable", + "name": "slot", + "nameLocation": "1931:4:13", + "nodeType": "VariableDeclaration", + "scope": 2079, + "src": "1923:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2070, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1923:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1922:14:13" + }, + "returnParameters": { + "id": 2076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2075, + "mutability": "mutable", + "name": "r", + "nameLocation": "1980:1:13", + "nodeType": "VariableDeclaration", + "scope": 2079, + "src": "1960:21:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSlot_$2050_storage_ptr", + "typeString": "struct StorageSlot.AddressSlot" + }, + "typeName": { + "id": 2074, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2073, + "name": "AddressSlot", + "nameLocations": [ + "1960:11:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2050, + "src": "1960:11:13" + }, + "referencedDeclaration": 2050, + "src": "1960:11:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSlot_$2050_storage_ptr", + "typeString": "struct StorageSlot.AddressSlot" + } + }, + "visibility": "internal" + } + ], + "src": "1959:23:13" + }, + "scope": 2168, + "src": "1899:163:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2089, + "nodeType": "Block", + "src": "2243:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "2278:38:13", + "nodeType": "YulBlock", + "src": "2278:38:13", + "statements": [ + { + "nativeSrc": "2292:14:13", + "nodeType": "YulAssignment", + "src": "2292:14:13", + "value": { + "name": "slot", + "nativeSrc": "2302:4:13", + "nodeType": "YulIdentifier", + "src": "2302:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "2292:6:13", + "nodeType": "YulIdentifier", + "src": "2292:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2086, + "isOffset": false, + "isSlot": true, + "src": "2292:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2082, + "isOffset": false, + "isSlot": false, + "src": "2302:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2088, + "nodeType": "InlineAssembly", + "src": "2253:63:13" + } + ] + }, + "documentation": { + "id": 2080, + "nodeType": "StructuredDocumentation", + "src": "2068:86:13", + "text": " @dev Returns a `BooleanSlot` with member `value` located at `slot`." + }, + "id": 2090, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBooleanSlot", + "nameLocation": "2168:14:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2082, + "mutability": "mutable", + "name": "slot", + "nameLocation": "2191:4:13", + "nodeType": "VariableDeclaration", + "scope": 2090, + "src": "2183:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2081, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2183:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2182:14:13" + }, + "returnParameters": { + "id": 2087, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2086, + "mutability": "mutable", + "name": "r", + "nameLocation": "2240:1:13", + "nodeType": "VariableDeclaration", + "scope": 2090, + "src": "2220:21:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BooleanSlot_$2053_storage_ptr", + "typeString": "struct StorageSlot.BooleanSlot" + }, + "typeName": { + "id": 2085, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2084, + "name": "BooleanSlot", + "nameLocations": [ + "2220:11:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2053, + "src": "2220:11:13" + }, + "referencedDeclaration": 2053, + "src": "2220:11:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BooleanSlot_$2053_storage_ptr", + "typeString": "struct StorageSlot.BooleanSlot" + } + }, + "visibility": "internal" + } + ], + "src": "2219:23:13" + }, + "scope": 2168, + "src": "2159:163:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2100, + "nodeType": "Block", + "src": "2503:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "2538:38:13", + "nodeType": "YulBlock", + "src": "2538:38:13", + "statements": [ + { + "nativeSrc": "2552:14:13", + "nodeType": "YulAssignment", + "src": "2552:14:13", + "value": { + "name": "slot", + "nativeSrc": "2562:4:13", + "nodeType": "YulIdentifier", + "src": "2562:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "2552:6:13", + "nodeType": "YulIdentifier", + "src": "2552:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2097, + "isOffset": false, + "isSlot": true, + "src": "2552:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2093, + "isOffset": false, + "isSlot": false, + "src": "2562:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2099, + "nodeType": "InlineAssembly", + "src": "2513:63:13" + } + ] + }, + "documentation": { + "id": 2091, + "nodeType": "StructuredDocumentation", + "src": "2328:86:13", + "text": " @dev Returns a `Bytes32Slot` with member `value` located at `slot`." + }, + "id": 2101, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBytes32Slot", + "nameLocation": "2428:14:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2094, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2093, + "mutability": "mutable", + "name": "slot", + "nameLocation": "2451:4:13", + "nodeType": "VariableDeclaration", + "scope": 2101, + "src": "2443:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2092, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2443:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2442:14:13" + }, + "returnParameters": { + "id": 2098, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2097, + "mutability": "mutable", + "name": "r", + "nameLocation": "2500:1:13", + "nodeType": "VariableDeclaration", + "scope": 2101, + "src": "2480:21:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Slot_$2056_storage_ptr", + "typeString": "struct StorageSlot.Bytes32Slot" + }, + "typeName": { + "id": 2096, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2095, + "name": "Bytes32Slot", + "nameLocations": [ + "2480:11:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2056, + "src": "2480:11:13" + }, + "referencedDeclaration": 2056, + "src": "2480:11:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Slot_$2056_storage_ptr", + "typeString": "struct StorageSlot.Bytes32Slot" + } + }, + "visibility": "internal" + } + ], + "src": "2479:23:13" + }, + "scope": 2168, + "src": "2419:163:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2111, + "nodeType": "Block", + "src": "2763:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "2798:38:13", + "nodeType": "YulBlock", + "src": "2798:38:13", + "statements": [ + { + "nativeSrc": "2812:14:13", + "nodeType": "YulAssignment", + "src": "2812:14:13", + "value": { + "name": "slot", + "nativeSrc": "2822:4:13", + "nodeType": "YulIdentifier", + "src": "2822:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "2812:6:13", + "nodeType": "YulIdentifier", + "src": "2812:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2108, + "isOffset": false, + "isSlot": true, + "src": "2812:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2104, + "isOffset": false, + "isSlot": false, + "src": "2822:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2110, + "nodeType": "InlineAssembly", + "src": "2773:63:13" + } + ] + }, + "documentation": { + "id": 2102, + "nodeType": "StructuredDocumentation", + "src": "2588:86:13", + "text": " @dev Returns a `Uint256Slot` with member `value` located at `slot`." + }, + "id": 2112, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getUint256Slot", + "nameLocation": "2688:14:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2105, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2104, + "mutability": "mutable", + "name": "slot", + "nameLocation": "2711:4:13", + "nodeType": "VariableDeclaration", + "scope": 2112, + "src": "2703:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2103, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2703:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2702:14:13" + }, + "returnParameters": { + "id": 2109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2108, + "mutability": "mutable", + "name": "r", + "nameLocation": "2760:1:13", + "nodeType": "VariableDeclaration", + "scope": 2112, + "src": "2740:21:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot" + }, + "typeName": { + "id": 2107, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2106, + "name": "Uint256Slot", + "nameLocations": [ + "2740:11:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2059, + "src": "2740:11:13" + }, + "referencedDeclaration": 2059, + "src": "2740:11:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Uint256Slot_$2059_storage_ptr", + "typeString": "struct StorageSlot.Uint256Slot" + } + }, + "visibility": "internal" + } + ], + "src": "2739:23:13" + }, + "scope": 2168, + "src": "2679:163:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2122, + "nodeType": "Block", + "src": "3020:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "3055:38:13", + "nodeType": "YulBlock", + "src": "3055:38:13", + "statements": [ + { + "nativeSrc": "3069:14:13", + "nodeType": "YulAssignment", + "src": "3069:14:13", + "value": { + "name": "slot", + "nativeSrc": "3079:4:13", + "nodeType": "YulIdentifier", + "src": "3079:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "3069:6:13", + "nodeType": "YulIdentifier", + "src": "3069:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2119, + "isOffset": false, + "isSlot": true, + "src": "3069:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2115, + "isOffset": false, + "isSlot": false, + "src": "3079:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2121, + "nodeType": "InlineAssembly", + "src": "3030:63:13" + } + ] + }, + "documentation": { + "id": 2113, + "nodeType": "StructuredDocumentation", + "src": "2848:85:13", + "text": " @dev Returns a `Int256Slot` with member `value` located at `slot`." + }, + "id": 2123, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getInt256Slot", + "nameLocation": "2947:13:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2116, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2115, + "mutability": "mutable", + "name": "slot", + "nameLocation": "2969:4:13", + "nodeType": "VariableDeclaration", + "scope": 2123, + "src": "2961:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2114, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2961:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2960:14:13" + }, + "returnParameters": { + "id": 2120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2119, + "mutability": "mutable", + "name": "r", + "nameLocation": "3017:1:13", + "nodeType": "VariableDeclaration", + "scope": 2123, + "src": "2998:20:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Int256Slot_$2062_storage_ptr", + "typeString": "struct StorageSlot.Int256Slot" + }, + "typeName": { + "id": 2118, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2117, + "name": "Int256Slot", + "nameLocations": [ + "2998:10:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2062, + "src": "2998:10:13" + }, + "referencedDeclaration": 2062, + "src": "2998:10:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Int256Slot_$2062_storage_ptr", + "typeString": "struct StorageSlot.Int256Slot" + } + }, + "visibility": "internal" + } + ], + "src": "2997:22:13" + }, + "scope": 2168, + "src": "2938:161:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2133, + "nodeType": "Block", + "src": "3277:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "3312:38:13", + "nodeType": "YulBlock", + "src": "3312:38:13", + "statements": [ + { + "nativeSrc": "3326:14:13", + "nodeType": "YulAssignment", + "src": "3326:14:13", + "value": { + "name": "slot", + "nativeSrc": "3336:4:13", + "nodeType": "YulIdentifier", + "src": "3336:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "3326:6:13", + "nodeType": "YulIdentifier", + "src": "3326:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2130, + "isOffset": false, + "isSlot": true, + "src": "3326:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2126, + "isOffset": false, + "isSlot": false, + "src": "3336:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2132, + "nodeType": "InlineAssembly", + "src": "3287:63:13" + } + ] + }, + "documentation": { + "id": 2124, + "nodeType": "StructuredDocumentation", + "src": "3105:85:13", + "text": " @dev Returns a `StringSlot` with member `value` located at `slot`." + }, + "id": 2134, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getStringSlot", + "nameLocation": "3204:13:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2127, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2126, + "mutability": "mutable", + "name": "slot", + "nameLocation": "3226:4:13", + "nodeType": "VariableDeclaration", + "scope": 2134, + "src": "3218:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2125, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3218:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3217:14:13" + }, + "returnParameters": { + "id": 2131, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2130, + "mutability": "mutable", + "name": "r", + "nameLocation": "3274:1:13", + "nodeType": "VariableDeclaration", + "scope": 2134, + "src": "3255:20:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot" + }, + "typeName": { + "id": 2129, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2128, + "name": "StringSlot", + "nameLocations": [ + "3255:10:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2065, + "src": "3255:10:13" + }, + "referencedDeclaration": 2065, + "src": "3255:10:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot" + } + }, + "visibility": "internal" + } + ], + "src": "3254:22:13" + }, + "scope": 2168, + "src": "3195:161:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2144, + "nodeType": "Block", + "src": "3558:85:13", + "statements": [ + { + "AST": { + "nativeSrc": "3593:44:13", + "nodeType": "YulBlock", + "src": "3593:44:13", + "statements": [ + { + "nativeSrc": "3607:20:13", + "nodeType": "YulAssignment", + "src": "3607:20:13", + "value": { + "name": "store.slot", + "nativeSrc": "3617:10:13", + "nodeType": "YulIdentifier", + "src": "3617:10:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "3607:6:13", + "nodeType": "YulIdentifier", + "src": "3607:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2141, + "isOffset": false, + "isSlot": true, + "src": "3607:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2137, + "isOffset": false, + "isSlot": true, + "src": "3617:10:13", + "suffix": "slot", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2143, + "nodeType": "InlineAssembly", + "src": "3568:69:13" + } + ] + }, + "documentation": { + "id": 2135, + "nodeType": "StructuredDocumentation", + "src": "3362:101:13", + "text": " @dev Returns an `StringSlot` representation of the string storage pointer `store`." + }, + "id": 2145, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getStringSlot", + "nameLocation": "3477:13:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2137, + "mutability": "mutable", + "name": "store", + "nameLocation": "3506:5:13", + "nodeType": "VariableDeclaration", + "scope": 2145, + "src": "3491:20:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2136, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3491:6:13", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3490:22:13" + }, + "returnParameters": { + "id": 2142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2141, + "mutability": "mutable", + "name": "r", + "nameLocation": "3555:1:13", + "nodeType": "VariableDeclaration", + "scope": 2145, + "src": "3536:20:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot" + }, + "typeName": { + "id": 2140, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2139, + "name": "StringSlot", + "nameLocations": [ + "3536:10:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2065, + "src": "3536:10:13" + }, + "referencedDeclaration": 2065, + "src": "3536:10:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_StringSlot_$2065_storage_ptr", + "typeString": "struct StorageSlot.StringSlot" + } + }, + "visibility": "internal" + } + ], + "src": "3535:22:13" + }, + "scope": 2168, + "src": "3468:175:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2155, + "nodeType": "Block", + "src": "3818:79:13", + "statements": [ + { + "AST": { + "nativeSrc": "3853:38:13", + "nodeType": "YulBlock", + "src": "3853:38:13", + "statements": [ + { + "nativeSrc": "3867:14:13", + "nodeType": "YulAssignment", + "src": "3867:14:13", + "value": { + "name": "slot", + "nativeSrc": "3877:4:13", + "nodeType": "YulIdentifier", + "src": "3877:4:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "3867:6:13", + "nodeType": "YulIdentifier", + "src": "3867:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2152, + "isOffset": false, + "isSlot": true, + "src": "3867:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2148, + "isOffset": false, + "isSlot": false, + "src": "3877:4:13", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2154, + "nodeType": "InlineAssembly", + "src": "3828:63:13" + } + ] + }, + "documentation": { + "id": 2146, + "nodeType": "StructuredDocumentation", + "src": "3649:84:13", + "text": " @dev Returns a `BytesSlot` with member `value` located at `slot`." + }, + "id": 2156, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBytesSlot", + "nameLocation": "3747:12:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2148, + "mutability": "mutable", + "name": "slot", + "nameLocation": "3768:4:13", + "nodeType": "VariableDeclaration", + "scope": 2156, + "src": "3760:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2147, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3760:7:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3759:14:13" + }, + "returnParameters": { + "id": 2153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2152, + "mutability": "mutable", + "name": "r", + "nameLocation": "3815:1:13", + "nodeType": "VariableDeclaration", + "scope": 2156, + "src": "3797:19:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BytesSlot_$2068_storage_ptr", + "typeString": "struct StorageSlot.BytesSlot" + }, + "typeName": { + "id": 2151, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2150, + "name": "BytesSlot", + "nameLocations": [ + "3797:9:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2068, + "src": "3797:9:13" + }, + "referencedDeclaration": 2068, + "src": "3797:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BytesSlot_$2068_storage_ptr", + "typeString": "struct StorageSlot.BytesSlot" + } + }, + "visibility": "internal" + } + ], + "src": "3796:21:13" + }, + "scope": 2168, + "src": "3738:159:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2166, + "nodeType": "Block", + "src": "4094:85:13", + "statements": [ + { + "AST": { + "nativeSrc": "4129:44:13", + "nodeType": "YulBlock", + "src": "4129:44:13", + "statements": [ + { + "nativeSrc": "4143:20:13", + "nodeType": "YulAssignment", + "src": "4143:20:13", + "value": { + "name": "store.slot", + "nativeSrc": "4153:10:13", + "nodeType": "YulIdentifier", + "src": "4153:10:13" + }, + "variableNames": [ + { + "name": "r.slot", + "nativeSrc": "4143:6:13", + "nodeType": "YulIdentifier", + "src": "4143:6:13" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2163, + "isOffset": false, + "isSlot": true, + "src": "4143:6:13", + "suffix": "slot", + "valueSize": 1 + }, + { + "declaration": 2159, + "isOffset": false, + "isSlot": true, + "src": "4153:10:13", + "suffix": "slot", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2165, + "nodeType": "InlineAssembly", + "src": "4104:69:13" + } + ] + }, + "documentation": { + "id": 2157, + "nodeType": "StructuredDocumentation", + "src": "3903:99:13", + "text": " @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`." + }, + "id": 2167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBytesSlot", + "nameLocation": "4016:12:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2160, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2159, + "mutability": "mutable", + "name": "store", + "nameLocation": "4043:5:13", + "nodeType": "VariableDeclaration", + "scope": 2167, + "src": "4029:19:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2158, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4029:5:13", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4028:21:13" + }, + "returnParameters": { + "id": 2164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2163, + "mutability": "mutable", + "name": "r", + "nameLocation": "4091:1:13", + "nodeType": "VariableDeclaration", + "scope": 2167, + "src": "4073:19:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BytesSlot_$2068_storage_ptr", + "typeString": "struct StorageSlot.BytesSlot" + }, + "typeName": { + "id": 2162, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2161, + "name": "BytesSlot", + "nameLocations": [ + "4073:9:13" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2068, + "src": "4073:9:13" + }, + "referencedDeclaration": 2068, + "src": "4073:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BytesSlot_$2068_storage_ptr", + "typeString": "struct StorageSlot.BytesSlot" + } + }, + "visibility": "internal" + } + ], + "src": "4072:21:13" + }, + "scope": 2168, + "src": "4007:172:13", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2169, + "src": "1407:2774:13", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "193:3989:13" + }, + "id": 13 + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/Strings.sol", + "exportedSymbols": { + "Bytes": [ + 1632 + ], + "Math": [ + 6204 + ], + "SafeCast": [ + 7969 + ], + "SignedMath": [ + 8113 + ], + "Strings": [ + 3678 + ] + }, + "id": 3679, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2170, + "literals": [ + "solidity", + "^", + "0.8", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "101:24:14" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/Math.sol", + "file": "./math/Math.sol", + "id": 2172, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3679, + "sourceUnit": 6205, + "src": "127:37:14", + "symbolAliases": [ + { + "foreign": { + "id": 2171, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "135:4:14", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol", + "file": "./math/SafeCast.sol", + "id": 2174, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3679, + "sourceUnit": 7970, + "src": "165:45:14", + "symbolAliases": [ + { + "foreign": { + "id": 2173, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "173:8:14", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/SignedMath.sol", + "file": "./math/SignedMath.sol", + "id": 2176, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3679, + "sourceUnit": 8114, + "src": "211:49:14", + "symbolAliases": [ + { + "foreign": { + "id": 2175, + "name": "SignedMath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8113, + "src": "219:10:14", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Bytes.sol", + "file": "./Bytes.sol", + "id": 2178, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3679, + "sourceUnit": 1633, + "src": "261:34:14", + "symbolAliases": [ + { + "foreign": { + "id": 2177, + "name": "Bytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1632, + "src": "269:5:14", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Strings", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 2179, + "nodeType": "StructuredDocumentation", + "src": "297:34:14", + "text": " @dev String operations." + }, + "fullyImplemented": true, + "id": 3678, + "linearizedBaseContracts": [ + 3678 + ], + "name": "Strings", + "nameLocation": "340:7:14", + "nodeType": "ContractDefinition", + "nodes": [ + { + "global": false, + "id": 2181, + "libraryName": { + "id": 2180, + "name": "SafeCast", + "nameLocations": [ + "360:8:14" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 7969, + "src": "360:8:14" + }, + "nodeType": "UsingForDirective", + "src": "354:21:14" + }, + { + "constant": true, + "id": 2184, + "mutability": "constant", + "name": "HEX_DIGITS", + "nameLocation": "406:10:14", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "381:56:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + }, + "typeName": { + "id": 2182, + "name": "bytes16", + "nodeType": "ElementaryTypeName", + "src": "381:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "value": { + "hexValue": "30313233343536373839616263646566", + "id": 2183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "419:18:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f", + "typeString": "literal_string \"0123456789abcdef\"" + }, + "value": "0123456789abcdef" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2187, + "mutability": "constant", + "name": "ADDRESS_LENGTH", + "nameLocation": "466:14:14", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "443:42:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2185, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "443:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "hexValue": "3230", + "id": 2186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "483:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_20_by_1", + "typeString": "int_const 20" + }, + "value": "20" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 2200, + "mutability": "constant", + "name": "SPECIAL_CHARS_LOOKUP", + "nameLocation": "516:20:14", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "491:210:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2188, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "491:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_4951760157141521121071333375_by_1", + "typeString": "int_const 4951760157141521121071333375" + }, + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_rational_21474836479_by_1", + "typeString": "int_const 21474836479" + }, + "id": 2194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "30786666666666666666", + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "547:10:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967295_by_1", + "typeString": "int_const 4294967295" + }, + "value": "0xffffffff" + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_17179869184_by_1", + "typeString": "int_const 17179869184" + }, + "id": 2192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 2190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "649:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "30783232", + "id": 2191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "654:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "0x22" + }, + "src": "649:9:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_17179869184_by_1", + "typeString": "int_const 17179869184" + } + } + ], + "id": 2193, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "648:11:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_17179869184_by_1", + "typeString": "int_const 17179869184" + } + }, + "src": "547:112:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_21474836479_by_1", + "typeString": "int_const 21474836479" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_4951760157141521099596496896_by_1", + "typeString": "int_const 4951760157141521099596496896" + }, + "id": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 2195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "691:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "30783563", + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "696:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_92_by_1", + "typeString": "int_const 92" + }, + "value": "0x5c" + }, + "src": "691:9:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4951760157141521099596496896_by_1", + "typeString": "int_const 4951760157141521099596496896" + } + } + ], + "id": 2198, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "690:11:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4951760157141521099596496896_by_1", + "typeString": "int_const 4951760157141521099596496896" + } + }, + "src": "547:154:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4951760157141521121071333375_by_1", + "typeString": "int_const 4951760157141521121071333375" + } + }, + "visibility": "private" + }, + { + "documentation": { + "id": 2201, + "nodeType": "StructuredDocumentation", + "src": "721:81:14", + "text": " @dev The `value` string doesn't fit in the specified `length`." + }, + "errorSelector": "e22e27eb", + "id": 2207, + "name": "StringsInsufficientHexLength", + "nameLocation": "813:28:14", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 2206, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2203, + "mutability": "mutable", + "name": "value", + "nameLocation": "850:5:14", + "nodeType": "VariableDeclaration", + "scope": 2207, + "src": "842:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2202, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "842:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2205, + "mutability": "mutable", + "name": "length", + "nameLocation": "865:6:14", + "nodeType": "VariableDeclaration", + "scope": 2207, + "src": "857:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2204, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "857:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "841:31:14" + }, + "src": "807:66:14" + }, + { + "documentation": { + "id": 2208, + "nodeType": "StructuredDocumentation", + "src": "879:108:14", + "text": " @dev The string being parsed contains characters that are not in scope of the given base." + }, + "errorSelector": "94e2737e", + "id": 2210, + "name": "StringsInvalidChar", + "nameLocation": "998:18:14", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 2209, + "nodeType": "ParameterList", + "parameters": [], + "src": "1016:2:14" + }, + "src": "992:27:14" + }, + { + "documentation": { + "id": 2211, + "nodeType": "StructuredDocumentation", + "src": "1025:84:14", + "text": " @dev The string being parsed is not a properly formatted address." + }, + "errorSelector": "1d15ae44", + "id": 2213, + "name": "StringsInvalidAddressFormat", + "nameLocation": "1120:27:14", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 2212, + "nodeType": "ParameterList", + "parameters": [], + "src": "1147:2:14" + }, + "src": "1114:36:14" + }, + { + "body": { + "id": 2260, + "nodeType": "Block", + "src": "1322:563:14", + "statements": [ + { + "id": 2259, + "nodeType": "UncheckedBlock", + "src": "1332:547:14", + "statements": [ + { + "assignments": [ + 2222 + ], + "declarations": [ + { + "constant": false, + "id": 2222, + "mutability": "mutable", + "name": "length", + "nameLocation": "1364:6:14", + "nodeType": "VariableDeclaration", + "scope": 2259, + "src": "1356:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2221, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1356:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2229, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2225, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2216, + "src": "1384:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2223, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "1373:4:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 2224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1378:5:14", + "memberName": "log10", + "nodeType": "MemberAccess", + "referencedDeclaration": 6015, + "src": "1373:10:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 2226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1373:17:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 2227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1393:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1373:21:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1356:38:14" + }, + { + "assignments": [ + 2231 + ], + "declarations": [ + { + "constant": false, + "id": 2231, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "1422:6:14", + "nodeType": "VariableDeclaration", + "scope": 2259, + "src": "1408:20:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2230, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1408:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "id": 2236, + "initialValue": { + "arguments": [ + { + "id": 2234, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2222, + "src": "1442:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1431:10:14", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + }, + "typeName": { + "id": 2232, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1435:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + } + }, + "id": 2235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1431:18:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1408:41:14" + }, + { + "assignments": [ + 2238 + ], + "declarations": [ + { + "constant": false, + "id": 2238, + "mutability": "mutable", + "name": "ptr", + "nameLocation": "1471:3:14", + "nodeType": "VariableDeclaration", + "scope": 2259, + "src": "1463:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1463:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2239, + "nodeType": "VariableDeclarationStatement", + "src": "1463:11:14" + }, + { + "AST": { + "nativeSrc": "1513:69:14", + "nodeType": "YulBlock", + "src": "1513:69:14", + "statements": [ + { + "nativeSrc": "1531:37:14", + "nodeType": "YulAssignment", + "src": "1531:37:14", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "1546:6:14", + "nodeType": "YulIdentifier", + "src": "1546:6:14" + }, + { + "kind": "number", + "nativeSrc": "1554:4:14", + "nodeType": "YulLiteral", + "src": "1554:4:14", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1542:3:14", + "nodeType": "YulIdentifier", + "src": "1542:3:14" + }, + "nativeSrc": "1542:17:14", + "nodeType": "YulFunctionCall", + "src": "1542:17:14" + }, + { + "name": "length", + "nativeSrc": "1561:6:14", + "nodeType": "YulIdentifier", + "src": "1561:6:14" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1538:3:14", + "nodeType": "YulIdentifier", + "src": "1538:3:14" + }, + "nativeSrc": "1538:30:14", + "nodeType": "YulFunctionCall", + "src": "1538:30:14" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "1531:3:14", + "nodeType": "YulIdentifier", + "src": "1531:3:14" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2231, + "isOffset": false, + "isSlot": false, + "src": "1546:6:14", + "valueSize": 1 + }, + { + "declaration": 2222, + "isOffset": false, + "isSlot": false, + "src": "1561:6:14", + "valueSize": 1 + }, + { + "declaration": 2238, + "isOffset": false, + "isSlot": false, + "src": "1531:3:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2240, + "nodeType": "InlineAssembly", + "src": "1488:94:14" + }, + { + "body": { + "id": 2255, + "nodeType": "Block", + "src": "1608:234:14", + "statements": [ + { + "expression": { + "id": 2243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "1626:5:14", + "subExpression": { + "id": 2242, + "name": "ptr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2238, + "src": "1626:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2244, + "nodeType": "ExpressionStatement", + "src": "1626:5:14" + }, + { + "AST": { + "nativeSrc": "1674:86:14", + "nodeType": "YulBlock", + "src": "1674:86:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "1704:3:14", + "nodeType": "YulIdentifier", + "src": "1704:3:14" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "1718:5:14", + "nodeType": "YulIdentifier", + "src": "1718:5:14" + }, + { + "kind": "number", + "nativeSrc": "1725:2:14", + "nodeType": "YulLiteral", + "src": "1725:2:14", + "type": "", + "value": "10" + } + ], + "functionName": { + "name": "mod", + "nativeSrc": "1714:3:14", + "nodeType": "YulIdentifier", + "src": "1714:3:14" + }, + "nativeSrc": "1714:14:14", + "nodeType": "YulFunctionCall", + "src": "1714:14:14" + }, + { + "name": "HEX_DIGITS", + "nativeSrc": "1730:10:14", + "nodeType": "YulIdentifier", + "src": "1730:10:14" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "1709:4:14", + "nodeType": "YulIdentifier", + "src": "1709:4:14" + }, + "nativeSrc": "1709:32:14", + "nodeType": "YulFunctionCall", + "src": "1709:32:14" + } + ], + "functionName": { + "name": "mstore8", + "nativeSrc": "1696:7:14", + "nodeType": "YulIdentifier", + "src": "1696:7:14" + }, + "nativeSrc": "1696:46:14", + "nodeType": "YulFunctionCall", + "src": "1696:46:14" + }, + "nativeSrc": "1696:46:14", + "nodeType": "YulExpressionStatement", + "src": "1696:46:14" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2184, + "isOffset": false, + "isSlot": false, + "src": "1730:10:14", + "valueSize": 1 + }, + { + "declaration": 2238, + "isOffset": false, + "isSlot": false, + "src": "1704:3:14", + "valueSize": 1 + }, + { + "declaration": 2216, + "isOffset": false, + "isSlot": false, + "src": "1718:5:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2245, + "nodeType": "InlineAssembly", + "src": "1649:111:14" + }, + { + "expression": { + "id": 2248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2246, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2216, + "src": "1777:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1786:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "1777:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2249, + "nodeType": "ExpressionStatement", + "src": "1777:11:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2250, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2216, + "src": "1810:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1819:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1810:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2254, + "nodeType": "IfStatement", + "src": "1806:21:14", + "trueBody": { + "id": 2253, + "nodeType": "Break", + "src": "1822:5:14" + } + } + ] + }, + "condition": { + "hexValue": "74727565", + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1602:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "id": 2256, + "nodeType": "WhileStatement", + "src": "1595:247:14" + }, + { + "expression": { + "id": 2257, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2231, + "src": "1862:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2220, + "id": 2258, + "nodeType": "Return", + "src": "1855:13:14" + } + ] + } + ] + }, + "documentation": { + "id": 2214, + "nodeType": "StructuredDocumentation", + "src": "1156:90:14", + "text": " @dev Converts a `uint256` to its ASCII `string` decimal representation." + }, + "id": 2261, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toString", + "nameLocation": "1260:8:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2216, + "mutability": "mutable", + "name": "value", + "nameLocation": "1277:5:14", + "nodeType": "VariableDeclaration", + "scope": 2261, + "src": "1269:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1269:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1268:15:14" + }, + "returnParameters": { + "id": 2220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2219, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2261, + "src": "1307:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2218, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1307:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1306:15:14" + }, + "scope": 3678, + "src": "1251:634:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2286, + "nodeType": "Block", + "src": "2061:92:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 2274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2272, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "2092:5:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "30", + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2100:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2092:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "hexValue": "", + "id": 2276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2110:2:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + "id": 2277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "2092:20:14", + "trueExpression": { + "hexValue": "2d", + "id": 2275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2104:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", + "typeString": "literal_string \"-\"" + }, + "value": "-" + }, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2281, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2264, + "src": "2138:5:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "expression": { + "id": 2279, + "name": "SignedMath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8113, + "src": "2123:10:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SignedMath_$8113_$", + "typeString": "type(library SignedMath)" + } + }, + "id": 2280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2134:3:14", + "memberName": "abs", + "nodeType": "MemberAccess", + "referencedDeclaration": 8112, + "src": "2123:14:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_uint256_$", + "typeString": "function (int256) pure returns (uint256)" + } + }, + "id": 2282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2123:21:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2278, + "name": "toString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2261, + "src": "2114:8:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 2283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2114:31:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 2270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2078:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2269, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2078:6:14", + "typeDescriptions": {} + } + }, + "id": 2271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2085:6:14", + "memberName": "concat", + "nodeType": "MemberAccess", + "src": "2078:13:14", + "typeDescriptions": { + "typeIdentifier": "t_function_stringconcat_pure$__$returns$_t_string_memory_ptr_$", + "typeString": "function () pure returns (string memory)" + } + }, + "id": 2284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2078:68:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2268, + "id": 2285, + "nodeType": "Return", + "src": "2071:75:14" + } + ] + }, + "documentation": { + "id": 2262, + "nodeType": "StructuredDocumentation", + "src": "1891:89:14", + "text": " @dev Converts a `int256` to its ASCII `string` decimal representation." + }, + "id": 2287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toStringSigned", + "nameLocation": "1994:14:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2264, + "mutability": "mutable", + "name": "value", + "nameLocation": "2016:5:14", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "2009:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2263, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "2009:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "2008:14:14" + }, + "returnParameters": { + "id": 2268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2267, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "2046:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2266, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2046:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2045:15:14" + }, + "scope": 3678, + "src": "1985:168:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2306, + "nodeType": "Block", + "src": "2332:100:14", + "statements": [ + { + "id": 2305, + "nodeType": "UncheckedBlock", + "src": "2342:84:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2296, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2290, + "src": "2385:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2299, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2290, + "src": "2404:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2297, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "2392:4:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2397:6:14", + "memberName": "log256", + "nodeType": "MemberAccess", + "referencedDeclaration": 6126, + "src": "2392:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2392:18:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2413:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2392:22:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2295, + "name": "toHexString", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2307, + 2390, + 2410, + 2564 + ], + "referencedDeclaration": 2390, + "src": "2373:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256,uint256) pure returns (string memory)" + } + }, + "id": 2303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2373:42:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2294, + "id": 2304, + "nodeType": "Return", + "src": "2366:49:14" + } + ] + } + ] + }, + "documentation": { + "id": 2288, + "nodeType": "StructuredDocumentation", + "src": "2159:94:14", + "text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation." + }, + "id": 2307, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toHexString", + "nameLocation": "2267:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2291, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2290, + "mutability": "mutable", + "name": "value", + "nameLocation": "2287:5:14", + "nodeType": "VariableDeclaration", + "scope": 2307, + "src": "2279:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2279:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2278:15:14" + }, + "returnParameters": { + "id": 2294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2293, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2307, + "src": "2317:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2292, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2317:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2316:15:14" + }, + "scope": 3678, + "src": "2258:174:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2389, + "nodeType": "Block", + "src": "2645:435:14", + "statements": [ + { + "assignments": [ + 2318 + ], + "declarations": [ + { + "constant": false, + "id": 2318, + "mutability": "mutable", + "name": "localValue", + "nameLocation": "2663:10:14", + "nodeType": "VariableDeclaration", + "scope": 2389, + "src": "2655:18:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2317, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2655:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2320, + "initialValue": { + "id": 2319, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2310, + "src": "2676:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2655:26:14" + }, + { + "assignments": [ + 2322 + ], + "declarations": [ + { + "constant": false, + "id": 2322, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "2704:6:14", + "nodeType": "VariableDeclaration", + "scope": 2389, + "src": "2691:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2321, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2691:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2331, + "initialValue": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2723:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2326, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2312, + "src": "2727:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2723:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "32", + "id": 2328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2736:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "2723:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2713:9:14", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 2323, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2717:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2713:25:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2691:47:14" + }, + { + "expression": { + "id": 2336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2332, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2322, + "src": "2748:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2334, + "indexExpression": { + "hexValue": "30", + "id": 2333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2755:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2748:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 2335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2760:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "src": "2748:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2337, + "nodeType": "ExpressionStatement", + "src": "2748:15:14" + }, + { + "expression": { + "id": 2342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2338, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2322, + "src": "2773:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2340, + "indexExpression": { + "hexValue": "31", + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2780:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2773:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "78", + "id": 2341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2785:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83", + "typeString": "literal_string \"x\"" + }, + "value": "x" + }, + "src": "2773:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2343, + "nodeType": "ExpressionStatement", + "src": "2773:15:14" + }, + { + "body": { + "id": 2372, + "nodeType": "Block", + "src": "2843:95:14", + "statements": [ + { + "expression": { + "id": 2366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2358, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2322, + "src": "2857:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2360, + "indexExpression": { + "id": 2359, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2345, + "src": "2864:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2857:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 2361, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "2869:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 2365, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2362, + "name": "localValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2318, + "src": "2880:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307866", + "id": 2363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2893:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0xf" + }, + "src": "2880:16:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2869:28:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "2857:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2367, + "nodeType": "ExpressionStatement", + "src": "2857:40:14" + }, + { + "expression": { + "id": 2370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2368, + "name": "localValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2318, + "src": "2911:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "34", + "id": 2369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2926:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "2911:16:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2371, + "nodeType": "ExpressionStatement", + "src": "2911:16:14" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2352, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2345, + "src": "2831:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2835:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2831:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2373, + "initializationExpression": { + "assignments": [ + 2345 + ], + "declarations": [ + { + "constant": false, + "id": 2345, + "mutability": "mutable", + "name": "i", + "nameLocation": "2811:1:14", + "nodeType": "VariableDeclaration", + "scope": 2373, + "src": "2803:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2344, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2803:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2351, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2815:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2347, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2312, + "src": "2819:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2815:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2828:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2815:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2803:26:14" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 2356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": true, + "src": "2838:3:14", + "subExpression": { + "id": 2355, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2345, + "src": "2840:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2357, + "nodeType": "ExpressionStatement", + "src": "2838:3:14" + }, + "nodeType": "ForStatement", + "src": "2798:140:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2374, + "name": "localValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2318, + "src": "2951:10:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2965:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2951:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2383, + "nodeType": "IfStatement", + "src": "2947:96:14", + "trueBody": { + "id": 2382, + "nodeType": "Block", + "src": "2968:75:14", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 2378, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2310, + "src": "3018:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2379, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2312, + "src": "3025:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2377, + "name": "StringsInsufficientHexLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2207, + "src": "2989:28:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint256,uint256) pure returns (error)" + } + }, + "id": 2380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2989:43:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 2381, + "nodeType": "RevertStatement", + "src": "2982:50:14" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2386, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2322, + "src": "3066:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3059:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2384, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3059:6:14", + "typeDescriptions": {} + } + }, + "id": 2387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3059:14:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2316, + "id": 2388, + "nodeType": "Return", + "src": "3052:21:14" + } + ] + }, + "documentation": { + "id": 2308, + "nodeType": "StructuredDocumentation", + "src": "2438:112:14", + "text": " @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length." + }, + "id": 2390, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toHexString", + "nameLocation": "2564:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2310, + "mutability": "mutable", + "name": "value", + "nameLocation": "2584:5:14", + "nodeType": "VariableDeclaration", + "scope": 2390, + "src": "2576:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2576:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2312, + "mutability": "mutable", + "name": "length", + "nameLocation": "2599:6:14", + "nodeType": "VariableDeclaration", + "scope": 2390, + "src": "2591:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2311, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2591:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2575:31:14" + }, + "returnParameters": { + "id": 2316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2315, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2390, + "src": "2630:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2314, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2630:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2629:15:14" + }, + "scope": 3678, + "src": "2555:525:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2409, + "nodeType": "Block", + "src": "3312:75:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 2403, + "name": "addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2393, + "src": "3357:4:14", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2402, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3349:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 2401, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "3349:7:14", + "typeDescriptions": {} + } + }, + "id": 2404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3349:13:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 2400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3341:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3341:7:14", + "typeDescriptions": {} + } + }, + "id": 2405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3341:22:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2406, + "name": "ADDRESS_LENGTH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "3365:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2398, + "name": "toHexString", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2307, + 2390, + 2410, + 2564 + ], + "referencedDeclaration": 2390, + "src": "3329:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256,uint256) pure returns (string memory)" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3329:51:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2397, + "id": 2408, + "nodeType": "Return", + "src": "3322:58:14" + } + ] + }, + "documentation": { + "id": 2391, + "nodeType": "StructuredDocumentation", + "src": "3086:148:14", + "text": " @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n representation." + }, + "id": 2410, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toHexString", + "nameLocation": "3248:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2394, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2393, + "mutability": "mutable", + "name": "addr", + "nameLocation": "3268:4:14", + "nodeType": "VariableDeclaration", + "scope": 2410, + "src": "3260:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2392, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3260:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3259:14:14" + }, + "returnParameters": { + "id": 2397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2396, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2410, + "src": "3297:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2395, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3297:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3296:15:14" + }, + "scope": 3678, + "src": "3239:148:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2474, + "nodeType": "Block", + "src": "3644:642:14", + "statements": [ + { + "assignments": [ + 2419 + ], + "declarations": [ + { + "constant": false, + "id": 2419, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "3667:6:14", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "3654:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2418, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3654:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2426, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 2423, + "name": "addr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2413, + "src": "3694:4:14", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2422, + "name": "toHexString", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2307, + 2390, + 2410, + 2564 + ], + "referencedDeclaration": 2410, + "src": "3682:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (address) pure returns (string memory)" + } + }, + "id": 2424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3682:17:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3676:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2420, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3676:5:14", + "typeDescriptions": {} + } + }, + "id": 2425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3676:24:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3654:46:14" + }, + { + "assignments": [ + 2428 + ], + "declarations": [ + { + "constant": false, + "id": 2428, + "mutability": "mutable", + "name": "hashValue", + "nameLocation": "3793:9:14", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "3785:17:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2427, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3785:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2429, + "nodeType": "VariableDeclarationStatement", + "src": "3785:17:14" + }, + { + "AST": { + "nativeSrc": "3837:78:14", + "nodeType": "YulBlock", + "src": "3837:78:14", + "statements": [ + { + "nativeSrc": "3851:54:14", + "nodeType": "YulAssignment", + "src": "3851:54:14", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3868:2:14", + "nodeType": "YulLiteral", + "src": "3868:2:14", + "type": "", + "value": "96" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "3886:6:14", + "nodeType": "YulIdentifier", + "src": "3886:6:14" + }, + { + "kind": "number", + "nativeSrc": "3894:4:14", + "nodeType": "YulLiteral", + "src": "3894:4:14", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3882:3:14", + "nodeType": "YulIdentifier", + "src": "3882:3:14" + }, + "nativeSrc": "3882:17:14", + "nodeType": "YulFunctionCall", + "src": "3882:17:14" + }, + { + "kind": "number", + "nativeSrc": "3901:2:14", + "nodeType": "YulLiteral", + "src": "3901:2:14", + "type": "", + "value": "40" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "3872:9:14", + "nodeType": "YulIdentifier", + "src": "3872:9:14" + }, + "nativeSrc": "3872:32:14", + "nodeType": "YulFunctionCall", + "src": "3872:32:14" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "3864:3:14", + "nodeType": "YulIdentifier", + "src": "3864:3:14" + }, + "nativeSrc": "3864:41:14", + "nodeType": "YulFunctionCall", + "src": "3864:41:14" + }, + "variableNames": [ + { + "name": "hashValue", + "nativeSrc": "3851:9:14", + "nodeType": "YulIdentifier", + "src": "3851:9:14" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 2419, + "isOffset": false, + "isSlot": false, + "src": "3886:6:14", + "valueSize": 1 + }, + { + "declaration": 2428, + "isOffset": false, + "isSlot": false, + "src": "3851:9:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 2430, + "nodeType": "InlineAssembly", + "src": "3812:103:14" + }, + { + "body": { + "id": 2467, + "nodeType": "Block", + "src": "3958:291:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2441, + "name": "hashValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2428, + "src": "4064:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307866", + "id": 2442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4076:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0xf" + }, + "src": "4064:15:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "37", + "id": 2444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4082:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "src": "4064:19:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "baseExpression": { + "id": 2448, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "4093:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2450, + "indexExpression": { + "id": 2449, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2432, + "src": "4100:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4093:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4087:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2446, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4087:5:14", + "typeDescriptions": {} + } + }, + "id": 2451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4087:16:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3936", + "id": 2452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4106:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + "src": "4087:21:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4064:44:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2462, + "nodeType": "IfStatement", + "src": "4060:150:14", + "trueBody": { + "id": 2461, + "nodeType": "Block", + "src": "4110:100:14", + "statements": [ + { + "expression": { + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2455, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "4178:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2457, + "indexExpression": { + "id": 2456, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2432, + "src": "4185:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4178:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "^=", + "rightHandSide": { + "hexValue": "30783230", + "id": 2458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4191:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "4178:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2460, + "nodeType": "ExpressionStatement", + "src": "4178:17:14" + } + ] + } + }, + { + "expression": { + "id": 2465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2463, + "name": "hashValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2428, + "src": "4223:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "34", + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4237:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "4223:15:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2466, + "nodeType": "ExpressionStatement", + "src": "4223:15:14" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2435, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2432, + "src": "3946:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 2436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3950:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3946:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2468, + "initializationExpression": { + "assignments": [ + 2432 + ], + "declarations": [ + { + "constant": false, + "id": 2432, + "mutability": "mutable", + "name": "i", + "nameLocation": "3938:1:14", + "nodeType": "VariableDeclaration", + "scope": 2468, + "src": "3930:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3930:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2434, + "initialValue": { + "hexValue": "3431", + "id": 2433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3942:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_41_by_1", + "typeString": "int_const 41" + }, + "value": "41" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3930:14:14" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 2439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": true, + "src": "3953:3:14", + "subExpression": { + "id": 2438, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2432, + "src": "3955:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2440, + "nodeType": "ExpressionStatement", + "src": "3953:3:14" + }, + "nodeType": "ForStatement", + "src": "3925:324:14" + }, + { + "expression": { + "arguments": [ + { + "id": 2471, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "4272:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4265:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2469, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4265:6:14", + "typeDescriptions": {} + } + }, + "id": 2472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4265:14:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2417, + "id": 2473, + "nodeType": "Return", + "src": "4258:21:14" + } + ] + }, + "documentation": { + "id": 2411, + "nodeType": "StructuredDocumentation", + "src": "3393:165:14", + "text": " @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n representation, according to EIP-55." + }, + "id": 2475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toChecksumHexString", + "nameLocation": "3572:19:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2414, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2413, + "mutability": "mutable", + "name": "addr", + "nameLocation": "3600:4:14", + "nodeType": "VariableDeclaration", + "scope": 2475, + "src": "3592:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2412, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3592:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3591:14:14" + }, + "returnParameters": { + "id": 2417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2416, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2475, + "src": "3629:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3629:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3628:15:14" + }, + "scope": 3678, + "src": "3563:723:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2563, + "nodeType": "Block", + "src": "4475:424:14", + "statements": [ + { + "id": 2562, + "nodeType": "UncheckedBlock", + "src": "4485:408:14", + "statements": [ + { + "assignments": [ + 2484 + ], + "declarations": [ + { + "constant": false, + "id": 2484, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "4522:6:14", + "nodeType": "VariableDeclaration", + "scope": 2562, + "src": "4509:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2483, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4509:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2494, + "initialValue": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4541:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "expression": { + "id": 2488, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "4545:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4551:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4545:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4541:16:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "32", + "id": 2491, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4560:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4541:20:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4531:9:14", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 2485, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4535:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4531:31:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4509:53:14" + }, + { + "expression": { + "id": 2499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2495, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4576:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2497, + "indexExpression": { + "hexValue": "30", + "id": 2496, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4583:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4576:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 2498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4588:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "src": "4576:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2500, + "nodeType": "ExpressionStatement", + "src": "4576:15:14" + }, + { + "expression": { + "id": 2505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2501, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4605:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2503, + "indexExpression": { + "hexValue": "31", + "id": 2502, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4612:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4605:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "78", + "id": 2504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4617:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83", + "typeString": "literal_string \"x\"" + }, + "value": "x" + }, + "src": "4605:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2506, + "nodeType": "ExpressionStatement", + "src": "4605:15:14" + }, + { + "body": { + "id": 2555, + "nodeType": "Block", + "src": "4677:171:14", + "statements": [ + { + "assignments": [ + 2519 + ], + "declarations": [ + { + "constant": false, + "id": 2519, + "mutability": "mutable", + "name": "v", + "nameLocation": "4701:1:14", + "nodeType": "VariableDeclaration", + "scope": 2555, + "src": "4695:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2518, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4695:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 2526, + "initialValue": { + "arguments": [ + { + "baseExpression": { + "id": 2522, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "4711:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2524, + "indexExpression": { + "id": 2523, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4717:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4711:8:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4705:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2520, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4705:5:14", + "typeDescriptions": {} + } + }, + "id": 2525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4705:15:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4695:25:14" + }, + { + "expression": { + "id": 2539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2527, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4738:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2533, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2528, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4745:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2529, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4749:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4745:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "32", + "id": 2531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4753:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4745:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4738:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 2534, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "4758:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 2538, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2535, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2519, + "src": "4769:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "34", + "id": 2536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4774:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "4769:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4758:18:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "4738:38:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2540, + "nodeType": "ExpressionStatement", + "src": "4738:38:14" + }, + { + "expression": { + "id": 2553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2541, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4794:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2547, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4801:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 2543, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4805:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4801:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "33", + "id": 2545, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4809:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "4801:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4794:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 2548, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "4814:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 2552, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2549, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2519, + "src": "4825:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "307866", + "id": 2550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4829:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0xf" + }, + "src": "4825:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4814:19:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "4794:39:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2554, + "nodeType": "ExpressionStatement", + "src": "4794:39:14" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2511, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4654:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 2512, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "4658:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4664:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4658:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4654:16:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2556, + "initializationExpression": { + "assignments": [ + 2508 + ], + "declarations": [ + { + "constant": false, + "id": 2508, + "mutability": "mutable", + "name": "i", + "nameLocation": "4647:1:14", + "nodeType": "VariableDeclaration", + "scope": 2556, + "src": "4639:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2507, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4639:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2510, + "initialValue": { + "hexValue": "30", + "id": 2509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4651:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4639:13:14" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 2516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "4672:3:14", + "subExpression": { + "id": 2515, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2508, + "src": "4674:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2517, + "nodeType": "ExpressionStatement", + "src": "4672:3:14" + }, + "nodeType": "ForStatement", + "src": "4634:214:14" + }, + { + "expression": { + "arguments": [ + { + "id": 2559, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2484, + "src": "4875:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4868:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2557, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4868:6:14", + "typeDescriptions": {} + } + }, + "id": 2560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4868:14:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2482, + "id": 2561, + "nodeType": "Return", + "src": "4861:21:14" + } + ] + } + ] + }, + "documentation": { + "id": 2476, + "nodeType": "StructuredDocumentation", + "src": "4292:99:14", + "text": " @dev Converts a `bytes` buffer to its ASCII `string` hexadecimal representation." + }, + "id": 2564, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toHexString", + "nameLocation": "4405:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2479, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2478, + "mutability": "mutable", + "name": "input", + "nameLocation": "4430:5:14", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "4417:18:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2477, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4417:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4416:20:14" + }, + "returnParameters": { + "id": 2482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2481, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2564, + "src": "4460:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2480, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4460:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "4459:15:14" + }, + "scope": 3678, + "src": "4396:503:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2586, + "nodeType": "Block", + "src": "5054:55:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 2578, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2567, + "src": "5089:1:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2577, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5083:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2576, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5083:5:14", + "typeDescriptions": {} + } + }, + "id": 2579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5083:8:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "arguments": [ + { + "id": 2582, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2569, + "src": "5099:1:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5093:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2580, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5093:5:14", + "typeDescriptions": {} + } + }, + "id": 2583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5093:8:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 2574, + "name": "Bytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1632, + "src": "5071:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Bytes_$1632_$", + "typeString": "type(library Bytes)" + } + }, + "id": 2575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5077:5:14", + "memberName": "equal", + "nodeType": "MemberAccess", + "referencedDeclaration": 1282, + "src": "5071:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes memory,bytes memory) pure returns (bool)" + } + }, + "id": 2584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5071:31:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2573, + "id": 2585, + "nodeType": "Return", + "src": "5064:38:14" + } + ] + }, + "documentation": { + "id": 2565, + "nodeType": "StructuredDocumentation", + "src": "4905:66:14", + "text": " @dev Returns true if the two strings are equal." + }, + "id": 2587, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "equal", + "nameLocation": "4985:5:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2567, + "mutability": "mutable", + "name": "a", + "nameLocation": "5005:1:14", + "nodeType": "VariableDeclaration", + "scope": 2587, + "src": "4991:15:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2566, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4991:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "b", + "nameLocation": "5022:1:14", + "nodeType": "VariableDeclaration", + "scope": 2587, + "src": "5008:15:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2568, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5008:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "4990:34:14" + }, + "returnParameters": { + "id": 2573, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2572, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2587, + "src": "5048:4:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2571, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5048:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5047:6:14" + }, + "scope": 3678, + "src": "4976:133:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2605, + "nodeType": "Block", + "src": "5406:64:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2596, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "5433:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 2597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5440:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 2600, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "5449:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5443:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2598, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5443:5:14", + "typeDescriptions": {} + } + }, + "id": 2601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5443:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5456:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "5443:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2595, + "name": "parseUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2606, + 2637 + ], + "referencedDeclaration": 2637, + "src": "5423:9:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (uint256)" + } + }, + "id": 2603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5423:40:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2594, + "id": 2604, + "nodeType": "Return", + "src": "5416:47:14" + } + ] + }, + "documentation": { + "id": 2588, + "nodeType": "StructuredDocumentation", + "src": "5115:214:14", + "text": " @dev Parse a decimal string and returns the value as a `uint256`.\n Requirements:\n - The string must be formatted as `[0-9]*`\n - The result must fit into an `uint256` type" + }, + "id": 2606, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseUint", + "nameLocation": "5343:9:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2591, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2590, + "mutability": "mutable", + "name": "input", + "nameLocation": "5367:5:14", + "nodeType": "VariableDeclaration", + "scope": 2606, + "src": "5353:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2589, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5353:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "5352:21:14" + }, + "returnParameters": { + "id": 2594, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2593, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2606, + "src": "5397:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2592, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5397:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5396:9:14" + }, + "scope": 3678, + "src": "5334:136:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2636, + "nodeType": "Block", + "src": "5875:153:14", + "statements": [ + { + "assignments": [ + 2619, + 2621 + ], + "declarations": [ + { + "constant": false, + "id": 2619, + "mutability": "mutable", + "name": "success", + "nameLocation": "5891:7:14", + "nodeType": "VariableDeclaration", + "scope": 2636, + "src": "5886:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2618, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5886:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2621, + "mutability": "mutable", + "name": "value", + "nameLocation": "5908:5:14", + "nodeType": "VariableDeclaration", + "scope": 2636, + "src": "5900:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2620, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5900:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2627, + "initialValue": { + "arguments": [ + { + "id": 2623, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2609, + "src": "5930:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 2624, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "5937:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2625, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2613, + "src": "5944:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2622, + "name": "tryParseUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2658, + 2695 + ], + "referencedDeclaration": 2695, + "src": "5917:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 2626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5917:31:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5885:63:14" + }, + { + "condition": { + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "5962:8:14", + "subExpression": { + "id": 2628, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2619, + "src": "5963:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2633, + "nodeType": "IfStatement", + "src": "5958:41:14", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2630, + "name": "StringsInvalidChar", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2210, + "src": "5979:18:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 2631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5979:20:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 2632, + "nodeType": "RevertStatement", + "src": "5972:27:14" + } + }, + { + "expression": { + "id": 2634, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2621, + "src": "6016:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2617, + "id": 2635, + "nodeType": "Return", + "src": "6009:12:14" + } + ] + }, + "documentation": { + "id": 2607, + "nodeType": "StructuredDocumentation", + "src": "5476:294:14", + "text": " @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n `end` (excluded).\n Requirements:\n - The substring must be formatted as `[0-9]*`\n - The result must fit into an `uint256` type" + }, + "id": 2637, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseUint", + "nameLocation": "5784:9:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2614, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2609, + "mutability": "mutable", + "name": "input", + "nameLocation": "5808:5:14", + "nodeType": "VariableDeclaration", + "scope": 2637, + "src": "5794:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2608, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5794:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2611, + "mutability": "mutable", + "name": "begin", + "nameLocation": "5823:5:14", + "nodeType": "VariableDeclaration", + "scope": 2637, + "src": "5815:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2610, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5815:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2613, + "mutability": "mutable", + "name": "end", + "nameLocation": "5838:3:14", + "nodeType": "VariableDeclaration", + "scope": 2637, + "src": "5830:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2612, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5830:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5793:49:14" + }, + "returnParameters": { + "id": 2617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2616, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2637, + "src": "5866:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2615, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5866:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5865:9:14" + }, + "scope": 3678, + "src": "5775:253:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2657, + "nodeType": "Block", + "src": "6349:83:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2648, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2640, + "src": "6395:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6402:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 2652, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2640, + "src": "6411:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6405:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2650, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6405:5:14", + "typeDescriptions": {} + } + }, + "id": 2653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6405:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6418:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6405:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2647, + "name": "_tryParseUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "6366:28:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 2655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6366:59:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 2646, + "id": 2656, + "nodeType": "Return", + "src": "6359:66:14" + } + ] + }, + "documentation": { + "id": 2638, + "nodeType": "StructuredDocumentation", + "src": "6034:215:14", + "text": " @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n NOTE: This function will revert if the result does not fit in a `uint256`." + }, + "id": 2658, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseUint", + "nameLocation": "6263:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2640, + "mutability": "mutable", + "name": "input", + "nameLocation": "6290:5:14", + "nodeType": "VariableDeclaration", + "scope": 2658, + "src": "6276:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2639, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6276:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "6275:21:14" + }, + "returnParameters": { + "id": 2646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2643, + "mutability": "mutable", + "name": "success", + "nameLocation": "6325:7:14", + "nodeType": "VariableDeclaration", + "scope": 2658, + "src": "6320:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2642, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6320:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2645, + "mutability": "mutable", + "name": "value", + "nameLocation": "6342:5:14", + "nodeType": "VariableDeclaration", + "scope": 2658, + "src": "6334:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2644, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6334:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6319:29:14" + }, + "scope": 3678, + "src": "6254:178:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2694, + "nodeType": "Block", + "src": "6834:144:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2672, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2665, + "src": "6848:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 2675, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2661, + "src": "6860:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6854:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2673, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6854:5:14", + "typeDescriptions": {} + } + }, + "id": 2676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6854:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6867:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6854:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6848:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2679, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2663, + "src": "6877:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 2680, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2665, + "src": "6885:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6877:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6848:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2687, + "nodeType": "IfStatement", + "src": "6844:63:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 2683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6898:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 2684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6905:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 2685, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6897:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 2671, + "id": 2686, + "nodeType": "Return", + "src": "6890:17:14" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2689, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2661, + "src": "6953:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 2690, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2663, + "src": "6960:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2691, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2665, + "src": "6967:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2688, + "name": "_tryParseUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2765, + "src": "6924:28:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 2692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6924:47:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 2671, + "id": 2693, + "nodeType": "Return", + "src": "6917:54:14" + } + ] + }, + "documentation": { + "id": 2659, + "nodeType": "StructuredDocumentation", + "src": "6438:238:14", + "text": " @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n character.\n NOTE: This function will revert if the result does not fit in a `uint256`." + }, + "id": 2695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseUint", + "nameLocation": "6690:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2666, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2661, + "mutability": "mutable", + "name": "input", + "nameLocation": "6726:5:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6712:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6712:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2663, + "mutability": "mutable", + "name": "begin", + "nameLocation": "6749:5:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6741:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2662, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6741:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2665, + "mutability": "mutable", + "name": "end", + "nameLocation": "6772:3:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6764:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2664, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6764:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6702:79:14" + }, + "returnParameters": { + "id": 2671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2668, + "mutability": "mutable", + "name": "success", + "nameLocation": "6810:7:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6805:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2667, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6805:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2670, + "mutability": "mutable", + "name": "value", + "nameLocation": "6827:5:14", + "nodeType": "VariableDeclaration", + "scope": 2695, + "src": "6819:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6819:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6804:29:14" + }, + "scope": 3678, + "src": "6681:297:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2764, + "nodeType": "Block", + "src": "7381:347:14", + "statements": [ + { + "assignments": [ + 2710 + ], + "declarations": [ + { + "constant": false, + "id": 2710, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "7404:6:14", + "nodeType": "VariableDeclaration", + "scope": 2764, + "src": "7391:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2709, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7391:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2715, + "initialValue": { + "arguments": [ + { + "id": 2713, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2698, + "src": "7419:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2712, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7413:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2711, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7413:5:14", + "typeDescriptions": {} + } + }, + "id": 2714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7413:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7391:34:14" + }, + { + "assignments": [ + 2717 + ], + "declarations": [ + { + "constant": false, + "id": 2717, + "mutability": "mutable", + "name": "result", + "nameLocation": "7444:6:14", + "nodeType": "VariableDeclaration", + "scope": 2764, + "src": "7436:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2716, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7436:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2719, + "initialValue": { + "hexValue": "30", + "id": 2718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7453:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7436:18:14" + }, + { + "body": { + "id": 2758, + "nodeType": "Block", + "src": "7502:189:14", + "statements": [ + { + "assignments": [ + 2731 + ], + "declarations": [ + { + "constant": false, + "id": 2731, + "mutability": "mutable", + "name": "chr", + "nameLocation": "7522:3:14", + "nodeType": "VariableDeclaration", + "scope": 2758, + "src": "7516:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2730, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "7516:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 2741, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 2736, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2710, + "src": "7571:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 2737, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2721, + "src": "7579:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2735, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "7548:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 2738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7548:33:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7541:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2733, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "7541:6:14", + "typeDescriptions": {} + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7541:41:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 2732, + "name": "_tryParseChr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "7528:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_uint8_$", + "typeString": "function (bytes1) pure returns (uint8)" + } + }, + "id": 2740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7528:55:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7516:67:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2742, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2731, + "src": "7601:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "39", + "id": 2743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7607:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_9_by_1", + "typeString": "int_const 9" + }, + "value": "9" + }, + "src": "7601:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2749, + "nodeType": "IfStatement", + "src": "7597:30:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 2745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7618:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 2746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7625:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 2747, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7617:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 2708, + "id": 2748, + "nodeType": "Return", + "src": "7610:17:14" + } + }, + { + "expression": { + "id": 2752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2750, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2717, + "src": "7641:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "hexValue": "3130", + "id": 2751, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7651:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "7641:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2753, + "nodeType": "ExpressionStatement", + "src": "7641:12:14" + }, + { + "expression": { + "id": 2756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2754, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2717, + "src": "7667:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 2755, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2731, + "src": "7677:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "7667:13:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2757, + "nodeType": "ExpressionStatement", + "src": "7667:13:14" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2724, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2721, + "src": "7488:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 2725, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2702, + "src": "7492:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7488:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2759, + "initializationExpression": { + "assignments": [ + 2721 + ], + "declarations": [ + { + "constant": false, + "id": 2721, + "mutability": "mutable", + "name": "i", + "nameLocation": "7477:1:14", + "nodeType": "VariableDeclaration", + "scope": 2759, + "src": "7469:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7469:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2723, + "initialValue": { + "id": 2722, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2700, + "src": "7481:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7469:17:14" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 2728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "7497:3:14", + "subExpression": { + "id": 2727, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2721, + "src": "7499:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2729, + "nodeType": "ExpressionStatement", + "src": "7497:3:14" + }, + "nodeType": "ForStatement", + "src": "7464:227:14" + }, + { + "expression": { + "components": [ + { + "hexValue": "74727565", + "id": 2760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7708:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "id": 2761, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2717, + "src": "7714:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2762, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7707:14:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 2708, + "id": 2763, + "nodeType": "Return", + "src": "7700:21:14" + } + ] + }, + "documentation": { + "id": 2696, + "nodeType": "StructuredDocumentation", + "src": "6984:224:14", + "text": " @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n `begin <= end <= input.length`. Other inputs would result in undefined behavior." + }, + "id": 2765, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_tryParseUintUncheckedBounds", + "nameLocation": "7222:28:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2703, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2698, + "mutability": "mutable", + "name": "input", + "nameLocation": "7274:5:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7260:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2697, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7260:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2700, + "mutability": "mutable", + "name": "begin", + "nameLocation": "7297:5:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7289:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7289:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2702, + "mutability": "mutable", + "name": "end", + "nameLocation": "7320:3:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7312:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2701, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7312:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7250:79:14" + }, + "returnParameters": { + "id": 2708, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2705, + "mutability": "mutable", + "name": "success", + "nameLocation": "7357:7:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7352:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2704, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7352:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2707, + "mutability": "mutable", + "name": "value", + "nameLocation": "7374:5:14", + "nodeType": "VariableDeclaration", + "scope": 2765, + "src": "7366:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2706, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7366:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7351:29:14" + }, + "scope": 3678, + "src": "7213:515:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2783, + "nodeType": "Block", + "src": "8025:63:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2774, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2768, + "src": "8051:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 2775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8058:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 2778, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2768, + "src": "8067:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8061:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2776, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "8061:5:14", + "typeDescriptions": {} + } + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8061:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8074:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "8061:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2773, + "name": "parseInt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2784, + 2815 + ], + "referencedDeclaration": 2815, + "src": "8042:8:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_int256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (int256)" + } + }, + "id": 2781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8042:39:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 2772, + "id": 2782, + "nodeType": "Return", + "src": "8035:46:14" + } + ] + }, + "documentation": { + "id": 2766, + "nodeType": "StructuredDocumentation", + "src": "7734:216:14", + "text": " @dev Parse a decimal string and returns the value as a `int256`.\n Requirements:\n - The string must be formatted as `[-+]?[0-9]*`\n - The result must fit in an `int256` type." + }, + "id": 2784, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseInt", + "nameLocation": "7964:8:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2768, + "mutability": "mutable", + "name": "input", + "nameLocation": "7987:5:14", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "7973:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2767, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7973:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "7972:21:14" + }, + "returnParameters": { + "id": 2772, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2771, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2784, + "src": "8017:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2770, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "8017:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "8016:8:14" + }, + "scope": 3678, + "src": "7955:133:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2814, + "nodeType": "Block", + "src": "8493:151:14", + "statements": [ + { + "assignments": [ + 2797, + 2799 + ], + "declarations": [ + { + "constant": false, + "id": 2797, + "mutability": "mutable", + "name": "success", + "nameLocation": "8509:7:14", + "nodeType": "VariableDeclaration", + "scope": 2814, + "src": "8504:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2796, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8504:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2799, + "mutability": "mutable", + "name": "value", + "nameLocation": "8525:5:14", + "nodeType": "VariableDeclaration", + "scope": 2814, + "src": "8518:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2798, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "8518:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 2805, + "initialValue": { + "arguments": [ + { + "id": 2801, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2787, + "src": "8546:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 2802, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2789, + "src": "8553:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2803, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2791, + "src": "8560:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2800, + "name": "tryParseInt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2836, + 2878 + ], + "referencedDeclaration": 2878, + "src": "8534:11:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_int256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,int256)" + } + }, + "id": 2804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8534:30:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8503:61:14" + }, + { + "condition": { + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8578:8:14", + "subExpression": { + "id": 2806, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2797, + "src": "8579:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2811, + "nodeType": "IfStatement", + "src": "8574:41:14", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2808, + "name": "StringsInvalidChar", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2210, + "src": "8595:18:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 2809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8595:20:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 2810, + "nodeType": "RevertStatement", + "src": "8588:27:14" + } + }, + { + "expression": { + "id": 2812, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2799, + "src": "8632:5:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 2795, + "id": 2813, + "nodeType": "Return", + "src": "8625:12:14" + } + ] + }, + "documentation": { + "id": 2785, + "nodeType": "StructuredDocumentation", + "src": "8094:296:14", + "text": " @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n `end` (excluded).\n Requirements:\n - The substring must be formatted as `[-+]?[0-9]*`\n - The result must fit in an `int256` type." + }, + "id": 2815, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseInt", + "nameLocation": "8404:8:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2792, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2787, + "mutability": "mutable", + "name": "input", + "nameLocation": "8427:5:14", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "8413:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2786, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8413:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2789, + "mutability": "mutable", + "name": "begin", + "nameLocation": "8442:5:14", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "8434:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2788, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8434:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2791, + "mutability": "mutable", + "name": "end", + "nameLocation": "8457:3:14", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "8449:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2790, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8449:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8412:49:14" + }, + "returnParameters": { + "id": 2795, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2794, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2815, + "src": "8485:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2793, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "8485:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "8484:8:14" + }, + "scope": 3678, + "src": "8395:249:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2835, + "nodeType": "Block", + "src": "9035:82:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2826, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "9080:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9087:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 2830, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "9096:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9090:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2828, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9090:5:14", + "typeDescriptions": {} + } + }, + "id": 2831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9090:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9103:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9090:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2825, + "name": "_tryParseIntUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2999, + "src": "9052:27:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_int256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,int256)" + } + }, + "id": 2833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9052:58:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "functionReturnParameters": 2824, + "id": 2834, + "nodeType": "Return", + "src": "9045:65:14" + } + ] + }, + "documentation": { + "id": 2816, + "nodeType": "StructuredDocumentation", + "src": "8650:287:14", + "text": " @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n the result does not fit in a `int256`.\n NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`." + }, + "id": 2836, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseInt", + "nameLocation": "8951:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2818, + "mutability": "mutable", + "name": "input", + "nameLocation": "8977:5:14", + "nodeType": "VariableDeclaration", + "scope": 2836, + "src": "8963:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2817, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8963:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "8962:21:14" + }, + "returnParameters": { + "id": 2824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2821, + "mutability": "mutable", + "name": "success", + "nameLocation": "9012:7:14", + "nodeType": "VariableDeclaration", + "scope": 2836, + "src": "9007:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2820, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9007:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2823, + "mutability": "mutable", + "name": "value", + "nameLocation": "9028:5:14", + "nodeType": "VariableDeclaration", + "scope": 2836, + "src": "9021:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2822, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "9021:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "9006:28:14" + }, + "scope": 3678, + "src": "8942:175:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "constant": true, + "id": 2841, + "mutability": "constant", + "name": "ABS_MIN_INT256", + "nameLocation": "9148:14:14", + "nodeType": "VariableDeclaration", + "scope": 3678, + "src": "9123:50:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2837, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9123:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 2838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9165:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "323535", + "id": 2839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9170:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "9165:8:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 2877, + "nodeType": "Block", + "src": "9639:143:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2855, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2848, + "src": "9653:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 2858, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "9665:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9659:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2856, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9659:5:14", + "typeDescriptions": {} + } + }, + "id": 2859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9659:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "9672:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9659:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9653:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2862, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2846, + "src": "9682:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 2863, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2848, + "src": "9690:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9682:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9653:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2870, + "nodeType": "IfStatement", + "src": "9649:63:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 2866, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9703:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 2867, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9710:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 2868, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "9702:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 2854, + "id": 2869, + "nodeType": "Return", + "src": "9695:17:14" + } + }, + { + "expression": { + "arguments": [ + { + "id": 2872, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2844, + "src": "9757:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 2873, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2846, + "src": "9764:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2874, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2848, + "src": "9771:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2871, + "name": "_tryParseIntUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2999, + "src": "9729:27:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_int256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,int256)" + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9729:46:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "functionReturnParameters": 2854, + "id": 2876, + "nodeType": "Return", + "src": "9722:53:14" + } + ] + }, + "documentation": { + "id": 2842, + "nodeType": "StructuredDocumentation", + "src": "9180:303:14", + "text": " @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n character or if the result does not fit in a `int256`.\n NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`." + }, + "id": 2878, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseInt", + "nameLocation": "9497:11:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2844, + "mutability": "mutable", + "name": "input", + "nameLocation": "9532:5:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9518:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2843, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "9518:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2846, + "mutability": "mutable", + "name": "begin", + "nameLocation": "9555:5:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9547:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2845, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9547:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2848, + "mutability": "mutable", + "name": "end", + "nameLocation": "9578:3:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9570:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2847, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9570:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9508:79:14" + }, + "returnParameters": { + "id": 2854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2851, + "mutability": "mutable", + "name": "success", + "nameLocation": "9616:7:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9611:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2850, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9611:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2853, + "mutability": "mutable", + "name": "value", + "nameLocation": "9632:5:14", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "9625:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2852, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "9625:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "9610:28:14" + }, + "scope": 3678, + "src": "9488:294:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2998, + "nodeType": "Block", + "src": "10182:812:14", + "statements": [ + { + "assignments": [ + 2893 + ], + "declarations": [ + { + "constant": false, + "id": 2893, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "10205:6:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10192:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2892, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10192:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2898, + "initialValue": { + "arguments": [ + { + "id": 2896, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2881, + "src": "10220:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10214:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 2894, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10214:5:14", + "typeDescriptions": {} + } + }, + "id": 2897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10214:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10192:34:14" + }, + { + "assignments": [ + 2900 + ], + "declarations": [ + { + "constant": false, + "id": 2900, + "mutability": "mutable", + "name": "sign", + "nameLocation": "10290:4:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10283:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 2899, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10283:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "id": 2916, + "initialValue": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2901, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "10297:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2902, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "10306:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10297:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 2911, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2893, + "src": "10354:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 2912, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "10362:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2910, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "10331:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 2913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10331:37:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10324:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2908, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10324:6:14", + "typeDescriptions": {} + } + }, + "id": 2914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10324:45:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "10297:72:14", + "trueExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 2906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10319:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10312:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2904, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10312:6:14", + "typeDescriptions": {} + } + }, + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10312:9:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10283:86:14" + }, + { + "assignments": [ + 2918 + ], + "declarations": [ + { + "constant": false, + "id": 2918, + "mutability": "mutable", + "name": "positiveSign", + "nameLocation": "10455:12:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10450:17:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2917, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10450:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 2925, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 2924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2919, + "name": "sign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2900, + "src": "10470:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "2b", + "id": 2922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10485:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_728b8dbbe730d9acd55e30e768e6a28a04bea0c61b88108287c2c87d79c98bb8", + "typeString": "literal_string \"+\"" + }, + "value": "+" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_728b8dbbe730d9acd55e30e768e6a28a04bea0c61b88108287c2c87d79c98bb8", + "typeString": "literal_string \"+\"" + } + ], + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10478:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2920, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10478:6:14", + "typeDescriptions": {} + } + }, + "id": 2923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10478:11:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "10470:19:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10450:39:14" + }, + { + "assignments": [ + 2927 + ], + "declarations": [ + { + "constant": false, + "id": 2927, + "mutability": "mutable", + "name": "negativeSign", + "nameLocation": "10504:12:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10499:17:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2926, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10499:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 2934, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2928, + "name": "sign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2900, + "src": "10519:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "2d", + "id": 2931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10534:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", + "typeString": "literal_string \"-\"" + }, + "value": "-" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d3b8281179950f98149eefdb158d0e1acb56f56e8e343aa9fefafa7e36959561", + "typeString": "literal_string \"-\"" + } + ], + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10527:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2929, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "10527:6:14", + "typeDescriptions": {} + } + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10527:11:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "10519:19:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10499:39:14" + }, + { + "assignments": [ + 2936 + ], + "declarations": [ + { + "constant": false, + "id": 2936, + "mutability": "mutable", + "name": "offset", + "nameLocation": "10556:6:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10548:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10548:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2943, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2937, + "name": "positiveSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2918, + "src": "10566:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "id": 2938, + "name": "negativeSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2927, + "src": "10582:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10566:28:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 2940, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10565:30:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "10596:6:14", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "10565:37:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$attached_to$_t_bool_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10565:39:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10548:56:14" + }, + { + "assignments": [ + 2945, + 2947 + ], + "declarations": [ + { + "constant": false, + "id": 2945, + "mutability": "mutable", + "name": "absSuccess", + "nameLocation": "10621:10:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10616:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2944, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10616:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2947, + "mutability": "mutable", + "name": "absValue", + "nameLocation": "10641:8:14", + "nodeType": "VariableDeclaration", + "scope": 2998, + "src": "10633:16:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2946, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10633:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2955, + "initialValue": { + "arguments": [ + { + "id": 2949, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2881, + "src": "10666:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2950, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2883, + "src": "10673:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 2951, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "10681:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10673:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 2953, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2885, + "src": "10689:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2948, + "name": "tryParseUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2658, + 2695 + ], + "referencedDeclaration": 2695, + "src": "10653:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 2954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10653:40:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10615:78:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2956, + "name": "absSuccess", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2945, + "src": "10708:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2957, + "name": "absValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2947, + "src": "10722:8:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 2958, + "name": "ABS_MIN_INT256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "10733:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10722:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10708:39:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2976, + "name": "absSuccess", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2945, + "src": "10850:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 2977, + "name": "negativeSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2927, + "src": "10864:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10850:26:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2979, + "name": "absValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2947, + "src": "10880:8:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2980, + "name": "ABS_MIN_INT256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2841, + "src": "10892:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10880:26:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10850:56:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 2992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10978:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 2993, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10985:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 2994, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10977:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 2891, + "id": 2995, + "nodeType": "Return", + "src": "10970:17:14" + }, + "id": 2996, + "nodeType": "IfStatement", + "src": "10846:141:14", + "trueBody": { + "id": 2991, + "nodeType": "Block", + "src": "10908:56:14", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "74727565", + "id": 2983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10930:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "expression": { + "arguments": [ + { + "id": 2986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10941:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 2985, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "10941:6:14", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + } + ], + "id": 2984, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "10936:4:14", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10936:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_int256", + "typeString": "type(int256)" + } + }, + "id": 2988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10949:3:14", + "memberName": "min", + "nodeType": "MemberAccess", + "src": "10936:16:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 2989, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10929:24:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "functionReturnParameters": 2891, + "id": 2990, + "nodeType": "Return", + "src": "10922:31:14" + } + ] + } + }, + "id": 2997, + "nodeType": "IfStatement", + "src": "10704:283:14", + "trueBody": { + "id": 2975, + "nodeType": "Block", + "src": "10749:91:14", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "74727565", + "id": 2961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10771:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "condition": { + "id": 2962, + "name": "negativeSign", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2927, + "src": "10777:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "arguments": [ + { + "id": 2970, + "name": "absValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2947, + "src": "10819:8:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10812:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 2968, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "10812:6:14", + "typeDescriptions": {} + } + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10812:16:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 2972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "10777:51:14", + "trueExpression": { + "id": 2967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "10792:17:14", + "subExpression": { + "arguments": [ + { + "id": 2965, + "name": "absValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2947, + "src": "10800:8:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10793:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 2963, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "10793:6:14", + "typeDescriptions": {} + } + }, + "id": 2966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10793:16:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 2973, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10770:59:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_int256_$", + "typeString": "tuple(bool,int256)" + } + }, + "functionReturnParameters": 2891, + "id": 2974, + "nodeType": "Return", + "src": "10763:66:14" + } + ] + } + } + ] + }, + "documentation": { + "id": 2879, + "nodeType": "StructuredDocumentation", + "src": "9788:223:14", + "text": " @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n `begin <= end <= input.length`. Other inputs would result in undefined behavior." + }, + "id": 2999, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_tryParseIntUncheckedBounds", + "nameLocation": "10025:27:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2886, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2881, + "mutability": "mutable", + "name": "input", + "nameLocation": "10076:5:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10062:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2880, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "10062:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2883, + "mutability": "mutable", + "name": "begin", + "nameLocation": "10099:5:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10091:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2882, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10091:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2885, + "mutability": "mutable", + "name": "end", + "nameLocation": "10122:3:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10114:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2884, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10114:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10052:79:14" + }, + "returnParameters": { + "id": 2891, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2888, + "mutability": "mutable", + "name": "success", + "nameLocation": "10159:7:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10154:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2887, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10154:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2890, + "mutability": "mutable", + "name": "value", + "nameLocation": "10175:5:14", + "nodeType": "VariableDeclaration", + "scope": 2999, + "src": "10168:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 2889, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "10168:6:14", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "10153:28:14" + }, + "scope": 3678, + "src": "10016:978:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3017, + "nodeType": "Block", + "src": "11339:67:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3008, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3002, + "src": "11369:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 3009, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11376:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 3012, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3002, + "src": "11385:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11379:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3010, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "11379:5:14", + "typeDescriptions": {} + } + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11379:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11392:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "11379:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3007, + "name": "parseHexUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3018, + 3049 + ], + "referencedDeclaration": 3049, + "src": "11356:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (uint256)" + } + }, + "id": 3015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11356:43:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3006, + "id": 3016, + "nodeType": "Return", + "src": "11349:50:14" + } + ] + }, + "documentation": { + "id": 3000, + "nodeType": "StructuredDocumentation", + "src": "11000:259:14", + "text": " @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n Requirements:\n - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n - The result must fit in an `uint256` type." + }, + "id": 3018, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseHexUint", + "nameLocation": "11273:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3002, + "mutability": "mutable", + "name": "input", + "nameLocation": "11300:5:14", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "11286:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3001, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11286:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "11285:21:14" + }, + "returnParameters": { + "id": 3006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3005, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3018, + "src": "11330:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11330:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11329:9:14" + }, + "scope": 3678, + "src": "11264:142:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3048, + "nodeType": "Block", + "src": "11827:156:14", + "statements": [ + { + "assignments": [ + 3031, + 3033 + ], + "declarations": [ + { + "constant": false, + "id": 3031, + "mutability": "mutable", + "name": "success", + "nameLocation": "11843:7:14", + "nodeType": "VariableDeclaration", + "scope": 3048, + "src": "11838:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3030, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11838:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3033, + "mutability": "mutable", + "name": "value", + "nameLocation": "11860:5:14", + "nodeType": "VariableDeclaration", + "scope": 3048, + "src": "11852:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3032, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11852:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3039, + "initialValue": { + "arguments": [ + { + "id": 3035, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3021, + "src": "11885:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3036, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3023, + "src": "11892:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3037, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3025, + "src": "11899:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3034, + "name": "tryParseHexUint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3070, + 3107 + ], + "referencedDeclaration": 3107, + "src": "11869:15:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11869:34:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11837:66:14" + }, + { + "condition": { + "id": 3041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "11917:8:14", + "subExpression": { + "id": 3040, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3031, + "src": "11918:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3045, + "nodeType": "IfStatement", + "src": "11913:41:14", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3042, + "name": "StringsInvalidChar", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2210, + "src": "11934:18:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 3043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11934:20:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 3044, + "nodeType": "RevertStatement", + "src": "11927:27:14" + } + }, + { + "expression": { + "id": 3046, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3033, + "src": "11971:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3029, + "id": 3047, + "nodeType": "Return", + "src": "11964:12:14" + } + ] + }, + "documentation": { + "id": 3019, + "nodeType": "StructuredDocumentation", + "src": "11412:307:14", + "text": " @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n `end` (excluded).\n Requirements:\n - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n - The result must fit in an `uint256` type." + }, + "id": 3049, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseHexUint", + "nameLocation": "11733:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3026, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3021, + "mutability": "mutable", + "name": "input", + "nameLocation": "11760:5:14", + "nodeType": "VariableDeclaration", + "scope": 3049, + "src": "11746:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3020, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "11746:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3023, + "mutability": "mutable", + "name": "begin", + "nameLocation": "11775:5:14", + "nodeType": "VariableDeclaration", + "scope": 3049, + "src": "11767:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3022, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11767:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3025, + "mutability": "mutable", + "name": "end", + "nameLocation": "11790:3:14", + "nodeType": "VariableDeclaration", + "scope": 3049, + "src": "11782:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3024, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11782:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11745:49:14" + }, + "returnParameters": { + "id": 3029, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3028, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3049, + "src": "11818:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3027, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11818:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11817:9:14" + }, + "scope": 3678, + "src": "11724:259:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3069, + "nodeType": "Block", + "src": "12310:86:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3060, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3052, + "src": "12359:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 3061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12366:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 3064, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3052, + "src": "12375:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12369:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3062, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "12369:5:14", + "typeDescriptions": {} + } + }, + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12369:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12382:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "12369:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3059, + "name": "_tryParseHexUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3210, + "src": "12327:31:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 3067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12327:62:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 3058, + "id": 3068, + "nodeType": "Return", + "src": "12320:69:14" + } + ] + }, + "documentation": { + "id": 3050, + "nodeType": "StructuredDocumentation", + "src": "11989:218:14", + "text": " @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n NOTE: This function will revert if the result does not fit in a `uint256`." + }, + "id": 3070, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseHexUint", + "nameLocation": "12221:15:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3052, + "mutability": "mutable", + "name": "input", + "nameLocation": "12251:5:14", + "nodeType": "VariableDeclaration", + "scope": 3070, + "src": "12237:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3051, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12237:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "12236:21:14" + }, + "returnParameters": { + "id": 3058, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3055, + "mutability": "mutable", + "name": "success", + "nameLocation": "12286:7:14", + "nodeType": "VariableDeclaration", + "scope": 3070, + "src": "12281:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12281:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "value", + "nameLocation": "12303:5:14", + "nodeType": "VariableDeclaration", + "scope": 3070, + "src": "12295:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3056, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12295:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12280:29:14" + }, + "scope": 3678, + "src": "12212:184:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3106, + "nodeType": "Block", + "src": "12804:147:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3084, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3077, + "src": "12818:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 3087, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3073, + "src": "12830:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3086, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12824:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3085, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "12824:5:14", + "typeDescriptions": {} + } + }, + "id": 3088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12824:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12837:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "12824:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12818:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3091, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3075, + "src": "12847:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 3092, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3077, + "src": "12855:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12847:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12818:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3099, + "nodeType": "IfStatement", + "src": "12814:63:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12868:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 3096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12875:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 3097, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12867:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 3083, + "id": 3098, + "nodeType": "Return", + "src": "12860:17:14" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3101, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3073, + "src": "12926:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3102, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3075, + "src": "12933:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3103, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3077, + "src": "12940:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3100, + "name": "_tryParseHexUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3210, + "src": "12894:31:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12894:50:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 3083, + "id": 3105, + "nodeType": "Return", + "src": "12887:57:14" + } + ] + }, + "documentation": { + "id": 3071, + "nodeType": "StructuredDocumentation", + "src": "12402:241:14", + "text": " @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n invalid character.\n NOTE: This function will revert if the result does not fit in a `uint256`." + }, + "id": 3107, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseHexUint", + "nameLocation": "12657:15:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3073, + "mutability": "mutable", + "name": "input", + "nameLocation": "12696:5:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12682:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3072, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12682:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3075, + "mutability": "mutable", + "name": "begin", + "nameLocation": "12719:5:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12711:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3074, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12711:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3077, + "mutability": "mutable", + "name": "end", + "nameLocation": "12742:3:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12734:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12734:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12672:79:14" + }, + "returnParameters": { + "id": 3083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3080, + "mutability": "mutable", + "name": "success", + "nameLocation": "12780:7:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12775:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3079, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12775:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "value", + "nameLocation": "12797:5:14", + "nodeType": "VariableDeclaration", + "scope": 3107, + "src": "12789:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12789:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12774:29:14" + }, + "scope": 3678, + "src": "12648:303:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3209, + "nodeType": "Block", + "src": "13360:881:14", + "statements": [ + { + "assignments": [ + 3122 + ], + "declarations": [ + { + "constant": false, + "id": 3122, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "13383:6:14", + "nodeType": "VariableDeclaration", + "scope": 3209, + "src": "13370:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3121, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13370:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 3127, + "initialValue": { + "arguments": [ + { + "id": 3125, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3110, + "src": "13398:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13392:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3123, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13392:5:14", + "typeDescriptions": {} + } + }, + "id": 3126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13392:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13370:34:14" + }, + { + "assignments": [ + 3129 + ], + "declarations": [ + { + "constant": false, + "id": 3129, + "mutability": "mutable", + "name": "hasPrefix", + "nameLocation": "13457:9:14", + "nodeType": "VariableDeclaration", + "scope": 3209, + "src": "13452:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3128, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13452:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 3149, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3130, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "13470:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3131, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13476:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 3132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13484:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "13476:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13470:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3135, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13469:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 3147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 3139, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "13520:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3140, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13528:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3138, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "13497:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 3141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13497:37:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13490:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes2_$", + "typeString": "type(bytes2)" + }, + "typeName": { + "id": 3136, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "13490:6:14", + "typeDescriptions": {} + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13490:45:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "3078", + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13546:4:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39bef1777deb3dfb14f64b9f81ced092c501fee72f90e93d03bb95ee89df9837", + "typeString": "literal_string \"0x\"" + }, + "value": "0x" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_39bef1777deb3dfb14f64b9f81ced092c501fee72f90e93d03bb95ee89df9837", + "typeString": "literal_string \"0x\"" + } + ], + "id": 3144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13539:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes2_$", + "typeString": "type(bytes2)" + }, + "typeName": { + "id": 3143, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "13539:6:14", + "typeDescriptions": {} + } + }, + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13539:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "src": "13490:61:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13469:82:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13452:99:14" + }, + { + "assignments": [ + 3151 + ], + "declarations": [ + { + "constant": false, + "id": 3151, + "mutability": "mutable", + "name": "offset", + "nameLocation": "13640:6:14", + "nodeType": "VariableDeclaration", + "scope": 3209, + "src": "13632:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13632:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3157, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 3152, + "name": "hasPrefix", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3129, + "src": "13649:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "13659:6:14", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "13649:16:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$attached_to$_t_bool_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 3154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13649:18:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "32", + "id": 3155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13670:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "13649:22:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13632:39:14" + }, + { + "assignments": [ + 3159 + ], + "declarations": [ + { + "constant": false, + "id": 3159, + "mutability": "mutable", + "name": "result", + "nameLocation": "13690:6:14", + "nodeType": "VariableDeclaration", + "scope": 3209, + "src": "13682:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3158, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13682:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3161, + "initialValue": { + "hexValue": "30", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13682:18:14" + }, + { + "body": { + "id": 3203, + "nodeType": "Block", + "src": "13757:447:14", + "statements": [ + { + "assignments": [ + 3175 + ], + "declarations": [ + { + "constant": false, + "id": 3175, + "mutability": "mutable", + "name": "chr", + "nameLocation": "13777:3:14", + "nodeType": "VariableDeclaration", + "scope": 3203, + "src": "13771:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3174, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13771:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3185, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 3180, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3122, + "src": "13826:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3181, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3163, + "src": "13834:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3179, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "13803:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 3182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13803:33:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13796:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 3177, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "13796:6:14", + "typeDescriptions": {} + } + }, + "id": 3183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13796:41:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3176, + "name": "_tryParseChr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3445, + "src": "13783:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_uint8_$", + "typeString": "function (bytes1) pure returns (uint8)" + } + }, + "id": 3184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13783:55:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13771:67:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3186, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "13856:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3135", + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13862:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "15" + }, + "src": "13856:8:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3193, + "nodeType": "IfStatement", + "src": "13852:31:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 3189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13874:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 3190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13881:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 3191, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13873:10:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 3120, + "id": 3192, + "nodeType": "Return", + "src": "13866:17:14" + } + }, + { + "expression": { + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3194, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3159, + "src": "13897:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "hexValue": "3136", + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13907:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "13897:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3197, + "nodeType": "ExpressionStatement", + "src": "13897:12:14" + }, + { + "id": 3202, + "nodeType": "UncheckedBlock", + "src": "13923:271:14", + "statements": [ + { + "expression": { + "id": 3200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3198, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3159, + "src": "14166:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 3199, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3175, + "src": "14176:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "14166:13:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3201, + "nodeType": "ExpressionStatement", + "src": "14166:13:14" + } + ] + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3168, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3163, + "src": "13743:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 3169, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "13747:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13743:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3204, + "initializationExpression": { + "assignments": [ + 3163 + ], + "declarations": [ + { + "constant": false, + "id": 3163, + "mutability": "mutable", + "name": "i", + "nameLocation": "13723:1:14", + "nodeType": "VariableDeclaration", + "scope": 3204, + "src": "13715:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3162, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13715:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3167, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3164, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13727:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 3165, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3151, + "src": "13735:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13727:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13715:26:14" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "13752:3:14", + "subExpression": { + "id": 3171, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3163, + "src": "13754:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3173, + "nodeType": "ExpressionStatement", + "src": "13752:3:14" + }, + "nodeType": "ForStatement", + "src": "13710:494:14" + }, + { + "expression": { + "components": [ + { + "hexValue": "74727565", + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14221:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "id": 3206, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3159, + "src": "14227:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3207, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14220:14:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "functionReturnParameters": 3120, + "id": 3208, + "nodeType": "Return", + "src": "14213:21:14" + } + ] + }, + "documentation": { + "id": 3108, + "nodeType": "StructuredDocumentation", + "src": "12957:227:14", + "text": " @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n `begin <= end <= input.length`. Other inputs would result in undefined behavior." + }, + "id": 3210, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_tryParseHexUintUncheckedBounds", + "nameLocation": "13198:31:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3110, + "mutability": "mutable", + "name": "input", + "nameLocation": "13253:5:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13239:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3109, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "13239:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3112, + "mutability": "mutable", + "name": "begin", + "nameLocation": "13276:5:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13268:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13268:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3114, + "mutability": "mutable", + "name": "end", + "nameLocation": "13299:3:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13291:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3113, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13291:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13229:79:14" + }, + "returnParameters": { + "id": 3120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3117, + "mutability": "mutable", + "name": "success", + "nameLocation": "13336:7:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13331:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3116, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13331:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3119, + "mutability": "mutable", + "name": "value", + "nameLocation": "13353:5:14", + "nodeType": "VariableDeclaration", + "scope": 3210, + "src": "13345:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13345:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13330:29:14" + }, + "scope": 3678, + "src": "13189:1052:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3228, + "nodeType": "Block", + "src": "14539:67:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3219, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3213, + "src": "14569:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14576:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 3223, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3213, + "src": "14585:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14579:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3221, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "14579:5:14", + "typeDescriptions": {} + } + }, + "id": 3224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14579:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "14592:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "14579:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3218, + "name": "parseAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3229, + 3260 + ], + "referencedDeclaration": 3260, + "src": "14556:12:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_address_$", + "typeString": "function (string memory,uint256,uint256) pure returns (address)" + } + }, + "id": 3226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14556:43:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3217, + "id": 3227, + "nodeType": "Return", + "src": "14549:50:14" + } + ] + }, + "documentation": { + "id": 3211, + "nodeType": "StructuredDocumentation", + "src": "14247:212:14", + "text": " @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n Requirements:\n - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`" + }, + "id": 3229, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseAddress", + "nameLocation": "14473:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3213, + "mutability": "mutable", + "name": "input", + "nameLocation": "14500:5:14", + "nodeType": "VariableDeclaration", + "scope": 3229, + "src": "14486:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3212, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14486:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "14485:21:14" + }, + "returnParameters": { + "id": 3217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3216, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3229, + "src": "14530:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14530:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14529:9:14" + }, + "scope": 3678, + "src": "14464:142:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3259, + "nodeType": "Block", + "src": "14979:165:14", + "statements": [ + { + "assignments": [ + 3242, + 3244 + ], + "declarations": [ + { + "constant": false, + "id": 3242, + "mutability": "mutable", + "name": "success", + "nameLocation": "14995:7:14", + "nodeType": "VariableDeclaration", + "scope": 3259, + "src": "14990:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3241, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14990:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3244, + "mutability": "mutable", + "name": "value", + "nameLocation": "15012:5:14", + "nodeType": "VariableDeclaration", + "scope": 3259, + "src": "15004:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15004:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3250, + "initialValue": { + "arguments": [ + { + "id": 3246, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3232, + "src": "15037:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3247, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3234, + "src": "15044:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3248, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "15051:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3245, + "name": "tryParseAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3281, + 3385 + ], + "referencedDeclaration": 3385, + "src": "15021:15:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_address_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,address)" + } + }, + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15021:34:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14989:66:14" + }, + { + "condition": { + "id": 3252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "15069:8:14", + "subExpression": { + "id": 3251, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3242, + "src": "15070:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3256, + "nodeType": "IfStatement", + "src": "15065:50:14", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3253, + "name": "StringsInvalidAddressFormat", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2213, + "src": "15086:27:14", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 3254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15086:29:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 3255, + "nodeType": "RevertStatement", + "src": "15079:36:14" + } + }, + { + "expression": { + "id": 3257, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3244, + "src": "15132:5:14", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3240, + "id": 3258, + "nodeType": "Return", + "src": "15125:12:14" + } + ] + }, + "documentation": { + "id": 3230, + "nodeType": "StructuredDocumentation", + "src": "14612:259:14", + "text": " @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n `end` (excluded).\n Requirements:\n - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`" + }, + "id": 3260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseAddress", + "nameLocation": "14885:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3232, + "mutability": "mutable", + "name": "input", + "nameLocation": "14912:5:14", + "nodeType": "VariableDeclaration", + "scope": 3260, + "src": "14898:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3231, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "14898:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3234, + "mutability": "mutable", + "name": "begin", + "nameLocation": "14927:5:14", + "nodeType": "VariableDeclaration", + "scope": 3260, + "src": "14919:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3233, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14919:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3236, + "mutability": "mutable", + "name": "end", + "nameLocation": "14942:3:14", + "nodeType": "VariableDeclaration", + "scope": 3260, + "src": "14934:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14934:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14897:49:14" + }, + "returnParameters": { + "id": 3240, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3239, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3260, + "src": "14970:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14970:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14969:9:14" + }, + "scope": 3678, + "src": "14876:268:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3280, + "nodeType": "Block", + "src": "15451:70:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3271, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3263, + "src": "15484:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "30", + "id": 3272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15491:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "expression": { + "arguments": [ + { + "id": 3275, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3263, + "src": "15500:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15494:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3273, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "15494:5:14", + "typeDescriptions": {} + } + }, + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15494:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15507:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "15494:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3270, + "name": "tryParseAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3281, + 3385 + ], + "referencedDeclaration": 3385, + "src": "15468:15:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_address_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,address)" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15468:46:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "functionReturnParameters": 3269, + "id": 3279, + "nodeType": "Return", + "src": "15461:53:14" + } + ] + }, + "documentation": { + "id": 3261, + "nodeType": "StructuredDocumentation", + "src": "15150:198:14", + "text": " @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n formatted address. See {parseAddress-string} requirements." + }, + "id": 3281, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseAddress", + "nameLocation": "15362:15:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3263, + "mutability": "mutable", + "name": "input", + "nameLocation": "15392:5:14", + "nodeType": "VariableDeclaration", + "scope": 3281, + "src": "15378:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3262, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "15378:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "15377:21:14" + }, + "returnParameters": { + "id": 3269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3266, + "mutability": "mutable", + "name": "success", + "nameLocation": "15427:7:14", + "nodeType": "VariableDeclaration", + "scope": 3281, + "src": "15422:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3265, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15422:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3268, + "mutability": "mutable", + "name": "value", + "nameLocation": "15444:5:14", + "nodeType": "VariableDeclaration", + "scope": 3281, + "src": "15436:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3267, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15436:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "15421:29:14" + }, + "scope": 3678, + "src": "15353:168:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3384, + "nodeType": "Block", + "src": "15914:733:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3295, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "15928:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 3298, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "15940:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15934:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3296, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "15934:5:14", + "typeDescriptions": {} + } + }, + "id": 3299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15934:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15947:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "15934:19:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15928:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3302, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "15957:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 3303, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "15965:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15957:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "15928:40:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3313, + "nodeType": "IfStatement", + "src": "15924:72:14", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 3306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15978:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15993:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15985:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3307, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15985:7:14", + "typeDescriptions": {} + } + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15985:10:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 3311, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15977:19:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "functionReturnParameters": 3294, + "id": 3312, + "nodeType": "Return", + "src": "15970:26:14" + } + }, + { + "assignments": [ + 3315 + ], + "declarations": [ + { + "constant": false, + "id": 3315, + "mutability": "mutable", + "name": "hasPrefix", + "nameLocation": "16012:9:14", + "nodeType": "VariableDeclaration", + "scope": 3384, + "src": "16007:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3314, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16007:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 3338, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3316, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "16025:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3317, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16031:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 3318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16039:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "16031:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16025:15:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3321, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16024:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 3327, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "16081:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16075:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3325, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "16075:5:14", + "typeDescriptions": {} + } + }, + "id": 3328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16075:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3329, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16089:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3324, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "16052:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 3330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16052:43:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16045:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes2_$", + "typeString": "type(bytes2)" + }, + "typeName": { + "id": 3322, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "16045:6:14", + "typeDescriptions": {} + } + }, + "id": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16045:51:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "3078", + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16107:4:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39bef1777deb3dfb14f64b9f81ced092c501fee72f90e93d03bb95ee89df9837", + "typeString": "literal_string \"0x\"" + }, + "value": "0x" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_39bef1777deb3dfb14f64b9f81ced092c501fee72f90e93d03bb95ee89df9837", + "typeString": "literal_string \"0x\"" + } + ], + "id": 3333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16100:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes2_$", + "typeString": "type(bytes2)" + }, + "typeName": { + "id": 3332, + "name": "bytes2", + "nodeType": "ElementaryTypeName", + "src": "16100:6:14", + "typeDescriptions": {} + } + }, + "id": 3335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16100:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes2", + "typeString": "bytes2" + } + }, + "src": "16045:67:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16024:88:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16007:105:14" + }, + { + "assignments": [ + 3340 + ], + "declarations": [ + { + "constant": false, + "id": 3340, + "mutability": "mutable", + "name": "expectedLength", + "nameLocation": "16201:14:14", + "nodeType": "VariableDeclaration", + "scope": 3384, + "src": "16193:22:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3339, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16193:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3348, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3430", + "id": 3341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16218:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 3342, + "name": "hasPrefix", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3315, + "src": "16223:9:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16233:6:14", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "16223:16:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$attached_to$_t_bool_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16223:18:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "32", + "id": 3345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16244:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "16223:22:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16218:27:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16193:52:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3349, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "16310:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 3350, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16316:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16310:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3352, + "name": "expectedLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3340, + "src": "16325:14:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16310:29:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3382, + "nodeType": "Block", + "src": "16590:51:14", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 3375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16612:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 3378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16627:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16619:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16619:7:14", + "typeDescriptions": {} + } + }, + "id": 3379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16619:10:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 3380, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16611:19:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "functionReturnParameters": 3294, + "id": 3381, + "nodeType": "Return", + "src": "16604:26:14" + } + ] + }, + "id": 3383, + "nodeType": "IfStatement", + "src": "16306:335:14", + "trueBody": { + "id": 3374, + "nodeType": "Block", + "src": "16341:243:14", + "statements": [ + { + "assignments": [ + 3355, + 3357 + ], + "declarations": [ + { + "constant": false, + "id": 3355, + "mutability": "mutable", + "name": "s", + "nameLocation": "16462:1:14", + "nodeType": "VariableDeclaration", + "scope": 3374, + "src": "16457:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3354, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16457:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3357, + "mutability": "mutable", + "name": "v", + "nameLocation": "16473:1:14", + "nodeType": "VariableDeclaration", + "scope": 3374, + "src": "16465:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16465:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3363, + "initialValue": { + "arguments": [ + { + "id": 3359, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "16510:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3360, + "name": "begin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16517:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3361, + "name": "end", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "16524:3:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3358, + "name": "_tryParseHexUintUncheckedBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3210, + "src": "16478:31:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (string memory,uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 3362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16478:50:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16456:72:14" + }, + { + "expression": { + "components": [ + { + "id": 3364, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3355, + "src": "16550:1:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 3369, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3357, + "src": "16569:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16561:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 3367, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "16561:7:14", + "typeDescriptions": {} + } + }, + "id": 3370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16561:10:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 3366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16553:7:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16553:7:14", + "typeDescriptions": {} + } + }, + "id": 3371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16553:19:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 3372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16549:24:14", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_address_$", + "typeString": "tuple(bool,address)" + } + }, + "functionReturnParameters": 3294, + "id": 3373, + "nodeType": "Return", + "src": "16542:31:14" + } + ] + } + } + ] + }, + "documentation": { + "id": 3282, + "nodeType": "StructuredDocumentation", + "src": "15527:226:14", + "text": " @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n formatted address. See {parseAddress-string-uint256-uint256} requirements." + }, + "id": 3385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryParseAddress", + "nameLocation": "15767:15:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3289, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3284, + "mutability": "mutable", + "name": "input", + "nameLocation": "15806:5:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15792:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "15792:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3286, + "mutability": "mutable", + "name": "begin", + "nameLocation": "15829:5:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15821:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3285, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15821:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3288, + "mutability": "mutable", + "name": "end", + "nameLocation": "15852:3:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15844:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15844:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15782:79:14" + }, + "returnParameters": { + "id": 3294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3291, + "mutability": "mutable", + "name": "success", + "nameLocation": "15890:7:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15885:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3290, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "15885:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3293, + "mutability": "mutable", + "name": "value", + "nameLocation": "15907:5:14", + "nodeType": "VariableDeclaration", + "scope": 3385, + "src": "15899:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3292, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15899:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "15884:29:14" + }, + "scope": 3678, + "src": "15758:889:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3444, + "nodeType": "Block", + "src": "16716:461:14", + "statements": [ + { + "assignments": [ + 3393 + ], + "declarations": [ + { + "constant": false, + "id": 3393, + "mutability": "mutable", + "name": "value", + "nameLocation": "16732:5:14", + "nodeType": "VariableDeclaration", + "scope": 3444, + "src": "16726:11:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3392, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16726:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3398, + "initialValue": { + "arguments": [ + { + "id": 3396, + "name": "chr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3387, + "src": "16746:3:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16740:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3394, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16740:5:14", + "typeDescriptions": {} + } + }, + "id": 3397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16740:10:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16726:24:14" + }, + { + "id": 3441, + "nodeType": "UncheckedBlock", + "src": "16910:238:14", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3399, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "16938:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3437", + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16946:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_47_by_1", + "typeString": "int_const 47" + }, + "value": "47" + }, + "src": "16938:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3402, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "16952:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "3538", + "id": 3403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16960:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_58_by_1", + "typeString": "int_const 58" + }, + "value": "58" + }, + "src": "16952:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16938:24:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3410, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "16998:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3936", + "id": 3411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17006:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + "src": "16998:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3413, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17012:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "313033", + "id": 3414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17020:3:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_103_by_1", + "typeString": "int_const 103" + }, + "value": "103" + }, + "src": "17012:11:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16998:25:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3421, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17059:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "3634", + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17067:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "17059:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3424, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17073:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "3731", + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17081:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_71_by_1", + "typeString": "int_const 71" + }, + "value": "71" + }, + "src": "17073:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17059:24:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "expression": { + "arguments": [ + { + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17127:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3433, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "17127:5:14", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + } + ], + "id": 3432, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "17122:4:14", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17122:11:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint8", + "typeString": "type(uint8)" + } + }, + "id": 3436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "17134:3:14", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "17122:15:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3391, + "id": 3437, + "nodeType": "Return", + "src": "17115:22:14" + }, + "id": 3438, + "nodeType": "IfStatement", + "src": "17055:82:14", + "trueBody": { + "expression": { + "id": 3430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3428, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17085:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "3535", + "id": 3429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17094:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_55_by_1", + "typeString": "int_const 55" + }, + "value": "55" + }, + "src": "17085:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3431, + "nodeType": "ExpressionStatement", + "src": "17085:11:14" + } + }, + "id": 3439, + "nodeType": "IfStatement", + "src": "16994:143:14", + "trueBody": { + "expression": { + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3417, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17025:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "3837", + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17034:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_87_by_1", + "typeString": "int_const 87" + }, + "value": "87" + }, + "src": "17025:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3420, + "nodeType": "ExpressionStatement", + "src": "17025:11:14" + } + }, + "id": 3440, + "nodeType": "IfStatement", + "src": "16934:203:14", + "trueBody": { + "expression": { + "id": 3408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3406, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "16964:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "3438", + "id": 3407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16973:2:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "src": "16964:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3409, + "nodeType": "ExpressionStatement", + "src": "16964:11:14" + } + } + ] + }, + { + "expression": { + "id": 3442, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3393, + "src": "17165:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3391, + "id": 3443, + "nodeType": "Return", + "src": "17158:12:14" + } + ] + }, + "id": 3445, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_tryParseChr", + "nameLocation": "16662:12:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3388, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3387, + "mutability": "mutable", + "name": "chr", + "nameLocation": "16682:3:14", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "16675:10:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 3386, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "16675:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "16674:12:14" + }, + "returnParameters": { + "id": 3391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3390, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3445, + "src": "16709:5:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3389, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16709:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "16708:7:14" + }, + "scope": 3678, + "src": "16653:524:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3652, + "nodeType": "Block", + "src": "17984:2333:14", + "statements": [ + { + "assignments": [ + 3454 + ], + "declarations": [ + { + "constant": false, + "id": 3454, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "18007:6:14", + "nodeType": "VariableDeclaration", + "scope": 3652, + "src": "17994:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3453, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "17994:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 3459, + "initialValue": { + "arguments": [ + { + "id": 3457, + "name": "input", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3448, + "src": "18022:5:14", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18016:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3455, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18016:5:14", + "typeDescriptions": {} + } + }, + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18016:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17994:34:14" + }, + { + "assignments": [ + 3461 + ], + "declarations": [ + { + "constant": false, + "id": 3461, + "mutability": "mutable", + "name": "output", + "nameLocation": "18318:6:14", + "nodeType": "VariableDeclaration", + "scope": 3652, + "src": "18305:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3460, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18305:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 3462, + "nodeType": "VariableDeclarationStatement", + "src": "18305:19:14" + }, + { + "AST": { + "nativeSrc": "18359:45:14", + "nodeType": "YulBlock", + "src": "18359:45:14", + "statements": [ + { + "nativeSrc": "18373:21:14", + "nodeType": "YulAssignment", + "src": "18373:21:14", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "18389:4:14", + "nodeType": "YulLiteral", + "src": "18389:4:14", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "18383:5:14", + "nodeType": "YulIdentifier", + "src": "18383:5:14" + }, + "nativeSrc": "18383:11:14", + "nodeType": "YulFunctionCall", + "src": "18383:11:14" + }, + "variableNames": [ + { + "name": "output", + "nativeSrc": "18373:6:14", + "nodeType": "YulIdentifier", + "src": "18373:6:14" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3461, + "isOffset": false, + "isSlot": false, + "src": "18373:6:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3463, + "nodeType": "InlineAssembly", + "src": "18334:70:14" + }, + { + "assignments": [ + 3465 + ], + "declarations": [ + { + "constant": false, + "id": 3465, + "mutability": "mutable", + "name": "outputLength", + "nameLocation": "18421:12:14", + "nodeType": "VariableDeclaration", + "scope": 3652, + "src": "18413:20:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3464, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18413:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3467, + "initialValue": { + "hexValue": "30", + "id": 3466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18436:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "18413:24:14" + }, + { + "body": { + "id": 3644, + "nodeType": "Block", + "src": "18492:1584:14", + "statements": [ + { + "assignments": [ + 3480 + ], + "declarations": [ + { + "constant": false, + "id": 3480, + "mutability": "mutable", + "name": "char", + "nameLocation": "18512:4:14", + "nodeType": "VariableDeclaration", + "scope": 3644, + "src": "18506:10:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3479, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "18506:5:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3491, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 3486, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "18555:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3487, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "18563:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3485, + "name": "_unsafeReadBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3665, + "src": "18532:22:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (bytes memory,uint256) pure returns (bytes32)" + } + }, + "id": 3488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18532:33:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18525:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 3483, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "18525:6:14", + "typeDescriptions": {} + } + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18525:41:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18519:5:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3481, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "18519:5:14", + "typeDescriptions": {} + } + }, + "id": 3490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18519:48:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18506:61:14" + }, + { + "condition": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3492, + "name": "SPECIAL_CHARS_LOOKUP", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2200, + "src": "18587:20:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 3493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18611:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "id": 3494, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "18616:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "18611:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3496, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18610:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18587:34:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3498, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18586:36:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 3499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18626:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "18586:41:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3501, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18585:43:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3642, + "nodeType": "Block", + "src": "19972:94:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3633, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "20014:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "20022:14:14", + "subExpression": { + "id": 3634, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "20022:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 3638, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "20045:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20038:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 3636, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "20038:6:14", + "typeDescriptions": {} + } + }, + "id": 3639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20038:12:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3632, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19990:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19990:61:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3641, + "nodeType": "ExpressionStatement", + "src": "19990:61:14" + } + ] + }, + "id": 3643, + "nodeType": "IfStatement", + "src": "18581:1485:14", + "trueBody": { + "id": 3631, + "nodeType": "Block", + "src": "18630:1336:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3503, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "18672:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18680:14:14", + "subExpression": { + "id": 3504, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "18680:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "5c", + "id": 3506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18696:4:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_731553fa98541ade8b78284229adfe09a819380dee9244baac20dd1e0aa24095", + "typeString": "literal_string \"\\\"" + }, + "value": "\\" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_731553fa98541ade8b78284229adfe09a819380dee9244baac20dd1e0aa24095", + "typeString": "literal_string \"\\\"" + } + ], + "id": 3502, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "18648:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18648:53:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3508, + "nodeType": "ExpressionStatement", + "src": "18648:53:14" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3509, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "18723:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783038", + "id": 3510, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18731:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "0x08" + }, + "src": "18723:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3519, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "18816:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783039", + "id": 3520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18824:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_9_by_1", + "typeString": "int_const 9" + }, + "value": "0x09" + }, + "src": "18816:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3529, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "18909:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783061", + "id": 3530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18917:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "0x0a" + }, + "src": "18909:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3539, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19002:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783063", + "id": 3540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19010:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_12_by_1", + "typeString": "int_const 12" + }, + "value": "0x0c" + }, + "src": "19002:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3549, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19095:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783064", + "id": 3550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19103:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_13_by_1", + "typeString": "int_const 13" + }, + "value": "0x0d" + }, + "src": "19095:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3559, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19188:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783563", + "id": 3560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19196:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_92_by_1", + "typeString": "int_const 92" + }, + "value": "0x5c" + }, + "src": "19188:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3569, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19282:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783232", + "id": 3570, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19290:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "0x22" + }, + "src": "19282:12:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3623, + "nodeType": "Block", + "src": "19451:501:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3581, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19571:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19579:14:14", + "subExpression": { + "id": 3582, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19579:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "75", + "id": 3584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19595:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_32cefdcd8e794145c9af8dd1f4b1fbd92d6e547ae855553080fc8bd19c4883a0", + "typeString": "literal_string \"u\"" + }, + "value": "u" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_32cefdcd8e794145c9af8dd1f4b1fbd92d6e547ae855553080fc8bd19c4883a0", + "typeString": "literal_string \"u\"" + } + ], + "id": 3580, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19547:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19547:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3586, + "nodeType": "ExpressionStatement", + "src": "19547:52:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3588, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19645:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19653:14:14", + "subExpression": { + "id": 3589, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19653:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 3591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19669:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + } + ], + "id": 3587, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19621:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19621:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3593, + "nodeType": "ExpressionStatement", + "src": "19621:52:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3595, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19719:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19727:14:14", + "subExpression": { + "id": 3596, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19727:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 3598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19743:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + } + ], + "id": 3594, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19695:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19695:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3600, + "nodeType": "ExpressionStatement", + "src": "19695:52:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3602, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19793:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19801:14:14", + "subExpression": { + "id": 3603, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19801:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 3605, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "19817:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 3609, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3606, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19828:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "34", + "id": 3607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19836:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "19828:9:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19817:21:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3601, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19769:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19769:70:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3611, + "nodeType": "ExpressionStatement", + "src": "19769:70:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3613, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19885:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19893:14:14", + "subExpression": { + "id": 3614, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19893:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 3616, + "name": "HEX_DIGITS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "19909:10:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes16", + "typeString": "bytes16" + } + }, + "id": 3620, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3617, + "name": "char", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3480, + "src": "19920:4:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783066", + "id": 3618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19927:4:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0x0f" + }, + "src": "19920:11:14", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19909:23:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3612, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19861:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19861:72:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3622, + "nodeType": "ExpressionStatement", + "src": "19861:72:14" + } + ] + }, + "id": 3624, + "nodeType": "IfStatement", + "src": "19278:674:14", + "trueBody": { + "id": 3579, + "nodeType": "Block", + "src": "19296:149:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3573, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19398:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19406:14:14", + "subExpression": { + "id": 3574, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19406:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "22", + "id": 3576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19422:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0", + "typeString": "literal_string \"\"\"" + }, + "value": "\"" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0", + "typeString": "literal_string \"\"\"" + } + ], + "id": 3572, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19374:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19374:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3578, + "nodeType": "ExpressionStatement", + "src": "19374:52:14" + } + ] + } + }, + "id": 3625, + "nodeType": "IfStatement", + "src": "19184:768:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3563, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19226:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19234:14:14", + "subExpression": { + "id": 3564, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19234:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "5c", + "id": 3566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19250:4:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_731553fa98541ade8b78284229adfe09a819380dee9244baac20dd1e0aa24095", + "typeString": "literal_string \"\\\"" + }, + "value": "\\" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_731553fa98541ade8b78284229adfe09a819380dee9244baac20dd1e0aa24095", + "typeString": "literal_string \"\\\"" + } + ], + "id": 3562, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19202:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19202:53:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3568, + "nodeType": "ExpressionStatement", + "src": "19202:53:14" + } + }, + "id": 3626, + "nodeType": "IfStatement", + "src": "19091:861:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3553, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19133:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19141:14:14", + "subExpression": { + "id": 3554, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19141:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "72", + "id": 3556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19157:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_414f72a4d550cad29f17d9d99a4af64b3776ec5538cd440cef0f03fef2e9e010", + "typeString": "literal_string \"r\"" + }, + "value": "r" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_414f72a4d550cad29f17d9d99a4af64b3776ec5538cd440cef0f03fef2e9e010", + "typeString": "literal_string \"r\"" + } + ], + "id": 3552, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19109:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19109:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3558, + "nodeType": "ExpressionStatement", + "src": "19109:52:14" + } + }, + "id": 3627, + "nodeType": "IfStatement", + "src": "18998:954:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3543, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "19040:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19048:14:14", + "subExpression": { + "id": 3544, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "19048:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "66", + "id": 3546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19064:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d1e8aeb79500496ef3dc2e57ba746a8315d048b7a664a2bf948db4fa91960483", + "typeString": "literal_string \"f\"" + }, + "value": "f" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_d1e8aeb79500496ef3dc2e57ba746a8315d048b7a664a2bf948db4fa91960483", + "typeString": "literal_string \"f\"" + } + ], + "id": 3542, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "19016:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19016:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3548, + "nodeType": "ExpressionStatement", + "src": "19016:52:14" + } + }, + "id": 3628, + "nodeType": "IfStatement", + "src": "18905:1047:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3533, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "18947:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18955:14:14", + "subExpression": { + "id": 3534, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "18955:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "6e", + "id": 3536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18971:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4b4ecedb4964a40fe416b16c7bd8b46092040ec42ef0aa69e59f09872f105cf3", + "typeString": "literal_string \"n\"" + }, + "value": "n" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_4b4ecedb4964a40fe416b16c7bd8b46092040ec42ef0aa69e59f09872f105cf3", + "typeString": "literal_string \"n\"" + } + ], + "id": 3532, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "18923:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18923:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3538, + "nodeType": "ExpressionStatement", + "src": "18923:52:14" + } + }, + "id": 3629, + "nodeType": "IfStatement", + "src": "18812:1140:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3523, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "18854:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18862:14:14", + "subExpression": { + "id": 3524, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "18862:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "74", + "id": 3526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18878:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cac1bb71f0a97c8ac94ca9546b43178a9ad254c7b757ac07433aa6df35cd8089", + "typeString": "literal_string \"t\"" + }, + "value": "t" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_cac1bb71f0a97c8ac94ca9546b43178a9ad254c7b757ac07433aa6df35cd8089", + "typeString": "literal_string \"t\"" + } + ], + "id": 3522, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "18830:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18830:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3528, + "nodeType": "ExpressionStatement", + "src": "18830:52:14" + } + }, + "id": 3630, + "nodeType": "IfStatement", + "src": "18719:1233:14", + "trueBody": { + "expression": { + "arguments": [ + { + "id": 3513, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "18761:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 3515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18769:14:14", + "subExpression": { + "id": 3514, + "name": "outputLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "18769:12:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "62", + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18785:3:14", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b5553de315e0edf504d9150af82dafa5c4667fa618ed0a6f19c69b41166c5510", + "typeString": "literal_string \"b\"" + }, + "value": "b" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_b5553de315e0edf504d9150af82dafa5c4667fa618ed0a6f19c69b41166c5510", + "typeString": "literal_string \"b\"" + } + ], + "id": 3512, + "name": "_unsafeWriteBytesOffset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3677, + "src": "18737:23:14", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes1_$returns$__$", + "typeString": "function (bytes memory,uint256,bytes1) pure" + } + }, + "id": 3517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18737:52:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3518, + "nodeType": "ExpressionStatement", + "src": "18737:52:14" + } + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3472, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "18468:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 3473, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "18472:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "18479:6:14", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "18472:13:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18468:17:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3645, + "initializationExpression": { + "assignments": [ + 3469 + ], + "declarations": [ + { + "constant": false, + "id": 3469, + "mutability": "mutable", + "name": "i", + "nameLocation": "18461:1:14", + "nodeType": "VariableDeclaration", + "scope": 3645, + "src": "18453:9:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3468, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18453:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3471, + "initialValue": { + "hexValue": "30", + "id": 3470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18465:1:14", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "18453:13:14" + }, + "isSimpleCounterLoop": true, + "loopExpression": { + "expression": { + "id": 3477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "18487:3:14", + "subExpression": { + "id": 3476, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3469, + "src": "18489:1:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3478, + "nodeType": "ExpressionStatement", + "src": "18487:3:14" + }, + "nodeType": "ForStatement", + "src": "18448:1628:14" + }, + { + "AST": { + "nativeSrc": "20164:115:14", + "nodeType": "YulBlock", + "src": "20164:115:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "output", + "nativeSrc": "20185:6:14", + "nodeType": "YulIdentifier", + "src": "20185:6:14" + }, + { + "name": "outputLength", + "nativeSrc": "20193:12:14", + "nodeType": "YulIdentifier", + "src": "20193:12:14" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "20178:6:14", + "nodeType": "YulIdentifier", + "src": "20178:6:14" + }, + "nativeSrc": "20178:28:14", + "nodeType": "YulFunctionCall", + "src": "20178:28:14" + }, + "nativeSrc": "20178:28:14", + "nodeType": "YulExpressionStatement", + "src": "20178:28:14" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "20226:4:14", + "nodeType": "YulLiteral", + "src": "20226:4:14", + "type": "", + "value": "0x40" + }, + { + "arguments": [ + { + "name": "output", + "nativeSrc": "20236:6:14", + "nodeType": "YulIdentifier", + "src": "20236:6:14" + }, + { + "arguments": [ + { + "name": "outputLength", + "nativeSrc": "20248:12:14", + "nodeType": "YulIdentifier", + "src": "20248:12:14" + }, + { + "kind": "number", + "nativeSrc": "20262:4:14", + "nodeType": "YulLiteral", + "src": "20262:4:14", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20244:3:14", + "nodeType": "YulIdentifier", + "src": "20244:3:14" + }, + "nativeSrc": "20244:23:14", + "nodeType": "YulFunctionCall", + "src": "20244:23:14" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20232:3:14", + "nodeType": "YulIdentifier", + "src": "20232:3:14" + }, + "nativeSrc": "20232:36:14", + "nodeType": "YulFunctionCall", + "src": "20232:36:14" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "20219:6:14", + "nodeType": "YulIdentifier", + "src": "20219:6:14" + }, + "nativeSrc": "20219:50:14", + "nodeType": "YulFunctionCall", + "src": "20219:50:14" + }, + "nativeSrc": "20219:50:14", + "nodeType": "YulExpressionStatement", + "src": "20219:50:14" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3461, + "isOffset": false, + "isSlot": false, + "src": "20185:6:14", + "valueSize": 1 + }, + { + "declaration": 3461, + "isOffset": false, + "isSlot": false, + "src": "20236:6:14", + "valueSize": 1 + }, + { + "declaration": 3465, + "isOffset": false, + "isSlot": false, + "src": "20193:12:14", + "valueSize": 1 + }, + { + "declaration": 3465, + "isOffset": false, + "isSlot": false, + "src": "20248:12:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3646, + "nodeType": "InlineAssembly", + "src": "20139:140:14" + }, + { + "expression": { + "arguments": [ + { + "id": 3649, + "name": "output", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3461, + "src": "20303:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3648, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20296:6:14", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 3647, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "20296:6:14", + "typeDescriptions": {} + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20296:14:14", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3452, + "id": 3651, + "nodeType": "Return", + "src": "20289:21:14" + } + ] + }, + "documentation": { + "id": 3446, + "nodeType": "StructuredDocumentation", + "src": "17183:717:14", + "text": " @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n NOTE: This function escapes backslashes (including those in \\uXXXX sequences) and the characters in ranges\n defined in section 2.5 of RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). All control characters in U+0000\n to U+001F are escaped (\\b, \\t, \\n, \\f, \\r use short form; others use \\u00XX). ECMAScript's `JSON.parse` does\n recover escaped unicode characters that are not in this range, but other tooling may provide different results." + }, + "id": 3653, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "escapeJSON", + "nameLocation": "17914:10:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3448, + "mutability": "mutable", + "name": "input", + "nameLocation": "17939:5:14", + "nodeType": "VariableDeclaration", + "scope": 3653, + "src": "17925:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3447, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "17925:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "17924:21:14" + }, + "returnParameters": { + "id": 3452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3451, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3653, + "src": "17969:13:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3450, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "17969:6:14", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "17968:15:14" + }, + "scope": 3678, + "src": "17905:2412:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3664, + "nodeType": "Block", + "src": "20702:225:14", + "statements": [ + { + "AST": { + "nativeSrc": "20851:70:14", + "nodeType": "YulBlock", + "src": "20851:70:14", + "statements": [ + { + "nativeSrc": "20865:46:14", + "nodeType": "YulAssignment", + "src": "20865:46:14", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "20888:6:14", + "nodeType": "YulIdentifier", + "src": "20888:6:14" + }, + { + "kind": "number", + "nativeSrc": "20896:4:14", + "nodeType": "YulLiteral", + "src": "20896:4:14", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20884:3:14", + "nodeType": "YulIdentifier", + "src": "20884:3:14" + }, + "nativeSrc": "20884:17:14", + "nodeType": "YulFunctionCall", + "src": "20884:17:14" + }, + { + "name": "offset", + "nativeSrc": "20903:6:14", + "nodeType": "YulIdentifier", + "src": "20903:6:14" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20880:3:14", + "nodeType": "YulIdentifier", + "src": "20880:3:14" + }, + "nativeSrc": "20880:30:14", + "nodeType": "YulFunctionCall", + "src": "20880:30:14" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "20874:5:14", + "nodeType": "YulIdentifier", + "src": "20874:5:14" + }, + "nativeSrc": "20874:37:14", + "nodeType": "YulFunctionCall", + "src": "20874:37:14" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "20865:5:14", + "nodeType": "YulIdentifier", + "src": "20865:5:14" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3656, + "isOffset": false, + "isSlot": false, + "src": "20888:6:14", + "valueSize": 1 + }, + { + "declaration": 3658, + "isOffset": false, + "isSlot": false, + "src": "20903:6:14", + "valueSize": 1 + }, + { + "declaration": 3661, + "isOffset": false, + "isSlot": false, + "src": "20865:5:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3663, + "nodeType": "InlineAssembly", + "src": "20826:95:14" + } + ] + }, + "documentation": { + "id": 3654, + "nodeType": "StructuredDocumentation", + "src": "20323:268:14", + "text": " @dev Reads a bytes32 from a bytes array without bounds checking.\n NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n assembly block as such would prevent some optimizations." + }, + "id": 3665, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_unsafeReadBytesOffset", + "nameLocation": "20605:22:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3659, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3656, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "20641:6:14", + "nodeType": "VariableDeclaration", + "scope": 3665, + "src": "20628:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3655, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "20628:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3658, + "mutability": "mutable", + "name": "offset", + "nameLocation": "20657:6:14", + "nodeType": "VariableDeclaration", + "scope": 3665, + "src": "20649:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3657, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20649:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "20627:37:14" + }, + "returnParameters": { + "id": 3662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3661, + "mutability": "mutable", + "name": "value", + "nameLocation": "20695:5:14", + "nodeType": "VariableDeclaration", + "scope": 3665, + "src": "20687:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3660, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "20687:7:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "20686:15:14" + }, + "scope": 3678, + "src": "20596:331:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3676, + "nodeType": "Block", + "src": "21300:235:14", + "statements": [ + { + "AST": { + "nativeSrc": "21449:80:14", + "nodeType": "YulBlock", + "src": "21449:80:14", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "21479:6:14", + "nodeType": "YulIdentifier", + "src": "21479:6:14" + }, + { + "kind": "number", + "nativeSrc": "21487:4:14", + "nodeType": "YulLiteral", + "src": "21487:4:14", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "21475:3:14", + "nodeType": "YulIdentifier", + "src": "21475:3:14" + }, + "nativeSrc": "21475:17:14", + "nodeType": "YulFunctionCall", + "src": "21475:17:14" + }, + { + "name": "offset", + "nativeSrc": "21494:6:14", + "nodeType": "YulIdentifier", + "src": "21494:6:14" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "21471:3:14", + "nodeType": "YulIdentifier", + "src": "21471:3:14" + }, + "nativeSrc": "21471:30:14", + "nodeType": "YulFunctionCall", + "src": "21471:30:14" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "21507:3:14", + "nodeType": "YulLiteral", + "src": "21507:3:14", + "type": "", + "value": "248" + }, + { + "name": "value", + "nativeSrc": "21512:5:14", + "nodeType": "YulIdentifier", + "src": "21512:5:14" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "21503:3:14", + "nodeType": "YulIdentifier", + "src": "21503:3:14" + }, + "nativeSrc": "21503:15:14", + "nodeType": "YulFunctionCall", + "src": "21503:15:14" + } + ], + "functionName": { + "name": "mstore8", + "nativeSrc": "21463:7:14", + "nodeType": "YulIdentifier", + "src": "21463:7:14" + }, + "nativeSrc": "21463:56:14", + "nodeType": "YulFunctionCall", + "src": "21463:56:14" + }, + "nativeSrc": "21463:56:14", + "nodeType": "YulExpressionStatement", + "src": "21463:56:14" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3668, + "isOffset": false, + "isSlot": false, + "src": "21479:6:14", + "valueSize": 1 + }, + { + "declaration": 3670, + "isOffset": false, + "isSlot": false, + "src": "21494:6:14", + "valueSize": 1 + }, + { + "declaration": 3672, + "isOffset": false, + "isSlot": false, + "src": "21512:5:14", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3675, + "nodeType": "InlineAssembly", + "src": "21424:105:14" + } + ] + }, + "documentation": { + "id": 3666, + "nodeType": "StructuredDocumentation", + "src": "20933:265:14", + "text": " @dev Write a bytes1 to a bytes array without bounds checking.\n NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n assembly block as such would prevent some optimizations." + }, + "id": 3677, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_unsafeWriteBytesOffset", + "nameLocation": "21212:23:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3668, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "21249:6:14", + "nodeType": "VariableDeclaration", + "scope": 3677, + "src": "21236:19:14", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3667, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "21236:5:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3670, + "mutability": "mutable", + "name": "offset", + "nameLocation": "21265:6:14", + "nodeType": "VariableDeclaration", + "scope": 3677, + "src": "21257:14:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21257:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3672, + "mutability": "mutable", + "name": "value", + "nameLocation": "21280:5:14", + "nodeType": "VariableDeclaration", + "scope": 3677, + "src": "21273:12:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 3671, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "21273:6:14", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "21235:51:14" + }, + "returnParameters": { + "id": 3674, + "nodeType": "ParameterList", + "parameters": [], + "src": "21300:0:14" + }, + "scope": 3678, + "src": "21203:332:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 3679, + "src": "332:21205:14", + "usedErrors": [ + 2207, + 2210, + 2213 + ], + "usedEvents": [] + } + ], + "src": "101:21437:14" + }, + "id": 14 + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", + "exportedSymbols": { + "ECDSA": [ + 4137 + ] + }, + "id": 4138, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3680, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "112:24:15" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ECDSA", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 3681, + "nodeType": "StructuredDocumentation", + "src": "138:205:15", + "text": " @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n These functions can be used to verify that a message was signed by the holder\n of the private keys of a given address." + }, + "fullyImplemented": true, + "id": 4137, + "linearizedBaseContracts": [ + 4137 + ], + "name": "ECDSA", + "nameLocation": "352:5:15", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ECDSA.RecoverError", + "id": 3686, + "members": [ + { + "id": 3682, + "name": "NoError", + "nameLocation": "392:7:15", + "nodeType": "EnumValue", + "src": "392:7:15" + }, + { + "id": 3683, + "name": "InvalidSignature", + "nameLocation": "409:16:15", + "nodeType": "EnumValue", + "src": "409:16:15" + }, + { + "id": 3684, + "name": "InvalidSignatureLength", + "nameLocation": "435:22:15", + "nodeType": "EnumValue", + "src": "435:22:15" + }, + { + "id": 3685, + "name": "InvalidSignatureS", + "nameLocation": "467:17:15", + "nodeType": "EnumValue", + "src": "467:17:15" + } + ], + "name": "RecoverError", + "nameLocation": "369:12:15", + "nodeType": "EnumDefinition", + "src": "364:126:15" + }, + { + "documentation": { + "id": 3687, + "nodeType": "StructuredDocumentation", + "src": "496:49:15", + "text": " @dev The signature is invalid." + }, + "errorSelector": "f645eedf", + "id": 3689, + "name": "ECDSAInvalidSignature", + "nameLocation": "556:21:15", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 3688, + "nodeType": "ParameterList", + "parameters": [], + "src": "577:2:15" + }, + "src": "550:30:15" + }, + { + "documentation": { + "id": 3690, + "nodeType": "StructuredDocumentation", + "src": "586:60:15", + "text": " @dev The signature has an invalid length." + }, + "errorSelector": "fce698f7", + "id": 3694, + "name": "ECDSAInvalidSignatureLength", + "nameLocation": "657:27:15", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 3693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3692, + "mutability": "mutable", + "name": "length", + "nameLocation": "693:6:15", + "nodeType": "VariableDeclaration", + "scope": 3694, + "src": "685:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3691, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "685:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "684:16:15" + }, + "src": "651:50:15" + }, + { + "documentation": { + "id": 3695, + "nodeType": "StructuredDocumentation", + "src": "707:85:15", + "text": " @dev The signature has an S value that is in the upper half order." + }, + "errorSelector": "d78bce0c", + "id": 3699, + "name": "ECDSAInvalidSignatureS", + "nameLocation": "803:22:15", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 3698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3697, + "mutability": "mutable", + "name": "s", + "nameLocation": "834:1:15", + "nodeType": "VariableDeclaration", + "scope": 3699, + "src": "826:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3696, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "826:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "825:11:15" + }, + "src": "797:40:15" + }, + { + "body": { + "id": 3751, + "nodeType": "Block", + "src": "2575:622:15", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3714, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3704, + "src": "2589:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2599:6:15", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2589:16:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "3635", + "id": 3716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2609:2:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "65" + }, + "src": "2589:22:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3749, + "nodeType": "Block", + "src": "3083:108:15", + "statements": [ + { + "expression": { + "components": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 3738, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3105:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3105:7:15", + "typeDescriptions": {} + } + }, + "id": 3739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3105:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3740, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "3117:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3130:22:15", + "memberName": "InvalidSignatureLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 3684, + "src": "3117:35:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "arguments": [ + { + "expression": { + "id": 3744, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3704, + "src": "3162:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3172:6:15", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3162:16:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3154:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 3742, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3154:7:15", + "typeDescriptions": {} + } + }, + "id": 3746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3154:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 3747, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3104:76:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3713, + "id": 3748, + "nodeType": "Return", + "src": "3097:83:15" + } + ] + }, + "id": 3750, + "nodeType": "IfStatement", + "src": "2585:606:15", + "trueBody": { + "id": 3735, + "nodeType": "Block", + "src": "2613:464:15", + "statements": [ + { + "assignments": [ + 3719 + ], + "declarations": [ + { + "constant": false, + "id": 3719, + "mutability": "mutable", + "name": "r", + "nameLocation": "2635:1:15", + "nodeType": "VariableDeclaration", + "scope": 3735, + "src": "2627:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3718, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2627:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3720, + "nodeType": "VariableDeclarationStatement", + "src": "2627:9:15" + }, + { + "assignments": [ + 3722 + ], + "declarations": [ + { + "constant": false, + "id": 3722, + "mutability": "mutable", + "name": "s", + "nameLocation": "2658:1:15", + "nodeType": "VariableDeclaration", + "scope": 3735, + "src": "2650:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3721, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2650:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3723, + "nodeType": "VariableDeclarationStatement", + "src": "2650:9:15" + }, + { + "assignments": [ + 3725 + ], + "declarations": [ + { + "constant": false, + "id": 3725, + "mutability": "mutable", + "name": "v", + "nameLocation": "2679:1:15", + "nodeType": "VariableDeclaration", + "scope": 3735, + "src": "2673:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3724, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2673:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3726, + "nodeType": "VariableDeclarationStatement", + "src": "2673:7:15" + }, + { + "AST": { + "nativeSrc": "2850:171:15", + "nodeType": "YulBlock", + "src": "2850:171:15", + "statements": [ + { + "nativeSrc": "2868:32:15", + "nodeType": "YulAssignment", + "src": "2868:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "2883:9:15", + "nodeType": "YulIdentifier", + "src": "2883:9:15" + }, + { + "kind": "number", + "nativeSrc": "2894:4:15", + "nodeType": "YulLiteral", + "src": "2894:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2879:3:15", + "nodeType": "YulIdentifier", + "src": "2879:3:15" + }, + "nativeSrc": "2879:20:15", + "nodeType": "YulFunctionCall", + "src": "2879:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2873:5:15", + "nodeType": "YulIdentifier", + "src": "2873:5:15" + }, + "nativeSrc": "2873:27:15", + "nodeType": "YulFunctionCall", + "src": "2873:27:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "2868:1:15", + "nodeType": "YulIdentifier", + "src": "2868:1:15" + } + ] + }, + { + "nativeSrc": "2917:32:15", + "nodeType": "YulAssignment", + "src": "2917:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "2932:9:15", + "nodeType": "YulIdentifier", + "src": "2932:9:15" + }, + { + "kind": "number", + "nativeSrc": "2943:4:15", + "nodeType": "YulLiteral", + "src": "2943:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2928:3:15", + "nodeType": "YulIdentifier", + "src": "2928:3:15" + }, + "nativeSrc": "2928:20:15", + "nodeType": "YulFunctionCall", + "src": "2928:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2922:5:15", + "nodeType": "YulIdentifier", + "src": "2922:5:15" + }, + "nativeSrc": "2922:27:15", + "nodeType": "YulFunctionCall", + "src": "2922:27:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "2917:1:15", + "nodeType": "YulIdentifier", + "src": "2917:1:15" + } + ] + }, + { + "nativeSrc": "2966:41:15", + "nodeType": "YulAssignment", + "src": "2966:41:15", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2976:1:15", + "nodeType": "YulLiteral", + "src": "2976:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "2989:9:15", + "nodeType": "YulIdentifier", + "src": "2989:9:15" + }, + { + "kind": "number", + "nativeSrc": "3000:4:15", + "nodeType": "YulLiteral", + "src": "3000:4:15", + "type": "", + "value": "0x60" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2985:3:15", + "nodeType": "YulIdentifier", + "src": "2985:3:15" + }, + "nativeSrc": "2985:20:15", + "nodeType": "YulFunctionCall", + "src": "2985:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2979:5:15", + "nodeType": "YulIdentifier", + "src": "2979:5:15" + }, + "nativeSrc": "2979:27:15", + "nodeType": "YulFunctionCall", + "src": "2979:27:15" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "2971:4:15", + "nodeType": "YulIdentifier", + "src": "2971:4:15" + }, + "nativeSrc": "2971:36:15", + "nodeType": "YulFunctionCall", + "src": "2971:36:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "2966:1:15", + "nodeType": "YulIdentifier", + "src": "2966:1:15" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3719, + "isOffset": false, + "isSlot": false, + "src": "2868:1:15", + "valueSize": 1 + }, + { + "declaration": 3722, + "isOffset": false, + "isSlot": false, + "src": "2917:1:15", + "valueSize": 1 + }, + { + "declaration": 3704, + "isOffset": false, + "isSlot": false, + "src": "2883:9:15", + "valueSize": 1 + }, + { + "declaration": 3704, + "isOffset": false, + "isSlot": false, + "src": "2932:9:15", + "valueSize": 1 + }, + { + "declaration": 3704, + "isOffset": false, + "isSlot": false, + "src": "2989:9:15", + "valueSize": 1 + }, + { + "declaration": 3725, + "isOffset": false, + "isSlot": false, + "src": "2966:1:15", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3727, + "nodeType": "InlineAssembly", + "src": "2825:196:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3729, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3702, + "src": "3052:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3730, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3725, + "src": "3058:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3731, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3719, + "src": "3061:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3732, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3722, + "src": "3064:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3728, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 4023, + "src": "3041:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3041:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3713, + "id": 3734, + "nodeType": "Return", + "src": "3034:32:15" + } + ] + } + } + ] + }, + "documentation": { + "id": 3700, + "nodeType": "StructuredDocumentation", + "src": "843:1571:15", + "text": " @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n return address(0) without also returning an error description. Errors are documented using an enum (error type)\n and a bytes32 providing additional information about the error.\n If no error is returned, then the address can be used for verification purposes.\n The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n this function rejects them by requiring the `s` value to be in the lower\n half order, and the `v` value to be either 27 or 28.\n NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n invalidation or nonces for replay protection.\n IMPORTANT: `hash` _must_ be the result of a hash operation for the\n verification to be secure: it is possible to craft signatures that\n recover to arbitrary addresses for non-hashed data. A safe way to ensure\n this is by receiving a hash of the original message (which may otherwise\n be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n Documentation for signature generation:\n - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]" + }, + "id": 3752, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryRecover", + "nameLocation": "2428:10:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3702, + "mutability": "mutable", + "name": "hash", + "nameLocation": "2456:4:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2448:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3701, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2448:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3704, + "mutability": "mutable", + "name": "signature", + "nameLocation": "2483:9:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2470:22:15", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3703, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2470:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2438:60:15" + }, + "returnParameters": { + "id": 3713, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3707, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "2530:9:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2522:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3706, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2522:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3710, + "mutability": "mutable", + "name": "err", + "nameLocation": "2554:3:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2541:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3709, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3708, + "name": "RecoverError", + "nameLocations": [ + "2541:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "2541:12:15" + }, + "referencedDeclaration": 3686, + "src": "2541:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3712, + "mutability": "mutable", + "name": "errArg", + "nameLocation": "2567:6:15", + "nodeType": "VariableDeclaration", + "scope": 3752, + "src": "2559:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3711, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2559:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2521:53:15" + }, + "scope": 4137, + "src": "2419:778:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3804, + "nodeType": "Block", + "src": "3456:716:15", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3767, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "3470:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "id": 3768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3480:6:15", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3470:16:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "3635", + "id": 3769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3490:2:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "65" + }, + "src": "3470:22:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3802, + "nodeType": "Block", + "src": "4058:108:15", + "statements": [ + { + "expression": { + "components": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 3791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4088:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4080:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4080:7:15", + "typeDescriptions": {} + } + }, + "id": 3792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4080:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3793, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "4092:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 3794, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4105:22:15", + "memberName": "InvalidSignatureLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 3684, + "src": "4092:35:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "arguments": [ + { + "expression": { + "id": 3797, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3757, + "src": "4137:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "id": 3798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4147:6:15", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4137:16:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4129:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 3795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4129:7:15", + "typeDescriptions": {} + } + }, + "id": 3799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4129:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 3800, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4079:76:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3766, + "id": 3801, + "nodeType": "Return", + "src": "4072:83:15" + } + ] + }, + "id": 3803, + "nodeType": "IfStatement", + "src": "3466:700:15", + "trueBody": { + "id": 3788, + "nodeType": "Block", + "src": "3494:558:15", + "statements": [ + { + "assignments": [ + 3772 + ], + "declarations": [ + { + "constant": false, + "id": 3772, + "mutability": "mutable", + "name": "r", + "nameLocation": "3516:1:15", + "nodeType": "VariableDeclaration", + "scope": 3788, + "src": "3508:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3771, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3508:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3773, + "nodeType": "VariableDeclarationStatement", + "src": "3508:9:15" + }, + { + "assignments": [ + 3775 + ], + "declarations": [ + { + "constant": false, + "id": 3775, + "mutability": "mutable", + "name": "s", + "nameLocation": "3539:1:15", + "nodeType": "VariableDeclaration", + "scope": 3788, + "src": "3531:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3774, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3531:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3776, + "nodeType": "VariableDeclarationStatement", + "src": "3531:9:15" + }, + { + "assignments": [ + 3778 + ], + "declarations": [ + { + "constant": false, + "id": 3778, + "mutability": "mutable", + "name": "v", + "nameLocation": "3560:1:15", + "nodeType": "VariableDeclaration", + "scope": 3788, + "src": "3554:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3777, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3554:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3779, + "nodeType": "VariableDeclarationStatement", + "src": "3554:7:15" + }, + { + "AST": { + "nativeSrc": "3794:202:15", + "nodeType": "YulBlock", + "src": "3794:202:15", + "statements": [ + { + "nativeSrc": "3812:35:15", + "nodeType": "YulAssignment", + "src": "3812:35:15", + "value": { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "3830:16:15", + "nodeType": "YulIdentifier", + "src": "3830:16:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3817:12:15", + "nodeType": "YulIdentifier", + "src": "3817:12:15" + }, + "nativeSrc": "3817:30:15", + "nodeType": "YulFunctionCall", + "src": "3817:30:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "3812:1:15", + "nodeType": "YulIdentifier", + "src": "3812:1:15" + } + ] + }, + { + "nativeSrc": "3864:46:15", + "nodeType": "YulAssignment", + "src": "3864:46:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "3886:16:15", + "nodeType": "YulIdentifier", + "src": "3886:16:15" + }, + { + "kind": "number", + "nativeSrc": "3904:4:15", + "nodeType": "YulLiteral", + "src": "3904:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3882:3:15", + "nodeType": "YulIdentifier", + "src": "3882:3:15" + }, + "nativeSrc": "3882:27:15", + "nodeType": "YulFunctionCall", + "src": "3882:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3869:12:15", + "nodeType": "YulIdentifier", + "src": "3869:12:15" + }, + "nativeSrc": "3869:41:15", + "nodeType": "YulFunctionCall", + "src": "3869:41:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "3864:1:15", + "nodeType": "YulIdentifier", + "src": "3864:1:15" + } + ] + }, + { + "nativeSrc": "3927:55:15", + "nodeType": "YulAssignment", + "src": "3927:55:15", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3937:1:15", + "nodeType": "YulLiteral", + "src": "3937:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "3957:16:15", + "nodeType": "YulIdentifier", + "src": "3957:16:15" + }, + { + "kind": "number", + "nativeSrc": "3975:4:15", + "nodeType": "YulLiteral", + "src": "3975:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3953:3:15", + "nodeType": "YulIdentifier", + "src": "3953:3:15" + }, + "nativeSrc": "3953:27:15", + "nodeType": "YulFunctionCall", + "src": "3953:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3940:12:15", + "nodeType": "YulIdentifier", + "src": "3940:12:15" + }, + "nativeSrc": "3940:41:15", + "nodeType": "YulFunctionCall", + "src": "3940:41:15" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "3932:4:15", + "nodeType": "YulIdentifier", + "src": "3932:4:15" + }, + "nativeSrc": "3932:50:15", + "nodeType": "YulFunctionCall", + "src": "3932:50:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "3927:1:15", + "nodeType": "YulIdentifier", + "src": "3927:1:15" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 3772, + "isOffset": false, + "isSlot": false, + "src": "3812:1:15", + "valueSize": 1 + }, + { + "declaration": 3775, + "isOffset": false, + "isSlot": false, + "src": "3864:1:15", + "valueSize": 1 + }, + { + "declaration": 3757, + "isOffset": true, + "isSlot": false, + "src": "3830:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 3757, + "isOffset": true, + "isSlot": false, + "src": "3886:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 3757, + "isOffset": true, + "isSlot": false, + "src": "3957:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 3778, + "isOffset": false, + "isSlot": false, + "src": "3927:1:15", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 3780, + "nodeType": "InlineAssembly", + "src": "3769:227:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3782, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3755, + "src": "4027:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3783, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3778, + "src": "4033:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3784, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3772, + "src": "4036:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3785, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "4039:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3781, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 4023, + "src": "4016:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4016:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3766, + "id": 3787, + "nodeType": "Return", + "src": "4009:32:15" + } + ] + } + } + ] + }, + "documentation": { + "id": 3753, + "nodeType": "StructuredDocumentation", + "src": "3203:82:15", + "text": " @dev Variant of {tryRecover} that takes a signature in calldata" + }, + "id": 3805, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryRecoverCalldata", + "nameLocation": "3299:18:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3758, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3755, + "mutability": "mutable", + "name": "hash", + "nameLocation": "3335:4:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3327:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3754, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3327:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3757, + "mutability": "mutable", + "name": "signature", + "nameLocation": "3364:9:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3349:24:15", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3756, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3349:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3317:62:15" + }, + "returnParameters": { + "id": 3766, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3760, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "3411:9:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3403:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3759, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3403:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3763, + "mutability": "mutable", + "name": "err", + "nameLocation": "3435:3:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3422:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3762, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3761, + "name": "RecoverError", + "nameLocations": [ + "3422:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "3422:12:15" + }, + "referencedDeclaration": 3686, + "src": "3422:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3765, + "mutability": "mutable", + "name": "errArg", + "nameLocation": "3448:6:15", + "nodeType": "VariableDeclaration", + "scope": 3805, + "src": "3440:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3764, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3440:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3402:53:15" + }, + "scope": 4137, + "src": "3290:882:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3834, + "nodeType": "Block", + "src": "5363:168:15", + "statements": [ + { + "assignments": [ + 3816, + 3819, + 3821 + ], + "declarations": [ + { + "constant": false, + "id": 3816, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "5382:9:15", + "nodeType": "VariableDeclaration", + "scope": 3834, + "src": "5374:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5374:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3819, + "mutability": "mutable", + "name": "error", + "nameLocation": "5406:5:15", + "nodeType": "VariableDeclaration", + "scope": 3834, + "src": "5393:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3818, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3817, + "name": "RecoverError", + "nameLocations": [ + "5393:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "5393:12:15" + }, + "referencedDeclaration": 3686, + "src": "5393:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3821, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "5421:8:15", + "nodeType": "VariableDeclaration", + "scope": 3834, + "src": "5413:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3820, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5413:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3826, + "initialValue": { + "arguments": [ + { + "id": 3823, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3808, + "src": "5444:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3824, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3810, + "src": "5450:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3822, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 3752, + "src": "5433:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_memory_ptr_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,bytes memory) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5433:27:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5373:87:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3828, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3819, + "src": "5482:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 3829, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3821, + "src": "5489:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3827, + "name": "_throwError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4136, + "src": "5470:11:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_RecoverError_$3686_$_t_bytes32_$returns$__$", + "typeString": "function (enum ECDSA.RecoverError,bytes32) pure" + } + }, + "id": 3830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5470:28:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3831, + "nodeType": "ExpressionStatement", + "src": "5470:28:15" + }, + { + "expression": { + "id": 3832, + "name": "recovered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3816, + "src": "5515:9:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3814, + "id": 3833, + "nodeType": "Return", + "src": "5508:16:15" + } + ] + }, + "documentation": { + "id": 3806, + "nodeType": "StructuredDocumentation", + "src": "4178:1093:15", + "text": " @dev Returns the address that signed a hashed message (`hash`) with\n `signature`. This address can then be used for verification purposes.\n The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n this function rejects them by requiring the `s` value to be in the lower\n half order, and the `v` value to be either 27 or 28.\n NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n invalidation or nonces for replay protection.\n IMPORTANT: `hash` _must_ be the result of a hash operation for the\n verification to be secure: it is possible to craft signatures that\n recover to arbitrary addresses for non-hashed data. A safe way to ensure\n this is by receiving a hash of the original message (which may otherwise\n be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it." + }, + "id": 3835, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recover", + "nameLocation": "5285:7:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3808, + "mutability": "mutable", + "name": "hash", + "nameLocation": "5301:4:15", + "nodeType": "VariableDeclaration", + "scope": 3835, + "src": "5293:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3807, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5293:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3810, + "mutability": "mutable", + "name": "signature", + "nameLocation": "5320:9:15", + "nodeType": "VariableDeclaration", + "scope": 3835, + "src": "5307:22:15", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3809, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5307:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "5292:38:15" + }, + "returnParameters": { + "id": 3814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3813, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3835, + "src": "5354:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3812, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5354:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5353:9:15" + }, + "scope": 4137, + "src": "5276:255:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3864, + "nodeType": "Block", + "src": "5718:176:15", + "statements": [ + { + "assignments": [ + 3846, + 3849, + 3851 + ], + "declarations": [ + { + "constant": false, + "id": 3846, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "5737:9:15", + "nodeType": "VariableDeclaration", + "scope": 3864, + "src": "5729:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5729:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3849, + "mutability": "mutable", + "name": "error", + "nameLocation": "5761:5:15", + "nodeType": "VariableDeclaration", + "scope": 3864, + "src": "5748:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3848, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3847, + "name": "RecoverError", + "nameLocations": [ + "5748:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "5748:12:15" + }, + "referencedDeclaration": 3686, + "src": "5748:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3851, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "5776:8:15", + "nodeType": "VariableDeclaration", + "scope": 3864, + "src": "5768:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3850, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5768:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3856, + "initialValue": { + "arguments": [ + { + "id": 3853, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3838, + "src": "5807:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3854, + "name": "signature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3840, + "src": "5813:9:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "id": 3852, + "name": "tryRecoverCalldata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3805, + "src": "5788:18:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes_calldata_ptr_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,bytes calldata) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5788:35:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5728:95:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3858, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3849, + "src": "5845:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 3859, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3851, + "src": "5852:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3857, + "name": "_throwError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4136, + "src": "5833:11:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_RecoverError_$3686_$_t_bytes32_$returns$__$", + "typeString": "function (enum ECDSA.RecoverError,bytes32) pure" + } + }, + "id": 3860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5833:28:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3861, + "nodeType": "ExpressionStatement", + "src": "5833:28:15" + }, + { + "expression": { + "id": 3862, + "name": "recovered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3846, + "src": "5878:9:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3844, + "id": 3863, + "nodeType": "Return", + "src": "5871:16:15" + } + ] + }, + "documentation": { + "id": 3836, + "nodeType": "StructuredDocumentation", + "src": "5537:79:15", + "text": " @dev Variant of {recover} that takes a signature in calldata" + }, + "id": 3865, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recoverCalldata", + "nameLocation": "5630:15:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3838, + "mutability": "mutable", + "name": "hash", + "nameLocation": "5654:4:15", + "nodeType": "VariableDeclaration", + "scope": 3865, + "src": "5646:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3837, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5646:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3840, + "mutability": "mutable", + "name": "signature", + "nameLocation": "5675:9:15", + "nodeType": "VariableDeclaration", + "scope": 3865, + "src": "5660:24:15", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3839, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5660:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "5645:40:15" + }, + "returnParameters": { + "id": 3844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3843, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3865, + "src": "5709:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5709:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5708:9:15" + }, + "scope": 4137, + "src": "5621:273:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3914, + "nodeType": "Block", + "src": "6273:342:15", + "statements": [ + { + "id": 3913, + "nodeType": "UncheckedBlock", + "src": "6283:326:15", + "statements": [ + { + "assignments": [ + 3883 + ], + "declarations": [ + { + "constant": false, + "id": 3883, + "mutability": "mutable", + "name": "s", + "nameLocation": "6315:1:15", + "nodeType": "VariableDeclaration", + "scope": 3913, + "src": "6307:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3882, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6307:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3890, + "initialValue": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 3889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3884, + "name": "vs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3872, + "src": "6319:2:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "arguments": [ + { + "hexValue": "307837666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666", + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6332:66:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819967_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9967" + }, + "value": "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819967_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9967" + } + ], + "id": 3886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6324:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 3885, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6324:7:15", + "typeDescriptions": {} + } + }, + "id": 3888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6324:75:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6319:80:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6307:92:15" + }, + { + "assignments": [ + 3892 + ], + "declarations": [ + { + "constant": false, + "id": 3892, + "mutability": "mutable", + "name": "v", + "nameLocation": "6516:1:15", + "nodeType": "VariableDeclaration", + "scope": 3913, + "src": "6510:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3891, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6510:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3905, + "initialValue": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3897, + "name": "vs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3872, + "src": "6535:2:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6527:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3895, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6527:7:15", + "typeDescriptions": {} + } + }, + "id": 3898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6527:11:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "323535", + "id": 3899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6542:3:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "6527:18:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3901, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6526:20:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "3237", + "id": 3902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6549:2:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_27_by_1", + "typeString": "int_const 27" + }, + "value": "27" + }, + "src": "6526:25:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3894, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6520:5:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3893, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6520:5:15", + "typeDescriptions": {} + } + }, + "id": 3904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6520:32:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6510:42:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3907, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3868, + "src": "6584:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3908, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3892, + "src": "6590:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3909, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3870, + "src": "6593:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3910, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3883, + "src": "6596:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3906, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 4023, + "src": "6573:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6573:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3881, + "id": 3912, + "nodeType": "Return", + "src": "6566:32:15" + } + ] + } + ] + }, + "documentation": { + "id": 3866, + "nodeType": "StructuredDocumentation", + "src": "5900:205:15", + "text": " @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]" + }, + "id": 3915, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryRecover", + "nameLocation": "6119:10:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3868, + "mutability": "mutable", + "name": "hash", + "nameLocation": "6147:4:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6139:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3867, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6139:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3870, + "mutability": "mutable", + "name": "r", + "nameLocation": "6169:1:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6161:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3869, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6161:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3872, + "mutability": "mutable", + "name": "vs", + "nameLocation": "6188:2:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6180:10:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3871, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6180:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6129:67:15" + }, + "returnParameters": { + "id": 3881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3875, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "6228:9:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6220:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3874, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6220:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3878, + "mutability": "mutable", + "name": "err", + "nameLocation": "6252:3:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6239:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3877, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3876, + "name": "RecoverError", + "nameLocations": [ + "6239:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "6239:12:15" + }, + "referencedDeclaration": 3686, + "src": "6239:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3880, + "mutability": "mutable", + "name": "errArg", + "nameLocation": "6265:6:15", + "nodeType": "VariableDeclaration", + "scope": 3915, + "src": "6257:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3879, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6257:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6219:53:15" + }, + "scope": 4137, + "src": "6110:505:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3947, + "nodeType": "Block", + "src": "6829:164:15", + "statements": [ + { + "assignments": [ + 3928, + 3931, + 3933 + ], + "declarations": [ + { + "constant": false, + "id": 3928, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "6848:9:15", + "nodeType": "VariableDeclaration", + "scope": 3947, + "src": "6840:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6840:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3931, + "mutability": "mutable", + "name": "error", + "nameLocation": "6872:5:15", + "nodeType": "VariableDeclaration", + "scope": 3947, + "src": "6859:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3930, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3929, + "name": "RecoverError", + "nameLocations": [ + "6859:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "6859:12:15" + }, + "referencedDeclaration": 3686, + "src": "6859:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3933, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "6887:8:15", + "nodeType": "VariableDeclaration", + "scope": 3947, + "src": "6879:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3932, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6879:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3939, + "initialValue": { + "arguments": [ + { + "id": 3935, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3918, + "src": "6910:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3936, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3920, + "src": "6916:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3937, + "name": "vs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3922, + "src": "6919:2:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3934, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 3915, + "src": "6899:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 3938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6899:23:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6839:83:15" + }, + { + "expression": { + "arguments": [ + { + "id": 3941, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3931, + "src": "6944:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 3942, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3933, + "src": "6951:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3940, + "name": "_throwError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4136, + "src": "6932:11:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_RecoverError_$3686_$_t_bytes32_$returns$__$", + "typeString": "function (enum ECDSA.RecoverError,bytes32) pure" + } + }, + "id": 3943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6932:28:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3944, + "nodeType": "ExpressionStatement", + "src": "6932:28:15" + }, + { + "expression": { + "id": 3945, + "name": "recovered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3928, + "src": "6977:9:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 3926, + "id": 3946, + "nodeType": "Return", + "src": "6970:16:15" + } + ] + }, + "documentation": { + "id": 3916, + "nodeType": "StructuredDocumentation", + "src": "6621:117:15", + "text": " @dev Overload of {ECDSA-recover} that receives the `r` and `vs` short-signature fields separately." + }, + "id": 3948, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recover", + "nameLocation": "6752:7:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3918, + "mutability": "mutable", + "name": "hash", + "nameLocation": "6768:4:15", + "nodeType": "VariableDeclaration", + "scope": 3948, + "src": "6760:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3917, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6760:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3920, + "mutability": "mutable", + "name": "r", + "nameLocation": "6782:1:15", + "nodeType": "VariableDeclaration", + "scope": 3948, + "src": "6774:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3919, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6774:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3922, + "mutability": "mutable", + "name": "vs", + "nameLocation": "6793:2:15", + "nodeType": "VariableDeclaration", + "scope": 3948, + "src": "6785:10:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3921, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6785:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6759:37:15" + }, + "returnParameters": { + "id": 3926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3925, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3948, + "src": "6820:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3924, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6820:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6819:9:15" + }, + "scope": 4137, + "src": "6743:250:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4022, + "nodeType": "Block", + "src": "7308:1372:15", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 3969, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3957, + "src": "8204:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3968, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8196:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8196:7:15", + "typeDescriptions": {} + } + }, + "id": 3970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8196:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307837464646464646464646464646464646464646464646464646464646464646463544353736453733353741343530314444464539324634363638314232304130", + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8209:66:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926418782139537452191302581570759080747168_by_1", + "typeString": "int_const 5789...(69 digits omitted)...7168" + }, + "value": "0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0" + }, + "src": "8196:79:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3983, + "nodeType": "IfStatement", + "src": "8192:164:15", + "trueBody": { + "id": 3982, + "nodeType": "Block", + "src": "8277:79:15", + "statements": [ + { + "expression": { + "components": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 3975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8307:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3974, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8299:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3973, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8299:7:15", + "typeDescriptions": {} + } + }, + "id": 3976, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8299:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3977, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "8311:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 3978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8324:17:15", + "memberName": "InvalidSignatureS", + "nodeType": "MemberAccess", + "referencedDeclaration": 3685, + "src": "8311:30:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 3979, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3957, + "src": "8343:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 3980, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8298:47:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3966, + "id": 3981, + "nodeType": "Return", + "src": "8291:54:15" + } + ] + } + }, + { + "assignments": [ + 3985 + ], + "declarations": [ + { + "constant": false, + "id": 3985, + "mutability": "mutable", + "name": "signer", + "nameLocation": "8458:6:15", + "nodeType": "VariableDeclaration", + "scope": 4022, + "src": "8450:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8450:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3992, + "initialValue": { + "arguments": [ + { + "id": 3987, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3951, + "src": "8477:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3988, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3953, + "src": "8483:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3989, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3955, + "src": "8486:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3990, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3957, + "src": "8489:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3986, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -6, + "src": "8467:9:15", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 3991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8467:24:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8450:41:15" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3993, + "name": "signer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3985, + "src": "8505:6:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8523:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8515:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3994, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8515:7:15", + "typeDescriptions": {} + } + }, + "id": 3997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8515:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8505:20:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4012, + "nodeType": "IfStatement", + "src": "8501:113:15", + "trueBody": { + "id": 4011, + "nodeType": "Block", + "src": "8527:87:15", + "statements": [ + { + "expression": { + "components": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 4001, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8557:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8549:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3999, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8549:7:15", + "typeDescriptions": {} + } + }, + "id": 4002, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8549:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 4003, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "8561:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4004, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8574:16:15", + "memberName": "InvalidSignature", + "nodeType": "MemberAccess", + "referencedDeclaration": 3683, + "src": "8561:29:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 4007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8600:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8592:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4005, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8592:7:15", + "typeDescriptions": {} + } + }, + "id": 4008, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8592:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 4009, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8548:55:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3966, + "id": 4010, + "nodeType": "Return", + "src": "8541:62:15" + } + ] + } + }, + { + "expression": { + "components": [ + { + "id": 4013, + "name": "signer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3985, + "src": "8632:6:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 4014, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "8640:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8653:7:15", + "memberName": "NoError", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "8640:20:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 4018, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8670:1:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4017, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8662:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4016, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8662:7:15", + "typeDescriptions": {} + } + }, + "id": 4019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8662:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 4020, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8631:42:15", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "functionReturnParameters": 3966, + "id": 4021, + "nodeType": "Return", + "src": "8624:49:15" + } + ] + }, + "documentation": { + "id": 3949, + "nodeType": "StructuredDocumentation", + "src": "6999:125:15", + "text": " @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n `r` and `s` signature fields separately." + }, + "id": 4023, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryRecover", + "nameLocation": "7138:10:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3958, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3951, + "mutability": "mutable", + "name": "hash", + "nameLocation": "7166:4:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7158:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3950, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7158:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3953, + "mutability": "mutable", + "name": "v", + "nameLocation": "7186:1:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7180:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3952, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "7180:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3955, + "mutability": "mutable", + "name": "r", + "nameLocation": "7205:1:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7197:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3954, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7197:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3957, + "mutability": "mutable", + "name": "s", + "nameLocation": "7224:1:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7216:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3956, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7216:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "7148:83:15" + }, + "returnParameters": { + "id": 3966, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3960, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "7263:9:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7255:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3959, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7255:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3963, + "mutability": "mutable", + "name": "err", + "nameLocation": "7287:3:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7274:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 3962, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3961, + "name": "RecoverError", + "nameLocations": [ + "7274:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "7274:12:15" + }, + "referencedDeclaration": 3686, + "src": "7274:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3965, + "mutability": "mutable", + "name": "errArg", + "nameLocation": "7300:6:15", + "nodeType": "VariableDeclaration", + "scope": 4023, + "src": "7292:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3964, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7292:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "7254:53:15" + }, + "scope": 4137, + "src": "7129:1551:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4058, + "nodeType": "Block", + "src": "8907:166:15", + "statements": [ + { + "assignments": [ + 4038, + 4041, + 4043 + ], + "declarations": [ + { + "constant": false, + "id": 4038, + "mutability": "mutable", + "name": "recovered", + "nameLocation": "8926:9:15", + "nodeType": "VariableDeclaration", + "scope": 4058, + "src": "8918:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4037, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8918:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4041, + "mutability": "mutable", + "name": "error", + "nameLocation": "8950:5:15", + "nodeType": "VariableDeclaration", + "scope": 4058, + "src": "8937:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 4040, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4039, + "name": "RecoverError", + "nameLocations": [ + "8937:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "8937:12:15" + }, + "referencedDeclaration": 3686, + "src": "8937:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4043, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "8965:8:15", + "nodeType": "VariableDeclaration", + "scope": 4058, + "src": "8957:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4042, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8957:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 4050, + "initialValue": { + "arguments": [ + { + "id": 4045, + "name": "hash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4026, + "src": "8988:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4046, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4028, + "src": "8994:1:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 4047, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4030, + "src": "8997:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4048, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4032, + "src": "9000:1:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4044, + "name": "tryRecover", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3752, + 3915, + 4023 + ], + "referencedDeclaration": 4023, + "src": "8977:10:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address,enum ECDSA.RecoverError,bytes32)" + } + }, + "id": 4049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8977:25:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_enum$_RecoverError_$3686_$_t_bytes32_$", + "typeString": "tuple(address,enum ECDSA.RecoverError,bytes32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8917:85:15" + }, + { + "expression": { + "arguments": [ + { + "id": 4052, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4041, + "src": "9024:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + { + "id": 4053, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4043, + "src": "9031:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4051, + "name": "_throwError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4136, + "src": "9012:11:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_RecoverError_$3686_$_t_bytes32_$returns$__$", + "typeString": "function (enum ECDSA.RecoverError,bytes32) pure" + } + }, + "id": 4054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9012:28:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4055, + "nodeType": "ExpressionStatement", + "src": "9012:28:15" + }, + { + "expression": { + "id": 4056, + "name": "recovered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4038, + "src": "9057:9:15", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4036, + "id": 4057, + "nodeType": "Return", + "src": "9050:16:15" + } + ] + }, + "documentation": { + "id": 4024, + "nodeType": "StructuredDocumentation", + "src": "8686:122:15", + "text": " @dev Overload of {ECDSA-recover} that receives the `v`,\n `r` and `s` signature fields separately." + }, + "id": 4059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recover", + "nameLocation": "8822:7:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4026, + "mutability": "mutable", + "name": "hash", + "nameLocation": "8838:4:15", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8830:12:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4025, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8830:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4028, + "mutability": "mutable", + "name": "v", + "nameLocation": "8850:1:15", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8844:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4027, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "8844:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4030, + "mutability": "mutable", + "name": "r", + "nameLocation": "8861:1:15", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8853:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4029, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8853:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4032, + "mutability": "mutable", + "name": "s", + "nameLocation": "8872:1:15", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8864:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4031, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8864:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "8829:45:15" + }, + "returnParameters": { + "id": 4036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4035, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4059, + "src": "8898:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4034, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8898:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "8897:9:15" + }, + "scope": 4137, + "src": "8813:260:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4072, + "nodeType": "Block", + "src": "9659:793:15", + "statements": [ + { + "AST": { + "nativeSrc": "9694:752:15", + "nodeType": "YulBlock", + "src": "9694:752:15", + "statements": [ + { + "cases": [ + { + "body": { + "nativeSrc": "9847:171:15", + "nodeType": "YulBlock", + "src": "9847:171:15", + "statements": [ + { + "nativeSrc": "9865:32:15", + "nodeType": "YulAssignment", + "src": "9865:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "9880:9:15", + "nodeType": "YulIdentifier", + "src": "9880:9:15" + }, + { + "kind": "number", + "nativeSrc": "9891:4:15", + "nodeType": "YulLiteral", + "src": "9891:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9876:3:15", + "nodeType": "YulIdentifier", + "src": "9876:3:15" + }, + "nativeSrc": "9876:20:15", + "nodeType": "YulFunctionCall", + "src": "9876:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9870:5:15", + "nodeType": "YulIdentifier", + "src": "9870:5:15" + }, + "nativeSrc": "9870:27:15", + "nodeType": "YulFunctionCall", + "src": "9870:27:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "9865:1:15", + "nodeType": "YulIdentifier", + "src": "9865:1:15" + } + ] + }, + { + "nativeSrc": "9914:32:15", + "nodeType": "YulAssignment", + "src": "9914:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "9929:9:15", + "nodeType": "YulIdentifier", + "src": "9929:9:15" + }, + { + "kind": "number", + "nativeSrc": "9940:4:15", + "nodeType": "YulLiteral", + "src": "9940:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9925:3:15", + "nodeType": "YulIdentifier", + "src": "9925:3:15" + }, + "nativeSrc": "9925:20:15", + "nodeType": "YulFunctionCall", + "src": "9925:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9919:5:15", + "nodeType": "YulIdentifier", + "src": "9919:5:15" + }, + "nativeSrc": "9919:27:15", + "nodeType": "YulFunctionCall", + "src": "9919:27:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "9914:1:15", + "nodeType": "YulIdentifier", + "src": "9914:1:15" + } + ] + }, + { + "nativeSrc": "9963:41:15", + "nodeType": "YulAssignment", + "src": "9963:41:15", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9973:1:15", + "nodeType": "YulLiteral", + "src": "9973:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "9986:9:15", + "nodeType": "YulIdentifier", + "src": "9986:9:15" + }, + { + "kind": "number", + "nativeSrc": "9997:4:15", + "nodeType": "YulLiteral", + "src": "9997:4:15", + "type": "", + "value": "0x60" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9982:3:15", + "nodeType": "YulIdentifier", + "src": "9982:3:15" + }, + "nativeSrc": "9982:20:15", + "nodeType": "YulFunctionCall", + "src": "9982:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9976:5:15", + "nodeType": "YulIdentifier", + "src": "9976:5:15" + }, + "nativeSrc": "9976:27:15", + "nodeType": "YulFunctionCall", + "src": "9976:27:15" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "9968:4:15", + "nodeType": "YulIdentifier", + "src": "9968:4:15" + }, + "nativeSrc": "9968:36:15", + "nodeType": "YulFunctionCall", + "src": "9968:36:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "9963:1:15", + "nodeType": "YulIdentifier", + "src": "9963:1:15" + } + ] + } + ] + }, + "nativeSrc": "9839:179:15", + "nodeType": "YulCase", + "src": "9839:179:15", + "value": { + "kind": "number", + "nativeSrc": "9844:2:15", + "nodeType": "YulLiteral", + "src": "9844:2:15", + "type": "", + "value": "65" + } + }, + { + "body": { + "nativeSrc": "10125:206:15", + "nodeType": "YulBlock", + "src": "10125:206:15", + "statements": [ + { + "nativeSrc": "10143:37:15", + "nodeType": "YulVariableDeclaration", + "src": "10143:37:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "10163:9:15", + "nodeType": "YulIdentifier", + "src": "10163:9:15" + }, + { + "kind": "number", + "nativeSrc": "10174:4:15", + "nodeType": "YulLiteral", + "src": "10174:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10159:3:15", + "nodeType": "YulIdentifier", + "src": "10159:3:15" + }, + "nativeSrc": "10159:20:15", + "nodeType": "YulFunctionCall", + "src": "10159:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10153:5:15", + "nodeType": "YulIdentifier", + "src": "10153:5:15" + }, + "nativeSrc": "10153:27:15", + "nodeType": "YulFunctionCall", + "src": "10153:27:15" + }, + "variables": [ + { + "name": "vs", + "nativeSrc": "10147:2:15", + "nodeType": "YulTypedName", + "src": "10147:2:15", + "type": "" + } + ] + }, + { + "nativeSrc": "10197:32:15", + "nodeType": "YulAssignment", + "src": "10197:32:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature", + "nativeSrc": "10212:9:15", + "nodeType": "YulIdentifier", + "src": "10212:9:15" + }, + { + "kind": "number", + "nativeSrc": "10223:4:15", + "nodeType": "YulLiteral", + "src": "10223:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10208:3:15", + "nodeType": "YulIdentifier", + "src": "10208:3:15" + }, + "nativeSrc": "10208:20:15", + "nodeType": "YulFunctionCall", + "src": "10208:20:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "10202:5:15", + "nodeType": "YulIdentifier", + "src": "10202:5:15" + }, + "nativeSrc": "10202:27:15", + "nodeType": "YulFunctionCall", + "src": "10202:27:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "10197:1:15", + "nodeType": "YulIdentifier", + "src": "10197:1:15" + } + ] + }, + { + "nativeSrc": "10246:28:15", + "nodeType": "YulAssignment", + "src": "10246:28:15", + "value": { + "arguments": [ + { + "name": "vs", + "nativeSrc": "10255:2:15", + "nodeType": "YulIdentifier", + "src": "10255:2:15" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10263:1:15", + "nodeType": "YulLiteral", + "src": "10263:1:15", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10270:1:15", + "nodeType": "YulLiteral", + "src": "10270:1:15", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "10266:3:15", + "nodeType": "YulIdentifier", + "src": "10266:3:15" + }, + "nativeSrc": "10266:6:15", + "nodeType": "YulFunctionCall", + "src": "10266:6:15" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10259:3:15", + "nodeType": "YulIdentifier", + "src": "10259:3:15" + }, + "nativeSrc": "10259:14:15", + "nodeType": "YulFunctionCall", + "src": "10259:14:15" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10251:3:15", + "nodeType": "YulIdentifier", + "src": "10251:3:15" + }, + "nativeSrc": "10251:23:15", + "nodeType": "YulFunctionCall", + "src": "10251:23:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "10246:1:15", + "nodeType": "YulIdentifier", + "src": "10246:1:15" + } + ] + }, + { + "nativeSrc": "10291:26:15", + "nodeType": "YulAssignment", + "src": "10291:26:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10304:3:15", + "nodeType": "YulLiteral", + "src": "10304:3:15", + "type": "", + "value": "255" + }, + { + "name": "vs", + "nativeSrc": "10309:2:15", + "nodeType": "YulIdentifier", + "src": "10309:2:15" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10300:3:15", + "nodeType": "YulIdentifier", + "src": "10300:3:15" + }, + "nativeSrc": "10300:12:15", + "nodeType": "YulFunctionCall", + "src": "10300:12:15" + }, + { + "kind": "number", + "nativeSrc": "10314:2:15", + "nodeType": "YulLiteral", + "src": "10314:2:15", + "type": "", + "value": "27" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10296:3:15", + "nodeType": "YulIdentifier", + "src": "10296:3:15" + }, + "nativeSrc": "10296:21:15", + "nodeType": "YulFunctionCall", + "src": "10296:21:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "10291:1:15", + "nodeType": "YulIdentifier", + "src": "10291:1:15" + } + ] + } + ] + }, + "nativeSrc": "10117:214:15", + "nodeType": "YulCase", + "src": "10117:214:15", + "value": { + "kind": "number", + "nativeSrc": "10122:2:15", + "nodeType": "YulLiteral", + "src": "10122:2:15", + "type": "", + "value": "64" + } + }, + { + "body": { + "nativeSrc": "10352:84:15", + "nodeType": "YulBlock", + "src": "10352:84:15", + "statements": [ + { + "nativeSrc": "10370:6:15", + "nodeType": "YulAssignment", + "src": "10370:6:15", + "value": { + "kind": "number", + "nativeSrc": "10375:1:15", + "nodeType": "YulLiteral", + "src": "10375:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "10370:1:15", + "nodeType": "YulIdentifier", + "src": "10370:1:15" + } + ] + }, + { + "nativeSrc": "10393:6:15", + "nodeType": "YulAssignment", + "src": "10393:6:15", + "value": { + "kind": "number", + "nativeSrc": "10398:1:15", + "nodeType": "YulLiteral", + "src": "10398:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "10393:1:15", + "nodeType": "YulIdentifier", + "src": "10393:1:15" + } + ] + }, + { + "nativeSrc": "10416:6:15", + "nodeType": "YulAssignment", + "src": "10416:6:15", + "value": { + "kind": "number", + "nativeSrc": "10421:1:15", + "nodeType": "YulLiteral", + "src": "10421:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "10416:1:15", + "nodeType": "YulIdentifier", + "src": "10416:1:15" + } + ] + } + ] + }, + "nativeSrc": "10344:92:15", + "nodeType": "YulCase", + "src": "10344:92:15", + "value": "default" + } + ], + "expression": { + "arguments": [ + { + "name": "signature", + "nativeSrc": "9763:9:15", + "nodeType": "YulIdentifier", + "src": "9763:9:15" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9757:5:15", + "nodeType": "YulIdentifier", + "src": "9757:5:15" + }, + "nativeSrc": "9757:16:15", + "nodeType": "YulFunctionCall", + "src": "9757:16:15" + }, + "nativeSrc": "9750:686:15", + "nodeType": "YulSwitch", + "src": "9750:686:15" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4067, + "isOffset": false, + "isSlot": false, + "src": "10197:1:15", + "valueSize": 1 + }, + { + "declaration": 4067, + "isOffset": false, + "isSlot": false, + "src": "10370:1:15", + "valueSize": 1 + }, + { + "declaration": 4067, + "isOffset": false, + "isSlot": false, + "src": "9865:1:15", + "valueSize": 1 + }, + { + "declaration": 4069, + "isOffset": false, + "isSlot": false, + "src": "10246:1:15", + "valueSize": 1 + }, + { + "declaration": 4069, + "isOffset": false, + "isSlot": false, + "src": "10393:1:15", + "valueSize": 1 + }, + { + "declaration": 4069, + "isOffset": false, + "isSlot": false, + "src": "9914:1:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "10163:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "10212:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "9763:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "9880:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "9929:9:15", + "valueSize": 1 + }, + { + "declaration": 4062, + "isOffset": false, + "isSlot": false, + "src": "9986:9:15", + "valueSize": 1 + }, + { + "declaration": 4065, + "isOffset": false, + "isSlot": false, + "src": "10291:1:15", + "valueSize": 1 + }, + { + "declaration": 4065, + "isOffset": false, + "isSlot": false, + "src": "10416:1:15", + "valueSize": 1 + }, + { + "declaration": 4065, + "isOffset": false, + "isSlot": false, + "src": "9963:1:15", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4071, + "nodeType": "InlineAssembly", + "src": "9669:777:15" + } + ] + }, + "documentation": { + "id": 4060, + "nodeType": "StructuredDocumentation", + "src": "9079:482:15", + "text": " @dev Parse a signature into its `v`, `r` and `s` components. Supports 65-byte and 64-byte (ERC-2098)\n formats. Returns (0,0,0) for invalid signatures.\n For 64-byte signatures, `v` is automatically normalized to 27 or 28.\n For 65-byte signatures, `v` is returned as-is and MUST already be 27 or 28 for use with ecrecover.\n Consider validating the result before use, or use {tryRecover}/{recover} which perform full validation." + }, + "id": 4073, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parse", + "nameLocation": "9575:5:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4063, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4062, + "mutability": "mutable", + "name": "signature", + "nameLocation": "9594:9:15", + "nodeType": "VariableDeclaration", + "scope": 4073, + "src": "9581:22:15", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4061, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "9581:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "9580:24:15" + }, + "returnParameters": { + "id": 4070, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4065, + "mutability": "mutable", + "name": "v", + "nameLocation": "9634:1:15", + "nodeType": "VariableDeclaration", + "scope": 4073, + "src": "9628:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4064, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "9628:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4067, + "mutability": "mutable", + "name": "r", + "nameLocation": "9645:1:15", + "nodeType": "VariableDeclaration", + "scope": 4073, + "src": "9637:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4066, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9637:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4069, + "mutability": "mutable", + "name": "s", + "nameLocation": "9656:1:15", + "nodeType": "VariableDeclaration", + "scope": 4073, + "src": "9648:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4068, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9648:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "9627:31:15" + }, + "scope": 4137, + "src": "9566:886:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4086, + "nodeType": "Block", + "src": "10643:841:15", + "statements": [ + { + "AST": { + "nativeSrc": "10678:800:15", + "nodeType": "YulBlock", + "src": "10678:800:15", + "statements": [ + { + "cases": [ + { + "body": { + "nativeSrc": "10831:202:15", + "nodeType": "YulBlock", + "src": "10831:202:15", + "statements": [ + { + "nativeSrc": "10849:35:15", + "nodeType": "YulAssignment", + "src": "10849:35:15", + "value": { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "10867:16:15", + "nodeType": "YulIdentifier", + "src": "10867:16:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "10854:12:15", + "nodeType": "YulIdentifier", + "src": "10854:12:15" + }, + "nativeSrc": "10854:30:15", + "nodeType": "YulFunctionCall", + "src": "10854:30:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "10849:1:15", + "nodeType": "YulIdentifier", + "src": "10849:1:15" + } + ] + }, + { + "nativeSrc": "10901:46:15", + "nodeType": "YulAssignment", + "src": "10901:46:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "10923:16:15", + "nodeType": "YulIdentifier", + "src": "10923:16:15" + }, + { + "kind": "number", + "nativeSrc": "10941:4:15", + "nodeType": "YulLiteral", + "src": "10941:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10919:3:15", + "nodeType": "YulIdentifier", + "src": "10919:3:15" + }, + "nativeSrc": "10919:27:15", + "nodeType": "YulFunctionCall", + "src": "10919:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "10906:12:15", + "nodeType": "YulIdentifier", + "src": "10906:12:15" + }, + "nativeSrc": "10906:41:15", + "nodeType": "YulFunctionCall", + "src": "10906:41:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "10901:1:15", + "nodeType": "YulIdentifier", + "src": "10901:1:15" + } + ] + }, + { + "nativeSrc": "10964:55:15", + "nodeType": "YulAssignment", + "src": "10964:55:15", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10974:1:15", + "nodeType": "YulLiteral", + "src": "10974:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "10994:16:15", + "nodeType": "YulIdentifier", + "src": "10994:16:15" + }, + { + "kind": "number", + "nativeSrc": "11012:4:15", + "nodeType": "YulLiteral", + "src": "11012:4:15", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10990:3:15", + "nodeType": "YulIdentifier", + "src": "10990:3:15" + }, + "nativeSrc": "10990:27:15", + "nodeType": "YulFunctionCall", + "src": "10990:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "10977:12:15", + "nodeType": "YulIdentifier", + "src": "10977:12:15" + }, + "nativeSrc": "10977:41:15", + "nodeType": "YulFunctionCall", + "src": "10977:41:15" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "10969:4:15", + "nodeType": "YulIdentifier", + "src": "10969:4:15" + }, + "nativeSrc": "10969:50:15", + "nodeType": "YulFunctionCall", + "src": "10969:50:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "10964:1:15", + "nodeType": "YulIdentifier", + "src": "10964:1:15" + } + ] + } + ] + }, + "nativeSrc": "10823:210:15", + "nodeType": "YulCase", + "src": "10823:210:15", + "value": { + "kind": "number", + "nativeSrc": "10828:2:15", + "nodeType": "YulLiteral", + "src": "10828:2:15", + "type": "", + "value": "65" + } + }, + { + "body": { + "nativeSrc": "11140:223:15", + "nodeType": "YulBlock", + "src": "11140:223:15", + "statements": [ + { + "nativeSrc": "11158:51:15", + "nodeType": "YulVariableDeclaration", + "src": "11158:51:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "11185:16:15", + "nodeType": "YulIdentifier", + "src": "11185:16:15" + }, + { + "kind": "number", + "nativeSrc": "11203:4:15", + "nodeType": "YulLiteral", + "src": "11203:4:15", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11181:3:15", + "nodeType": "YulIdentifier", + "src": "11181:3:15" + }, + "nativeSrc": "11181:27:15", + "nodeType": "YulFunctionCall", + "src": "11181:27:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "11168:12:15", + "nodeType": "YulIdentifier", + "src": "11168:12:15" + }, + "nativeSrc": "11168:41:15", + "nodeType": "YulFunctionCall", + "src": "11168:41:15" + }, + "variables": [ + { + "name": "vs", + "nativeSrc": "11162:2:15", + "nodeType": "YulTypedName", + "src": "11162:2:15", + "type": "" + } + ] + }, + { + "nativeSrc": "11226:35:15", + "nodeType": "YulAssignment", + "src": "11226:35:15", + "value": { + "arguments": [ + { + "name": "signature.offset", + "nativeSrc": "11244:16:15", + "nodeType": "YulIdentifier", + "src": "11244:16:15" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "11231:12:15", + "nodeType": "YulIdentifier", + "src": "11231:12:15" + }, + "nativeSrc": "11231:30:15", + "nodeType": "YulFunctionCall", + "src": "11231:30:15" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "11226:1:15", + "nodeType": "YulIdentifier", + "src": "11226:1:15" + } + ] + }, + { + "nativeSrc": "11278:28:15", + "nodeType": "YulAssignment", + "src": "11278:28:15", + "value": { + "arguments": [ + { + "name": "vs", + "nativeSrc": "11287:2:15", + "nodeType": "YulIdentifier", + "src": "11287:2:15" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11295:1:15", + "nodeType": "YulLiteral", + "src": "11295:1:15", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11302:1:15", + "nodeType": "YulLiteral", + "src": "11302:1:15", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "11298:3:15", + "nodeType": "YulIdentifier", + "src": "11298:3:15" + }, + "nativeSrc": "11298:6:15", + "nodeType": "YulFunctionCall", + "src": "11298:6:15" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "11291:3:15", + "nodeType": "YulIdentifier", + "src": "11291:3:15" + }, + "nativeSrc": "11291:14:15", + "nodeType": "YulFunctionCall", + "src": "11291:14:15" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11283:3:15", + "nodeType": "YulIdentifier", + "src": "11283:3:15" + }, + "nativeSrc": "11283:23:15", + "nodeType": "YulFunctionCall", + "src": "11283:23:15" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "11278:1:15", + "nodeType": "YulIdentifier", + "src": "11278:1:15" + } + ] + }, + { + "nativeSrc": "11323:26:15", + "nodeType": "YulAssignment", + "src": "11323:26:15", + "value": { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11336:3:15", + "nodeType": "YulLiteral", + "src": "11336:3:15", + "type": "", + "value": "255" + }, + { + "name": "vs", + "nativeSrc": "11341:2:15", + "nodeType": "YulIdentifier", + "src": "11341:2:15" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "11332:3:15", + "nodeType": "YulIdentifier", + "src": "11332:3:15" + }, + "nativeSrc": "11332:12:15", + "nodeType": "YulFunctionCall", + "src": "11332:12:15" + }, + { + "kind": "number", + "nativeSrc": "11346:2:15", + "nodeType": "YulLiteral", + "src": "11346:2:15", + "type": "", + "value": "27" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11328:3:15", + "nodeType": "YulIdentifier", + "src": "11328:3:15" + }, + "nativeSrc": "11328:21:15", + "nodeType": "YulFunctionCall", + "src": "11328:21:15" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "11323:1:15", + "nodeType": "YulIdentifier", + "src": "11323:1:15" + } + ] + } + ] + }, + "nativeSrc": "11132:231:15", + "nodeType": "YulCase", + "src": "11132:231:15", + "value": { + "kind": "number", + "nativeSrc": "11137:2:15", + "nodeType": "YulLiteral", + "src": "11137:2:15", + "type": "", + "value": "64" + } + }, + { + "body": { + "nativeSrc": "11384:84:15", + "nodeType": "YulBlock", + "src": "11384:84:15", + "statements": [ + { + "nativeSrc": "11402:6:15", + "nodeType": "YulAssignment", + "src": "11402:6:15", + "value": { + "kind": "number", + "nativeSrc": "11407:1:15", + "nodeType": "YulLiteral", + "src": "11407:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "11402:1:15", + "nodeType": "YulIdentifier", + "src": "11402:1:15" + } + ] + }, + { + "nativeSrc": "11425:6:15", + "nodeType": "YulAssignment", + "src": "11425:6:15", + "value": { + "kind": "number", + "nativeSrc": "11430:1:15", + "nodeType": "YulLiteral", + "src": "11430:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "s", + "nativeSrc": "11425:1:15", + "nodeType": "YulIdentifier", + "src": "11425:1:15" + } + ] + }, + { + "nativeSrc": "11448:6:15", + "nodeType": "YulAssignment", + "src": "11448:6:15", + "value": { + "kind": "number", + "nativeSrc": "11453:1:15", + "nodeType": "YulLiteral", + "src": "11453:1:15", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "v", + "nativeSrc": "11448:1:15", + "nodeType": "YulIdentifier", + "src": "11448:1:15" + } + ] + } + ] + }, + "nativeSrc": "11376:92:15", + "nodeType": "YulCase", + "src": "11376:92:15", + "value": "default" + } + ], + "expression": { + "name": "signature.length", + "nativeSrc": "10741:16:15", + "nodeType": "YulIdentifier", + "src": "10741:16:15" + }, + "nativeSrc": "10734:734:15", + "nodeType": "YulSwitch", + "src": "10734:734:15" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4081, + "isOffset": false, + "isSlot": false, + "src": "10849:1:15", + "valueSize": 1 + }, + { + "declaration": 4081, + "isOffset": false, + "isSlot": false, + "src": "11226:1:15", + "valueSize": 1 + }, + { + "declaration": 4081, + "isOffset": false, + "isSlot": false, + "src": "11402:1:15", + "valueSize": 1 + }, + { + "declaration": 4083, + "isOffset": false, + "isSlot": false, + "src": "10901:1:15", + "valueSize": 1 + }, + { + "declaration": 4083, + "isOffset": false, + "isSlot": false, + "src": "11278:1:15", + "valueSize": 1 + }, + { + "declaration": 4083, + "isOffset": false, + "isSlot": false, + "src": "11425:1:15", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": false, + "isSlot": false, + "src": "10741:16:15", + "suffix": "length", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "10867:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "10923:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "10994:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "11185:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4076, + "isOffset": true, + "isSlot": false, + "src": "11244:16:15", + "suffix": "offset", + "valueSize": 1 + }, + { + "declaration": 4079, + "isOffset": false, + "isSlot": false, + "src": "10964:1:15", + "valueSize": 1 + }, + { + "declaration": 4079, + "isOffset": false, + "isSlot": false, + "src": "11323:1:15", + "valueSize": 1 + }, + { + "declaration": 4079, + "isOffset": false, + "isSlot": false, + "src": "11448:1:15", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4085, + "nodeType": "InlineAssembly", + "src": "10653:825:15" + } + ] + }, + "documentation": { + "id": 4074, + "nodeType": "StructuredDocumentation", + "src": "10458:77:15", + "text": " @dev Variant of {parse} that takes a signature in calldata" + }, + "id": 4087, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "parseCalldata", + "nameLocation": "10549:13:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4076, + "mutability": "mutable", + "name": "signature", + "nameLocation": "10578:9:15", + "nodeType": "VariableDeclaration", + "scope": 4087, + "src": "10563:24:15", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4075, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "10563:5:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "10562:26:15" + }, + "returnParameters": { + "id": 4084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4079, + "mutability": "mutable", + "name": "v", + "nameLocation": "10618:1:15", + "nodeType": "VariableDeclaration", + "scope": 4087, + "src": "10612:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4078, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10612:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4081, + "mutability": "mutable", + "name": "r", + "nameLocation": "10629:1:15", + "nodeType": "VariableDeclaration", + "scope": 4087, + "src": "10621:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4080, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10621:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4083, + "mutability": "mutable", + "name": "s", + "nameLocation": "10640:1:15", + "nodeType": "VariableDeclaration", + "scope": 4087, + "src": "10632:9:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4082, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10632:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "10611:31:15" + }, + "scope": 4137, + "src": "10540:944:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4135, + "nodeType": "Block", + "src": "11689:460:15", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "id": 4099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4096, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "11703:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4097, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "11712:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11725:7:15", + "memberName": "NoError", + "nodeType": "MemberAccess", + "referencedDeclaration": 3682, + "src": "11712:20:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "src": "11703:29:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "id": 4105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4102, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "11799:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4103, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "11808:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11821:16:15", + "memberName": "InvalidSignature", + "nodeType": "MemberAccess", + "referencedDeclaration": 3683, + "src": "11808:29:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "src": "11799:38:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "id": 4113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4110, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "11904:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4111, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "11913:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11926:22:15", + "memberName": "InvalidSignatureLength", + "nodeType": "MemberAccess", + "referencedDeclaration": 3684, + "src": "11913:35:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "src": "11904:44:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "id": 4125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4122, + "name": "error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "12038:5:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4123, + "name": "RecoverError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3686, + "src": "12047:12:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_RecoverError_$3686_$", + "typeString": "type(enum ECDSA.RecoverError)" + } + }, + "id": 4124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12060:17:15", + "memberName": "InvalidSignatureS", + "nodeType": "MemberAccess", + "referencedDeclaration": 3685, + "src": "12047:30:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "src": "12038:39:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4131, + "nodeType": "IfStatement", + "src": "12034:109:15", + "trueBody": { + "id": 4130, + "nodeType": "Block", + "src": "12079:64:15", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 4127, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4093, + "src": "12123:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4126, + "name": "ECDSAInvalidSignatureS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3699, + "src": "12100:22:15", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_bytes32_$returns$_t_error_$", + "typeString": "function (bytes32) pure returns (error)" + } + }, + "id": 4128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12100:32:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 4129, + "nodeType": "RevertStatement", + "src": "12093:39:15" + } + ] + } + }, + "id": 4132, + "nodeType": "IfStatement", + "src": "11900:243:15", + "trueBody": { + "id": 4121, + "nodeType": "Block", + "src": "11950:78:15", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "arguments": [ + { + "id": 4117, + "name": "errorArg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4093, + "src": "12007:8:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11999:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 4115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11999:7:15", + "typeDescriptions": {} + } + }, + "id": 4118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11999:17:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4114, + "name": "ECDSAInvalidSignatureLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3694, + "src": "11971:27:15", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint256) pure returns (error)" + } + }, + "id": 4119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11971:46:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 4120, + "nodeType": "RevertStatement", + "src": "11964:53:15" + } + ] + } + }, + "id": 4133, + "nodeType": "IfStatement", + "src": "11795:348:15", + "trueBody": { + "id": 4109, + "nodeType": "Block", + "src": "11839:55:15", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4106, + "name": "ECDSAInvalidSignature", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3689, + "src": "11860:21:15", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 4107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11860:23:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 4108, + "nodeType": "RevertStatement", + "src": "11853:30:15" + } + ] + } + }, + "id": 4134, + "nodeType": "IfStatement", + "src": "11699:444:15", + "trueBody": { + "id": 4101, + "nodeType": "Block", + "src": "11734:55:15", + "statements": [ + { + "functionReturnParameters": 4095, + "id": 4100, + "nodeType": "Return", + "src": "11748:7:15" + } + ] + } + } + ] + }, + "documentation": { + "id": 4088, + "nodeType": "StructuredDocumentation", + "src": "11490:122:15", + "text": " @dev Optionally reverts with the corresponding custom error according to the `error` argument provided." + }, + "id": 4136, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_throwError", + "nameLocation": "11626:11:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4094, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4091, + "mutability": "mutable", + "name": "error", + "nameLocation": "11651:5:15", + "nodeType": "VariableDeclaration", + "scope": 4136, + "src": "11638:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + }, + "typeName": { + "id": 4090, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4089, + "name": "RecoverError", + "nameLocations": [ + "11638:12:15" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 3686, + "src": "11638:12:15" + }, + "referencedDeclaration": 3686, + "src": "11638:12:15", + "typeDescriptions": { + "typeIdentifier": "t_enum$_RecoverError_$3686", + "typeString": "enum ECDSA.RecoverError" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4093, + "mutability": "mutable", + "name": "errorArg", + "nameLocation": "11666:8:15", + "nodeType": "VariableDeclaration", + "scope": 4136, + "src": "11658:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4092, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11658:7:15", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "11637:38:15" + }, + "returnParameters": { + "id": 4095, + "nodeType": "ParameterList", + "parameters": [], + "src": "11689:0:15" + }, + "scope": 4137, + "src": "11617:532:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 4138, + "src": "344:11807:15", + "usedErrors": [ + 3689, + 3694, + 3699 + ], + "usedEvents": [] + } + ], + "src": "112:12040:15" + }, + "id": 15 + }, + "@openzeppelin/contracts/utils/cryptography/EIP712.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/EIP712.sol", + "exportedSymbols": { + "EIP712": [ + 4364 + ], + "IERC5267": [ + 262 + ], + "MessageHashUtils": [ + 4535 + ], + "ShortString": [ + 1833 + ], + "ShortStrings": [ + 2044 + ] + }, + "id": 4365, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4139, + "literals": [ + "solidity", + "^", + "0.8", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "113:24:16" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol", + "file": "./MessageHashUtils.sol", + "id": 4141, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4365, + "sourceUnit": 4536, + "src": "139:56:16", + "symbolAliases": [ + { + "foreign": { + "id": 4140, + "name": "MessageHashUtils", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4535, + "src": "147:16:16", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/ShortStrings.sol", + "file": "../ShortStrings.sol", + "id": 4144, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4365, + "sourceUnit": 2045, + "src": "196:62:16", + "symbolAliases": [ + { + "foreign": { + "id": 4142, + "name": "ShortStrings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2044, + "src": "204:12:16", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + }, + { + "foreign": { + "id": 4143, + "name": "ShortString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "218:11:16", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/interfaces/IERC5267.sol", + "file": "../../interfaces/IERC5267.sol", + "id": 4146, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4365, + "sourceUnit": 263, + "src": "259:55:16", + "symbolAliases": [ + { + "foreign": { + "id": 4145, + "name": "IERC5267", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "267:8:16", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "baseName": { + "id": 4148, + "name": "IERC5267", + "nameLocations": [ + "1988:8:16" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 262, + "src": "1988:8:16" + }, + "id": 4149, + "nodeType": "InheritanceSpecifier", + "src": "1988:8:16" + } + ], + "canonicalName": "EIP712", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4147, + "nodeType": "StructuredDocumentation", + "src": "316:1643:16", + "text": " @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.\n The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose\n encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract\n does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to\n produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.\n This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n ({_hashTypedDataV4}).\n The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n the chain id to protect against replay attacks on an eventual fork of the chain.\n NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the\n separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n @custom:oz-upgrades-unsafe-allow state-variable-immutable" + }, + "fullyImplemented": true, + "id": 4364, + "linearizedBaseContracts": [ + 4364, + 262 + ], + "name": "EIP712", + "nameLocation": "1978:6:16", + "nodeType": "ContractDefinition", + "nodes": [ + { + "global": false, + "id": 4151, + "libraryName": { + "id": 4150, + "name": "ShortStrings", + "nameLocations": [ + "2009:12:16" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 2044, + "src": "2009:12:16" + }, + "nodeType": "UsingForDirective", + "src": "2003:25:16" + }, + { + "constant": true, + "id": 4156, + "mutability": "constant", + "name": "TYPE_HASH", + "nameLocation": "2059:9:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2034:140:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4152, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2034:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", + "id": 4154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2089:84:16", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f", + "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"" + }, + "value": "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f", + "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"" + } + ], + "id": 4153, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2079:9:16", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2079:95:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4158, + "mutability": "immutable", + "name": "_cachedDomainSeparator", + "nameLocation": "2399:22:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2373:48:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4157, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2373:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4160, + "mutability": "immutable", + "name": "_cachedChainId", + "nameLocation": "2453:14:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2427:40:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2427:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4162, + "mutability": "immutable", + "name": "_cachedThis", + "nameLocation": "2499:11:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2473:37:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2473:7:16", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4164, + "mutability": "immutable", + "name": "_hashedName", + "nameLocation": "2543:11:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2517:37:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4163, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2517:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4166, + "mutability": "immutable", + "name": "_hashedVersion", + "nameLocation": "2586:14:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2560:40:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4165, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2560:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4169, + "mutability": "immutable", + "name": "_name", + "nameLocation": "2637:5:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2607:35:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 4168, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4167, + "name": "ShortString", + "nameLocations": [ + "2607:11:16" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2607:11:16" + }, + "referencedDeclaration": 1833, + "src": "2607:11:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4172, + "mutability": "immutable", + "name": "_version", + "nameLocation": "2678:8:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2648:38:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + }, + "typeName": { + "id": 4171, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4170, + "name": "ShortString", + "nameLocations": [ + "2648:11:16" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1833, + "src": "2648:11:16" + }, + "referencedDeclaration": 1833, + "src": "2648:11:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4174, + "mutability": "mutable", + "name": "_nameFallback", + "nameLocation": "2757:13:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2742:28:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4173, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2742:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4176, + "mutability": "mutable", + "name": "_versionFallback", + "nameLocation": "2841:16:16", + "nodeType": "VariableDeclaration", + "scope": 4364, + "src": "2826:31:16", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4175, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2826:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 4233, + "nodeType": "Block", + "src": "3483:376:16", + "statements": [ + { + "expression": { + "id": 4189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4169, + "src": "3493:5:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4187, + "name": "_nameFallback", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4174, + "src": "3532:13:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 4185, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4179, + "src": "3501:4:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 4186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3506:25:16", + "memberName": "toShortStringWithFallback", + "nodeType": "MemberAccess", + "referencedDeclaration": 1985, + "src": "3501:30:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_storage_ptr_$returns$_t_userDefinedValueType$_ShortString_$1833_$attached_to$_t_string_memory_ptr_$", + "typeString": "function (string memory,string storage pointer) returns (ShortString)" + } + }, + "id": 4188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3501:45:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "src": "3493:53:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "id": 4190, + "nodeType": "ExpressionStatement", + "src": "3493:53:16" + }, + { + "expression": { + "id": 4196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4191, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4172, + "src": "3556:8:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4194, + "name": "_versionFallback", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4176, + "src": "3601:16:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 4192, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4181, + "src": "3567:7:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "id": 4193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3575:25:16", + "memberName": "toShortStringWithFallback", + "nodeType": "MemberAccess", + "referencedDeclaration": 1985, + "src": "3567:33:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_storage_ptr_$returns$_t_userDefinedValueType$_ShortString_$1833_$attached_to$_t_string_memory_ptr_$", + "typeString": "function (string memory,string storage pointer) returns (ShortString)" + } + }, + "id": 4195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3567:51:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "src": "3556:62:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "id": 4197, + "nodeType": "ExpressionStatement", + "src": "3556:62:16" + }, + { + "expression": { + "id": 4205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4198, + "name": "_hashedName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4164, + "src": "3628:11:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 4202, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4179, + "src": "3658:4:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3652:5:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4200, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3652:5:16", + "typeDescriptions": {} + } + }, + "id": 4203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3652:11:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4199, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "3642:9:16", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3642:22:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3628:36:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4206, + "nodeType": "ExpressionStatement", + "src": "3628:36:16" + }, + { + "expression": { + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4207, + "name": "_hashedVersion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4166, + "src": "3674:14:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 4211, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4181, + "src": "3707:7:16", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3701:5:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4209, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3701:5:16", + "typeDescriptions": {} + } + }, + "id": 4212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3701:14:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4208, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "3691:9:16", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3691:25:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3674:42:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4215, + "nodeType": "ExpressionStatement", + "src": "3674:42:16" + }, + { + "expression": { + "id": 4219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4216, + "name": "_cachedChainId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4160, + "src": "3727:14:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 4217, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "3744:5:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3750:7:16", + "memberName": "chainid", + "nodeType": "MemberAccess", + "src": "3744:13:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3727:30:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4220, + "nodeType": "ExpressionStatement", + "src": "3727:30:16" + }, + { + "expression": { + "id": 4224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4221, + "name": "_cachedDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4158, + "src": "3767:22:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4222, + "name": "_buildDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4281, + "src": "3792:21:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 4223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3792:23:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3767:48:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4225, + "nodeType": "ExpressionStatement", + "src": "3767:48:16" + }, + { + "expression": { + "id": 4231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4226, + "name": "_cachedThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4162, + "src": "3825:11:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4229, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3847:4:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + ], + "id": 4228, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3839:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4227, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3839:7:16", + "typeDescriptions": {} + } + }, + "id": 4230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3839:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3825:27:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4232, + "nodeType": "ExpressionStatement", + "src": "3825:27:16" + } + ] + }, + "documentation": { + "id": 4177, + "nodeType": "StructuredDocumentation", + "src": "2864:559:16", + "text": " @dev Initializes the domain separator and parameter caches.\n The meaning of `name` and `version` is specified in\n https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]:\n - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n - `version`: the current major version of the signing domain.\n NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n contract upgrade]." + }, + "id": 4234, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4179, + "mutability": "mutable", + "name": "name", + "nameLocation": "3454:4:16", + "nodeType": "VariableDeclaration", + "scope": 4234, + "src": "3440:18:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4178, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3440:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4181, + "mutability": "mutable", + "name": "version", + "nameLocation": "3474:7:16", + "nodeType": "VariableDeclaration", + "scope": 4234, + "src": "3460:21:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4180, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3460:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "3439:43:16" + }, + "returnParameters": { + "id": 4183, + "nodeType": "ParameterList", + "parameters": [], + "src": "3483:0:16" + }, + "scope": 4364, + "src": "3428:431:16", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4259, + "nodeType": "Block", + "src": "4007:200:16", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4242, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4029:4:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + ], + "id": 4241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4021:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4240, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4021:7:16", + "typeDescriptions": {} + } + }, + "id": 4243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4021:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4244, + "name": "_cachedThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4162, + "src": "4038:11:16", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4021:28:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4246, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "4053:5:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4059:7:16", + "memberName": "chainid", + "nodeType": "MemberAccess", + "src": "4053:13:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4248, + "name": "_cachedChainId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4160, + "src": "4070:14:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4053:31:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4021:63:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4257, + "nodeType": "Block", + "src": "4146:55:16", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4254, + "name": "_buildDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4281, + "src": "4167:21:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4167:23:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4239, + "id": 4256, + "nodeType": "Return", + "src": "4160:30:16" + } + ] + }, + "id": 4258, + "nodeType": "IfStatement", + "src": "4017:184:16", + "trueBody": { + "id": 4253, + "nodeType": "Block", + "src": "4086:54:16", + "statements": [ + { + "expression": { + "id": 4251, + "name": "_cachedDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4158, + "src": "4107:22:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4239, + "id": 4252, + "nodeType": "Return", + "src": "4100:29:16" + } + ] + } + } + ] + }, + "documentation": { + "id": 4235, + "nodeType": "StructuredDocumentation", + "src": "3865:75:16", + "text": " @dev Returns the domain separator for the current chain." + }, + "id": 4260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_domainSeparatorV4", + "nameLocation": "3954:18:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4236, + "nodeType": "ParameterList", + "parameters": [], + "src": "3972:2:16" + }, + "returnParameters": { + "id": 4239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4238, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4260, + "src": "3998:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4237, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3998:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3997:9:16" + }, + "scope": 4364, + "src": "3945:262:16", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4280, + "nodeType": "Block", + "src": "4277:115:16", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4268, + "name": "TYPE_HASH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4156, + "src": "4315:9:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4269, + "name": "_hashedName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4164, + "src": "4326:11:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4270, + "name": "_hashedVersion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4166, + "src": "4339:14:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 4271, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "4355:5:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4361:7:16", + "memberName": "chainid", + "nodeType": "MemberAccess", + "src": "4355:13:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 4275, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4378:4:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + ], + "id": 4274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4370:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4273, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4370:7:16", + "typeDescriptions": {} + } + }, + "id": 4276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4370:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4266, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "4304:3:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4308:6:16", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "4304:10:16", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4304:80:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4265, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "4294:9:16", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4294:91:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4264, + "id": 4279, + "nodeType": "Return", + "src": "4287:98:16" + } + ] + }, + "id": 4281, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_buildDomainSeparator", + "nameLocation": "4222:21:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4261, + "nodeType": "ParameterList", + "parameters": [], + "src": "4243:2:16" + }, + "returnParameters": { + "id": 4264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4263, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4281, + "src": "4268:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4262, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4268:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4267:9:16" + }, + "scope": 4364, + "src": "4213:179:16", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 4296, + "nodeType": "Block", + "src": "5103:90:16", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4291, + "name": "_domainSeparatorV4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4260, + "src": "5153:18:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 4292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5153:20:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4293, + "name": "structHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4284, + "src": "5175:10:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 4289, + "name": "MessageHashUtils", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4535, + "src": "5120:16:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MessageHashUtils_$4535_$", + "typeString": "type(library MessageHashUtils)" + } + }, + "id": 4290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5137:15:16", + "memberName": "toTypedDataHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 4451, + "src": "5120:32:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 4294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5120:66:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4288, + "id": 4295, + "nodeType": "Return", + "src": "5113:73:16" + } + ] + }, + "documentation": { + "id": 4282, + "nodeType": "StructuredDocumentation", + "src": "4398:614:16", + "text": " @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n function returns the hash of the fully encoded EIP712 message for this domain.\n This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n ```solidity\n bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n keccak256(\"Mail(address to,string contents)\"),\n mailTo,\n keccak256(bytes(mailContents))\n )));\n address signer = ECDSA.recover(digest, signature);\n ```" + }, + "id": 4297, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_hashTypedDataV4", + "nameLocation": "5026:16:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4284, + "mutability": "mutable", + "name": "structHash", + "nameLocation": "5051:10:16", + "nodeType": "VariableDeclaration", + "scope": 4297, + "src": "5043:18:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4283, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5043:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5042:20:16" + }, + "returnParameters": { + "id": 4288, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4287, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4297, + "src": "5094:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4286, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5094:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5093:9:16" + }, + "scope": 4364, + "src": "5017:176:16", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 261 + ], + "body": { + "id": 4338, + "nodeType": "Block", + "src": "5556:229:16", + "statements": [ + { + "expression": { + "components": [ + { + "hexValue": "0f", + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "hexString", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5587:7:16", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3d725c5ee53025f027da36bea8d3af3b6a3e9d2d1542d47c162631de48e66c1c", + "typeString": "literal_string hex\"0f\"" + }, + "value": "\u000f" + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4317, + "name": "_EIP712Name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4351, + "src": "5617:11:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_string_memory_ptr_$", + "typeString": "function () view returns (string memory)" + } + }, + "id": 4318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5617:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4319, + "name": "_EIP712Version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4363, + "src": "5644:14:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_string_memory_ptr_$", + "typeString": "function () view returns (string memory)" + } + }, + "id": 4320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5644:16:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "expression": { + "id": 4321, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "5674:5:16", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5680:7:16", + "memberName": "chainid", + "nodeType": "MemberAccess", + "src": "5674:13:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 4325, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5709:4:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EIP712_$4364", + "typeString": "contract EIP712" + } + ], + "id": 4324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5701:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4323, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5701:7:16", + "typeDescriptions": {} + } + }, + "id": 4326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5701:13:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 4329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5736:1:16", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5728:7:16", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4327, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5728:7:16", + "typeDescriptions": {} + } + }, + "id": 4330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5728:10:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 4334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5766:1:16", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "5752:13:16", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint256[] memory)" + }, + "typeName": { + "baseType": { + "id": 4331, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5756:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4332, + "nodeType": "ArrayTypeName", + "src": "5756:9:16", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 4335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5752:16:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "id": 4336, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5573:205:16", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_stringliteral_3d725c5ee53025f027da36bea8d3af3b6a3e9d2d1542d47c162631de48e66c1c_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint256_$_t_address_$_t_bytes32_$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "tuple(literal_string hex\"0f\",string memory,string memory,uint256,address,bytes32,uint256[] memory)" + } + }, + "functionReturnParameters": 4315, + "id": 4337, + "nodeType": "Return", + "src": "5566:212:16" + } + ] + }, + "documentation": { + "id": 4298, + "nodeType": "StructuredDocumentation", + "src": "5199:24:16", + "text": "@inheritdoc IERC5267" + }, + "functionSelector": "84b0196e", + "id": 4339, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "eip712Domain", + "nameLocation": "5237:12:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4299, + "nodeType": "ParameterList", + "parameters": [], + "src": "5249:2:16" + }, + "returnParameters": { + "id": 4315, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4301, + "mutability": "mutable", + "name": "fields", + "nameLocation": "5333:6:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5326:13:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 4300, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "5326:6:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4303, + "mutability": "mutable", + "name": "name", + "nameLocation": "5367:4:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5353:18:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4302, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5353:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4305, + "mutability": "mutable", + "name": "version", + "nameLocation": "5399:7:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5385:21:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4304, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5385:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4307, + "mutability": "mutable", + "name": "chainId", + "nameLocation": "5428:7:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5420:15:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5420:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4309, + "mutability": "mutable", + "name": "verifyingContract", + "nameLocation": "5457:17:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5449:25:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5449:7:16", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4311, + "mutability": "mutable", + "name": "salt", + "nameLocation": "5496:4:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5488:12:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4310, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5488:7:16", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4314, + "mutability": "mutable", + "name": "extensions", + "nameLocation": "5531:10:16", + "nodeType": "VariableDeclaration", + "scope": 4339, + "src": "5514:27:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5514:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4313, + "nodeType": "ArrayTypeName", + "src": "5514:9:16", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "5312:239:16" + }, + "scope": 4364, + "src": "5228:557:16", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 4350, + "nodeType": "Block", + "src": "6166:65:16", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4347, + "name": "_nameFallback", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4174, + "src": "6210:13:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 4345, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4169, + "src": "6183:5:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "id": 4346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6189:20:16", + "memberName": "toStringWithFallback", + "nodeType": "MemberAccess", + "referencedDeclaration": 2012, + "src": "6183:26:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$_t_string_storage_ptr_$returns$_t_string_memory_ptr_$attached_to$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (ShortString,string storage pointer) pure returns (string memory)" + } + }, + "id": 4348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6183:41:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 4344, + "id": 4349, + "nodeType": "Return", + "src": "6176:48:16" + } + ] + }, + "documentation": { + "id": 4340, + "nodeType": "StructuredDocumentation", + "src": "5791:256:16", + "text": " @dev The name parameter for the EIP712 domain.\n NOTE: By default this function reads _name which is an immutable value.\n It only reads from storage if necessary (in case the value is too large to fit in a ShortString)." + }, + "id": 4351, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_EIP712Name", + "nameLocation": "6114:11:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4341, + "nodeType": "ParameterList", + "parameters": [], + "src": "6125:2:16" + }, + "returnParameters": { + "id": 4344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4343, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4351, + "src": "6151:13:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4342, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6151:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "6150:15:16" + }, + "scope": 4364, + "src": "6105:126:16", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4362, + "nodeType": "Block", + "src": "6621:71:16", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4359, + "name": "_versionFallback", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4176, + "src": "6668:16:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 4357, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4172, + "src": "6638:8:16", + "typeDescriptions": { + "typeIdentifier": "t_userDefinedValueType$_ShortString_$1833", + "typeString": "ShortString" + } + }, + "id": 4358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6647:20:16", + "memberName": "toStringWithFallback", + "nodeType": "MemberAccess", + "referencedDeclaration": 2012, + "src": "6638:29:16", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_userDefinedValueType$_ShortString_$1833_$_t_string_storage_ptr_$returns$_t_string_memory_ptr_$attached_to$_t_userDefinedValueType$_ShortString_$1833_$", + "typeString": "function (ShortString,string storage pointer) pure returns (string memory)" + } + }, + "id": 4360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6638:47:16", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 4356, + "id": 4361, + "nodeType": "Return", + "src": "6631:54:16" + } + ] + }, + "documentation": { + "id": 4352, + "nodeType": "StructuredDocumentation", + "src": "6237:262:16", + "text": " @dev The version parameter for the EIP712 domain.\n NOTE: By default this function reads _version which is an immutable value.\n It only reads from storage if necessary (in case the value is too large to fit in a ShortString)." + }, + "id": 4363, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_EIP712Version", + "nameLocation": "6566:14:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4353, + "nodeType": "ParameterList", + "parameters": [], + "src": "6580:2:16" + }, + "returnParameters": { + "id": 4356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4355, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4363, + "src": "6606:13:16", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4354, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6606:6:16", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "6605:15:16" + }, + "scope": 4364, + "src": "6557:135:16", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4365, + "src": "1960:4734:16", + "usedErrors": [ + 1841, + 1843 + ], + "usedEvents": [ + 242 + ] + } + ], + "src": "113:6582:16" + }, + "id": 16 + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol", + "exportedSymbols": { + "MessageHashUtils": [ + 4535 + ], + "Strings": [ + 3678 + ] + }, + "id": 4536, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4366, + "literals": [ + "solidity", + "^", + "0.8", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "123:24:17" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Strings.sol", + "file": "../Strings.sol", + "id": 4368, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4536, + "sourceUnit": 3679, + "src": "149:39:17", + "symbolAliases": [ + { + "foreign": { + "id": 4367, + "name": "Strings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3678, + "src": "157:7:17", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MessageHashUtils", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 4369, + "nodeType": "StructuredDocumentation", + "src": "190:330:17", + "text": " @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n The library provides methods for generating a hash of a message that conforms to the\n https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n specifications." + }, + "fullyImplemented": true, + "id": 4535, + "linearizedBaseContracts": [ + 4535 + ], + "name": "MessageHashUtils", + "nameLocation": "529:16:17", + "nodeType": "ContractDefinition", + "nodes": [ + { + "errorSelector": "db00f904", + "id": 4371, + "name": "ERC5267ExtensionsNotSupported", + "nameLocation": "558:29:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4370, + "nodeType": "ParameterList", + "parameters": [], + "src": "587:2:17" + }, + "src": "552:38:17" + }, + { + "body": { + "id": 4380, + "nodeType": "Block", + "src": "1383:341:17", + "statements": [ + { + "AST": { + "nativeSrc": "1418:300:17", + "nodeType": "YulBlock", + "src": "1418:300:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1439:4:17", + "nodeType": "YulLiteral", + "src": "1439:4:17", + "type": "", + "value": "0x00" + }, + { + "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332", + "kind": "string", + "nativeSrc": "1445:34:17", + "nodeType": "YulLiteral", + "src": "1445:34:17", + "type": "", + "value": "\u0019Ethereum Signed Message:\n32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1432:6:17", + "nodeType": "YulIdentifier", + "src": "1432:6:17" + }, + "nativeSrc": "1432:48:17", + "nodeType": "YulFunctionCall", + "src": "1432:48:17" + }, + "nativeSrc": "1432:48:17", + "nodeType": "YulExpressionStatement", + "src": "1432:48:17" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1541:4:17", + "nodeType": "YulLiteral", + "src": "1541:4:17", + "type": "", + "value": "0x1c" + }, + { + "name": "messageHash", + "nativeSrc": "1547:11:17", + "nodeType": "YulIdentifier", + "src": "1547:11:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1534:6:17", + "nodeType": "YulIdentifier", + "src": "1534:6:17" + }, + "nativeSrc": "1534:25:17", + "nodeType": "YulFunctionCall", + "src": "1534:25:17" + }, + "nativeSrc": "1534:25:17", + "nodeType": "YulExpressionStatement", + "src": "1534:25:17" + }, + { + "nativeSrc": "1613:31:17", + "nodeType": "YulAssignment", + "src": "1613:31:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1633:4:17", + "nodeType": "YulLiteral", + "src": "1633:4:17", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "1639:4:17", + "nodeType": "YulLiteral", + "src": "1639:4:17", + "type": "", + "value": "0x3c" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "1623:9:17", + "nodeType": "YulIdentifier", + "src": "1623:9:17" + }, + "nativeSrc": "1623:21:17", + "nodeType": "YulFunctionCall", + "src": "1623:21:17" + }, + "variableNames": [ + { + "name": "digest", + "nativeSrc": "1613:6:17", + "nodeType": "YulIdentifier", + "src": "1613:6:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4377, + "isOffset": false, + "isSlot": false, + "src": "1613:6:17", + "valueSize": 1 + }, + { + "declaration": 4374, + "isOffset": false, + "isSlot": false, + "src": "1547:11:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4379, + "nodeType": "InlineAssembly", + "src": "1393:325:17" + } + ] + }, + "documentation": { + "id": 4372, + "nodeType": "StructuredDocumentation", + "src": "596:690:17", + "text": " @dev Returns the keccak256 digest of an ERC-191 signed data with version\n `0x45` (`personal_sign` messages).\n The digest is calculated by prefixing a bytes32 `messageHash` with\n `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n keccak256, although any bytes32 value can be safely used because the final digest will\n be re-hashed.\n See {ECDSA-recover}." + }, + "id": 4381, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toEthSignedMessageHash", + "nameLocation": "1300:22:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4375, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4374, + "mutability": "mutable", + "name": "messageHash", + "nameLocation": "1331:11:17", + "nodeType": "VariableDeclaration", + "scope": 4381, + "src": "1323:19:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4373, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1323:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1322:21:17" + }, + "returnParameters": { + "id": 4378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4377, + "mutability": "mutable", + "name": "digest", + "nameLocation": "1375:6:17", + "nodeType": "VariableDeclaration", + "scope": 4381, + "src": "1367:14:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4376, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1367:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1366:16:17" + }, + "scope": 4535, + "src": "1291:433:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4406, + "nodeType": "Block", + "src": "2301:143:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "19457468657265756d205369676e6564204d6573736167653a0a", + "id": 4393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2353:32:17", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9af2d9c228f6cfddaa6d1e5b94e0bce4ab16bd9a472a2b7fbfd74ebff4c720b4", + "typeString": "literal_string hex\"19457468657265756d205369676e6564204d6573736167653a0a\"" + }, + "value": "\u0019Ethereum Signed Message:\n" + }, + { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 4398, + "name": "message", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "2410:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 4399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2418:6:17", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2410:14:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4396, + "name": "Strings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3678, + "src": "2393:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Strings_$3678_$", + "typeString": "type(library Strings)" + } + }, + "id": 4397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2401:8:17", + "memberName": "toString", + "nodeType": "MemberAccess", + "referencedDeclaration": 2261, + "src": "2393:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 4400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2393:32:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2387:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4394, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2387:5:17", + "typeDescriptions": {} + } + }, + "id": 4401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2387:39:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 4402, + "name": "message", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "2428:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_9af2d9c228f6cfddaa6d1e5b94e0bce4ab16bd9a472a2b7fbfd74ebff4c720b4", + "typeString": "literal_string hex\"19457468657265756d205369676e6564204d6573736167653a0a\"" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2340:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4390, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2340:5:17", + "typeDescriptions": {} + } + }, + "id": 4392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2346:6:17", + "memberName": "concat", + "nodeType": "MemberAccess", + "src": "2340:12:17", + "typeDescriptions": { + "typeIdentifier": "t_function_bytesconcat_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2340:96:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4389, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2330:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2330:107:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4388, + "id": 4405, + "nodeType": "Return", + "src": "2311:126:17" + } + ] + }, + "documentation": { + "id": 4382, + "nodeType": "StructuredDocumentation", + "src": "1730:480:17", + "text": " @dev Returns the keccak256 digest of an ERC-191 signed data with version\n `0x45` (`personal_sign` messages).\n The digest is calculated by prefixing an arbitrary `message` with\n `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n See {ECDSA-recover}." + }, + "id": 4407, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toEthSignedMessageHash", + "nameLocation": "2224:22:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4385, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4384, + "mutability": "mutable", + "name": "message", + "nameLocation": "2260:7:17", + "nodeType": "VariableDeclaration", + "scope": 4407, + "src": "2247:20:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4383, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2247:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2246:22:17" + }, + "returnParameters": { + "id": 4388, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4387, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4407, + "src": "2292:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4386, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2292:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2291:9:17" + }, + "scope": 4535, + "src": "2215:229:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4426, + "nodeType": "Block", + "src": "2898:80:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "1900", + "id": 4420, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "hexString", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2942:10:17", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73fd5d154550a4a103564cb191928cd38898034de1b952dc21b290898b4b697a", + "typeString": "literal_string hex\"1900\"" + }, + "value": "\u0019\u0000" + }, + { + "id": 4421, + "name": "validator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4410, + "src": "2954:9:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4422, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4412, + "src": "2965:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_73fd5d154550a4a103564cb191928cd38898034de1b952dc21b290898b4b697a", + "typeString": "literal_string hex\"1900\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 4418, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2925:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2929:12:17", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2925:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2925:45:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4417, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2915:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2915:56:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4416, + "id": 4425, + "nodeType": "Return", + "src": "2908:63:17" + } + ] + }, + "documentation": { + "id": 4408, + "nodeType": "StructuredDocumentation", + "src": "2450:332:17", + "text": " @dev Returns the keccak256 digest of an ERC-191 signed data with version\n `0x00` (data with intended validator).\n The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n `validator` address. Then hashing the result.\n See {ECDSA-recover}." + }, + "id": 4427, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDataWithIntendedValidatorHash", + "nameLocation": "2796:31:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4410, + "mutability": "mutable", + "name": "validator", + "nameLocation": "2836:9:17", + "nodeType": "VariableDeclaration", + "scope": 4427, + "src": "2828:17:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4409, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2828:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4412, + "mutability": "mutable", + "name": "data", + "nameLocation": "2860:4:17", + "nodeType": "VariableDeclaration", + "scope": 4427, + "src": "2847:17:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4411, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2847:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "2827:38:17" + }, + "returnParameters": { + "id": 4416, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4415, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4427, + "src": "2889:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4414, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2889:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2888:9:17" + }, + "scope": 4535, + "src": "2787:191:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4438, + "nodeType": "Block", + "src": "3260:216:17", + "statements": [ + { + "AST": { + "nativeSrc": "3295:175:17", + "nodeType": "YulBlock", + "src": "3295:175:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3316:4:17", + "nodeType": "YulLiteral", + "src": "3316:4:17", + "type": "", + "value": "0x00" + }, + { + "hexValue": "1900", + "kind": "string", + "nativeSrc": "3322:10:17", + "nodeType": "YulLiteral", + "src": "3322:10:17", + "type": "", + "value": "\u0019\u0000" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3309:6:17", + "nodeType": "YulIdentifier", + "src": "3309:6:17" + }, + "nativeSrc": "3309:24:17", + "nodeType": "YulFunctionCall", + "src": "3309:24:17" + }, + "nativeSrc": "3309:24:17", + "nodeType": "YulExpressionStatement", + "src": "3309:24:17" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3353:4:17", + "nodeType": "YulLiteral", + "src": "3353:4:17", + "type": "", + "value": "0x02" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3363:2:17", + "nodeType": "YulLiteral", + "src": "3363:2:17", + "type": "", + "value": "96" + }, + { + "name": "validator", + "nativeSrc": "3367:9:17", + "nodeType": "YulIdentifier", + "src": "3367:9:17" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3359:3:17", + "nodeType": "YulIdentifier", + "src": "3359:3:17" + }, + "nativeSrc": "3359:18:17", + "nodeType": "YulFunctionCall", + "src": "3359:18:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3346:6:17", + "nodeType": "YulIdentifier", + "src": "3346:6:17" + }, + "nativeSrc": "3346:32:17", + "nodeType": "YulFunctionCall", + "src": "3346:32:17" + }, + "nativeSrc": "3346:32:17", + "nodeType": "YulExpressionStatement", + "src": "3346:32:17" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3398:4:17", + "nodeType": "YulLiteral", + "src": "3398:4:17", + "type": "", + "value": "0x16" + }, + { + "name": "messageHash", + "nativeSrc": "3404:11:17", + "nodeType": "YulIdentifier", + "src": "3404:11:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3391:6:17", + "nodeType": "YulIdentifier", + "src": "3391:6:17" + }, + "nativeSrc": "3391:25:17", + "nodeType": "YulFunctionCall", + "src": "3391:25:17" + }, + "nativeSrc": "3391:25:17", + "nodeType": "YulExpressionStatement", + "src": "3391:25:17" + }, + { + "nativeSrc": "3429:31:17", + "nodeType": "YulAssignment", + "src": "3429:31:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3449:4:17", + "nodeType": "YulLiteral", + "src": "3449:4:17", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "3455:4:17", + "nodeType": "YulLiteral", + "src": "3455:4:17", + "type": "", + "value": "0x36" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "3439:9:17", + "nodeType": "YulIdentifier", + "src": "3439:9:17" + }, + "nativeSrc": "3439:21:17", + "nodeType": "YulFunctionCall", + "src": "3439:21:17" + }, + "variableNames": [ + { + "name": "digest", + "nativeSrc": "3429:6:17", + "nodeType": "YulIdentifier", + "src": "3429:6:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4435, + "isOffset": false, + "isSlot": false, + "src": "3429:6:17", + "valueSize": 1 + }, + { + "declaration": 4432, + "isOffset": false, + "isSlot": false, + "src": "3404:11:17", + "valueSize": 1 + }, + { + "declaration": 4430, + "isOffset": false, + "isSlot": false, + "src": "3367:9:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4437, + "nodeType": "InlineAssembly", + "src": "3270:200:17" + } + ] + }, + "documentation": { + "id": 4428, + "nodeType": "StructuredDocumentation", + "src": "2984:129:17", + "text": " @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32." + }, + "id": 4439, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDataWithIntendedValidatorHash", + "nameLocation": "3127:31:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4430, + "mutability": "mutable", + "name": "validator", + "nameLocation": "3176:9:17", + "nodeType": "VariableDeclaration", + "scope": 4439, + "src": "3168:17:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3168:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4432, + "mutability": "mutable", + "name": "messageHash", + "nameLocation": "3203:11:17", + "nodeType": "VariableDeclaration", + "scope": 4439, + "src": "3195:19:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4431, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3195:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3158:62:17" + }, + "returnParameters": { + "id": 4436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4435, + "mutability": "mutable", + "name": "digest", + "nameLocation": "3252:6:17", + "nodeType": "VariableDeclaration", + "scope": 4439, + "src": "3244:14:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4434, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3244:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3243:16:17" + }, + "scope": 4535, + "src": "3118:358:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4450, + "nodeType": "Block", + "src": "4027:265:17", + "statements": [ + { + "AST": { + "nativeSrc": "4062:224:17", + "nodeType": "YulBlock", + "src": "4062:224:17", + "statements": [ + { + "nativeSrc": "4076:22:17", + "nodeType": "YulVariableDeclaration", + "src": "4076:22:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4093:4:17", + "nodeType": "YulLiteral", + "src": "4093:4:17", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4087:5:17", + "nodeType": "YulIdentifier", + "src": "4087:5:17" + }, + "nativeSrc": "4087:11:17", + "nodeType": "YulFunctionCall", + "src": "4087:11:17" + }, + "variables": [ + { + "name": "ptr", + "nativeSrc": "4080:3:17", + "nodeType": "YulTypedName", + "src": "4080:3:17", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "4118:3:17", + "nodeType": "YulIdentifier", + "src": "4118:3:17" + }, + { + "hexValue": "1901", + "kind": "string", + "nativeSrc": "4123:10:17", + "nodeType": "YulLiteral", + "src": "4123:10:17", + "type": "", + "value": "\u0019\u0001" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4111:6:17", + "nodeType": "YulIdentifier", + "src": "4111:6:17" + }, + "nativeSrc": "4111:23:17", + "nodeType": "YulFunctionCall", + "src": "4111:23:17" + }, + "nativeSrc": "4111:23:17", + "nodeType": "YulExpressionStatement", + "src": "4111:23:17" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "4158:3:17", + "nodeType": "YulIdentifier", + "src": "4158:3:17" + }, + { + "kind": "number", + "nativeSrc": "4163:4:17", + "nodeType": "YulLiteral", + "src": "4163:4:17", + "type": "", + "value": "0x02" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4154:3:17", + "nodeType": "YulIdentifier", + "src": "4154:3:17" + }, + "nativeSrc": "4154:14:17", + "nodeType": "YulFunctionCall", + "src": "4154:14:17" + }, + { + "name": "domainSeparator", + "nativeSrc": "4170:15:17", + "nodeType": "YulIdentifier", + "src": "4170:15:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4147:6:17", + "nodeType": "YulIdentifier", + "src": "4147:6:17" + }, + "nativeSrc": "4147:39:17", + "nodeType": "YulFunctionCall", + "src": "4147:39:17" + }, + "nativeSrc": "4147:39:17", + "nodeType": "YulExpressionStatement", + "src": "4147:39:17" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "4210:3:17", + "nodeType": "YulIdentifier", + "src": "4210:3:17" + }, + { + "kind": "number", + "nativeSrc": "4215:4:17", + "nodeType": "YulLiteral", + "src": "4215:4:17", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4206:3:17", + "nodeType": "YulIdentifier", + "src": "4206:3:17" + }, + "nativeSrc": "4206:14:17", + "nodeType": "YulFunctionCall", + "src": "4206:14:17" + }, + { + "name": "structHash", + "nativeSrc": "4222:10:17", + "nodeType": "YulIdentifier", + "src": "4222:10:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4199:6:17", + "nodeType": "YulIdentifier", + "src": "4199:6:17" + }, + "nativeSrc": "4199:34:17", + "nodeType": "YulFunctionCall", + "src": "4199:34:17" + }, + "nativeSrc": "4199:34:17", + "nodeType": "YulExpressionStatement", + "src": "4199:34:17" + }, + { + "nativeSrc": "4246:30:17", + "nodeType": "YulAssignment", + "src": "4246:30:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "4266:3:17", + "nodeType": "YulIdentifier", + "src": "4266:3:17" + }, + { + "kind": "number", + "nativeSrc": "4271:4:17", + "nodeType": "YulLiteral", + "src": "4271:4:17", + "type": "", + "value": "0x42" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "4256:9:17", + "nodeType": "YulIdentifier", + "src": "4256:9:17" + }, + "nativeSrc": "4256:20:17", + "nodeType": "YulFunctionCall", + "src": "4256:20:17" + }, + "variableNames": [ + { + "name": "digest", + "nativeSrc": "4246:6:17", + "nodeType": "YulIdentifier", + "src": "4246:6:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4447, + "isOffset": false, + "isSlot": false, + "src": "4246:6:17", + "valueSize": 1 + }, + { + "declaration": 4442, + "isOffset": false, + "isSlot": false, + "src": "4170:15:17", + "valueSize": 1 + }, + { + "declaration": 4444, + "isOffset": false, + "isSlot": false, + "src": "4222:10:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4449, + "nodeType": "InlineAssembly", + "src": "4037:249:17" + } + ] + }, + "documentation": { + "id": 4440, + "nodeType": "StructuredDocumentation", + "src": "3482:431:17", + "text": " @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n See {ECDSA-recover}." + }, + "id": 4451, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toTypedDataHash", + "nameLocation": "3927:15:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4445, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4442, + "mutability": "mutable", + "name": "domainSeparator", + "nameLocation": "3951:15:17", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "3943:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4441, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3943:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4444, + "mutability": "mutable", + "name": "structHash", + "nameLocation": "3976:10:17", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "3968:18:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4443, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3968:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3942:45:17" + }, + "returnParameters": { + "id": 4448, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4447, + "mutability": "mutable", + "name": "digest", + "nameLocation": "4019:6:17", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "4011:14:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4446, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4011:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4010:16:17" + }, + "scope": 4535, + "src": "3918:374:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4488, + "nodeType": "Block", + "src": "5222:256:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4470, + "name": "fields", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "5286:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 4474, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4456, + "src": "5326:4:17", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5320:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4472, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5320:5:17", + "typeDescriptions": {} + } + }, + "id": 4475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5320:11:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4471, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "5310:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5310:22:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 4480, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4458, + "src": "5366:7:17", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5360:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 4478, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5360:5:17", + "typeDescriptions": {} + } + }, + "id": 4481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5360:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4477, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "5350:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5350:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 4483, + "name": "chainId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4460, + "src": "5393:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4484, + "name": "verifyingContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4462, + "src": "5418:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4485, + "name": "salt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4464, + "src": "5453:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4469, + "name": "toDomainSeparator", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4489, + 4515 + ], + "referencedDeclaration": 4515, + "src": "5251:17:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes1_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_address_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes1,bytes32,bytes32,uint256,address,bytes32) pure returns (bytes32)" + } + }, + "id": 4486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5251:220:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4468, + "id": 4487, + "nodeType": "Return", + "src": "5232:239:17" + } + ] + }, + "documentation": { + "id": 4452, + "nodeType": "StructuredDocumentation", + "src": "4298:685:17", + "text": " @dev Returns the EIP-712 domain separator constructed from an `eip712Domain`. See {IERC5267-eip712Domain}\n This function dynamically constructs the domain separator based on which fields are present in the\n `fields` parameter. It contains flags that indicate which domain fields are present:\n * Bit 0 (0x01): name\n * Bit 1 (0x02): version\n * Bit 2 (0x04): chainId\n * Bit 3 (0x08): verifyingContract\n * Bit 4 (0x10): salt\n Arguments that correspond to fields which are not present in `fields` are ignored. For example, if `fields` is\n `0x0f` (`0b01111`), then the `salt` parameter is ignored." + }, + "id": 4489, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDomainSeparator", + "nameLocation": "4997:17:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4454, + "mutability": "mutable", + "name": "fields", + "nameLocation": "5031:6:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5024:13:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 4453, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "5024:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4456, + "mutability": "mutable", + "name": "name", + "nameLocation": "5061:4:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5047:18:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4455, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5047:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4458, + "mutability": "mutable", + "name": "version", + "nameLocation": "5089:7:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5075:21:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4457, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5075:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4460, + "mutability": "mutable", + "name": "chainId", + "nameLocation": "5114:7:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5106:15:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4459, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5106:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4462, + "mutability": "mutable", + "name": "verifyingContract", + "nameLocation": "5139:17:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5131:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5131:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4464, + "mutability": "mutable", + "name": "salt", + "nameLocation": "5174:4:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5166:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4463, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5166:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5014:170:17" + }, + "returnParameters": { + "id": 4468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4467, + "mutability": "mutable", + "name": "hash", + "nameLocation": "5216:4:17", + "nodeType": "VariableDeclaration", + "scope": 4489, + "src": "5208:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4466, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5208:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5207:14:17" + }, + "scope": 4535, + "src": "4988:490:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4514, + "nodeType": "Block", + "src": "5838:1051:17", + "statements": [ + { + "assignments": [ + 4508 + ], + "declarations": [ + { + "constant": false, + "id": 4508, + "mutability": "mutable", + "name": "domainTypeHash", + "nameLocation": "5856:14:17", + "nodeType": "VariableDeclaration", + "scope": 4514, + "src": "5848:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4507, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5848:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 4512, + "initialValue": { + "arguments": [ + { + "id": 4510, + "name": "fields", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4492, + "src": "5890:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 4509, + "name": "toDomainTypeHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4534, + "src": "5873:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes1_$returns$_t_bytes32_$", + "typeString": "function (bytes1) pure returns (bytes32)" + } + }, + "id": 4511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5873:24:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5848:49:17" + }, + { + "AST": { + "nativeSrc": "5933:950:17", + "nodeType": "YulBlock", + "src": "5933:950:17", + "statements": [ + { + "nativeSrc": "6008:26:17", + "nodeType": "YulAssignment", + "src": "6008:26:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6022:3:17", + "nodeType": "YulLiteral", + "src": "6022:3:17", + "type": "", + "value": "248" + }, + { + "name": "fields", + "nativeSrc": "6027:6:17", + "nodeType": "YulIdentifier", + "src": "6027:6:17" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "6018:3:17", + "nodeType": "YulIdentifier", + "src": "6018:3:17" + }, + "nativeSrc": "6018:16:17", + "nodeType": "YulFunctionCall", + "src": "6018:16:17" + }, + "variableNames": [ + { + "name": "fields", + "nativeSrc": "6008:6:17", + "nodeType": "YulIdentifier", + "src": "6008:6:17" + } + ] + }, + { + "nativeSrc": "6089:22:17", + "nodeType": "YulVariableDeclaration", + "src": "6089:22:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6106:4:17", + "nodeType": "YulLiteral", + "src": "6106:4:17", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "6100:5:17", + "nodeType": "YulIdentifier", + "src": "6100:5:17" + }, + "nativeSrc": "6100:11:17", + "nodeType": "YulFunctionCall", + "src": "6100:11:17" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "6093:3:17", + "nodeType": "YulTypedName", + "src": "6093:3:17", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "6131:3:17", + "nodeType": "YulIdentifier", + "src": "6131:3:17" + }, + { + "name": "domainTypeHash", + "nativeSrc": "6136:14:17", + "nodeType": "YulIdentifier", + "src": "6136:14:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6124:6:17", + "nodeType": "YulIdentifier", + "src": "6124:6:17" + }, + "nativeSrc": "6124:27:17", + "nodeType": "YulFunctionCall", + "src": "6124:27:17" + }, + "nativeSrc": "6124:27:17", + "nodeType": "YulExpressionStatement", + "src": "6124:27:17" + }, + { + "nativeSrc": "6165:25:17", + "nodeType": "YulVariableDeclaration", + "src": "6165:25:17", + "value": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "6180:3:17", + "nodeType": "YulIdentifier", + "src": "6180:3:17" + }, + { + "kind": "number", + "nativeSrc": "6185:4:17", + "nodeType": "YulLiteral", + "src": "6185:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6176:3:17", + "nodeType": "YulIdentifier", + "src": "6176:3:17" + }, + "nativeSrc": "6176:14:17", + "nodeType": "YulFunctionCall", + "src": "6176:14:17" + }, + "variables": [ + { + "name": "ptr", + "nativeSrc": "6169:3:17", + "nodeType": "YulTypedName", + "src": "6169:3:17", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "6224:91:17", + "nodeType": "YulBlock", + "src": "6224:91:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6249:3:17", + "nodeType": "YulIdentifier", + "src": "6249:3:17" + }, + { + "name": "nameHash", + "nativeSrc": "6254:8:17", + "nodeType": "YulIdentifier", + "src": "6254:8:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6242:6:17", + "nodeType": "YulIdentifier", + "src": "6242:6:17" + }, + "nativeSrc": "6242:21:17", + "nodeType": "YulFunctionCall", + "src": "6242:21:17" + }, + "nativeSrc": "6242:21:17", + "nodeType": "YulExpressionStatement", + "src": "6242:21:17" + }, + { + "nativeSrc": "6280:21:17", + "nodeType": "YulAssignment", + "src": "6280:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6291:3:17", + "nodeType": "YulIdentifier", + "src": "6291:3:17" + }, + { + "kind": "number", + "nativeSrc": "6296:4:17", + "nodeType": "YulLiteral", + "src": "6296:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6287:3:17", + "nodeType": "YulIdentifier", + "src": "6287:3:17" + }, + "nativeSrc": "6287:14:17", + "nodeType": "YulFunctionCall", + "src": "6287:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6280:3:17", + "nodeType": "YulIdentifier", + "src": "6280:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6210:6:17", + "nodeType": "YulIdentifier", + "src": "6210:6:17" + }, + { + "kind": "number", + "nativeSrc": "6218:4:17", + "nodeType": "YulLiteral", + "src": "6218:4:17", + "type": "", + "value": "0x01" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6206:3:17", + "nodeType": "YulIdentifier", + "src": "6206:3:17" + }, + "nativeSrc": "6206:17:17", + "nodeType": "YulFunctionCall", + "src": "6206:17:17" + }, + "nativeSrc": "6203:112:17", + "nodeType": "YulIf", + "src": "6203:112:17" + }, + { + "body": { + "nativeSrc": "6349:94:17", + "nodeType": "YulBlock", + "src": "6349:94:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6374:3:17", + "nodeType": "YulIdentifier", + "src": "6374:3:17" + }, + { + "name": "versionHash", + "nativeSrc": "6379:11:17", + "nodeType": "YulIdentifier", + "src": "6379:11:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6367:6:17", + "nodeType": "YulIdentifier", + "src": "6367:6:17" + }, + "nativeSrc": "6367:24:17", + "nodeType": "YulFunctionCall", + "src": "6367:24:17" + }, + "nativeSrc": "6367:24:17", + "nodeType": "YulExpressionStatement", + "src": "6367:24:17" + }, + { + "nativeSrc": "6408:21:17", + "nodeType": "YulAssignment", + "src": "6408:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6419:3:17", + "nodeType": "YulIdentifier", + "src": "6419:3:17" + }, + { + "kind": "number", + "nativeSrc": "6424:4:17", + "nodeType": "YulLiteral", + "src": "6424:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6415:3:17", + "nodeType": "YulIdentifier", + "src": "6415:3:17" + }, + "nativeSrc": "6415:14:17", + "nodeType": "YulFunctionCall", + "src": "6415:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6408:3:17", + "nodeType": "YulIdentifier", + "src": "6408:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6335:6:17", + "nodeType": "YulIdentifier", + "src": "6335:6:17" + }, + { + "kind": "number", + "nativeSrc": "6343:4:17", + "nodeType": "YulLiteral", + "src": "6343:4:17", + "type": "", + "value": "0x02" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6331:3:17", + "nodeType": "YulIdentifier", + "src": "6331:3:17" + }, + "nativeSrc": "6331:17:17", + "nodeType": "YulFunctionCall", + "src": "6331:17:17" + }, + "nativeSrc": "6328:115:17", + "nodeType": "YulIf", + "src": "6328:115:17" + }, + { + "body": { + "nativeSrc": "6477:90:17", + "nodeType": "YulBlock", + "src": "6477:90:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6502:3:17", + "nodeType": "YulIdentifier", + "src": "6502:3:17" + }, + { + "name": "chainId", + "nativeSrc": "6507:7:17", + "nodeType": "YulIdentifier", + "src": "6507:7:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6495:6:17", + "nodeType": "YulIdentifier", + "src": "6495:6:17" + }, + "nativeSrc": "6495:20:17", + "nodeType": "YulFunctionCall", + "src": "6495:20:17" + }, + "nativeSrc": "6495:20:17", + "nodeType": "YulExpressionStatement", + "src": "6495:20:17" + }, + { + "nativeSrc": "6532:21:17", + "nodeType": "YulAssignment", + "src": "6532:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6543:3:17", + "nodeType": "YulIdentifier", + "src": "6543:3:17" + }, + { + "kind": "number", + "nativeSrc": "6548:4:17", + "nodeType": "YulLiteral", + "src": "6548:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6539:3:17", + "nodeType": "YulIdentifier", + "src": "6539:3:17" + }, + "nativeSrc": "6539:14:17", + "nodeType": "YulFunctionCall", + "src": "6539:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6532:3:17", + "nodeType": "YulIdentifier", + "src": "6532:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6463:6:17", + "nodeType": "YulIdentifier", + "src": "6463:6:17" + }, + { + "kind": "number", + "nativeSrc": "6471:4:17", + "nodeType": "YulLiteral", + "src": "6471:4:17", + "type": "", + "value": "0x04" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6459:3:17", + "nodeType": "YulIdentifier", + "src": "6459:3:17" + }, + "nativeSrc": "6459:17:17", + "nodeType": "YulFunctionCall", + "src": "6459:17:17" + }, + "nativeSrc": "6456:111:17", + "nodeType": "YulIf", + "src": "6456:111:17" + }, + { + "body": { + "nativeSrc": "6601:100:17", + "nodeType": "YulBlock", + "src": "6601:100:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6626:3:17", + "nodeType": "YulIdentifier", + "src": "6626:3:17" + }, + { + "name": "verifyingContract", + "nativeSrc": "6631:17:17", + "nodeType": "YulIdentifier", + "src": "6631:17:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6619:6:17", + "nodeType": "YulIdentifier", + "src": "6619:6:17" + }, + "nativeSrc": "6619:30:17", + "nodeType": "YulFunctionCall", + "src": "6619:30:17" + }, + "nativeSrc": "6619:30:17", + "nodeType": "YulExpressionStatement", + "src": "6619:30:17" + }, + { + "nativeSrc": "6666:21:17", + "nodeType": "YulAssignment", + "src": "6666:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6677:3:17", + "nodeType": "YulIdentifier", + "src": "6677:3:17" + }, + { + "kind": "number", + "nativeSrc": "6682:4:17", + "nodeType": "YulLiteral", + "src": "6682:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6673:3:17", + "nodeType": "YulIdentifier", + "src": "6673:3:17" + }, + "nativeSrc": "6673:14:17", + "nodeType": "YulFunctionCall", + "src": "6673:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6666:3:17", + "nodeType": "YulIdentifier", + "src": "6666:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6587:6:17", + "nodeType": "YulIdentifier", + "src": "6587:6:17" + }, + { + "kind": "number", + "nativeSrc": "6595:4:17", + "nodeType": "YulLiteral", + "src": "6595:4:17", + "type": "", + "value": "0x08" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6583:3:17", + "nodeType": "YulIdentifier", + "src": "6583:3:17" + }, + "nativeSrc": "6583:17:17", + "nodeType": "YulFunctionCall", + "src": "6583:17:17" + }, + "nativeSrc": "6580:121:17", + "nodeType": "YulIf", + "src": "6580:121:17" + }, + { + "body": { + "nativeSrc": "6735:87:17", + "nodeType": "YulBlock", + "src": "6735:87:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6760:3:17", + "nodeType": "YulIdentifier", + "src": "6760:3:17" + }, + { + "name": "salt", + "nativeSrc": "6765:4:17", + "nodeType": "YulIdentifier", + "src": "6765:4:17" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6753:6:17", + "nodeType": "YulIdentifier", + "src": "6753:6:17" + }, + "nativeSrc": "6753:17:17", + "nodeType": "YulFunctionCall", + "src": "6753:17:17" + }, + "nativeSrc": "6753:17:17", + "nodeType": "YulExpressionStatement", + "src": "6753:17:17" + }, + { + "nativeSrc": "6787:21:17", + "nodeType": "YulAssignment", + "src": "6787:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6798:3:17", + "nodeType": "YulIdentifier", + "src": "6798:3:17" + }, + { + "kind": "number", + "nativeSrc": "6803:4:17", + "nodeType": "YulLiteral", + "src": "6803:4:17", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6794:3:17", + "nodeType": "YulIdentifier", + "src": "6794:3:17" + }, + "nativeSrc": "6794:14:17", + "nodeType": "YulFunctionCall", + "src": "6794:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "6787:3:17", + "nodeType": "YulIdentifier", + "src": "6787:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "6721:6:17", + "nodeType": "YulIdentifier", + "src": "6721:6:17" + }, + { + "kind": "number", + "nativeSrc": "6729:4:17", + "nodeType": "YulLiteral", + "src": "6729:4:17", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "6717:3:17", + "nodeType": "YulIdentifier", + "src": "6717:3:17" + }, + "nativeSrc": "6717:17:17", + "nodeType": "YulFunctionCall", + "src": "6717:17:17" + }, + "nativeSrc": "6714:108:17", + "nodeType": "YulIf", + "src": "6714:108:17" + }, + { + "nativeSrc": "6836:37:17", + "nodeType": "YulAssignment", + "src": "6836:37:17", + "value": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "6854:3:17", + "nodeType": "YulIdentifier", + "src": "6854:3:17" + }, + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "6863:3:17", + "nodeType": "YulIdentifier", + "src": "6863:3:17" + }, + { + "name": "fmp", + "nativeSrc": "6868:3:17", + "nodeType": "YulIdentifier", + "src": "6868:3:17" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "6859:3:17", + "nodeType": "YulIdentifier", + "src": "6859:3:17" + }, + "nativeSrc": "6859:13:17", + "nodeType": "YulFunctionCall", + "src": "6859:13:17" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "6844:9:17", + "nodeType": "YulIdentifier", + "src": "6844:9:17" + }, + "nativeSrc": "6844:29:17", + "nodeType": "YulFunctionCall", + "src": "6844:29:17" + }, + "variableNames": [ + { + "name": "hash", + "nativeSrc": "6836:4:17", + "nodeType": "YulIdentifier", + "src": "6836:4:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4498, + "isOffset": false, + "isSlot": false, + "src": "6507:7:17", + "valueSize": 1 + }, + { + "declaration": 4508, + "isOffset": false, + "isSlot": false, + "src": "6136:14:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6008:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6027:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6210:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6335:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6463:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6587:6:17", + "valueSize": 1 + }, + { + "declaration": 4492, + "isOffset": false, + "isSlot": false, + "src": "6721:6:17", + "valueSize": 1 + }, + { + "declaration": 4505, + "isOffset": false, + "isSlot": false, + "src": "6836:4:17", + "valueSize": 1 + }, + { + "declaration": 4494, + "isOffset": false, + "isSlot": false, + "src": "6254:8:17", + "valueSize": 1 + }, + { + "declaration": 4502, + "isOffset": false, + "isSlot": false, + "src": "6765:4:17", + "valueSize": 1 + }, + { + "declaration": 4500, + "isOffset": false, + "isSlot": false, + "src": "6631:17:17", + "valueSize": 1 + }, + { + "declaration": 4496, + "isOffset": false, + "isSlot": false, + "src": "6379:11:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4513, + "nodeType": "InlineAssembly", + "src": "5908:975:17" + } + ] + }, + "documentation": { + "id": 4490, + "nodeType": "StructuredDocumentation", + "src": "5484:119:17", + "text": "@dev Variant of {toDomainSeparator-bytes1-string-string-uint256-address-bytes32} that uses hashed name and version." + }, + "id": 4515, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDomainSeparator", + "nameLocation": "5617:17:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4503, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4492, + "mutability": "mutable", + "name": "fields", + "nameLocation": "5651:6:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5644:13:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 4491, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "5644:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4494, + "mutability": "mutable", + "name": "nameHash", + "nameLocation": "5675:8:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5667:16:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4493, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5667:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4496, + "mutability": "mutable", + "name": "versionHash", + "nameLocation": "5701:11:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5693:19:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4495, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5693:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4498, + "mutability": "mutable", + "name": "chainId", + "nameLocation": "5730:7:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5722:15:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4497, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5722:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4500, + "mutability": "mutable", + "name": "verifyingContract", + "nameLocation": "5755:17:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5747:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4499, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5747:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4502, + "mutability": "mutable", + "name": "salt", + "nameLocation": "5790:4:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5782:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5782:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5634:166:17" + }, + "returnParameters": { + "id": 4506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4505, + "mutability": "mutable", + "name": "hash", + "nameLocation": "5832:4:17", + "nodeType": "VariableDeclaration", + "scope": 4515, + "src": "5824:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4504, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5824:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5823:14:17" + }, + "scope": 4535, + "src": "5608:1281:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4533, + "nodeType": "Block", + "src": "7117:1511:17", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 4527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 4525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4523, + "name": "fields", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4518, + "src": "7131:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "hexValue": "30783230", + "id": 4524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7140:4:17", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "7131:13:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783230", + "id": 4526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7148:4:17", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "7131:21:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4531, + "nodeType": "IfStatement", + "src": "7127:65:17", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4528, + "name": "ERC5267ExtensionsNotSupported", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4371, + "src": "7161:29:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$_t_error_$", + "typeString": "function () pure returns (error)" + } + }, + "id": 4529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7161:31:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 4530, + "nodeType": "RevertStatement", + "src": "7154:38:17" + } + }, + { + "AST": { + "nativeSrc": "7228:1394:17", + "nodeType": "YulBlock", + "src": "7228:1394:17", + "statements": [ + { + "nativeSrc": "7303:26:17", + "nodeType": "YulAssignment", + "src": "7303:26:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7317:3:17", + "nodeType": "YulLiteral", + "src": "7317:3:17", + "type": "", + "value": "248" + }, + { + "name": "fields", + "nativeSrc": "7322:6:17", + "nodeType": "YulIdentifier", + "src": "7322:6:17" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "7313:3:17", + "nodeType": "YulIdentifier", + "src": "7313:3:17" + }, + "nativeSrc": "7313:16:17", + "nodeType": "YulFunctionCall", + "src": "7313:16:17" + }, + "variableNames": [ + { + "name": "fields", + "nativeSrc": "7303:6:17", + "nodeType": "YulIdentifier", + "src": "7303:6:17" + } + ] + }, + { + "nativeSrc": "7384:22:17", + "nodeType": "YulVariableDeclaration", + "src": "7384:22:17", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7401:4:17", + "nodeType": "YulLiteral", + "src": "7401:4:17", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "7395:5:17", + "nodeType": "YulIdentifier", + "src": "7395:5:17" + }, + "nativeSrc": "7395:11:17", + "nodeType": "YulFunctionCall", + "src": "7395:11:17" + }, + "variables": [ + { + "name": "fmp", + "nativeSrc": "7388:3:17", + "nodeType": "YulTypedName", + "src": "7388:3:17", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "7426:3:17", + "nodeType": "YulIdentifier", + "src": "7426:3:17" + }, + { + "hexValue": "454950373132446f6d61696e28", + "kind": "string", + "nativeSrc": "7431:15:17", + "nodeType": "YulLiteral", + "src": "7431:15:17", + "type": "", + "value": "EIP712Domain(" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7419:6:17", + "nodeType": "YulIdentifier", + "src": "7419:6:17" + }, + "nativeSrc": "7419:28:17", + "nodeType": "YulFunctionCall", + "src": "7419:28:17" + }, + "nativeSrc": "7419:28:17", + "nodeType": "YulExpressionStatement", + "src": "7419:28:17" + }, + { + "nativeSrc": "7461:25:17", + "nodeType": "YulVariableDeclaration", + "src": "7461:25:17", + "value": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "7476:3:17", + "nodeType": "YulIdentifier", + "src": "7476:3:17" + }, + { + "kind": "number", + "nativeSrc": "7481:4:17", + "nodeType": "YulLiteral", + "src": "7481:4:17", + "type": "", + "value": "0x0d" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7472:3:17", + "nodeType": "YulIdentifier", + "src": "7472:3:17" + }, + "nativeSrc": "7472:14:17", + "nodeType": "YulFunctionCall", + "src": "7472:14:17" + }, + "variables": [ + { + "name": "ptr", + "nativeSrc": "7465:3:17", + "nodeType": "YulTypedName", + "src": "7465:3:17", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "7546:97:17", + "nodeType": "YulBlock", + "src": "7546:97:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7571:3:17", + "nodeType": "YulIdentifier", + "src": "7571:3:17" + }, + { + "hexValue": "737472696e67206e616d652c", + "kind": "string", + "nativeSrc": "7576:14:17", + "nodeType": "YulLiteral", + "src": "7576:14:17", + "type": "", + "value": "string name," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7564:6:17", + "nodeType": "YulIdentifier", + "src": "7564:6:17" + }, + "nativeSrc": "7564:27:17", + "nodeType": "YulFunctionCall", + "src": "7564:27:17" + }, + "nativeSrc": "7564:27:17", + "nodeType": "YulExpressionStatement", + "src": "7564:27:17" + }, + { + "nativeSrc": "7608:21:17", + "nodeType": "YulAssignment", + "src": "7608:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7619:3:17", + "nodeType": "YulIdentifier", + "src": "7619:3:17" + }, + { + "kind": "number", + "nativeSrc": "7624:4:17", + "nodeType": "YulLiteral", + "src": "7624:4:17", + "type": "", + "value": "0x0c" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7615:3:17", + "nodeType": "YulIdentifier", + "src": "7615:3:17" + }, + "nativeSrc": "7615:14:17", + "nodeType": "YulFunctionCall", + "src": "7615:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "7608:3:17", + "nodeType": "YulIdentifier", + "src": "7608:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "7532:6:17", + "nodeType": "YulIdentifier", + "src": "7532:6:17" + }, + { + "kind": "number", + "nativeSrc": "7540:4:17", + "nodeType": "YulLiteral", + "src": "7540:4:17", + "type": "", + "value": "0x01" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7528:3:17", + "nodeType": "YulIdentifier", + "src": "7528:3:17" + }, + "nativeSrc": "7528:17:17", + "nodeType": "YulFunctionCall", + "src": "7528:17:17" + }, + "nativeSrc": "7525:118:17", + "nodeType": "YulIf", + "src": "7525:118:17" + }, + { + "body": { + "nativeSrc": "7706:100:17", + "nodeType": "YulBlock", + "src": "7706:100:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7731:3:17", + "nodeType": "YulIdentifier", + "src": "7731:3:17" + }, + { + "hexValue": "737472696e672076657273696f6e2c", + "kind": "string", + "nativeSrc": "7736:17:17", + "nodeType": "YulLiteral", + "src": "7736:17:17", + "type": "", + "value": "string version," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7724:6:17", + "nodeType": "YulIdentifier", + "src": "7724:6:17" + }, + "nativeSrc": "7724:30:17", + "nodeType": "YulFunctionCall", + "src": "7724:30:17" + }, + "nativeSrc": "7724:30:17", + "nodeType": "YulExpressionStatement", + "src": "7724:30:17" + }, + { + "nativeSrc": "7771:21:17", + "nodeType": "YulAssignment", + "src": "7771:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7782:3:17", + "nodeType": "YulIdentifier", + "src": "7782:3:17" + }, + { + "kind": "number", + "nativeSrc": "7787:4:17", + "nodeType": "YulLiteral", + "src": "7787:4:17", + "type": "", + "value": "0x0f" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7778:3:17", + "nodeType": "YulIdentifier", + "src": "7778:3:17" + }, + "nativeSrc": "7778:14:17", + "nodeType": "YulFunctionCall", + "src": "7778:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "7771:3:17", + "nodeType": "YulIdentifier", + "src": "7771:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "7692:6:17", + "nodeType": "YulIdentifier", + "src": "7692:6:17" + }, + { + "kind": "number", + "nativeSrc": "7700:4:17", + "nodeType": "YulLiteral", + "src": "7700:4:17", + "type": "", + "value": "0x02" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7688:3:17", + "nodeType": "YulIdentifier", + "src": "7688:3:17" + }, + "nativeSrc": "7688:17:17", + "nodeType": "YulFunctionCall", + "src": "7688:17:17" + }, + "nativeSrc": "7685:121:17", + "nodeType": "YulIf", + "src": "7685:121:17" + }, + { + "body": { + "nativeSrc": "7869:101:17", + "nodeType": "YulBlock", + "src": "7869:101:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7894:3:17", + "nodeType": "YulIdentifier", + "src": "7894:3:17" + }, + { + "hexValue": "75696e7432353620636861696e49642c", + "kind": "string", + "nativeSrc": "7899:18:17", + "nodeType": "YulLiteral", + "src": "7899:18:17", + "type": "", + "value": "uint256 chainId," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7887:6:17", + "nodeType": "YulIdentifier", + "src": "7887:6:17" + }, + "nativeSrc": "7887:31:17", + "nodeType": "YulFunctionCall", + "src": "7887:31:17" + }, + "nativeSrc": "7887:31:17", + "nodeType": "YulExpressionStatement", + "src": "7887:31:17" + }, + { + "nativeSrc": "7935:21:17", + "nodeType": "YulAssignment", + "src": "7935:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "7946:3:17", + "nodeType": "YulIdentifier", + "src": "7946:3:17" + }, + { + "kind": "number", + "nativeSrc": "7951:4:17", + "nodeType": "YulLiteral", + "src": "7951:4:17", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7942:3:17", + "nodeType": "YulIdentifier", + "src": "7942:3:17" + }, + "nativeSrc": "7942:14:17", + "nodeType": "YulFunctionCall", + "src": "7942:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "7935:3:17", + "nodeType": "YulIdentifier", + "src": "7935:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "7855:6:17", + "nodeType": "YulIdentifier", + "src": "7855:6:17" + }, + { + "kind": "number", + "nativeSrc": "7863:4:17", + "nodeType": "YulLiteral", + "src": "7863:4:17", + "type": "", + "value": "0x04" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7851:3:17", + "nodeType": "YulIdentifier", + "src": "7851:3:17" + }, + "nativeSrc": "7851:17:17", + "nodeType": "YulFunctionCall", + "src": "7851:17:17" + }, + "nativeSrc": "7848:122:17", + "nodeType": "YulIf", + "src": "7848:122:17" + }, + { + "body": { + "nativeSrc": "8043:111:17", + "nodeType": "YulBlock", + "src": "8043:111:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8068:3:17", + "nodeType": "YulIdentifier", + "src": "8068:3:17" + }, + { + "hexValue": "6164647265737320766572696679696e67436f6e74726163742c", + "kind": "string", + "nativeSrc": "8073:28:17", + "nodeType": "YulLiteral", + "src": "8073:28:17", + "type": "", + "value": "address verifyingContract," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8061:6:17", + "nodeType": "YulIdentifier", + "src": "8061:6:17" + }, + "nativeSrc": "8061:41:17", + "nodeType": "YulFunctionCall", + "src": "8061:41:17" + }, + "nativeSrc": "8061:41:17", + "nodeType": "YulExpressionStatement", + "src": "8061:41:17" + }, + { + "nativeSrc": "8119:21:17", + "nodeType": "YulAssignment", + "src": "8119:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8130:3:17", + "nodeType": "YulIdentifier", + "src": "8130:3:17" + }, + { + "kind": "number", + "nativeSrc": "8135:4:17", + "nodeType": "YulLiteral", + "src": "8135:4:17", + "type": "", + "value": "0x1a" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8126:3:17", + "nodeType": "YulIdentifier", + "src": "8126:3:17" + }, + "nativeSrc": "8126:14:17", + "nodeType": "YulFunctionCall", + "src": "8126:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "8119:3:17", + "nodeType": "YulIdentifier", + "src": "8119:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "8029:6:17", + "nodeType": "YulIdentifier", + "src": "8029:6:17" + }, + { + "kind": "number", + "nativeSrc": "8037:4:17", + "nodeType": "YulLiteral", + "src": "8037:4:17", + "type": "", + "value": "0x08" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8025:3:17", + "nodeType": "YulIdentifier", + "src": "8025:3:17" + }, + "nativeSrc": "8025:17:17", + "nodeType": "YulFunctionCall", + "src": "8025:17:17" + }, + "nativeSrc": "8022:132:17", + "nodeType": "YulIf", + "src": "8022:132:17" + }, + { + "body": { + "nativeSrc": "8214:98:17", + "nodeType": "YulBlock", + "src": "8214:98:17", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8239:3:17", + "nodeType": "YulIdentifier", + "src": "8239:3:17" + }, + { + "hexValue": "627974657333322073616c742c", + "kind": "string", + "nativeSrc": "8244:15:17", + "nodeType": "YulLiteral", + "src": "8244:15:17", + "type": "", + "value": "bytes32 salt," + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8232:6:17", + "nodeType": "YulIdentifier", + "src": "8232:6:17" + }, + "nativeSrc": "8232:28:17", + "nodeType": "YulFunctionCall", + "src": "8232:28:17" + }, + "nativeSrc": "8232:28:17", + "nodeType": "YulExpressionStatement", + "src": "8232:28:17" + }, + { + "nativeSrc": "8277:21:17", + "nodeType": "YulAssignment", + "src": "8277:21:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8288:3:17", + "nodeType": "YulIdentifier", + "src": "8288:3:17" + }, + { + "kind": "number", + "nativeSrc": "8293:4:17", + "nodeType": "YulLiteral", + "src": "8293:4:17", + "type": "", + "value": "0x0d" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8284:3:17", + "nodeType": "YulIdentifier", + "src": "8284:3:17" + }, + "nativeSrc": "8284:14:17", + "nodeType": "YulFunctionCall", + "src": "8284:14:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "8277:3:17", + "nodeType": "YulIdentifier", + "src": "8277:3:17" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "fields", + "nativeSrc": "8200:6:17", + "nodeType": "YulIdentifier", + "src": "8200:6:17" + }, + { + "kind": "number", + "nativeSrc": "8208:4:17", + "nodeType": "YulLiteral", + "src": "8208:4:17", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8196:3:17", + "nodeType": "YulIdentifier", + "src": "8196:3:17" + }, + "nativeSrc": "8196:17:17", + "nodeType": "YulFunctionCall", + "src": "8196:17:17" + }, + "nativeSrc": "8193:119:17", + "nodeType": "YulIf", + "src": "8193:119:17" + }, + { + "nativeSrc": "8391:50:17", + "nodeType": "YulAssignment", + "src": "8391:50:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8402:3:17", + "nodeType": "YulIdentifier", + "src": "8402:3:17" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "fields", + "nativeSrc": "8425:6:17", + "nodeType": "YulIdentifier", + "src": "8425:6:17" + }, + { + "kind": "number", + "nativeSrc": "8433:4:17", + "nodeType": "YulLiteral", + "src": "8433:4:17", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8421:3:17", + "nodeType": "YulIdentifier", + "src": "8421:3:17" + }, + "nativeSrc": "8421:17:17", + "nodeType": "YulFunctionCall", + "src": "8421:17:17" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "8414:6:17", + "nodeType": "YulIdentifier", + "src": "8414:6:17" + }, + "nativeSrc": "8414:25:17", + "nodeType": "YulFunctionCall", + "src": "8414:25:17" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "8407:6:17", + "nodeType": "YulIdentifier", + "src": "8407:6:17" + }, + "nativeSrc": "8407:33:17", + "nodeType": "YulFunctionCall", + "src": "8407:33:17" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8398:3:17", + "nodeType": "YulIdentifier", + "src": "8398:3:17" + }, + "nativeSrc": "8398:43:17", + "nodeType": "YulFunctionCall", + "src": "8398:43:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "8391:3:17", + "nodeType": "YulIdentifier", + "src": "8391:3:17" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8499:3:17", + "nodeType": "YulIdentifier", + "src": "8499:3:17" + }, + { + "kind": "number", + "nativeSrc": "8504:4:17", + "nodeType": "YulLiteral", + "src": "8504:4:17", + "type": "", + "value": "0x29" + } + ], + "functionName": { + "name": "mstore8", + "nativeSrc": "8491:7:17", + "nodeType": "YulIdentifier", + "src": "8491:7:17" + }, + "nativeSrc": "8491:18:17", + "nodeType": "YulFunctionCall", + "src": "8491:18:17" + }, + "nativeSrc": "8491:18:17", + "nodeType": "YulExpressionStatement", + "src": "8491:18:17" + }, + { + "nativeSrc": "8543:18:17", + "nodeType": "YulAssignment", + "src": "8543:18:17", + "value": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8554:3:17", + "nodeType": "YulIdentifier", + "src": "8554:3:17" + }, + { + "kind": "number", + "nativeSrc": "8559:1:17", + "nodeType": "YulLiteral", + "src": "8559:1:17", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8550:3:17", + "nodeType": "YulIdentifier", + "src": "8550:3:17" + }, + "nativeSrc": "8550:11:17", + "nodeType": "YulFunctionCall", + "src": "8550:11:17" + }, + "variableNames": [ + { + "name": "ptr", + "nativeSrc": "8543:3:17", + "nodeType": "YulIdentifier", + "src": "8543:3:17" + } + ] + }, + { + "nativeSrc": "8575:37:17", + "nodeType": "YulAssignment", + "src": "8575:37:17", + "value": { + "arguments": [ + { + "name": "fmp", + "nativeSrc": "8593:3:17", + "nodeType": "YulIdentifier", + "src": "8593:3:17" + }, + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "8602:3:17", + "nodeType": "YulIdentifier", + "src": "8602:3:17" + }, + { + "name": "fmp", + "nativeSrc": "8607:3:17", + "nodeType": "YulIdentifier", + "src": "8607:3:17" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8598:3:17", + "nodeType": "YulIdentifier", + "src": "8598:3:17" + }, + "nativeSrc": "8598:13:17", + "nodeType": "YulFunctionCall", + "src": "8598:13:17" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "8583:9:17", + "nodeType": "YulIdentifier", + "src": "8583:9:17" + }, + "nativeSrc": "8583:29:17", + "nodeType": "YulFunctionCall", + "src": "8583:29:17" + }, + "variableNames": [ + { + "name": "hash", + "nativeSrc": "8575:4:17", + "nodeType": "YulIdentifier", + "src": "8575:4:17" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7303:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7322:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7532:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7692:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "7855:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "8029:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "8200:6:17", + "valueSize": 1 + }, + { + "declaration": 4518, + "isOffset": false, + "isSlot": false, + "src": "8425:6:17", + "valueSize": 1 + }, + { + "declaration": 4521, + "isOffset": false, + "isSlot": false, + "src": "8575:4:17", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4532, + "nodeType": "InlineAssembly", + "src": "7203:1419:17" + } + ] + }, + "documentation": { + "id": 4516, + "nodeType": "StructuredDocumentation", + "src": "6895:139:17", + "text": "@dev Builds an EIP-712 domain type hash depending on the `fields` provided, following https://eips.ethereum.org/EIPS/eip-5267[ERC-5267]" + }, + "id": 4534, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toDomainTypeHash", + "nameLocation": "7048:16:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4519, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4518, + "mutability": "mutable", + "name": "fields", + "nameLocation": "7072:6:17", + "nodeType": "VariableDeclaration", + "scope": 4534, + "src": "7065:13:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "typeName": { + "id": 4517, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "7065:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "visibility": "internal" + } + ], + "src": "7064:15:17" + }, + "returnParameters": { + "id": 4522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4521, + "mutability": "mutable", + "name": "hash", + "nameLocation": "7111:4:17", + "nodeType": "VariableDeclaration", + "scope": 4534, + "src": "7103:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4520, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7103:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "7102:14:17" + }, + "scope": 4535, + "src": "7039:1589:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4536, + "src": "521:8109:17", + "usedErrors": [ + 4371 + ], + "usedEvents": [] + } + ], + "src": "123:8508:17" + }, + "id": 17 + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol", + "exportedSymbols": { + "IERC165": [ + 4547 + ] + }, + "id": 4548, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4537, + "literals": [ + "solidity", + ">=", + "0.4", + ".16" + ], + "nodeType": "PragmaDirective", + "src": "115:25:18" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC165", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 4538, + "nodeType": "StructuredDocumentation", + "src": "142:280:18", + "text": " @dev Interface of the ERC-165 standard, as defined in the\n https://eips.ethereum.org/EIPS/eip-165[ERC].\n Implementers can declare support of contract interfaces, which can then be\n queried by others ({ERC165Checker}).\n For an implementation, see {ERC165}." + }, + "fullyImplemented": false, + "id": 4547, + "linearizedBaseContracts": [ + 4547 + ], + "name": "IERC165", + "nameLocation": "433:7:18", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 4539, + "nodeType": "StructuredDocumentation", + "src": "447:340:18", + "text": " @dev Returns true if this contract implements the interface defined by\n `interfaceId`. See the corresponding\n https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n to learn more about how these ids are created.\n This function call must use less than 30 000 gas." + }, + "functionSelector": "01ffc9a7", + "id": 4546, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "801:17:18", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4541, + "mutability": "mutable", + "name": "interfaceId", + "nameLocation": "826:11:18", + "nodeType": "VariableDeclaration", + "scope": 4546, + "src": "819:18:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 4540, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "819:6:18", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "818:20:18" + }, + "returnParameters": { + "id": 4545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4544, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4546, + "src": "862:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4543, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "862:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "861:6:18" + }, + "scope": 4547, + "src": "792:76:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4548, + "src": "423:447:18", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "115:756:18" + }, + "id": 18 + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/math/Math.sol", + "exportedSymbols": { + "Math": [ + 6204 + ], + "Panic": [ + 1714 + ], + "SafeCast": [ + 7969 + ] + }, + "id": 6205, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4549, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "103:24:19" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Panic.sol", + "file": "../Panic.sol", + "id": 4551, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6205, + "sourceUnit": 1715, + "src": "129:35:19", + "symbolAliases": [ + { + "foreign": { + "id": 4550, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "137:5:19", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol", + "file": "./SafeCast.sol", + "id": 4553, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6205, + "sourceUnit": 7970, + "src": "165:40:19", + "symbolAliases": [ + { + "foreign": { + "id": 4552, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "173:8:19", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Math", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 4554, + "nodeType": "StructuredDocumentation", + "src": "207:73:19", + "text": " @dev Standard math utilities missing in the Solidity language." + }, + "fullyImplemented": true, + "id": 6204, + "linearizedBaseContracts": [ + 6204 + ], + "name": "Math", + "nameLocation": "289:4:19", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Math.Rounding", + "id": 4559, + "members": [ + { + "id": 4555, + "name": "Floor", + "nameLocation": "324:5:19", + "nodeType": "EnumValue", + "src": "324:5:19" + }, + { + "id": 4556, + "name": "Ceil", + "nameLocation": "367:4:19", + "nodeType": "EnumValue", + "src": "367:4:19" + }, + { + "id": 4557, + "name": "Trunc", + "nameLocation": "409:5:19", + "nodeType": "EnumValue", + "src": "409:5:19" + }, + { + "id": 4558, + "name": "Expand", + "nameLocation": "439:6:19", + "nodeType": "EnumValue", + "src": "439:6:19" + } + ], + "name": "Rounding", + "nameLocation": "305:8:19", + "nodeType": "EnumDefinition", + "src": "300:169:19" + }, + { + "body": { + "id": 4572, + "nodeType": "Block", + "src": "731:112:19", + "statements": [ + { + "AST": { + "nativeSrc": "766:71:19", + "nodeType": "YulBlock", + "src": "766:71:19", + "statements": [ + { + "nativeSrc": "780:16:19", + "nodeType": "YulAssignment", + "src": "780:16:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "791:1:19", + "nodeType": "YulIdentifier", + "src": "791:1:19" + }, + { + "name": "b", + "nativeSrc": "794:1:19", + "nodeType": "YulIdentifier", + "src": "794:1:19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "787:3:19", + "nodeType": "YulIdentifier", + "src": "787:3:19" + }, + "nativeSrc": "787:9:19", + "nodeType": "YulFunctionCall", + "src": "787:9:19" + }, + "variableNames": [ + { + "name": "low", + "nativeSrc": "780:3:19", + "nodeType": "YulIdentifier", + "src": "780:3:19" + } + ] + }, + { + "nativeSrc": "809:18:19", + "nodeType": "YulAssignment", + "src": "809:18:19", + "value": { + "arguments": [ + { + "name": "low", + "nativeSrc": "820:3:19", + "nodeType": "YulIdentifier", + "src": "820:3:19" + }, + { + "name": "a", + "nativeSrc": "825:1:19", + "nodeType": "YulIdentifier", + "src": "825:1:19" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "817:2:19", + "nodeType": "YulIdentifier", + "src": "817:2:19" + }, + "nativeSrc": "817:10:19", + "nodeType": "YulFunctionCall", + "src": "817:10:19" + }, + "variableNames": [ + { + "name": "high", + "nativeSrc": "809:4:19", + "nodeType": "YulIdentifier", + "src": "809:4:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4562, + "isOffset": false, + "isSlot": false, + "src": "791:1:19", + "valueSize": 1 + }, + { + "declaration": 4562, + "isOffset": false, + "isSlot": false, + "src": "825:1:19", + "valueSize": 1 + }, + { + "declaration": 4564, + "isOffset": false, + "isSlot": false, + "src": "794:1:19", + "valueSize": 1 + }, + { + "declaration": 4567, + "isOffset": false, + "isSlot": false, + "src": "809:4:19", + "valueSize": 1 + }, + { + "declaration": 4569, + "isOffset": false, + "isSlot": false, + "src": "780:3:19", + "valueSize": 1 + }, + { + "declaration": 4569, + "isOffset": false, + "isSlot": false, + "src": "820:3:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4571, + "nodeType": "InlineAssembly", + "src": "741:96:19" + } + ] + }, + "documentation": { + "id": 4560, + "nodeType": "StructuredDocumentation", + "src": "475:163:19", + "text": " @dev Return the 512-bit addition of two uint256.\n The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low." + }, + "id": 4573, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add512", + "nameLocation": "652:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4565, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4562, + "mutability": "mutable", + "name": "a", + "nameLocation": "667:1:19", + "nodeType": "VariableDeclaration", + "scope": 4573, + "src": "659:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4561, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "659:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4564, + "mutability": "mutable", + "name": "b", + "nameLocation": "678:1:19", + "nodeType": "VariableDeclaration", + "scope": 4573, + "src": "670:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4563, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "670:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "658:22:19" + }, + "returnParameters": { + "id": 4570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4567, + "mutability": "mutable", + "name": "high", + "nameLocation": "712:4:19", + "nodeType": "VariableDeclaration", + "scope": 4573, + "src": "704:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4566, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "704:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4569, + "mutability": "mutable", + "name": "low", + "nameLocation": "726:3:19", + "nodeType": "VariableDeclaration", + "scope": 4573, + "src": "718:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4568, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "703:27:19" + }, + "scope": 6204, + "src": "643:200:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4586, + "nodeType": "Block", + "src": "1115:462:19", + "statements": [ + { + "AST": { + "nativeSrc": "1437:134:19", + "nodeType": "YulBlock", + "src": "1437:134:19", + "statements": [ + { + "nativeSrc": "1451:30:19", + "nodeType": "YulVariableDeclaration", + "src": "1451:30:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "1468:1:19", + "nodeType": "YulIdentifier", + "src": "1468:1:19" + }, + { + "name": "b", + "nativeSrc": "1471:1:19", + "nodeType": "YulIdentifier", + "src": "1471:1:19" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1478:1:19", + "nodeType": "YulLiteral", + "src": "1478:1:19", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "1474:3:19", + "nodeType": "YulIdentifier", + "src": "1474:3:19" + }, + "nativeSrc": "1474:6:19", + "nodeType": "YulFunctionCall", + "src": "1474:6:19" + } + ], + "functionName": { + "name": "mulmod", + "nativeSrc": "1461:6:19", + "nodeType": "YulIdentifier", + "src": "1461:6:19" + }, + "nativeSrc": "1461:20:19", + "nodeType": "YulFunctionCall", + "src": "1461:20:19" + }, + "variables": [ + { + "name": "mm", + "nativeSrc": "1455:2:19", + "nodeType": "YulTypedName", + "src": "1455:2:19", + "type": "" + } + ] + }, + { + "nativeSrc": "1494:16:19", + "nodeType": "YulAssignment", + "src": "1494:16:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "1505:1:19", + "nodeType": "YulIdentifier", + "src": "1505:1:19" + }, + { + "name": "b", + "nativeSrc": "1508:1:19", + "nodeType": "YulIdentifier", + "src": "1508:1:19" + } + ], + "functionName": { + "name": "mul", + "nativeSrc": "1501:3:19", + "nodeType": "YulIdentifier", + "src": "1501:3:19" + }, + "nativeSrc": "1501:9:19", + "nodeType": "YulFunctionCall", + "src": "1501:9:19" + }, + "variableNames": [ + { + "name": "low", + "nativeSrc": "1494:3:19", + "nodeType": "YulIdentifier", + "src": "1494:3:19" + } + ] + }, + { + "nativeSrc": "1523:38:19", + "nodeType": "YulAssignment", + "src": "1523:38:19", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "mm", + "nativeSrc": "1539:2:19", + "nodeType": "YulIdentifier", + "src": "1539:2:19" + }, + { + "name": "low", + "nativeSrc": "1543:3:19", + "nodeType": "YulIdentifier", + "src": "1543:3:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1535:3:19", + "nodeType": "YulIdentifier", + "src": "1535:3:19" + }, + "nativeSrc": "1535:12:19", + "nodeType": "YulFunctionCall", + "src": "1535:12:19" + }, + { + "arguments": [ + { + "name": "mm", + "nativeSrc": "1552:2:19", + "nodeType": "YulIdentifier", + "src": "1552:2:19" + }, + { + "name": "low", + "nativeSrc": "1556:3:19", + "nodeType": "YulIdentifier", + "src": "1556:3:19" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1549:2:19", + "nodeType": "YulIdentifier", + "src": "1549:2:19" + }, + "nativeSrc": "1549:11:19", + "nodeType": "YulFunctionCall", + "src": "1549:11:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1531:3:19", + "nodeType": "YulIdentifier", + "src": "1531:3:19" + }, + "nativeSrc": "1531:30:19", + "nodeType": "YulFunctionCall", + "src": "1531:30:19" + }, + "variableNames": [ + { + "name": "high", + "nativeSrc": "1523:4:19", + "nodeType": "YulIdentifier", + "src": "1523:4:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4576, + "isOffset": false, + "isSlot": false, + "src": "1468:1:19", + "valueSize": 1 + }, + { + "declaration": 4576, + "isOffset": false, + "isSlot": false, + "src": "1505:1:19", + "valueSize": 1 + }, + { + "declaration": 4578, + "isOffset": false, + "isSlot": false, + "src": "1471:1:19", + "valueSize": 1 + }, + { + "declaration": 4578, + "isOffset": false, + "isSlot": false, + "src": "1508:1:19", + "valueSize": 1 + }, + { + "declaration": 4581, + "isOffset": false, + "isSlot": false, + "src": "1523:4:19", + "valueSize": 1 + }, + { + "declaration": 4583, + "isOffset": false, + "isSlot": false, + "src": "1494:3:19", + "valueSize": 1 + }, + { + "declaration": 4583, + "isOffset": false, + "isSlot": false, + "src": "1543:3:19", + "valueSize": 1 + }, + { + "declaration": 4583, + "isOffset": false, + "isSlot": false, + "src": "1556:3:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4585, + "nodeType": "InlineAssembly", + "src": "1412:159:19" + } + ] + }, + "documentation": { + "id": 4574, + "nodeType": "StructuredDocumentation", + "src": "849:173:19", + "text": " @dev Return the 512-bit multiplication of two uint256.\n The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low." + }, + "id": 4587, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul512", + "nameLocation": "1036:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4579, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4576, + "mutability": "mutable", + "name": "a", + "nameLocation": "1051:1:19", + "nodeType": "VariableDeclaration", + "scope": 4587, + "src": "1043:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4575, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1043:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4578, + "mutability": "mutable", + "name": "b", + "nameLocation": "1062:1:19", + "nodeType": "VariableDeclaration", + "scope": 4587, + "src": "1054:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4577, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1054:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1042:22:19" + }, + "returnParameters": { + "id": 4584, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4581, + "mutability": "mutable", + "name": "high", + "nameLocation": "1096:4:19", + "nodeType": "VariableDeclaration", + "scope": 4587, + "src": "1088:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4580, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1088:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4583, + "mutability": "mutable", + "name": "low", + "nameLocation": "1110:3:19", + "nodeType": "VariableDeclaration", + "scope": 4587, + "src": "1102:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4582, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1102:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1087:27:19" + }, + "scope": 6204, + "src": "1027:550:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4621, + "nodeType": "Block", + "src": "1784:149:19", + "statements": [ + { + "id": 4620, + "nodeType": "UncheckedBlock", + "src": "1794:133:19", + "statements": [ + { + "assignments": [ + 4600 + ], + "declarations": [ + { + "constant": false, + "id": 4600, + "mutability": "mutable", + "name": "c", + "nameLocation": "1826:1:19", + "nodeType": "VariableDeclaration", + "scope": 4620, + "src": "1818:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4599, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1818:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4604, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4601, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4590, + "src": "1830:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 4602, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4592, + "src": "1834:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1830:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1818:17:19" + }, + { + "expression": { + "id": 4609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4605, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4595, + "src": "1849:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4606, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4600, + "src": "1859:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 4607, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4590, + "src": "1864:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1859:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1849:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4610, + "nodeType": "ExpressionStatement", + "src": "1849:16:19" + }, + { + "expression": { + "id": 4618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4611, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4597, + "src": "1879:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4612, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4600, + "src": "1888:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 4615, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4595, + "src": "1908:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4613, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "1892:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1901:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "1892:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1892:24:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1888:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1879:37:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4619, + "nodeType": "ExpressionStatement", + "src": "1879:37:19" + } + ] + } + ] + }, + "documentation": { + "id": 4588, + "nodeType": "StructuredDocumentation", + "src": "1583:105:19", + "text": " @dev Returns the addition of two unsigned integers, with a success flag (no overflow)." + }, + "id": 4622, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryAdd", + "nameLocation": "1702:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4590, + "mutability": "mutable", + "name": "a", + "nameLocation": "1717:1:19", + "nodeType": "VariableDeclaration", + "scope": 4622, + "src": "1709:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4589, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1709:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4592, + "mutability": "mutable", + "name": "b", + "nameLocation": "1728:1:19", + "nodeType": "VariableDeclaration", + "scope": 4622, + "src": "1720:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4591, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1720:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1708:22:19" + }, + "returnParameters": { + "id": 4598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4595, + "mutability": "mutable", + "name": "success", + "nameLocation": "1759:7:19", + "nodeType": "VariableDeclaration", + "scope": 4622, + "src": "1754:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4594, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1754:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4597, + "mutability": "mutable", + "name": "result", + "nameLocation": "1776:6:19", + "nodeType": "VariableDeclaration", + "scope": 4622, + "src": "1768:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1768:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1753:30:19" + }, + "scope": 6204, + "src": "1693:240:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4656, + "nodeType": "Block", + "src": "2143:149:19", + "statements": [ + { + "id": 4655, + "nodeType": "UncheckedBlock", + "src": "2153:133:19", + "statements": [ + { + "assignments": [ + 4635 + ], + "declarations": [ + { + "constant": false, + "id": 4635, + "mutability": "mutable", + "name": "c", + "nameLocation": "2185:1:19", + "nodeType": "VariableDeclaration", + "scope": 4655, + "src": "2177:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4634, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2177:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4639, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4636, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4625, + "src": "2189:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 4637, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4627, + "src": "2193:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2189:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2177:17:19" + }, + { + "expression": { + "id": 4644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4640, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4630, + "src": "2208:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4641, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4635, + "src": "2218:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 4642, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4625, + "src": "2223:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2218:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2208:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4645, + "nodeType": "ExpressionStatement", + "src": "2208:16:19" + }, + { + "expression": { + "id": 4653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4646, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4632, + "src": "2238:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4647, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4635, + "src": "2247:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 4650, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4630, + "src": "2267:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4648, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "2251:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2260:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "2251:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2251:24:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2247:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2238:37:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4654, + "nodeType": "ExpressionStatement", + "src": "2238:37:19" + } + ] + } + ] + }, + "documentation": { + "id": 4623, + "nodeType": "StructuredDocumentation", + "src": "1939:108:19", + "text": " @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow)." + }, + "id": 4657, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "trySub", + "nameLocation": "2061:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4625, + "mutability": "mutable", + "name": "a", + "nameLocation": "2076:1:19", + "nodeType": "VariableDeclaration", + "scope": 4657, + "src": "2068:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2068:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4627, + "mutability": "mutable", + "name": "b", + "nameLocation": "2087:1:19", + "nodeType": "VariableDeclaration", + "scope": 4657, + "src": "2079:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2079:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2067:22:19" + }, + "returnParameters": { + "id": 4633, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4630, + "mutability": "mutable", + "name": "success", + "nameLocation": "2118:7:19", + "nodeType": "VariableDeclaration", + "scope": 4657, + "src": "2113:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4629, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2113:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4632, + "mutability": "mutable", + "name": "result", + "nameLocation": "2135:6:19", + "nodeType": "VariableDeclaration", + "scope": 4657, + "src": "2127:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4631, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2127:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2112:30:19" + }, + "scope": 6204, + "src": "2052:240:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4686, + "nodeType": "Block", + "src": "2505:391:19", + "statements": [ + { + "id": 4685, + "nodeType": "UncheckedBlock", + "src": "2515:375:19", + "statements": [ + { + "assignments": [ + 4670 + ], + "declarations": [ + { + "constant": false, + "id": 4670, + "mutability": "mutable", + "name": "c", + "nameLocation": "2547:1:19", + "nodeType": "VariableDeclaration", + "scope": 4685, + "src": "2539:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2539:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4674, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4671, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4660, + "src": "2551:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 4672, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4662, + "src": "2555:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2551:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2539:17:19" + }, + { + "AST": { + "nativeSrc": "2595:188:19", + "nodeType": "YulBlock", + "src": "2595:188:19", + "statements": [ + { + "nativeSrc": "2727:42:19", + "nodeType": "YulAssignment", + "src": "2727:42:19", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "c", + "nativeSrc": "2748:1:19", + "nodeType": "YulIdentifier", + "src": "2748:1:19" + }, + { + "name": "a", + "nativeSrc": "2751:1:19", + "nodeType": "YulIdentifier", + "src": "2751:1:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "2744:3:19", + "nodeType": "YulIdentifier", + "src": "2744:3:19" + }, + "nativeSrc": "2744:9:19", + "nodeType": "YulFunctionCall", + "src": "2744:9:19" + }, + { + "name": "b", + "nativeSrc": "2755:1:19", + "nodeType": "YulIdentifier", + "src": "2755:1:19" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "2741:2:19", + "nodeType": "YulIdentifier", + "src": "2741:2:19" + }, + "nativeSrc": "2741:16:19", + "nodeType": "YulFunctionCall", + "src": "2741:16:19" + }, + { + "arguments": [ + { + "name": "a", + "nativeSrc": "2766:1:19", + "nodeType": "YulIdentifier", + "src": "2766:1:19" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2759:6:19", + "nodeType": "YulIdentifier", + "src": "2759:6:19" + }, + "nativeSrc": "2759:9:19", + "nodeType": "YulFunctionCall", + "src": "2759:9:19" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "2738:2:19", + "nodeType": "YulIdentifier", + "src": "2738:2:19" + }, + "nativeSrc": "2738:31:19", + "nodeType": "YulFunctionCall", + "src": "2738:31:19" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "2727:7:19", + "nodeType": "YulIdentifier", + "src": "2727:7:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4660, + "isOffset": false, + "isSlot": false, + "src": "2751:1:19", + "valueSize": 1 + }, + { + "declaration": 4660, + "isOffset": false, + "isSlot": false, + "src": "2766:1:19", + "valueSize": 1 + }, + { + "declaration": 4662, + "isOffset": false, + "isSlot": false, + "src": "2755:1:19", + "valueSize": 1 + }, + { + "declaration": 4670, + "isOffset": false, + "isSlot": false, + "src": "2748:1:19", + "valueSize": 1 + }, + { + "declaration": 4665, + "isOffset": false, + "isSlot": false, + "src": "2727:7:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4675, + "nodeType": "InlineAssembly", + "src": "2570:213:19" + }, + { + "expression": { + "id": 4683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4676, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4667, + "src": "2842:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4677, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4670, + "src": "2851:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 4680, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4665, + "src": "2871:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4678, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "2855:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2864:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "2855:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2855:24:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2851:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2842:37:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4684, + "nodeType": "ExpressionStatement", + "src": "2842:37:19" + } + ] + } + ] + }, + "documentation": { + "id": 4658, + "nodeType": "StructuredDocumentation", + "src": "2298:111:19", + "text": " @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow)." + }, + "id": 4687, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryMul", + "nameLocation": "2423:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4660, + "mutability": "mutable", + "name": "a", + "nameLocation": "2438:1:19", + "nodeType": "VariableDeclaration", + "scope": 4687, + "src": "2430:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2430:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4662, + "mutability": "mutable", + "name": "b", + "nameLocation": "2449:1:19", + "nodeType": "VariableDeclaration", + "scope": 4687, + "src": "2441:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4661, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2441:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2429:22:19" + }, + "returnParameters": { + "id": 4668, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4665, + "mutability": "mutable", + "name": "success", + "nameLocation": "2480:7:19", + "nodeType": "VariableDeclaration", + "scope": 4687, + "src": "2475:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4664, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2475:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4667, + "mutability": "mutable", + "name": "result", + "nameLocation": "2497:6:19", + "nodeType": "VariableDeclaration", + "scope": 4687, + "src": "2489:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4666, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2489:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2474:30:19" + }, + "scope": 6204, + "src": "2414:482:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4707, + "nodeType": "Block", + "src": "3111:231:19", + "statements": [ + { + "id": 4706, + "nodeType": "UncheckedBlock", + "src": "3121:215:19", + "statements": [ + { + "expression": { + "id": 4703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4699, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4695, + "src": "3145:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4700, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4692, + "src": "3155:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 4701, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3159:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3155:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3145:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4704, + "nodeType": "ExpressionStatement", + "src": "3145:15:19" + }, + { + "AST": { + "nativeSrc": "3199:127:19", + "nodeType": "YulBlock", + "src": "3199:127:19", + "statements": [ + { + "nativeSrc": "3293:19:19", + "nodeType": "YulAssignment", + "src": "3293:19:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "3307:1:19", + "nodeType": "YulIdentifier", + "src": "3307:1:19" + }, + { + "name": "b", + "nativeSrc": "3310:1:19", + "nodeType": "YulIdentifier", + "src": "3310:1:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "3303:3:19", + "nodeType": "YulIdentifier", + "src": "3303:3:19" + }, + "nativeSrc": "3303:9:19", + "nodeType": "YulFunctionCall", + "src": "3303:9:19" + }, + "variableNames": [ + { + "name": "result", + "nativeSrc": "3293:6:19", + "nodeType": "YulIdentifier", + "src": "3293:6:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4690, + "isOffset": false, + "isSlot": false, + "src": "3307:1:19", + "valueSize": 1 + }, + { + "declaration": 4692, + "isOffset": false, + "isSlot": false, + "src": "3310:1:19", + "valueSize": 1 + }, + { + "declaration": 4697, + "isOffset": false, + "isSlot": false, + "src": "3293:6:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4705, + "nodeType": "InlineAssembly", + "src": "3174:152:19" + } + ] + } + ] + }, + "documentation": { + "id": 4688, + "nodeType": "StructuredDocumentation", + "src": "2902:113:19", + "text": " @dev Returns the division of two unsigned integers, with a success flag (no division by zero)." + }, + "id": 4708, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryDiv", + "nameLocation": "3029:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4690, + "mutability": "mutable", + "name": "a", + "nameLocation": "3044:1:19", + "nodeType": "VariableDeclaration", + "scope": 4708, + "src": "3036:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4689, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3036:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4692, + "mutability": "mutable", + "name": "b", + "nameLocation": "3055:1:19", + "nodeType": "VariableDeclaration", + "scope": 4708, + "src": "3047:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4691, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3047:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3035:22:19" + }, + "returnParameters": { + "id": 4698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4695, + "mutability": "mutable", + "name": "success", + "nameLocation": "3086:7:19", + "nodeType": "VariableDeclaration", + "scope": 4708, + "src": "3081:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4694, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3081:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4697, + "mutability": "mutable", + "name": "result", + "nameLocation": "3103:6:19", + "nodeType": "VariableDeclaration", + "scope": 4708, + "src": "3095:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4696, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3095:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3080:30:19" + }, + "scope": 6204, + "src": "3020:322:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4728, + "nodeType": "Block", + "src": "3567:231:19", + "statements": [ + { + "id": 4727, + "nodeType": "UncheckedBlock", + "src": "3577:215:19", + "statements": [ + { + "expression": { + "id": 4724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4720, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4716, + "src": "3601:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4721, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "3611:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 4722, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3615:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3611:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3601:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4725, + "nodeType": "ExpressionStatement", + "src": "3601:15:19" + }, + { + "AST": { + "nativeSrc": "3655:127:19", + "nodeType": "YulBlock", + "src": "3655:127:19", + "statements": [ + { + "nativeSrc": "3749:19:19", + "nodeType": "YulAssignment", + "src": "3749:19:19", + "value": { + "arguments": [ + { + "name": "a", + "nativeSrc": "3763:1:19", + "nodeType": "YulIdentifier", + "src": "3763:1:19" + }, + { + "name": "b", + "nativeSrc": "3766:1:19", + "nodeType": "YulIdentifier", + "src": "3766:1:19" + } + ], + "functionName": { + "name": "mod", + "nativeSrc": "3759:3:19", + "nodeType": "YulIdentifier", + "src": "3759:3:19" + }, + "nativeSrc": "3759:9:19", + "nodeType": "YulFunctionCall", + "src": "3759:9:19" + }, + "variableNames": [ + { + "name": "result", + "nativeSrc": "3749:6:19", + "nodeType": "YulIdentifier", + "src": "3749:6:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4711, + "isOffset": false, + "isSlot": false, + "src": "3763:1:19", + "valueSize": 1 + }, + { + "declaration": 4713, + "isOffset": false, + "isSlot": false, + "src": "3766:1:19", + "valueSize": 1 + }, + { + "declaration": 4718, + "isOffset": false, + "isSlot": false, + "src": "3749:6:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4726, + "nodeType": "InlineAssembly", + "src": "3630:152:19" + } + ] + } + ] + }, + "documentation": { + "id": 4709, + "nodeType": "StructuredDocumentation", + "src": "3348:123:19", + "text": " @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero)." + }, + "id": 4729, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryMod", + "nameLocation": "3485:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4714, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4711, + "mutability": "mutable", + "name": "a", + "nameLocation": "3500:1:19", + "nodeType": "VariableDeclaration", + "scope": 4729, + "src": "3492:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4710, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3492:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4713, + "mutability": "mutable", + "name": "b", + "nameLocation": "3511:1:19", + "nodeType": "VariableDeclaration", + "scope": 4729, + "src": "3503:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4712, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3503:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3491:22:19" + }, + "returnParameters": { + "id": 4719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4716, + "mutability": "mutable", + "name": "success", + "nameLocation": "3542:7:19", + "nodeType": "VariableDeclaration", + "scope": 4729, + "src": "3537:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4715, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3537:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4718, + "mutability": "mutable", + "name": "result", + "nameLocation": "3559:6:19", + "nodeType": "VariableDeclaration", + "scope": 4729, + "src": "3551:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3551:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3536:30:19" + }, + "scope": 6204, + "src": "3476:322:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4758, + "nodeType": "Block", + "src": "3989:122:19", + "statements": [ + { + "assignments": [ + 4740, + 4742 + ], + "declarations": [ + { + "constant": false, + "id": 4740, + "mutability": "mutable", + "name": "success", + "nameLocation": "4005:7:19", + "nodeType": "VariableDeclaration", + "scope": 4758, + "src": "4000:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4739, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4000:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4742, + "mutability": "mutable", + "name": "result", + "nameLocation": "4022:6:19", + "nodeType": "VariableDeclaration", + "scope": 4758, + "src": "4014:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4014:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4747, + "initialValue": { + "arguments": [ + { + "id": 4744, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4732, + "src": "4039:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4745, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4734, + "src": "4042:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4743, + "name": "tryAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4622, + "src": "4032:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 4746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4032:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3999:45:19" + }, + { + "expression": { + "arguments": [ + { + "id": 4749, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4740, + "src": "4069:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 4750, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4742, + "src": "4078:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [ + { + "id": 4753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4091:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 4752, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4091:7:19", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 4751, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4086:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4086:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 4755, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4100:3:19", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4086:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4748, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "4061:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4061:43:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4738, + "id": 4757, + "nodeType": "Return", + "src": "4054:50:19" + } + ] + }, + "documentation": { + "id": 4730, + "nodeType": "StructuredDocumentation", + "src": "3804:103:19", + "text": " @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing." + }, + "id": 4759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saturatingAdd", + "nameLocation": "3921:13:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4735, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4732, + "mutability": "mutable", + "name": "a", + "nameLocation": "3943:1:19", + "nodeType": "VariableDeclaration", + "scope": 4759, + "src": "3935:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4731, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3935:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4734, + "mutability": "mutable", + "name": "b", + "nameLocation": "3954:1:19", + "nodeType": "VariableDeclaration", + "scope": 4759, + "src": "3946:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4733, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3946:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3934:22:19" + }, + "returnParameters": { + "id": 4738, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4737, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4759, + "src": "3980:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4736, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3980:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3979:9:19" + }, + "scope": 6204, + "src": "3912:199:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4778, + "nodeType": "Block", + "src": "4294:73:19", + "statements": [ + { + "assignments": [ + null, + 4770 + ], + "declarations": [ + null, + { + "constant": false, + "id": 4770, + "mutability": "mutable", + "name": "result", + "nameLocation": "4315:6:19", + "nodeType": "VariableDeclaration", + "scope": 4778, + "src": "4307:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4769, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4307:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4775, + "initialValue": { + "arguments": [ + { + "id": 4772, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4762, + "src": "4332:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4773, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4764, + "src": "4335:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4771, + "name": "trySub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "4325:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 4774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4325:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4304:33:19" + }, + { + "expression": { + "id": 4776, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4770, + "src": "4354:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4768, + "id": 4777, + "nodeType": "Return", + "src": "4347:13:19" + } + ] + }, + "documentation": { + "id": 4760, + "nodeType": "StructuredDocumentation", + "src": "4117:95:19", + "text": " @dev Unsigned saturating subtraction, bounds to zero instead of overflowing." + }, + "id": 4779, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saturatingSub", + "nameLocation": "4226:13:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4765, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4762, + "mutability": "mutable", + "name": "a", + "nameLocation": "4248:1:19", + "nodeType": "VariableDeclaration", + "scope": 4779, + "src": "4240:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4761, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4240:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4764, + "mutability": "mutable", + "name": "b", + "nameLocation": "4259:1:19", + "nodeType": "VariableDeclaration", + "scope": 4779, + "src": "4251:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4763, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4251:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4239:22:19" + }, + "returnParameters": { + "id": 4768, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4767, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4779, + "src": "4285:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4766, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4284:9:19" + }, + "scope": 6204, + "src": "4217:150:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4808, + "nodeType": "Block", + "src": "4564:122:19", + "statements": [ + { + "assignments": [ + 4790, + 4792 + ], + "declarations": [ + { + "constant": false, + "id": 4790, + "mutability": "mutable", + "name": "success", + "nameLocation": "4580:7:19", + "nodeType": "VariableDeclaration", + "scope": 4808, + "src": "4575:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4789, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4575:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4792, + "mutability": "mutable", + "name": "result", + "nameLocation": "4597:6:19", + "nodeType": "VariableDeclaration", + "scope": 4808, + "src": "4589:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4589:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4797, + "initialValue": { + "arguments": [ + { + "id": 4794, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4782, + "src": "4614:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4795, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "4617:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4793, + "name": "tryMul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4687, + "src": "4607:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (bool,uint256)" + } + }, + "id": 4796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4607:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4574:45:19" + }, + { + "expression": { + "arguments": [ + { + "id": 4799, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4790, + "src": "4644:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 4800, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4792, + "src": "4653:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "arguments": [ + { + "id": 4803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4666:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 4802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4666:7:19", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 4801, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4661:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4661:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 4805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4675:3:19", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4661:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4798, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "4636:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4636:43:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4788, + "id": 4807, + "nodeType": "Return", + "src": "4629:50:19" + } + ] + }, + "documentation": { + "id": 4780, + "nodeType": "StructuredDocumentation", + "src": "4373:109:19", + "text": " @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing." + }, + "id": 4809, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saturatingMul", + "nameLocation": "4496:13:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4782, + "mutability": "mutable", + "name": "a", + "nameLocation": "4518:1:19", + "nodeType": "VariableDeclaration", + "scope": 4809, + "src": "4510:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4781, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4510:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4784, + "mutability": "mutable", + "name": "b", + "nameLocation": "4529:1:19", + "nodeType": "VariableDeclaration", + "scope": 4809, + "src": "4521:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4521:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4509:22:19" + }, + "returnParameters": { + "id": 4788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4787, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4809, + "src": "4555:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4786, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4555:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4554:9:19" + }, + "scope": 6204, + "src": "4487:199:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4835, + "nodeType": "Block", + "src": "5174:207:19", + "statements": [ + { + "id": 4834, + "nodeType": "UncheckedBlock", + "src": "5184:191:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4821, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4816, + "src": "5322:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4822, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4814, + "src": "5328:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 4823, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4816, + "src": "5332:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5328:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4825, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5327:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 4828, + "name": "condition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4812, + "src": "5353:9:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4826, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "5337:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "5346:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "5337:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5337:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5327:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4831, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5326:38:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5322:42:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4820, + "id": 4833, + "nodeType": "Return", + "src": "5315:49:19" + } + ] + } + ] + }, + "documentation": { + "id": 4810, + "nodeType": "StructuredDocumentation", + "src": "4692:390:19", + "text": " @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.\n IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute\n one branch when needed, making this function more expensive." + }, + "id": 4836, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ternary", + "nameLocation": "5096:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4817, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4812, + "mutability": "mutable", + "name": "condition", + "nameLocation": "5109:9:19", + "nodeType": "VariableDeclaration", + "scope": 4836, + "src": "5104:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4811, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5104:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4814, + "mutability": "mutable", + "name": "a", + "nameLocation": "5128:1:19", + "nodeType": "VariableDeclaration", + "scope": 4836, + "src": "5120:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4813, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5120:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4816, + "mutability": "mutable", + "name": "b", + "nameLocation": "5139:1:19", + "nodeType": "VariableDeclaration", + "scope": 4836, + "src": "5131:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4815, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5131:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5103:38:19" + }, + "returnParameters": { + "id": 4820, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4819, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4836, + "src": "5165:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4818, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5165:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5164:9:19" + }, + "scope": 6204, + "src": "5087:294:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4854, + "nodeType": "Block", + "src": "5518:44:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4847, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "5543:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 4848, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4841, + "src": "5547:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5543:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 4850, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "5550:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4851, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4841, + "src": "5553:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4846, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "5535:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5535:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4845, + "id": 4853, + "nodeType": "Return", + "src": "5528:27:19" + } + ] + }, + "documentation": { + "id": 4837, + "nodeType": "StructuredDocumentation", + "src": "5387:59:19", + "text": " @dev Returns the largest of two numbers." + }, + "id": 4855, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "max", + "nameLocation": "5460:3:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4839, + "mutability": "mutable", + "name": "a", + "nameLocation": "5472:1:19", + "nodeType": "VariableDeclaration", + "scope": 4855, + "src": "5464:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4838, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5464:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4841, + "mutability": "mutable", + "name": "b", + "nameLocation": "5483:1:19", + "nodeType": "VariableDeclaration", + "scope": 4855, + "src": "5475:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5475:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5463:22:19" + }, + "returnParameters": { + "id": 4845, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4844, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4855, + "src": "5509:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5509:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5508:9:19" + }, + "scope": 6204, + "src": "5451:111:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4873, + "nodeType": "Block", + "src": "5700:44:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4866, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "5725:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4867, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4860, + "src": "5729:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5725:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 4869, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "5732:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4870, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4860, + "src": "5735:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4865, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "5717:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5717:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4864, + "id": 4872, + "nodeType": "Return", + "src": "5710:27:19" + } + ] + }, + "documentation": { + "id": 4856, + "nodeType": "StructuredDocumentation", + "src": "5568:60:19", + "text": " @dev Returns the smallest of two numbers." + }, + "id": 4874, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "min", + "nameLocation": "5642:3:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4861, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4858, + "mutability": "mutable", + "name": "a", + "nameLocation": "5654:1:19", + "nodeType": "VariableDeclaration", + "scope": 4874, + "src": "5646:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5646:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4860, + "mutability": "mutable", + "name": "b", + "nameLocation": "5665:1:19", + "nodeType": "VariableDeclaration", + "scope": 4874, + "src": "5657:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5657:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5645:22:19" + }, + "returnParameters": { + "id": 4864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4863, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4874, + "src": "5691:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4862, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5691:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5690:9:19" + }, + "scope": 6204, + "src": "5633:111:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4897, + "nodeType": "Block", + "src": "5928:120:19", + "statements": [ + { + "id": 4896, + "nodeType": "UncheckedBlock", + "src": "5938:104:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4884, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4877, + "src": "6011:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 4885, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4879, + "src": "6015:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6011:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4887, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6010:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4888, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4877, + "src": "6021:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 4889, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4879, + "src": "6025:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6021:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4891, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6020:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "hexValue": "32", + "id": 4892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6030:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6020:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6010:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4883, + "id": 4895, + "nodeType": "Return", + "src": "6003:28:19" + } + ] + } + ] + }, + "documentation": { + "id": 4875, + "nodeType": "StructuredDocumentation", + "src": "5750:102:19", + "text": " @dev Returns the average of two numbers. The result is rounded towards\n zero." + }, + "id": 4898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "average", + "nameLocation": "5866:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4877, + "mutability": "mutable", + "name": "a", + "nameLocation": "5882:1:19", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "5874:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4876, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5874:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4879, + "mutability": "mutable", + "name": "b", + "nameLocation": "5893:1:19", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "5885:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4878, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5885:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5873:22:19" + }, + "returnParameters": { + "id": 4883, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4882, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "5919:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5919:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5918:9:19" + }, + "scope": 6204, + "src": "5857:191:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4938, + "nodeType": "Block", + "src": "6340:633:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4908, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "6354:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6359:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6354:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4919, + "nodeType": "IfStatement", + "src": "6350:150:19", + "trueBody": { + "id": 4918, + "nodeType": "Block", + "src": "6362:138:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 4914, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "6466:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6472:16:19", + "memberName": "DIVISION_BY_ZERO", + "nodeType": "MemberAccess", + "referencedDeclaration": 1681, + "src": "6466:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4911, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "6454:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6460:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "6454:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 4916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6454:35:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4917, + "nodeType": "ExpressionStatement", + "src": "6454:35:19" + } + ] + } + }, + { + "id": 4937, + "nodeType": "UncheckedBlock", + "src": "6883:84:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4922, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4901, + "src": "6930:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 4923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6934:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6930:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 4920, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "6914:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 4921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6923:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "6914:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 4925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6914:22:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4926, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4901, + "src": "6941:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6945:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6941:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4929, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6940:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 4930, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "6950:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6940:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 4932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6954:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6940:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4934, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6939:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6914:42:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4907, + "id": 4936, + "nodeType": "Return", + "src": "6907:49:19" + } + ] + } + ] + }, + "documentation": { + "id": 4899, + "nodeType": "StructuredDocumentation", + "src": "6054:210:19", + "text": " @dev Returns the ceiling of the division of two numbers.\n This differs from standard division with `/` in that it rounds towards infinity instead\n of rounding towards zero." + }, + "id": 4939, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ceilDiv", + "nameLocation": "6278:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4901, + "mutability": "mutable", + "name": "a", + "nameLocation": "6294:1:19", + "nodeType": "VariableDeclaration", + "scope": 4939, + "src": "6286:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4900, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6286:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4903, + "mutability": "mutable", + "name": "b", + "nameLocation": "6305:1:19", + "nodeType": "VariableDeclaration", + "scope": 4939, + "src": "6297:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6297:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6285:22:19" + }, + "returnParameters": { + "id": 4907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4906, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4939, + "src": "6331:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4905, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6331:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6330:9:19" + }, + "scope": 6204, + "src": "6269:704:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5074, + "nodeType": "Block", + "src": "7394:3585:19", + "statements": [ + { + "id": 5073, + "nodeType": "UncheckedBlock", + "src": "7404:3569:19", + "statements": [ + { + "assignments": [ + 4952, + 4954 + ], + "declarations": [ + { + "constant": false, + "id": 4952, + "mutability": "mutable", + "name": "high", + "nameLocation": "7437:4:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "7429:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4951, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7429:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4954, + "mutability": "mutable", + "name": "low", + "nameLocation": "7451:3:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "7443:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7443:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4959, + "initialValue": { + "arguments": [ + { + "id": 4956, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4942, + "src": "7465:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4957, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "7468:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4955, + "name": "mul512", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4587, + "src": "7458:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 4958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7458:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7428:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4960, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "7552:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7560:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7552:9:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4968, + "nodeType": "IfStatement", + "src": "7548:365:19", + "trueBody": { + "id": 4967, + "nodeType": "Block", + "src": "7563:350:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4963, + "name": "low", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4954, + "src": "7881:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 4964, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "7887:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7881:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4950, + "id": 4966, + "nodeType": "Return", + "src": "7874:24:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4969, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8023:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 4970, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "8038:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8023:19:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4987, + "nodeType": "IfStatement", + "src": "8019:142:19", + "trueBody": { + "id": 4986, + "nodeType": "Block", + "src": "8044:117:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4976, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8082:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4977, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8097:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8082:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "id": 4979, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "8100:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8106:16:19", + "memberName": "DIVISION_BY_ZERO", + "nodeType": "MemberAccess", + "referencedDeclaration": 1681, + "src": "8100:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 4981, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "8124:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4982, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8130:14:19", + "memberName": "UNDER_OVERFLOW", + "nodeType": "MemberAccess", + "referencedDeclaration": 1677, + "src": "8124:20:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4975, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "8074:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 4983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8074:71:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4972, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "8062:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 4974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "8068:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "8062:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 4984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8062:84:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4985, + "nodeType": "ExpressionStatement", + "src": "8062:84:19" + } + ] + } + }, + { + "assignments": [ + 4989 + ], + "declarations": [ + { + "constant": false, + "id": 4989, + "mutability": "mutable", + "name": "remainder", + "nameLocation": "8421:9:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "8413:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4988, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8413:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4990, + "nodeType": "VariableDeclarationStatement", + "src": "8413:17:19" + }, + { + "AST": { + "nativeSrc": "8469:283:19", + "nodeType": "YulBlock", + "src": "8469:283:19", + "statements": [ + { + "nativeSrc": "8538:38:19", + "nodeType": "YulAssignment", + "src": "8538:38:19", + "value": { + "arguments": [ + { + "name": "x", + "nativeSrc": "8558:1:19", + "nodeType": "YulIdentifier", + "src": "8558:1:19" + }, + { + "name": "y", + "nativeSrc": "8561:1:19", + "nodeType": "YulIdentifier", + "src": "8561:1:19" + }, + { + "name": "denominator", + "nativeSrc": "8564:11:19", + "nodeType": "YulIdentifier", + "src": "8564:11:19" + } + ], + "functionName": { + "name": "mulmod", + "nativeSrc": "8551:6:19", + "nodeType": "YulIdentifier", + "src": "8551:6:19" + }, + "nativeSrc": "8551:25:19", + "nodeType": "YulFunctionCall", + "src": "8551:25:19" + }, + "variableNames": [ + { + "name": "remainder", + "nativeSrc": "8538:9:19", + "nodeType": "YulIdentifier", + "src": "8538:9:19" + } + ] + }, + { + "nativeSrc": "8658:37:19", + "nodeType": "YulAssignment", + "src": "8658:37:19", + "value": { + "arguments": [ + { + "name": "high", + "nativeSrc": "8670:4:19", + "nodeType": "YulIdentifier", + "src": "8670:4:19" + }, + { + "arguments": [ + { + "name": "remainder", + "nativeSrc": "8679:9:19", + "nodeType": "YulIdentifier", + "src": "8679:9:19" + }, + { + "name": "low", + "nativeSrc": "8690:3:19", + "nodeType": "YulIdentifier", + "src": "8690:3:19" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "8676:2:19", + "nodeType": "YulIdentifier", + "src": "8676:2:19" + }, + "nativeSrc": "8676:18:19", + "nodeType": "YulFunctionCall", + "src": "8676:18:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8666:3:19", + "nodeType": "YulIdentifier", + "src": "8666:3:19" + }, + "nativeSrc": "8666:29:19", + "nodeType": "YulFunctionCall", + "src": "8666:29:19" + }, + "variableNames": [ + { + "name": "high", + "nativeSrc": "8658:4:19", + "nodeType": "YulIdentifier", + "src": "8658:4:19" + } + ] + }, + { + "nativeSrc": "8712:26:19", + "nodeType": "YulAssignment", + "src": "8712:26:19", + "value": { + "arguments": [ + { + "name": "low", + "nativeSrc": "8723:3:19", + "nodeType": "YulIdentifier", + "src": "8723:3:19" + }, + { + "name": "remainder", + "nativeSrc": "8728:9:19", + "nodeType": "YulIdentifier", + "src": "8728:9:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8719:3:19", + "nodeType": "YulIdentifier", + "src": "8719:3:19" + }, + "nativeSrc": "8719:19:19", + "nodeType": "YulFunctionCall", + "src": "8719:19:19" + }, + "variableNames": [ + { + "name": "low", + "nativeSrc": "8712:3:19", + "nodeType": "YulIdentifier", + "src": "8712:3:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4946, + "isOffset": false, + "isSlot": false, + "src": "8564:11:19", + "valueSize": 1 + }, + { + "declaration": 4952, + "isOffset": false, + "isSlot": false, + "src": "8658:4:19", + "valueSize": 1 + }, + { + "declaration": 4952, + "isOffset": false, + "isSlot": false, + "src": "8670:4:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "8690:3:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "8712:3:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "8723:3:19", + "valueSize": 1 + }, + { + "declaration": 4989, + "isOffset": false, + "isSlot": false, + "src": "8538:9:19", + "valueSize": 1 + }, + { + "declaration": 4989, + "isOffset": false, + "isSlot": false, + "src": "8679:9:19", + "valueSize": 1 + }, + { + "declaration": 4989, + "isOffset": false, + "isSlot": false, + "src": "8728:9:19", + "valueSize": 1 + }, + { + "declaration": 4942, + "isOffset": false, + "isSlot": false, + "src": "8558:1:19", + "valueSize": 1 + }, + { + "declaration": 4944, + "isOffset": false, + "isSlot": false, + "src": "8561:1:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 4991, + "nodeType": "InlineAssembly", + "src": "8444:308:19" + }, + { + "assignments": [ + 4993 + ], + "declarations": [ + { + "constant": false, + "id": 4993, + "mutability": "mutable", + "name": "twos", + "nameLocation": "8964:4:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "8956:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4992, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8956:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5000, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4994, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8971:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "30", + "id": 4995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8986:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 4996, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "8990:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8986:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 4998, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8985:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8971:31:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8956:46:19" + }, + { + "AST": { + "nativeSrc": "9041:359:19", + "nodeType": "YulBlock", + "src": "9041:359:19", + "statements": [ + { + "nativeSrc": "9106:37:19", + "nodeType": "YulAssignment", + "src": "9106:37:19", + "value": { + "arguments": [ + { + "name": "denominator", + "nativeSrc": "9125:11:19", + "nodeType": "YulIdentifier", + "src": "9125:11:19" + }, + { + "name": "twos", + "nativeSrc": "9138:4:19", + "nodeType": "YulIdentifier", + "src": "9138:4:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "9121:3:19", + "nodeType": "YulIdentifier", + "src": "9121:3:19" + }, + "nativeSrc": "9121:22:19", + "nodeType": "YulFunctionCall", + "src": "9121:22:19" + }, + "variableNames": [ + { + "name": "denominator", + "nativeSrc": "9106:11:19", + "nodeType": "YulIdentifier", + "src": "9106:11:19" + } + ] + }, + { + "nativeSrc": "9207:21:19", + "nodeType": "YulAssignment", + "src": "9207:21:19", + "value": { + "arguments": [ + { + "name": "low", + "nativeSrc": "9218:3:19", + "nodeType": "YulIdentifier", + "src": "9218:3:19" + }, + { + "name": "twos", + "nativeSrc": "9223:4:19", + "nodeType": "YulIdentifier", + "src": "9223:4:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "9214:3:19", + "nodeType": "YulIdentifier", + "src": "9214:3:19" + }, + "nativeSrc": "9214:14:19", + "nodeType": "YulFunctionCall", + "src": "9214:14:19" + }, + "variableNames": [ + { + "name": "low", + "nativeSrc": "9207:3:19", + "nodeType": "YulIdentifier", + "src": "9207:3:19" + } + ] + }, + { + "nativeSrc": "9347:39:19", + "nodeType": "YulAssignment", + "src": "9347:39:19", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9367:1:19", + "nodeType": "YulLiteral", + "src": "9367:1:19", + "type": "", + "value": "0" + }, + { + "name": "twos", + "nativeSrc": "9370:4:19", + "nodeType": "YulIdentifier", + "src": "9370:4:19" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9363:3:19", + "nodeType": "YulIdentifier", + "src": "9363:3:19" + }, + "nativeSrc": "9363:12:19", + "nodeType": "YulFunctionCall", + "src": "9363:12:19" + }, + { + "name": "twos", + "nativeSrc": "9377:4:19", + "nodeType": "YulIdentifier", + "src": "9377:4:19" + } + ], + "functionName": { + "name": "div", + "nativeSrc": "9359:3:19", + "nodeType": "YulIdentifier", + "src": "9359:3:19" + }, + "nativeSrc": "9359:23:19", + "nodeType": "YulFunctionCall", + "src": "9359:23:19" + }, + { + "kind": "number", + "nativeSrc": "9384:1:19", + "nodeType": "YulLiteral", + "src": "9384:1:19", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9355:3:19", + "nodeType": "YulIdentifier", + "src": "9355:3:19" + }, + "nativeSrc": "9355:31:19", + "nodeType": "YulFunctionCall", + "src": "9355:31:19" + }, + "variableNames": [ + { + "name": "twos", + "nativeSrc": "9347:4:19", + "nodeType": "YulIdentifier", + "src": "9347:4:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 4946, + "isOffset": false, + "isSlot": false, + "src": "9106:11:19", + "valueSize": 1 + }, + { + "declaration": 4946, + "isOffset": false, + "isSlot": false, + "src": "9125:11:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "9207:3:19", + "valueSize": 1 + }, + { + "declaration": 4954, + "isOffset": false, + "isSlot": false, + "src": "9218:3:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9138:4:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9223:4:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9347:4:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9370:4:19", + "valueSize": 1 + }, + { + "declaration": 4993, + "isOffset": false, + "isSlot": false, + "src": "9377:4:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5001, + "nodeType": "InlineAssembly", + "src": "9016:384:19" + }, + { + "expression": { + "id": 5006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5002, + "name": "low", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4954, + "src": "9463:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5003, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4952, + "src": "9470:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5004, + "name": "twos", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "9477:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9470:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9463:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5007, + "nodeType": "ExpressionStatement", + "src": "9463:18:19" + }, + { + "assignments": [ + 5009 + ], + "declarations": [ + { + "constant": false, + "id": 5009, + "mutability": "mutable", + "name": "inverse", + "nameLocation": "9824:7:19", + "nodeType": "VariableDeclaration", + "scope": 5073, + "src": "9816:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9816:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5016, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 5010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9835:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5011, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "9839:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9835:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5013, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "9834:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "hexValue": "32", + "id": 5014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9854:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "9834:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9816:39:19" + }, + { + "expression": { + "id": 5023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5017, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10072:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5018, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10083:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5019, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10087:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5020, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10101:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10087:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10083:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10072:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5024, + "nodeType": "ExpressionStatement", + "src": "10072:36:19" + }, + { + "expression": { + "id": 5031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5025, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10142:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10153:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5027, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10157:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5028, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10171:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10157:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10153:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10142:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5032, + "nodeType": "ExpressionStatement", + "src": "10142:36:19" + }, + { + "expression": { + "id": 5039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5033, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10214:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5034, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10225:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5035, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10229:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5036, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10243:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10229:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10225:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10214:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5040, + "nodeType": "ExpressionStatement", + "src": "10214:36:19" + }, + { + "expression": { + "id": 5047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5041, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10285:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5042, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10296:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5043, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10300:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5044, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10314:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10300:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10296:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10285:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5048, + "nodeType": "ExpressionStatement", + "src": "10285:36:19" + }, + { + "expression": { + "id": 5055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5049, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10358:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10369:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5051, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10373:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5052, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10387:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10373:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10369:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10358:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5056, + "nodeType": "ExpressionStatement", + "src": "10358:36:19" + }, + { + "expression": { + "id": 5063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5057, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10432:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "*=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "32", + "id": 5058, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10443:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5059, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4946, + "src": "10447:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5060, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10461:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10447:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10443:25:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10432:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5064, + "nodeType": "ExpressionStatement", + "src": "10432:36:19" + }, + { + "expression": { + "id": 5069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5065, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4949, + "src": "10913:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5066, + "name": "low", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4954, + "src": "10922:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5067, + "name": "inverse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5009, + "src": "10928:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10922:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10913:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5070, + "nodeType": "ExpressionStatement", + "src": "10913:22:19" + }, + { + "expression": { + "id": 5071, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4949, + "src": "10956:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4950, + "id": 5072, + "nodeType": "Return", + "src": "10949:13:19" + } + ] + } + ] + }, + "documentation": { + "id": 4940, + "nodeType": "StructuredDocumentation", + "src": "6979:312:19", + "text": " @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n denominator == 0.\n Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n Uniswap Labs also under MIT license." + }, + "id": 5075, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mulDiv", + "nameLocation": "7305:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4942, + "mutability": "mutable", + "name": "x", + "nameLocation": "7320:1:19", + "nodeType": "VariableDeclaration", + "scope": 5075, + "src": "7312:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4941, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7312:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4944, + "mutability": "mutable", + "name": "y", + "nameLocation": "7331:1:19", + "nodeType": "VariableDeclaration", + "scope": 5075, + "src": "7323:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7323:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4946, + "mutability": "mutable", + "name": "denominator", + "nameLocation": "7342:11:19", + "nodeType": "VariableDeclaration", + "scope": 5075, + "src": "7334:19:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4945, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7334:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7311:43:19" + }, + "returnParameters": { + "id": 4950, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4949, + "mutability": "mutable", + "name": "result", + "nameLocation": "7386:6:19", + "nodeType": "VariableDeclaration", + "scope": 5075, + "src": "7378:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4948, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7378:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7377:16:19" + }, + "scope": 6204, + "src": "7296:3683:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5111, + "nodeType": "Block", + "src": "11218:128:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5091, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5078, + "src": "11242:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5092, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5080, + "src": "11245:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5093, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5082, + "src": "11248:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5090, + "name": "mulDiv", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5075, + 5112 + ], + "referencedDeclaration": 5075, + "src": "11235:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 5094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11235:25:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5098, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "11296:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 5097, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "11279:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 5099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11279:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5101, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5078, + "src": "11316:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5102, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5080, + "src": "11319:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5103, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5082, + "src": "11322:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5100, + "name": "mulmod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -16, + "src": "11309:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 5104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11309:25:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 5105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11337:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11309:29:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11279:59:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5095, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "11263:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11272:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "11263:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11263:76:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11235:104:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5089, + "id": 5110, + "nodeType": "Return", + "src": "11228:111:19" + } + ] + }, + "documentation": { + "id": 5076, + "nodeType": "StructuredDocumentation", + "src": "10985:118:19", + "text": " @dev Calculates x * y / denominator with full precision, following the selected rounding direction." + }, + "id": 5112, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mulDiv", + "nameLocation": "11117:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5086, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5078, + "mutability": "mutable", + "name": "x", + "nameLocation": "11132:1:19", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11124:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5077, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11124:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5080, + "mutability": "mutable", + "name": "y", + "nameLocation": "11143:1:19", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11135:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5079, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11135:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5082, + "mutability": "mutable", + "name": "denominator", + "nameLocation": "11154:11:19", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11146:19:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11146:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5085, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "11176:8:19", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11167:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 5084, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5083, + "name": "Rounding", + "nameLocations": [ + "11167:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "11167:8:19" + }, + "referencedDeclaration": 4559, + "src": "11167:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "11123:62:19" + }, + "returnParameters": { + "id": 5089, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5088, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5112, + "src": "11209:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5087, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11209:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11208:9:19" + }, + "scope": 6204, + "src": "11108:238:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5161, + "nodeType": "Block", + "src": "11554:245:19", + "statements": [ + { + "id": 5160, + "nodeType": "UncheckedBlock", + "src": "11564:229:19", + "statements": [ + { + "assignments": [ + 5125, + 5127 + ], + "declarations": [ + { + "constant": false, + "id": 5125, + "mutability": "mutable", + "name": "high", + "nameLocation": "11597:4:19", + "nodeType": "VariableDeclaration", + "scope": 5160, + "src": "11589:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5124, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11589:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5127, + "mutability": "mutable", + "name": "low", + "nameLocation": "11611:3:19", + "nodeType": "VariableDeclaration", + "scope": 5160, + "src": "11603:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5126, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11603:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5132, + "initialValue": { + "arguments": [ + { + "id": 5129, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5115, + "src": "11625:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5130, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5117, + "src": "11628:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5128, + "name": "mul512", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4587, + "src": "11618:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 5131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11618:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11588:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5133, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5125, + "src": "11648:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11656:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "id": 5135, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "11661:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11656:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11648:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5146, + "nodeType": "IfStatement", + "src": "11644:86:19", + "trueBody": { + "id": 5145, + "nodeType": "Block", + "src": "11664:66:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5141, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "11694:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11700:14:19", + "memberName": "UNDER_OVERFLOW", + "nodeType": "MemberAccess", + "referencedDeclaration": 1677, + "src": "11694:20:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 5138, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "11682:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "11688:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "11682:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 5143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11682:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5144, + "nodeType": "ExpressionStatement", + "src": "11682:33:19" + } + ] + } + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5147, + "name": "high", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5125, + "src": "11751:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 5150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "323536", + "id": 5148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11760:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5149, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "11766:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11760:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "id": 5151, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11759:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "11751:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5153, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11750:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5154, + "name": "low", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "11773:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5155, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "11780:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11773:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5157, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "11772:10:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11750:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5123, + "id": 5159, + "nodeType": "Return", + "src": "11743:39:19" + } + ] + } + ] + }, + "documentation": { + "id": 5113, + "nodeType": "StructuredDocumentation", + "src": "11352:111:19", + "text": " @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256." + }, + "id": 5162, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mulShr", + "nameLocation": "11477:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5115, + "mutability": "mutable", + "name": "x", + "nameLocation": "11492:1:19", + "nodeType": "VariableDeclaration", + "scope": 5162, + "src": "11484:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5114, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11484:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5117, + "mutability": "mutable", + "name": "y", + "nameLocation": "11503:1:19", + "nodeType": "VariableDeclaration", + "scope": 5162, + "src": "11495:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5116, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11495:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5119, + "mutability": "mutable", + "name": "n", + "nameLocation": "11512:1:19", + "nodeType": "VariableDeclaration", + "scope": 5162, + "src": "11506:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5118, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11506:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11483:31:19" + }, + "returnParameters": { + "id": 5123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5122, + "mutability": "mutable", + "name": "result", + "nameLocation": "11546:6:19", + "nodeType": "VariableDeclaration", + "scope": 5162, + "src": "11538:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5121, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11538:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11537:16:19" + }, + "scope": 6204, + "src": "11468:331:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5200, + "nodeType": "Block", + "src": "12017:113:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5178, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5165, + "src": "12041:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5179, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5167, + "src": "12044:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5180, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "12047:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 5177, + "name": "mulShr", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5162, + 5201 + ], + "referencedDeclaration": 5162, + "src": "12034:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint8_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint8) pure returns (uint256)" + } + }, + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12034:15:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5185, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5172, + "src": "12085:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 5184, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "12068:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 5186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12068:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5188, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5165, + "src": "12105:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5189, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5167, + "src": "12108:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12111:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "id": 5191, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "12116:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "12111:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5187, + "name": "mulmod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -16, + "src": "12098:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" + } + }, + "id": 5193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12098:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 5194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12121:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12098:24:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12068:54:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5182, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "12052:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "12061:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "12052:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12052:71:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12034:89:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5176, + "id": 5199, + "nodeType": "Return", + "src": "12027:96:19" + } + ] + }, + "documentation": { + "id": 5163, + "nodeType": "StructuredDocumentation", + "src": "11805:109:19", + "text": " @dev Calculates x * y >> n with full precision, following the selected rounding direction." + }, + "id": 5201, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mulShr", + "nameLocation": "11928:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5173, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5165, + "mutability": "mutable", + "name": "x", + "nameLocation": "11943:1:19", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "11935:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5164, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11935:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5167, + "mutability": "mutable", + "name": "y", + "nameLocation": "11954:1:19", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "11946:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11946:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5169, + "mutability": "mutable", + "name": "n", + "nameLocation": "11963:1:19", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "11957:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5168, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11957:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5172, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "11975:8:19", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "11966:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 5171, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5170, + "name": "Rounding", + "nameLocations": [ + "11966:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "11966:8:19" + }, + "referencedDeclaration": 4559, + "src": "11966:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "11934:50:19" + }, + "returnParameters": { + "id": 5176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5175, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5201, + "src": "12008:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12008:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12007:9:19" + }, + "scope": 6204, + "src": "11919:211:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5297, + "nodeType": "Block", + "src": "12764:1849:19", + "statements": [ + { + "id": 5296, + "nodeType": "UncheckedBlock", + "src": "12774:1833:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5211, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "12802:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12807:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12802:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5216, + "nodeType": "IfStatement", + "src": "12798:20:19", + "trueBody": { + "expression": { + "hexValue": "30", + "id": 5214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12817:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5210, + "id": 5215, + "nodeType": "Return", + "src": "12810:8:19" + } + }, + { + "assignments": [ + 5218 + ], + "declarations": [ + { + "constant": false, + "id": 5218, + "mutability": "mutable", + "name": "remainder", + "nameLocation": "13297:9:19", + "nodeType": "VariableDeclaration", + "scope": 5296, + "src": "13289:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13289:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5222, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5219, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "13309:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "id": 5220, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "13313:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13309:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13289:25:19" + }, + { + "assignments": [ + 5224 + ], + "declarations": [ + { + "constant": false, + "id": 5224, + "mutability": "mutable", + "name": "gcd", + "nameLocation": "13336:3:19", + "nodeType": "VariableDeclaration", + "scope": 5296, + "src": "13328:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5223, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13328:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5226, + "initialValue": { + "id": 5225, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "13342:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13328:15:19" + }, + { + "assignments": [ + 5228 + ], + "declarations": [ + { + "constant": false, + "id": 5228, + "mutability": "mutable", + "name": "x", + "nameLocation": "13486:1:19", + "nodeType": "VariableDeclaration", + "scope": 5296, + "src": "13479:8:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5227, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "13479:6:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 5230, + "initialValue": { + "hexValue": "30", + "id": 5229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13490:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13479:12:19" + }, + { + "assignments": [ + 5232 + ], + "declarations": [ + { + "constant": false, + "id": 5232, + "mutability": "mutable", + "name": "y", + "nameLocation": "13512:1:19", + "nodeType": "VariableDeclaration", + "scope": 5296, + "src": "13505:8:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 5231, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "13505:6:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 5234, + "initialValue": { + "hexValue": "31", + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13516:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13505:12:19" + }, + { + "body": { + "id": 5271, + "nodeType": "Block", + "src": "13555:882:19", + "statements": [ + { + "assignments": [ + 5239 + ], + "declarations": [ + { + "constant": false, + "id": 5239, + "mutability": "mutable", + "name": "quotient", + "nameLocation": "13581:8:19", + "nodeType": "VariableDeclaration", + "scope": 5271, + "src": "13573:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5238, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13573:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5243, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5240, + "name": "gcd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5224, + "src": "13592:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5241, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13598:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13592:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13573:34:19" + }, + { + "expression": { + "id": 5254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "components": [ + { + "id": 5244, + "name": "gcd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5224, + "src": "13627:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5245, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13632:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5246, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "13626:16:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "components": [ + { + "id": 5247, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13732:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5248, + "name": "gcd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5224, + "src": "13977:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5249, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13983:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5250, + "name": "quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5239, + "src": "13995:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13983:20:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13977:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13645:376:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "13626:395:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5255, + "nodeType": "ExpressionStatement", + "src": "13626:395:19" + }, + { + "expression": { + "id": 5269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "components": [ + { + "id": 5256, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14041:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 5257, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5232, + "src": "14044:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 5258, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "14040:6:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$", + "typeString": "tuple(int256,int256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "components": [ + { + "id": 5259, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5232, + "src": "14126:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 5267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5260, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14380:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 5266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5261, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5232, + "src": "14384:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "id": 5264, + "name": "quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5239, + "src": "14395:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5263, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14388:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 5262, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "14388:6:19", + "typeDescriptions": {} + } + }, + "id": 5265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14388:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "14384:20:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "14380:24:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 5268, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14049:373:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$", + "typeString": "tuple(int256,int256)" + } + }, + "src": "14040:382:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5270, + "nodeType": "ExpressionStatement", + "src": "14040:382:19" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5235, + "name": "remainder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5218, + "src": "13539:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 5236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13552:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13539:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5272, + "nodeType": "WhileStatement", + "src": "13532:905:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5273, + "name": "gcd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5224, + "src": "14455:3:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "31", + "id": 5274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14462:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14455:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5278, + "nodeType": "IfStatement", + "src": "14451:22:19", + "trueBody": { + "expression": { + "hexValue": "30", + "id": 5276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14472:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5210, + "id": 5277, + "nodeType": "Return", + "src": "14465:8:19" + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 5282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5280, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14524:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "30", + "id": 5281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14528:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14524:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5283, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "14531:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "14543:2:19", + "subExpression": { + "id": 5286, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14544:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 5285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14535:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5284, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14535:7:19", + "typeDescriptions": {} + } + }, + "id": 5288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14535:11:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14531:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 5292, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "14556:1:19", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 5291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14548:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5290, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14548:7:19", + "typeDescriptions": {} + } + }, + "id": 5293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14548:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5279, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "14516:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 5294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14516:43:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5210, + "id": 5295, + "nodeType": "Return", + "src": "14509:50:19" + } + ] + } + ] + }, + "documentation": { + "id": 5202, + "nodeType": "StructuredDocumentation", + "src": "12136:553:19", + "text": " @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n If the input value is not inversible, 0 is returned.\n NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}." + }, + "id": 5298, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invMod", + "nameLocation": "12703:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5204, + "mutability": "mutable", + "name": "a", + "nameLocation": "12718:1:19", + "nodeType": "VariableDeclaration", + "scope": 5298, + "src": "12710:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12710:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5206, + "mutability": "mutable", + "name": "n", + "nameLocation": "12729:1:19", + "nodeType": "VariableDeclaration", + "scope": 5298, + "src": "12721:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12721:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12709:22:19" + }, + "returnParameters": { + "id": 5210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5209, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5298, + "src": "12755:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5208, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12755:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12754:9:19" + }, + "scope": 6204, + "src": "12694:1919:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5318, + "nodeType": "Block", + "src": "15213:82:19", + "statements": [ + { + "id": 5317, + "nodeType": "UncheckedBlock", + "src": "15223:66:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5310, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5301, + "src": "15266:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5311, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5303, + "src": "15269:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "32", + "id": 5312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15273:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "15269:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5314, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5303, + "src": "15276:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 5308, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15254:4:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$6204_$", + "typeString": "type(library Math)" + } + }, + "id": 5309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "15259:6:19", + "memberName": "modExp", + "nodeType": "MemberAccess", + "referencedDeclaration": 5355, + "src": "15254:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 5315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15254:24:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5307, + "id": 5316, + "nodeType": "Return", + "src": "15247:31:19" + } + ] + } + ] + }, + "documentation": { + "id": 5299, + "nodeType": "StructuredDocumentation", + "src": "14619:514:19", + "text": " @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n NOTE: this function does NOT check that `p` is a prime greater than `2`." + }, + "id": 5319, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "invModPrime", + "nameLocation": "15147:11:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5301, + "mutability": "mutable", + "name": "a", + "nameLocation": "15167:1:19", + "nodeType": "VariableDeclaration", + "scope": 5319, + "src": "15159:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15159:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5303, + "mutability": "mutable", + "name": "p", + "nameLocation": "15178:1:19", + "nodeType": "VariableDeclaration", + "scope": 5319, + "src": "15170:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15170:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15158:22:19" + }, + "returnParameters": { + "id": 5307, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5306, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5319, + "src": "15204:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5305, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15204:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15203:9:19" + }, + "scope": 6204, + "src": "15138:157:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5354, + "nodeType": "Block", + "src": "16065:174:19", + "statements": [ + { + "assignments": [ + 5332, + 5334 + ], + "declarations": [ + { + "constant": false, + "id": 5332, + "mutability": "mutable", + "name": "success", + "nameLocation": "16081:7:19", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "16076:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5331, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "16076:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5334, + "mutability": "mutable", + "name": "result", + "nameLocation": "16098:6:19", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "16090:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5333, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16090:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5340, + "initialValue": { + "arguments": [ + { + "id": 5336, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5322, + "src": "16118:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5337, + "name": "e", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5324, + "src": "16121:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5338, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5326, + "src": "16124:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5335, + "name": "tryModExp", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5379, + 5461 + ], + "referencedDeclaration": 5379, + "src": "16108:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (bool,uint256)" + } + }, + "id": 5339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16108:18:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$", + "typeString": "tuple(bool,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16075:51:19" + }, + { + "condition": { + "id": 5342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "16140:8:19", + "subExpression": { + "id": 5341, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "16141:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5351, + "nodeType": "IfStatement", + "src": "16136:74:19", + "trueBody": { + "id": 5350, + "nodeType": "Block", + "src": "16150:60:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5346, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "16176:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "16182:16:19", + "memberName": "DIVISION_BY_ZERO", + "nodeType": "MemberAccess", + "referencedDeclaration": 1681, + "src": "16176:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 5343, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "16164:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "16170:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "16164:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 5348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16164:35:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5349, + "nodeType": "ExpressionStatement", + "src": "16164:35:19" + } + ] + } + }, + { + "expression": { + "id": 5352, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "16226:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5330, + "id": 5353, + "nodeType": "Return", + "src": "16219:13:19" + } + ] + }, + "documentation": { + "id": 5320, + "nodeType": "StructuredDocumentation", + "src": "15301:678:19", + "text": " @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n Requirements:\n - modulus can't be zero\n - underlying staticcall to precompile must succeed\n IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n sure the chain you're using it on supports the precompiled contract for modular exponentiation\n at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n interpreted as 0." + }, + "id": 5355, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "modExp", + "nameLocation": "15993:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5322, + "mutability": "mutable", + "name": "b", + "nameLocation": "16008:1:19", + "nodeType": "VariableDeclaration", + "scope": 5355, + "src": "16000:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5321, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16000:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5324, + "mutability": "mutable", + "name": "e", + "nameLocation": "16019:1:19", + "nodeType": "VariableDeclaration", + "scope": 5355, + "src": "16011:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5323, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16011:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5326, + "mutability": "mutable", + "name": "m", + "nameLocation": "16030:1:19", + "nodeType": "VariableDeclaration", + "scope": 5355, + "src": "16022:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5325, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16022:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15999:33:19" + }, + "returnParameters": { + "id": 5330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5329, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5355, + "src": "16056:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5328, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16056:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16055:9:19" + }, + "scope": 6204, + "src": "15984:255:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5378, + "nodeType": "Block", + "src": "17093:1493:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5369, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5362, + "src": "17107:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17112:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17107:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5376, + "nodeType": "IfStatement", + "src": "17103:29:19", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 5372, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17123:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "hexValue": "30", + "id": 5373, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17130:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 5374, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "17122:10:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_rational_0_by_1_$", + "typeString": "tuple(bool,int_const 0)" + } + }, + "functionReturnParameters": 5368, + "id": 5375, + "nodeType": "Return", + "src": "17115:17:19" + } + }, + { + "AST": { + "nativeSrc": "17167:1413:19", + "nodeType": "YulBlock", + "src": "17167:1413:19", + "statements": [ + { + "nativeSrc": "17181:22:19", + "nodeType": "YulVariableDeclaration", + "src": "17181:22:19", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "17198:4:19", + "nodeType": "YulLiteral", + "src": "17198:4:19", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "17192:5:19", + "nodeType": "YulIdentifier", + "src": "17192:5:19" + }, + "nativeSrc": "17192:11:19", + "nodeType": "YulFunctionCall", + "src": "17192:11:19" + }, + "variables": [ + { + "name": "ptr", + "nativeSrc": "17185:3:19", + "nodeType": "YulTypedName", + "src": "17185:3:19", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18111:3:19", + "nodeType": "YulIdentifier", + "src": "18111:3:19" + }, + { + "kind": "number", + "nativeSrc": "18116:4:19", + "nodeType": "YulLiteral", + "src": "18116:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18104:6:19", + "nodeType": "YulIdentifier", + "src": "18104:6:19" + }, + "nativeSrc": "18104:17:19", + "nodeType": "YulFunctionCall", + "src": "18104:17:19" + }, + "nativeSrc": "18104:17:19", + "nodeType": "YulExpressionStatement", + "src": "18104:17:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18145:3:19", + "nodeType": "YulIdentifier", + "src": "18145:3:19" + }, + { + "kind": "number", + "nativeSrc": "18150:4:19", + "nodeType": "YulLiteral", + "src": "18150:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18141:3:19", + "nodeType": "YulIdentifier", + "src": "18141:3:19" + }, + "nativeSrc": "18141:14:19", + "nodeType": "YulFunctionCall", + "src": "18141:14:19" + }, + { + "kind": "number", + "nativeSrc": "18157:4:19", + "nodeType": "YulLiteral", + "src": "18157:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18134:6:19", + "nodeType": "YulIdentifier", + "src": "18134:6:19" + }, + "nativeSrc": "18134:28:19", + "nodeType": "YulFunctionCall", + "src": "18134:28:19" + }, + "nativeSrc": "18134:28:19", + "nodeType": "YulExpressionStatement", + "src": "18134:28:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18186:3:19", + "nodeType": "YulIdentifier", + "src": "18186:3:19" + }, + { + "kind": "number", + "nativeSrc": "18191:4:19", + "nodeType": "YulLiteral", + "src": "18191:4:19", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18182:3:19", + "nodeType": "YulIdentifier", + "src": "18182:3:19" + }, + "nativeSrc": "18182:14:19", + "nodeType": "YulFunctionCall", + "src": "18182:14:19" + }, + { + "kind": "number", + "nativeSrc": "18198:4:19", + "nodeType": "YulLiteral", + "src": "18198:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18175:6:19", + "nodeType": "YulIdentifier", + "src": "18175:6:19" + }, + "nativeSrc": "18175:28:19", + "nodeType": "YulFunctionCall", + "src": "18175:28:19" + }, + "nativeSrc": "18175:28:19", + "nodeType": "YulExpressionStatement", + "src": "18175:28:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18227:3:19", + "nodeType": "YulIdentifier", + "src": "18227:3:19" + }, + { + "kind": "number", + "nativeSrc": "18232:4:19", + "nodeType": "YulLiteral", + "src": "18232:4:19", + "type": "", + "value": "0x60" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18223:3:19", + "nodeType": "YulIdentifier", + "src": "18223:3:19" + }, + "nativeSrc": "18223:14:19", + "nodeType": "YulFunctionCall", + "src": "18223:14:19" + }, + { + "name": "b", + "nativeSrc": "18239:1:19", + "nodeType": "YulIdentifier", + "src": "18239:1:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18216:6:19", + "nodeType": "YulIdentifier", + "src": "18216:6:19" + }, + "nativeSrc": "18216:25:19", + "nodeType": "YulFunctionCall", + "src": "18216:25:19" + }, + "nativeSrc": "18216:25:19", + "nodeType": "YulExpressionStatement", + "src": "18216:25:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18265:3:19", + "nodeType": "YulIdentifier", + "src": "18265:3:19" + }, + { + "kind": "number", + "nativeSrc": "18270:4:19", + "nodeType": "YulLiteral", + "src": "18270:4:19", + "type": "", + "value": "0x80" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18261:3:19", + "nodeType": "YulIdentifier", + "src": "18261:3:19" + }, + "nativeSrc": "18261:14:19", + "nodeType": "YulFunctionCall", + "src": "18261:14:19" + }, + { + "name": "e", + "nativeSrc": "18277:1:19", + "nodeType": "YulIdentifier", + "src": "18277:1:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18254:6:19", + "nodeType": "YulIdentifier", + "src": "18254:6:19" + }, + "nativeSrc": "18254:25:19", + "nodeType": "YulFunctionCall", + "src": "18254:25:19" + }, + "nativeSrc": "18254:25:19", + "nodeType": "YulExpressionStatement", + "src": "18254:25:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "ptr", + "nativeSrc": "18303:3:19", + "nodeType": "YulIdentifier", + "src": "18303:3:19" + }, + { + "kind": "number", + "nativeSrc": "18308:4:19", + "nodeType": "YulLiteral", + "src": "18308:4:19", + "type": "", + "value": "0xa0" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "18299:3:19", + "nodeType": "YulIdentifier", + "src": "18299:3:19" + }, + "nativeSrc": "18299:14:19", + "nodeType": "YulFunctionCall", + "src": "18299:14:19" + }, + { + "name": "m", + "nativeSrc": "18315:1:19", + "nodeType": "YulIdentifier", + "src": "18315:1:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "18292:6:19", + "nodeType": "YulIdentifier", + "src": "18292:6:19" + }, + "nativeSrc": "18292:25:19", + "nodeType": "YulFunctionCall", + "src": "18292:25:19" + }, + "nativeSrc": "18292:25:19", + "nodeType": "YulExpressionStatement", + "src": "18292:25:19" + }, + { + "nativeSrc": "18479:57:19", + "nodeType": "YulAssignment", + "src": "18479:57:19", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "18501:3:19", + "nodeType": "YulIdentifier", + "src": "18501:3:19" + }, + "nativeSrc": "18501:5:19", + "nodeType": "YulFunctionCall", + "src": "18501:5:19" + }, + { + "kind": "number", + "nativeSrc": "18508:4:19", + "nodeType": "YulLiteral", + "src": "18508:4:19", + "type": "", + "value": "0x05" + }, + { + "name": "ptr", + "nativeSrc": "18514:3:19", + "nodeType": "YulIdentifier", + "src": "18514:3:19" + }, + { + "kind": "number", + "nativeSrc": "18519:4:19", + "nodeType": "YulLiteral", + "src": "18519:4:19", + "type": "", + "value": "0xc0" + }, + { + "kind": "number", + "nativeSrc": "18525:4:19", + "nodeType": "YulLiteral", + "src": "18525:4:19", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nativeSrc": "18531:4:19", + "nodeType": "YulLiteral", + "src": "18531:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "staticcall", + "nativeSrc": "18490:10:19", + "nodeType": "YulIdentifier", + "src": "18490:10:19" + }, + "nativeSrc": "18490:46:19", + "nodeType": "YulFunctionCall", + "src": "18490:46:19" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "18479:7:19", + "nodeType": "YulIdentifier", + "src": "18479:7:19" + } + ] + }, + { + "nativeSrc": "18549:21:19", + "nodeType": "YulAssignment", + "src": "18549:21:19", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "18565:4:19", + "nodeType": "YulLiteral", + "src": "18565:4:19", + "type": "", + "value": "0x00" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "18559:5:19", + "nodeType": "YulIdentifier", + "src": "18559:5:19" + }, + "nativeSrc": "18559:11:19", + "nodeType": "YulFunctionCall", + "src": "18559:11:19" + }, + "variableNames": [ + { + "name": "result", + "nativeSrc": "18549:6:19", + "nodeType": "YulIdentifier", + "src": "18549:6:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 5358, + "isOffset": false, + "isSlot": false, + "src": "18239:1:19", + "valueSize": 1 + }, + { + "declaration": 5360, + "isOffset": false, + "isSlot": false, + "src": "18277:1:19", + "valueSize": 1 + }, + { + "declaration": 5362, + "isOffset": false, + "isSlot": false, + "src": "18315:1:19", + "valueSize": 1 + }, + { + "declaration": 5367, + "isOffset": false, + "isSlot": false, + "src": "18549:6:19", + "valueSize": 1 + }, + { + "declaration": 5365, + "isOffset": false, + "isSlot": false, + "src": "18479:7:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5377, + "nodeType": "InlineAssembly", + "src": "17142:1438:19" + } + ] + }, + "documentation": { + "id": 5356, + "nodeType": "StructuredDocumentation", + "src": "16245:738:19", + "text": " @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n to operate modulo 0 or if the underlying precompile reverted.\n IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n of a revert, but the result may be incorrectly interpreted as 0." + }, + "id": 5379, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryModExp", + "nameLocation": "16997:9:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5358, + "mutability": "mutable", + "name": "b", + "nameLocation": "17015:1:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17007:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5357, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17007:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5360, + "mutability": "mutable", + "name": "e", + "nameLocation": "17026:1:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17018:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5359, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17018:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5362, + "mutability": "mutable", + "name": "m", + "nameLocation": "17037:1:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17029:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17029:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17006:33:19" + }, + "returnParameters": { + "id": 5368, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5365, + "mutability": "mutable", + "name": "success", + "nameLocation": "17068:7:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17063:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5364, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17063:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5367, + "mutability": "mutable", + "name": "result", + "nameLocation": "17085:6:19", + "nodeType": "VariableDeclaration", + "scope": 5379, + "src": "17077:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5366, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17077:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17062:30:19" + }, + "scope": 6204, + "src": "16988:1598:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5414, + "nodeType": "Block", + "src": "18783:179:19", + "statements": [ + { + "assignments": [ + 5392, + 5394 + ], + "declarations": [ + { + "constant": false, + "id": 5392, + "mutability": "mutable", + "name": "success", + "nameLocation": "18799:7:19", + "nodeType": "VariableDeclaration", + "scope": 5414, + "src": "18794:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5391, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18794:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5394, + "mutability": "mutable", + "name": "result", + "nameLocation": "18821:6:19", + "nodeType": "VariableDeclaration", + "scope": 5414, + "src": "18808:19:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5393, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18808:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 5400, + "initialValue": { + "arguments": [ + { + "id": 5396, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5382, + "src": "18841:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 5397, + "name": "e", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5384, + "src": "18844:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 5398, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5386, + "src": "18847:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5395, + "name": "tryModExp", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5379, + 5461 + ], + "referencedDeclaration": 5461, + "src": "18831:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory,bytes memory,bytes memory) view returns (bool,bytes memory)" + } + }, + "id": 5399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18831:18:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18793:56:19" + }, + { + "condition": { + "id": 5402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "18863:8:19", + "subExpression": { + "id": 5401, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5392, + "src": "18864:7:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5411, + "nodeType": "IfStatement", + "src": "18859:74:19", + "trueBody": { + "id": 5410, + "nodeType": "Block", + "src": "18873:60:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5406, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "18899:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "18905:16:19", + "memberName": "DIVISION_BY_ZERO", + "nodeType": "MemberAccess", + "referencedDeclaration": 1681, + "src": "18899:22:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 5403, + "name": "Panic", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1714, + "src": "18887:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Panic_$1714_$", + "typeString": "type(library Panic)" + } + }, + "id": 5405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "18893:5:19", + "memberName": "panic", + "nodeType": "MemberAccess", + "referencedDeclaration": 1713, + "src": "18887:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 5408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18887:35:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5409, + "nodeType": "ExpressionStatement", + "src": "18887:35:19" + } + ] + } + }, + { + "expression": { + "id": 5412, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5394, + "src": "18949:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 5390, + "id": 5413, + "nodeType": "Return", + "src": "18942:13:19" + } + ] + }, + "documentation": { + "id": 5380, + "nodeType": "StructuredDocumentation", + "src": "18592:85:19", + "text": " @dev Variant of {modExp} that supports inputs of arbitrary length." + }, + "id": 5415, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "modExp", + "nameLocation": "18691:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5382, + "mutability": "mutable", + "name": "b", + "nameLocation": "18711:1:19", + "nodeType": "VariableDeclaration", + "scope": 5415, + "src": "18698:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5381, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18698:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5384, + "mutability": "mutable", + "name": "e", + "nameLocation": "18727:1:19", + "nodeType": "VariableDeclaration", + "scope": 5415, + "src": "18714:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5383, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18714:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5386, + "mutability": "mutable", + "name": "m", + "nameLocation": "18743:1:19", + "nodeType": "VariableDeclaration", + "scope": 5415, + "src": "18730:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5385, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18730:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "18697:48:19" + }, + "returnParameters": { + "id": 5390, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5389, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5415, + "src": "18769:12:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5388, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "18769:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "18768:14:19" + }, + "scope": 6204, + "src": "18682:280:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5460, + "nodeType": "Block", + "src": "19216:771:19", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 5430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "19241:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5429, + "name": "_zeroBytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5508, + "src": "19230:10:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (bytes memory) pure returns (bool)" + } + }, + "id": 5431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19230:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5439, + "nodeType": "IfStatement", + "src": "19226:47:19", + "trueBody": { + "expression": { + "components": [ + { + "hexValue": "66616c7365", + "id": 5432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19253:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19270:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "19260:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 5433, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19264:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 5436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19260:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "id": 5437, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "19252:21:19", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "functionReturnParameters": 5428, + "id": 5438, + "nodeType": "Return", + "src": "19245:28:19" + } + }, + { + "assignments": [ + 5441 + ], + "declarations": [ + { + "constant": false, + "id": 5441, + "mutability": "mutable", + "name": "mLen", + "nameLocation": "19292:4:19", + "nodeType": "VariableDeclaration", + "scope": 5460, + "src": "19284:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5440, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19284:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5444, + "initialValue": { + "expression": { + "id": 5442, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "19299:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "19301:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "19299:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19284:23:19" + }, + { + "expression": { + "id": 5457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5445, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5427, + "src": "19389:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 5448, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "19415:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "19417:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "19415:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 5450, + "name": "e", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "19425:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "19427:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "19425:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5452, + "name": "mLen", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5441, + "src": "19435:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5453, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "19441:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 5454, + "name": "e", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "19444:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "id": 5455, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "19447:1:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 5446, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "19398:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "19402:12:19", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "19398:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 5456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19398:51:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "src": "19389:60:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5458, + "nodeType": "ExpressionStatement", + "src": "19389:60:19" + }, + { + "AST": { + "nativeSrc": "19485:496:19", + "nodeType": "YulBlock", + "src": "19485:496:19", + "statements": [ + { + "nativeSrc": "19499:32:19", + "nodeType": "YulVariableDeclaration", + "src": "19499:32:19", + "value": { + "arguments": [ + { + "name": "result", + "nativeSrc": "19518:6:19", + "nodeType": "YulIdentifier", + "src": "19518:6:19" + }, + { + "kind": "number", + "nativeSrc": "19526:4:19", + "nodeType": "YulLiteral", + "src": "19526:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "19514:3:19", + "nodeType": "YulIdentifier", + "src": "19514:3:19" + }, + "nativeSrc": "19514:17:19", + "nodeType": "YulFunctionCall", + "src": "19514:17:19" + }, + "variables": [ + { + "name": "dataPtr", + "nativeSrc": "19503:7:19", + "nodeType": "YulTypedName", + "src": "19503:7:19", + "type": "" + } + ] + }, + { + "nativeSrc": "19621:73:19", + "nodeType": "YulAssignment", + "src": "19621:73:19", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nativeSrc": "19643:3:19", + "nodeType": "YulIdentifier", + "src": "19643:3:19" + }, + "nativeSrc": "19643:5:19", + "nodeType": "YulFunctionCall", + "src": "19643:5:19" + }, + { + "kind": "number", + "nativeSrc": "19650:4:19", + "nodeType": "YulLiteral", + "src": "19650:4:19", + "type": "", + "value": "0x05" + }, + { + "name": "dataPtr", + "nativeSrc": "19656:7:19", + "nodeType": "YulIdentifier", + "src": "19656:7:19" + }, + { + "arguments": [ + { + "name": "result", + "nativeSrc": "19671:6:19", + "nodeType": "YulIdentifier", + "src": "19671:6:19" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "19665:5:19", + "nodeType": "YulIdentifier", + "src": "19665:5:19" + }, + "nativeSrc": "19665:13:19", + "nodeType": "YulFunctionCall", + "src": "19665:13:19" + }, + { + "name": "dataPtr", + "nativeSrc": "19680:7:19", + "nodeType": "YulIdentifier", + "src": "19680:7:19" + }, + { + "name": "mLen", + "nativeSrc": "19689:4:19", + "nodeType": "YulIdentifier", + "src": "19689:4:19" + } + ], + "functionName": { + "name": "staticcall", + "nativeSrc": "19632:10:19", + "nodeType": "YulIdentifier", + "src": "19632:10:19" + }, + "nativeSrc": "19632:62:19", + "nodeType": "YulFunctionCall", + "src": "19632:62:19" + }, + "variableNames": [ + { + "name": "success", + "nativeSrc": "19621:7:19", + "nodeType": "YulIdentifier", + "src": "19621:7:19" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "result", + "nativeSrc": "19850:6:19", + "nodeType": "YulIdentifier", + "src": "19850:6:19" + }, + { + "name": "mLen", + "nativeSrc": "19858:4:19", + "nodeType": "YulIdentifier", + "src": "19858:4:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "19843:6:19", + "nodeType": "YulIdentifier", + "src": "19843:6:19" + }, + "nativeSrc": "19843:20:19", + "nodeType": "YulFunctionCall", + "src": "19843:20:19" + }, + "nativeSrc": "19843:20:19", + "nodeType": "YulExpressionStatement", + "src": "19843:20:19" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "19946:4:19", + "nodeType": "YulLiteral", + "src": "19946:4:19", + "type": "", + "value": "0x40" + }, + { + "arguments": [ + { + "name": "dataPtr", + "nativeSrc": "19956:7:19", + "nodeType": "YulIdentifier", + "src": "19956:7:19" + }, + { + "name": "mLen", + "nativeSrc": "19965:4:19", + "nodeType": "YulIdentifier", + "src": "19965:4:19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "19952:3:19", + "nodeType": "YulIdentifier", + "src": "19952:3:19" + }, + "nativeSrc": "19952:18:19", + "nodeType": "YulFunctionCall", + "src": "19952:18:19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "19939:6:19", + "nodeType": "YulIdentifier", + "src": "19939:6:19" + }, + "nativeSrc": "19939:32:19", + "nodeType": "YulFunctionCall", + "src": "19939:32:19" + }, + "nativeSrc": "19939:32:19", + "nodeType": "YulExpressionStatement", + "src": "19939:32:19" + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 5441, + "isOffset": false, + "isSlot": false, + "src": "19689:4:19", + "valueSize": 1 + }, + { + "declaration": 5441, + "isOffset": false, + "isSlot": false, + "src": "19858:4:19", + "valueSize": 1 + }, + { + "declaration": 5441, + "isOffset": false, + "isSlot": false, + "src": "19965:4:19", + "valueSize": 1 + }, + { + "declaration": 5427, + "isOffset": false, + "isSlot": false, + "src": "19518:6:19", + "valueSize": 1 + }, + { + "declaration": 5427, + "isOffset": false, + "isSlot": false, + "src": "19671:6:19", + "valueSize": 1 + }, + { + "declaration": 5427, + "isOffset": false, + "isSlot": false, + "src": "19850:6:19", + "valueSize": 1 + }, + { + "declaration": 5425, + "isOffset": false, + "isSlot": false, + "src": "19621:7:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5459, + "nodeType": "InlineAssembly", + "src": "19460:521:19" + } + ] + }, + "documentation": { + "id": 5416, + "nodeType": "StructuredDocumentation", + "src": "18968:88:19", + "text": " @dev Variant of {tryModExp} that supports inputs of arbitrary length." + }, + "id": 5461, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tryModExp", + "nameLocation": "19070:9:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5418, + "mutability": "mutable", + "name": "b", + "nameLocation": "19102:1:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19089:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5417, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19089:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5420, + "mutability": "mutable", + "name": "e", + "nameLocation": "19126:1:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19113:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5419, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19113:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5422, + "mutability": "mutable", + "name": "m", + "nameLocation": "19150:1:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19137:14:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5421, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19137:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "19079:78:19" + }, + "returnParameters": { + "id": 5428, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5425, + "mutability": "mutable", + "name": "success", + "nameLocation": "19186:7:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19181:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5424, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19181:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5427, + "mutability": "mutable", + "name": "result", + "nameLocation": "19208:6:19", + "nodeType": "VariableDeclaration", + "scope": 5461, + "src": "19195:19:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5426, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "19195:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "19180:35:19" + }, + "scope": 6204, + "src": "19061:926:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5507, + "nodeType": "Block", + "src": "20139:417:19", + "statements": [ + { + "assignments": [ + 5470 + ], + "declarations": [ + { + "constant": false, + "id": 5470, + "mutability": "mutable", + "name": "chunk", + "nameLocation": "20157:5:19", + "nodeType": "VariableDeclaration", + "scope": 5507, + "src": "20149:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20149:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5471, + "nodeType": "VariableDeclarationStatement", + "src": "20149:13:19" + }, + { + "body": { + "id": 5503, + "nodeType": "Block", + "src": "20222:307:19", + "statements": [ + { + "AST": { + "nativeSrc": "20324:73:19", + "nodeType": "YulBlock", + "src": "20324:73:19", + "statements": [ + { + "nativeSrc": "20342:41:19", + "nodeType": "YulAssignment", + "src": "20342:41:19", + "value": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "buffer", + "nativeSrc": "20365:6:19", + "nodeType": "YulIdentifier", + "src": "20365:6:19" + }, + { + "kind": "number", + "nativeSrc": "20373:4:19", + "nodeType": "YulLiteral", + "src": "20373:4:19", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20361:3:19", + "nodeType": "YulIdentifier", + "src": "20361:3:19" + }, + "nativeSrc": "20361:17:19", + "nodeType": "YulFunctionCall", + "src": "20361:17:19" + }, + { + "name": "i", + "nativeSrc": "20380:1:19", + "nodeType": "YulIdentifier", + "src": "20380:1:19" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "20357:3:19", + "nodeType": "YulIdentifier", + "src": "20357:3:19" + }, + "nativeSrc": "20357:25:19", + "nodeType": "YulFunctionCall", + "src": "20357:25:19" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "20351:5:19", + "nodeType": "YulIdentifier", + "src": "20351:5:19" + }, + "nativeSrc": "20351:32:19", + "nodeType": "YulFunctionCall", + "src": "20351:32:19" + }, + "variableNames": [ + { + "name": "chunk", + "nativeSrc": "20342:5:19", + "nodeType": "YulIdentifier", + "src": "20342:5:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 5464, + "isOffset": false, + "isSlot": false, + "src": "20365:6:19", + "valueSize": 1 + }, + { + "declaration": 5470, + "isOffset": false, + "isSlot": false, + "src": "20342:5:19", + "valueSize": 1 + }, + { + "declaration": 5473, + "isOffset": false, + "isSlot": false, + "src": "20380:1:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5484, + "nodeType": "InlineAssembly", + "src": "20299:98:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5485, + "name": "chunk", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5470, + "src": "20414:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "38", + "id": 5486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20424:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5488, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "20442:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "30783230", + "id": 5489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20446:4:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "20442:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 5491, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5464, + "src": "20452:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20459:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "20452:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5487, + "name": "saturatingSub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4779, + "src": "20428:13:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20428:38:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20424:42:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5495, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "20423:44:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20414:53:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 5497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20471:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20414:58:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5502, + "nodeType": "IfStatement", + "src": "20410:109:19", + "trueBody": { + "id": 5501, + "nodeType": "Block", + "src": "20474:45:19", + "statements": [ + { + "expression": { + "hexValue": "66616c7365", + "id": 5499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20499:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 5468, + "id": 5500, + "nodeType": "Return", + "src": "20492:12:19" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5476, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "20192:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5477, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5464, + "src": "20196:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "20203:6:19", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "20196:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20192:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5504, + "initializationExpression": { + "assignments": [ + 5473 + ], + "declarations": [ + { + "constant": false, + "id": 5473, + "mutability": "mutable", + "name": "i", + "nameLocation": "20185:1:19", + "nodeType": "VariableDeclaration", + "scope": 5504, + "src": "20177:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5472, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20177:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5475, + "initialValue": { + "hexValue": "30", + "id": 5474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20189:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20177:13:19" + }, + "isSimpleCounterLoop": false, + "loopExpression": { + "expression": { + "id": 5482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5480, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "20211:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "30783230", + "id": 5481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20216:4:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "20211:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5483, + "nodeType": "ExpressionStatement", + "src": "20211:9:19" + }, + "nodeType": "ForStatement", + "src": "20172:357:19" + }, + { + "expression": { + "hexValue": "74727565", + "id": 5505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20545:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5468, + "id": 5506, + "nodeType": "Return", + "src": "20538:11:19" + } + ] + }, + "documentation": { + "id": 5462, + "nodeType": "StructuredDocumentation", + "src": "19993:72:19", + "text": " @dev Returns whether the provided byte array is zero." + }, + "id": 5508, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_zeroBytes", + "nameLocation": "20079:10:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5464, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "20103:6:19", + "nodeType": "VariableDeclaration", + "scope": 5508, + "src": "20090:19:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5463, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "20090:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "20089:21:19" + }, + "returnParameters": { + "id": 5468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5467, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5508, + "src": "20133:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5466, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20133:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "20132:6:19" + }, + "scope": 6204, + "src": "20070:486:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5726, + "nodeType": "Block", + "src": "20916:5124:19", + "statements": [ + { + "id": 5725, + "nodeType": "UncheckedBlock", + "src": "20926:5108:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5516, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "21020:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "31", + "id": 5517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21025:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "21020:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5522, + "nodeType": "IfStatement", + "src": "21016:53:19", + "trueBody": { + "id": 5521, + "nodeType": "Block", + "src": "21028:41:19", + "statements": [ + { + "expression": { + "id": 5519, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "21053:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5515, + "id": 5520, + "nodeType": "Return", + "src": "21046:8:19" + } + ] + } + }, + { + "assignments": [ + 5524 + ], + "declarations": [ + { + "constant": false, + "id": 5524, + "mutability": "mutable", + "name": "aa", + "nameLocation": "22004:2:19", + "nodeType": "VariableDeclaration", + "scope": 5725, + "src": "21996:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5523, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21996:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5526, + "initialValue": { + "id": 5525, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "22009:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21996:14:19" + }, + { + "assignments": [ + 5528 + ], + "declarations": [ + { + "constant": false, + "id": 5528, + "mutability": "mutable", + "name": "xn", + "nameLocation": "22032:2:19", + "nodeType": "VariableDeclaration", + "scope": 5725, + "src": "22024:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5527, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22024:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5530, + "initialValue": { + "hexValue": "31", + "id": 5529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22037:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "22024:14:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5531, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22057:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "id": 5534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22064:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 5533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22069:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "22064:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + } + } + ], + "id": 5535, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22063:10:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + } + }, + "src": "22057:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5546, + "nodeType": "IfStatement", + "src": "22053:92:19", + "trueBody": { + "id": 5545, + "nodeType": "Block", + "src": "22075:70:19", + "statements": [ + { + "expression": { + "id": 5539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5537, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22093:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "313238", + "id": 5538, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22100:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "22093:10:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5540, + "nodeType": "ExpressionStatement", + "src": "22093:10:19" + }, + { + "expression": { + "id": 5543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5541, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22121:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "3634", + "id": 5542, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22128:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "22121:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5544, + "nodeType": "ExpressionStatement", + "src": "22121:9:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5547, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22162:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_18446744073709551616_by_1", + "typeString": "int_const 18446744073709551616" + }, + "id": 5550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22169:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3634", + "id": 5549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22174:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "22169:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551616_by_1", + "typeString": "int_const 18446744073709551616" + } + } + ], + "id": 5551, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22168:9:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551616_by_1", + "typeString": "int_const 18446744073709551616" + } + }, + "src": "22162:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5562, + "nodeType": "IfStatement", + "src": "22158:90:19", + "trueBody": { + "id": 5561, + "nodeType": "Block", + "src": "22179:69:19", + "statements": [ + { + "expression": { + "id": 5555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5553, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22197:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "3634", + "id": 5554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22204:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "22197:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5556, + "nodeType": "ExpressionStatement", + "src": "22197:9:19" + }, + { + "expression": { + "id": 5559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5557, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22224:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "3332", + "id": 5558, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22231:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "22224:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5560, + "nodeType": "ExpressionStatement", + "src": "22224:9:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5563, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22265:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_4294967296_by_1", + "typeString": "int_const 4294967296" + }, + "id": 5566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5564, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22272:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3332", + "id": 5565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22277:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "22272:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967296_by_1", + "typeString": "int_const 4294967296" + } + } + ], + "id": 5567, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22271:9:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967296_by_1", + "typeString": "int_const 4294967296" + } + }, + "src": "22265:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5578, + "nodeType": "IfStatement", + "src": "22261:90:19", + "trueBody": { + "id": 5577, + "nodeType": "Block", + "src": "22282:69:19", + "statements": [ + { + "expression": { + "id": 5571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5569, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22300:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "3332", + "id": 5570, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22307:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "22300:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5572, + "nodeType": "ExpressionStatement", + "src": "22300:9:19" + }, + { + "expression": { + "id": 5575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5573, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22327:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "3136", + "id": 5574, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22334:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "22327:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5576, + "nodeType": "ExpressionStatement", + "src": "22327:9:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5579, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22368:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_65536_by_1", + "typeString": "int_const 65536" + }, + "id": 5582, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5580, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22375:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "3136", + "id": 5581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22380:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "22375:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_65536_by_1", + "typeString": "int_const 65536" + } + } + ], + "id": 5583, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22374:9:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_65536_by_1", + "typeString": "int_const 65536" + } + }, + "src": "22368:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5594, + "nodeType": "IfStatement", + "src": "22364:89:19", + "trueBody": { + "id": 5593, + "nodeType": "Block", + "src": "22385:68:19", + "statements": [ + { + "expression": { + "id": 5587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5585, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22403:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "3136", + "id": 5586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22410:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "22403:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5588, + "nodeType": "ExpressionStatement", + "src": "22403:9:19" + }, + { + "expression": { + "id": 5591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5589, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22430:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "38", + "id": 5590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22437:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "22430:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5592, + "nodeType": "ExpressionStatement", + "src": "22430:8:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5595, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22470:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "id": 5598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22477:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "38", + "id": 5597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22482:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "22477:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + } + } + ], + "id": 5599, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22476:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + } + }, + "src": "22470:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5610, + "nodeType": "IfStatement", + "src": "22466:87:19", + "trueBody": { + "id": 5609, + "nodeType": "Block", + "src": "22486:67:19", + "statements": [ + { + "expression": { + "id": 5603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5601, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22504:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "38", + "id": 5602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22511:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "22504:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5604, + "nodeType": "ExpressionStatement", + "src": "22504:8:19" + }, + { + "expression": { + "id": 5607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5605, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22530:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "34", + "id": 5606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22537:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "22530:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5608, + "nodeType": "ExpressionStatement", + "src": "22530:8:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5611, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22570:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "id": 5614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22577:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "34", + "id": 5613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22582:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "22577:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + } + } + ], + "id": 5615, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22576:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + } + }, + "src": "22570:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5626, + "nodeType": "IfStatement", + "src": "22566:87:19", + "trueBody": { + "id": 5625, + "nodeType": "Block", + "src": "22586:67:19", + "statements": [ + { + "expression": { + "id": 5619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5617, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22604:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "hexValue": "34", + "id": 5618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22611:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "22604:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5620, + "nodeType": "ExpressionStatement", + "src": "22604:8:19" + }, + { + "expression": { + "id": 5623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5621, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22630:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "32", + "id": 5622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22637:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "22630:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5624, + "nodeType": "ExpressionStatement", + "src": "22630:8:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5627, + "name": "aa", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "22670:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "id": 5630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22677:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "32", + "id": 5629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22682:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "22677:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + } + } + ], + "id": 5631, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22676:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + } + }, + "src": "22670:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5638, + "nodeType": "IfStatement", + "src": "22666:61:19", + "trueBody": { + "id": 5637, + "nodeType": "Block", + "src": "22686:41:19", + "statements": [ + { + "expression": { + "id": 5635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5633, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "22704:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "<<=", + "rightHandSide": { + "hexValue": "31", + "id": 5634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22711:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "22704:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5636, + "nodeType": "ExpressionStatement", + "src": "22704:8:19" + } + ] + } + }, + { + "expression": { + "id": 5646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5639, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "23147:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "33", + "id": 5640, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23153:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5641, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "23157:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23153:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5643, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "23152:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23164:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "23152:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23147:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5647, + "nodeType": "ExpressionStatement", + "src": "23147:18:19" + }, + { + "expression": { + "id": 5657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5648, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25052:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5649, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25058:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5650, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25063:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5651, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25067:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25063:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25058:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5654, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25057:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25074:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25057:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25052:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5658, + "nodeType": "ExpressionStatement", + "src": "25052:23:19" + }, + { + "expression": { + "id": 5668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5659, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25161:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5660, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25167:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5661, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25172:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5662, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25176:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25172:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25167:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5665, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25166:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25183:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25166:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25161:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5669, + "nodeType": "ExpressionStatement", + "src": "25161:23:19" + }, + { + "expression": { + "id": 5679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5670, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25272:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5671, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25278:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5672, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25283:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5673, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25287:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25283:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25278:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5676, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25277:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5677, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25294:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25277:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25272:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5680, + "nodeType": "ExpressionStatement", + "src": "25272:23:19" + }, + { + "expression": { + "id": 5690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5681, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25381:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5682, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25387:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5683, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25392:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5684, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25396:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25392:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25387:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5687, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25386:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25403:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25386:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25381:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5691, + "nodeType": "ExpressionStatement", + "src": "25381:23:19" + }, + { + "expression": { + "id": 5701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5692, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25491:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5693, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25497:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5694, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25502:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5695, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25506:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25502:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25497:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5698, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25496:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25513:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25496:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25491:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5702, + "nodeType": "ExpressionStatement", + "src": "25491:23:19" + }, + { + "expression": { + "id": 5712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5703, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25601:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5704, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25607:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5705, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "25612:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5706, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25616:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25612:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25607:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5709, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25606:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 5710, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25623:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25606:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25601:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5713, + "nodeType": "ExpressionStatement", + "src": "25601:23:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5714, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "25990:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5717, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "26011:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5718, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5511, + "src": "26016:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 5719, + "name": "xn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5528, + "src": "26020:2:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26016:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26011:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5715, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "25995:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26004:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "25995:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "25995:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25990:33:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5515, + "id": 5724, + "nodeType": "Return", + "src": "25983:40:19" + } + ] + } + ] + }, + "documentation": { + "id": 5509, + "nodeType": "StructuredDocumentation", + "src": "20562:292:19", + "text": " @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n towards zero.\n This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n using integer operations." + }, + "id": 5727, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sqrt", + "nameLocation": "20868:4:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5512, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5511, + "mutability": "mutable", + "name": "a", + "nameLocation": "20881:1:19", + "nodeType": "VariableDeclaration", + "scope": 5727, + "src": "20873:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5510, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20873:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "20872:11:19" + }, + "returnParameters": { + "id": 5515, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5514, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5727, + "src": "20907:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5513, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20907:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "20906:9:19" + }, + "scope": 6204, + "src": "20859:5181:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5760, + "nodeType": "Block", + "src": "26213:171:19", + "statements": [ + { + "id": 5759, + "nodeType": "UncheckedBlock", + "src": "26223:155:19", + "statements": [ + { + "assignments": [ + 5739 + ], + "declarations": [ + { + "constant": false, + "id": 5739, + "mutability": "mutable", + "name": "result", + "nameLocation": "26255:6:19", + "nodeType": "VariableDeclaration", + "scope": 5759, + "src": "26247:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5738, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26247:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5743, + "initialValue": { + "arguments": [ + { + "id": 5741, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5730, + "src": "26269:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5740, + "name": "sqrt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5727, + 5761 + ], + "referencedDeclaration": 5727, + "src": "26264:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26264:7:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26247:24:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5744, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5739, + "src": "26292:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5748, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5733, + "src": "26334:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 5747, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "26317:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 5749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26317:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5750, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5739, + "src": "26347:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 5751, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5739, + "src": "26356:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26347:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5753, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5730, + "src": "26365:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26347:19:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26317:49:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5745, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "26301:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26310:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "26301:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26301:66:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26292:75:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5737, + "id": 5758, + "nodeType": "Return", + "src": "26285:82:19" + } + ] + } + ] + }, + "documentation": { + "id": 5728, + "nodeType": "StructuredDocumentation", + "src": "26046:86:19", + "text": " @dev Calculates sqrt(a), following the selected rounding direction." + }, + "id": 5761, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sqrt", + "nameLocation": "26146:4:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5734, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5730, + "mutability": "mutable", + "name": "a", + "nameLocation": "26159:1:19", + "nodeType": "VariableDeclaration", + "scope": 5761, + "src": "26151:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5729, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26151:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5733, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "26171:8:19", + "nodeType": "VariableDeclaration", + "scope": 5761, + "src": "26162:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 5732, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5731, + "name": "Rounding", + "nameLocations": [ + "26162:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "26162:8:19" + }, + "referencedDeclaration": 4559, + "src": "26162:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "26150:30:19" + }, + "returnParameters": { + "id": 5737, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5736, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5761, + "src": "26204:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26204:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "26203:9:19" + }, + "scope": 6204, + "src": "26137:247:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5851, + "nodeType": "Block", + "src": "26573:2359:19", + "statements": [ + { + "expression": { + "id": 5778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5769, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26655:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5772, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "26675:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666666666666666666666666666666666666666666666666666666666666666", + "id": 5773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26679:34:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211455_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1455" + }, + "value": "0xffffffffffffffffffffffffffffffff" + }, + "src": "26675:38:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5770, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "26659:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26668:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "26659:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26659:55:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "37", + "id": 5776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26718:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "src": "26659:60:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26655:64:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5779, + "nodeType": "ExpressionStatement", + "src": "26655:64:19" + }, + { + "expression": { + "id": 5792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5780, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26795:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5783, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "26817:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5784, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26822:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26817:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5786, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26816:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866666666666666666666666666666666", + "id": 5787, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26827:18:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551615_by_1", + "typeString": "int_const 18446744073709551615" + }, + "value": "0xffffffffffffffff" + }, + "src": "26816:29:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5781, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "26800:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26809:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "26800:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26800:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "36", + "id": 5790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26850:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_6_by_1", + "typeString": "int_const 6" + }, + "value": "6" + }, + "src": "26800:51:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26795:56:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5793, + "nodeType": "ExpressionStatement", + "src": "26795:56:19" + }, + { + "expression": { + "id": 5806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5794, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26926:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5797, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "26948:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5798, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "26953:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26948:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5800, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26947:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666666666666666", + "id": 5801, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26958:10:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967295_by_1", + "typeString": "int_const 4294967295" + }, + "value": "0xffffffff" + }, + "src": "26947:21:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5795, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "26931:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "26940:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "26931:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26931:38:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "35", + "id": 5804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26973:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "26931:43:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26926:48:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5807, + "nodeType": "ExpressionStatement", + "src": "26926:48:19" + }, + { + "expression": { + "id": 5820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5808, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27049:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5811, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "27071:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5812, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27076:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27071:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5814, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "27070:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866666666", + "id": 5815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27081:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_65535_by_1", + "typeString": "int_const 65535" + }, + "value": "0xffff" + }, + "src": "27070:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5809, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "27054:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "27063:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "27054:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27054:34:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "34", + "id": 5818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27092:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "27054:39:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27049:44:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5821, + "nodeType": "ExpressionStatement", + "src": "27049:44:19" + }, + { + "expression": { + "id": 5834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5822, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27166:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5825, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "27188:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5826, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27193:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27188:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5828, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "27187:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666", + "id": 5829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27198:4:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0xff" + }, + "src": "27187:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5823, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "27171:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "27180:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "27171:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27171:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "33", + "id": 5832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27207:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "27171:37:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27166:42:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5835, + "nodeType": "ExpressionStatement", + "src": "27166:42:19" + }, + { + "expression": { + "id": 5848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5836, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27280:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5839, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5764, + "src": "27302:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 5840, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "27307:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27302:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5842, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "27301:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866", + "id": 5843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27312:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0xf" + }, + "src": "27301:14:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5837, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "27285:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "27294:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "27285:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27285:31:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "32", + "id": 5846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27320:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "27285:36:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27280:41:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5849, + "nodeType": "ExpressionStatement", + "src": "27280:41:19" + }, + { + "AST": { + "nativeSrc": "28807:119:19", + "nodeType": "YulBlock", + "src": "28807:119:19", + "statements": [ + { + "nativeSrc": "28821:95:19", + "nodeType": "YulAssignment", + "src": "28821:95:19", + "value": { + "arguments": [ + { + "name": "r", + "nativeSrc": "28829:1:19", + "nodeType": "YulIdentifier", + "src": "28829:1:19" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "r", + "nativeSrc": "28841:1:19", + "nodeType": "YulIdentifier", + "src": "28841:1:19" + }, + { + "name": "x", + "nativeSrc": "28844:1:19", + "nodeType": "YulIdentifier", + "src": "28844:1:19" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "28837:3:19", + "nodeType": "YulIdentifier", + "src": "28837:3:19" + }, + "nativeSrc": "28837:9:19", + "nodeType": "YulFunctionCall", + "src": "28837:9:19" + }, + { + "kind": "number", + "nativeSrc": "28848:66:19", + "nodeType": "YulLiteral", + "src": "28848:66:19", + "type": "", + "value": "0x0000010102020202030303030303030300000000000000000000000000000000" + } + ], + "functionName": { + "name": "byte", + "nativeSrc": "28832:4:19", + "nodeType": "YulIdentifier", + "src": "28832:4:19" + }, + "nativeSrc": "28832:83:19", + "nodeType": "YulFunctionCall", + "src": "28832:83:19" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "28826:2:19", + "nodeType": "YulIdentifier", + "src": "28826:2:19" + }, + "nativeSrc": "28826:90:19", + "nodeType": "YulFunctionCall", + "src": "28826:90:19" + }, + "variableNames": [ + { + "name": "r", + "nativeSrc": "28821:1:19", + "nodeType": "YulIdentifier", + "src": "28821:1:19" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 5767, + "isOffset": false, + "isSlot": false, + "src": "28821:1:19", + "valueSize": 1 + }, + { + "declaration": 5767, + "isOffset": false, + "isSlot": false, + "src": "28829:1:19", + "valueSize": 1 + }, + { + "declaration": 5767, + "isOffset": false, + "isSlot": false, + "src": "28841:1:19", + "valueSize": 1 + }, + { + "declaration": 5764, + "isOffset": false, + "isSlot": false, + "src": "28844:1:19", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 5850, + "nodeType": "InlineAssembly", + "src": "28782:144:19" + } + ] + }, + "documentation": { + "id": 5762, + "nodeType": "StructuredDocumentation", + "src": "26390:119:19", + "text": " @dev Return the log in base 2 of a positive value rounded towards zero.\n Returns 0 if given 0." + }, + "id": 5852, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log2", + "nameLocation": "26523:4:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5765, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5764, + "mutability": "mutable", + "name": "x", + "nameLocation": "26536:1:19", + "nodeType": "VariableDeclaration", + "scope": 5852, + "src": "26528:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5763, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26528:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "26527:11:19" + }, + "returnParameters": { + "id": 5768, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5767, + "mutability": "mutable", + "name": "r", + "nameLocation": "26570:1:19", + "nodeType": "VariableDeclaration", + "scope": 5852, + "src": "26562:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5766, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26562:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "26561:11:19" + }, + "scope": 6204, + "src": "26514:2418:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5885, + "nodeType": "Block", + "src": "29165:175:19", + "statements": [ + { + "id": 5884, + "nodeType": "UncheckedBlock", + "src": "29175:159:19", + "statements": [ + { + "assignments": [ + 5864 + ], + "declarations": [ + { + "constant": false, + "id": 5864, + "mutability": "mutable", + "name": "result", + "nameLocation": "29207:6:19", + "nodeType": "VariableDeclaration", + "scope": 5884, + "src": "29199:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29199:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5868, + "initialValue": { + "arguments": [ + { + "id": 5866, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5855, + "src": "29221:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5865, + "name": "log2", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5852, + 5886 + ], + "referencedDeclaration": 5852, + "src": "29216:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29216:11:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "29199:28:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5869, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5864, + "src": "29248:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5873, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5858, + "src": "29290:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 5872, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "29273:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 5874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29273:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 5875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29303:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "id": 5876, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5864, + "src": "29308:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29303:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5878, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5855, + "src": "29317:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29303:19:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "29273:49:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 5870, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "29257:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 5871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "29266:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "29257:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 5881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29257:66:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29248:75:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5862, + "id": 5883, + "nodeType": "Return", + "src": "29241:82:19" + } + ] + } + ] + }, + "documentation": { + "id": 5853, + "nodeType": "StructuredDocumentation", + "src": "28938:142:19", + "text": " @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n Returns 0 if given 0." + }, + "id": 5886, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log2", + "nameLocation": "29094:4:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5855, + "mutability": "mutable", + "name": "value", + "nameLocation": "29107:5:19", + "nodeType": "VariableDeclaration", + "scope": 5886, + "src": "29099:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5854, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29099:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5858, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "29123:8:19", + "nodeType": "VariableDeclaration", + "scope": 5886, + "src": "29114:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 5857, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5856, + "name": "Rounding", + "nameLocations": [ + "29114:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "29114:8:19" + }, + "referencedDeclaration": 4559, + "src": "29114:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "29098:34:19" + }, + "returnParameters": { + "id": 5862, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5861, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5886, + "src": "29156:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5860, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29156:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29155:9:19" + }, + "scope": 6204, + "src": "29085:255:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6014, + "nodeType": "Block", + "src": "29533:854:19", + "statements": [ + { + "assignments": [ + 5895 + ], + "declarations": [ + { + "constant": false, + "id": 5895, + "mutability": "mutable", + "name": "result", + "nameLocation": "29551:6:19", + "nodeType": "VariableDeclaration", + "scope": 6014, + "src": "29543:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5894, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29543:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5897, + "initialValue": { + "hexValue": "30", + "id": 5896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29560:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "29543:18:19" + }, + { + "id": 6011, + "nodeType": "UncheckedBlock", + "src": "29571:787:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5898, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29599:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(57 digits omitted)...0000" + }, + "id": 5901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29608:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3634", + "id": 5900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29614:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "29608:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(57 digits omitted)...0000" + } + }, + "src": "29599:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5914, + "nodeType": "IfStatement", + "src": "29595:103:19", + "trueBody": { + "id": 5913, + "nodeType": "Block", + "src": "29618:80:19", + "statements": [ + { + "expression": { + "id": 5907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5903, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29636:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(57 digits omitted)...0000" + }, + "id": 5906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29645:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3634", + "id": 5905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29651:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "29645:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000000000000000000000000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(57 digits omitted)...0000" + } + }, + "src": "29636:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5908, + "nodeType": "ExpressionStatement", + "src": "29636:17:19" + }, + { + "expression": { + "id": 5911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5909, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "29671:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "3634", + "id": 5910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29681:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "29671:12:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5912, + "nodeType": "ExpressionStatement", + "src": "29671:12:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5915, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29715:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(25 digits omitted)...0000" + }, + "id": 5918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29724:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3332", + "id": 5917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29730:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "29724:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(25 digits omitted)...0000" + } + }, + "src": "29715:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5931, + "nodeType": "IfStatement", + "src": "29711:103:19", + "trueBody": { + "id": 5930, + "nodeType": "Block", + "src": "29734:80:19", + "statements": [ + { + "expression": { + "id": 5924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5920, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29752:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(25 digits omitted)...0000" + }, + "id": 5923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29761:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3332", + "id": 5922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29767:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "29761:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(25 digits omitted)...0000" + } + }, + "src": "29752:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5925, + "nodeType": "ExpressionStatement", + "src": "29752:17:19" + }, + { + "expression": { + "id": 5928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5926, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "29787:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "3332", + "id": 5927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29797:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "29787:12:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5929, + "nodeType": "ExpressionStatement", + "src": "29787:12:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5932, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29831:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_10000000000000000_by_1", + "typeString": "int_const 10000000000000000" + }, + "id": 5935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5933, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29840:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3136", + "id": 5934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29846:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "29840:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000000000_by_1", + "typeString": "int_const 10000000000000000" + } + }, + "src": "29831:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5948, + "nodeType": "IfStatement", + "src": "29827:103:19", + "trueBody": { + "id": 5947, + "nodeType": "Block", + "src": "29850:80:19", + "statements": [ + { + "expression": { + "id": 5941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5937, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29868:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_10000000000000000_by_1", + "typeString": "int_const 10000000000000000" + }, + "id": 5940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29877:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "3136", + "id": 5939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29883:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "29877:8:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000000000_by_1", + "typeString": "int_const 10000000000000000" + } + }, + "src": "29868:17:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5942, + "nodeType": "ExpressionStatement", + "src": "29868:17:19" + }, + { + "expression": { + "id": 5945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5943, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "29903:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "3136", + "id": 5944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29913:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "src": "29903:12:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5946, + "nodeType": "ExpressionStatement", + "src": "29903:12:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5949, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29947:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "id": 5952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5950, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29956:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "38", + "id": 5951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29962:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "29956:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + } + }, + "src": "29947:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5965, + "nodeType": "IfStatement", + "src": "29943:100:19", + "trueBody": { + "id": 5964, + "nodeType": "Block", + "src": "29965:78:19", + "statements": [ + { + "expression": { + "id": 5958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5954, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "29983:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + }, + "id": 5957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29992:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "38", + "id": 5956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29998:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "29992:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000_by_1", + "typeString": "int_const 100000000" + } + }, + "src": "29983:16:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5959, + "nodeType": "ExpressionStatement", + "src": "29983:16:19" + }, + { + "expression": { + "id": 5962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5960, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30017:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "38", + "id": 5961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30027:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "30017:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5963, + "nodeType": "ExpressionStatement", + "src": "30017:11:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5966, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30060:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "id": 5969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30069:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "34", + "id": 5968, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30075:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "30069:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + }, + "src": "30060:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5982, + "nodeType": "IfStatement", + "src": "30056:100:19", + "trueBody": { + "id": 5981, + "nodeType": "Block", + "src": "30078:78:19", + "statements": [ + { + "expression": { + "id": 5975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5971, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30096:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "id": 5974, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30105:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "34", + "id": 5973, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30111:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "30105:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + } + }, + "src": "30096:16:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5976, + "nodeType": "ExpressionStatement", + "src": "30096:16:19" + }, + { + "expression": { + "id": 5979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5977, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30130:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "34", + "id": 5978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30140:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "30130:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5980, + "nodeType": "ExpressionStatement", + "src": "30130:11:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5983, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30173:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "id": 5986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5984, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30182:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "32", + "id": 5985, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30188:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "30182:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + } + }, + "src": "30173:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5999, + "nodeType": "IfStatement", + "src": "30169:100:19", + "trueBody": { + "id": 5998, + "nodeType": "Block", + "src": "30191:78:19", + "statements": [ + { + "expression": { + "id": 5992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5988, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30209:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "id": 5991, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 5989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30218:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "32", + "id": 5990, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30224:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "30218:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + } + }, + "src": "30209:16:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5993, + "nodeType": "ExpressionStatement", + "src": "30209:16:19" + }, + { + "expression": { + "id": 5996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5994, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30243:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "32", + "id": 5995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30253:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "30243:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5997, + "nodeType": "ExpressionStatement", + "src": "30243:11:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6000, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "30286:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "id": 6003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 6001, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30295:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "hexValue": "31", + "id": 6002, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30301:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "30295:7:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + } + }, + "src": "30286:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6010, + "nodeType": "IfStatement", + "src": "30282:66:19", + "trueBody": { + "id": 6009, + "nodeType": "Block", + "src": "30304:44:19", + "statements": [ + { + "expression": { + "id": 6007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6005, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30322:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 6006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30332:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "30322:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6008, + "nodeType": "ExpressionStatement", + "src": "30322:11:19" + } + ] + } + } + ] + }, + { + "expression": { + "id": 6012, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "30374:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5893, + "id": 6013, + "nodeType": "Return", + "src": "30367:13:19" + } + ] + }, + "documentation": { + "id": 5887, + "nodeType": "StructuredDocumentation", + "src": "29346:120:19", + "text": " @dev Return the log in base 10 of a positive value rounded towards zero.\n Returns 0 if given 0." + }, + "id": 6015, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log10", + "nameLocation": "29480:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5889, + "mutability": "mutable", + "name": "value", + "nameLocation": "29494:5:19", + "nodeType": "VariableDeclaration", + "scope": 6015, + "src": "29486:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29486:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29485:15:19" + }, + "returnParameters": { + "id": 5893, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5892, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6015, + "src": "29524:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5891, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29524:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29523:9:19" + }, + "scope": 6204, + "src": "29471:916:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6048, + "nodeType": "Block", + "src": "30622:177:19", + "statements": [ + { + "id": 6047, + "nodeType": "UncheckedBlock", + "src": "30632:161:19", + "statements": [ + { + "assignments": [ + 6027 + ], + "declarations": [ + { + "constant": false, + "id": 6027, + "mutability": "mutable", + "name": "result", + "nameLocation": "30664:6:19", + "nodeType": "VariableDeclaration", + "scope": 6047, + "src": "30656:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30656:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6031, + "initialValue": { + "arguments": [ + { + "id": 6029, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6018, + "src": "30679:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6028, + "name": "log10", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6015, + 6049 + ], + "referencedDeclaration": 6015, + "src": "30673:5:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30673:12:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30656:29:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6032, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6027, + "src": "30706:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6036, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6021, + "src": "30748:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 6035, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "30731:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 6037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30731:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 6038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30761:2:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "id": 6039, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6027, + "src": "30767:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30761:12:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6041, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6018, + "src": "30776:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30761:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "30731:50:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6033, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "30715:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "30724:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "30715:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30715:67:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30706:76:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6025, + "id": 6046, + "nodeType": "Return", + "src": "30699:83:19" + } + ] + } + ] + }, + "documentation": { + "id": 6016, + "nodeType": "StructuredDocumentation", + "src": "30393:143:19", + "text": " @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n Returns 0 if given 0." + }, + "id": 6049, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log10", + "nameLocation": "30550:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6018, + "mutability": "mutable", + "name": "value", + "nameLocation": "30564:5:19", + "nodeType": "VariableDeclaration", + "scope": 6049, + "src": "30556:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30556:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6021, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "30580:8:19", + "nodeType": "VariableDeclaration", + "scope": 6049, + "src": "30571:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 6020, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6019, + "name": "Rounding", + "nameLocations": [ + "30571:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "30571:8:19" + }, + "referencedDeclaration": 4559, + "src": "30571:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "30555:34:19" + }, + "returnParameters": { + "id": 6025, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6024, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6049, + "src": "30613:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30613:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30612:9:19" + }, + "scope": 6204, + "src": "30541:258:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6125, + "nodeType": "Block", + "src": "31117:675:19", + "statements": [ + { + "expression": { + "id": 6066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6057, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31199:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6060, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31219:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666666666666666666666666666666666666666666666666666666666666666", + "id": 6061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31223:34:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211455_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1455" + }, + "value": "0xffffffffffffffffffffffffffffffff" + }, + "src": "31219:38:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6058, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31203:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31212:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31203:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31203:55:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "37", + "id": 6064, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31262:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "src": "31203:60:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31199:64:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6067, + "nodeType": "ExpressionStatement", + "src": "31199:64:19" + }, + { + "expression": { + "id": 6080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6068, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31339:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6071, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31361:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 6072, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31366:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31361:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6074, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31360:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866666666666666666666666666666666", + "id": 6075, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31371:18:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_18446744073709551615_by_1", + "typeString": "int_const 18446744073709551615" + }, + "value": "0xffffffffffffffff" + }, + "src": "31360:29:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6069, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31344:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31353:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31344:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31344:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "36", + "id": 6078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31394:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_6_by_1", + "typeString": "int_const 6" + }, + "value": "6" + }, + "src": "31344:51:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31339:56:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6081, + "nodeType": "ExpressionStatement", + "src": "31339:56:19" + }, + { + "expression": { + "id": 6094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6082, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31470:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6085, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31492:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 6086, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31497:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31492:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6088, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31491:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666666666666666", + "id": 6089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31502:10:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4294967295_by_1", + "typeString": "int_const 4294967295" + }, + "value": "0xffffffff" + }, + "src": "31491:21:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6083, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31475:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31484:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31475:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31475:38:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "35", + "id": 6092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31517:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "31475:43:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31470:48:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6095, + "nodeType": "ExpressionStatement", + "src": "31470:48:19" + }, + { + "expression": { + "id": 6108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6096, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31593:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6099, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31615:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 6100, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31620:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31615:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6102, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31614:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "307866666666", + "id": 6103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31625:6:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_65535_by_1", + "typeString": "int_const 65535" + }, + "value": "0xffff" + }, + "src": "31614:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6097, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31598:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31607:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31598:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31598:34:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "34", + "id": 6106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31636:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "31598:39:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31593:44:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6109, + "nodeType": "ExpressionStatement", + "src": "31593:44:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6110, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31743:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "33", + "id": 6111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31748:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "31743:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6113, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31742:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6116, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6052, + "src": "31770:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "id": 6117, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6055, + "src": "31775:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31770:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6119, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31769:8:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30786666", + "id": 6120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31780:4:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "0xff" + }, + "src": "31769:15:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6114, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "31753:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "31762:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "31753:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31753:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31742:43:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6056, + "id": 6124, + "nodeType": "Return", + "src": "31735:50:19" + } + ] + }, + "documentation": { + "id": 6050, + "nodeType": "StructuredDocumentation", + "src": "30805:246:19", + "text": " @dev Return the log in base 256 of a positive value rounded towards zero.\n Returns 0 if given 0.\n Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string." + }, + "id": 6126, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log256", + "nameLocation": "31065:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6052, + "mutability": "mutable", + "name": "x", + "nameLocation": "31080:1:19", + "nodeType": "VariableDeclaration", + "scope": 6126, + "src": "31072:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31072:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31071:11:19" + }, + "returnParameters": { + "id": 6056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6055, + "mutability": "mutable", + "name": "r", + "nameLocation": "31114:1:19", + "nodeType": "VariableDeclaration", + "scope": 6126, + "src": "31106:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6054, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31106:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31105:11:19" + }, + "scope": 6204, + "src": "31056:736:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6162, + "nodeType": "Block", + "src": "32029:184:19", + "statements": [ + { + "id": 6161, + "nodeType": "UncheckedBlock", + "src": "32039:168:19", + "statements": [ + { + "assignments": [ + 6138 + ], + "declarations": [ + { + "constant": false, + "id": 6138, + "mutability": "mutable", + "name": "result", + "nameLocation": "32071:6:19", + "nodeType": "VariableDeclaration", + "scope": 6161, + "src": "32063:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6137, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32063:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6142, + "initialValue": { + "arguments": [ + { + "id": 6140, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "32087:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6139, + "name": "log256", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6126, + 6163 + ], + "referencedDeclaration": 6126, + "src": "32080:6:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32080:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32063:30:19" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6143, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6138, + "src": "32114:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6147, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6132, + "src": "32156:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 6146, + "name": "unsignedRoundsUp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6182, + "src": "32139:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_enum$_Rounding_$4559_$returns$_t_bool_$", + "typeString": "function (enum Math.Rounding) pure returns (bool)" + } + }, + "id": 6148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32139:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 6149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32169:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6150, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6138, + "src": "32175:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "33", + "id": 6151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32185:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "32175:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6153, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "32174:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32169:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "32190:5:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32169:26:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "32139:56:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 6144, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "32123:8:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 6145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "32132:6:19", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "32123:15:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 6158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32123:73:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32114:82:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6136, + "id": 6160, + "nodeType": "Return", + "src": "32107:89:19" + } + ] + } + ] + }, + "documentation": { + "id": 6127, + "nodeType": "StructuredDocumentation", + "src": "31798:144:19", + "text": " @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n Returns 0 if given 0." + }, + "id": 6163, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "log256", + "nameLocation": "31956:6:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6129, + "mutability": "mutable", + "name": "value", + "nameLocation": "31971:5:19", + "nodeType": "VariableDeclaration", + "scope": 6163, + "src": "31963:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6128, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31963:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6132, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "31987:8:19", + "nodeType": "VariableDeclaration", + "scope": 6163, + "src": "31978:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 6131, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6130, + "name": "Rounding", + "nameLocations": [ + "31978:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "31978:8:19" + }, + "referencedDeclaration": 4559, + "src": "31978:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "31962:34:19" + }, + "returnParameters": { + "id": 6136, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6135, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6163, + "src": "32020:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32020:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32019:9:19" + }, + "scope": 6204, + "src": "31947:266:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6181, + "nodeType": "Block", + "src": "32411:48:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6174, + "name": "rounding", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6167, + "src": "32434:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + ], + "id": 6173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32428:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 6172, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "32428:5:19", + "typeDescriptions": {} + } + }, + "id": 6175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32428:15:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "hexValue": "32", + "id": 6176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32446:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "32428:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "31", + "id": 6178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32451:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "32428:24:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 6171, + "id": 6180, + "nodeType": "Return", + "src": "32421:31:19" + } + ] + }, + "documentation": { + "id": 6164, + "nodeType": "StructuredDocumentation", + "src": "32219:113:19", + "text": " @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers." + }, + "id": 6182, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unsignedRoundsUp", + "nameLocation": "32346:16:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6167, + "mutability": "mutable", + "name": "rounding", + "nameLocation": "32372:8:19", + "nodeType": "VariableDeclaration", + "scope": 6182, + "src": "32363:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + }, + "typeName": { + "id": 6166, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6165, + "name": "Rounding", + "nameLocations": [ + "32363:8:19" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4559, + "src": "32363:8:19" + }, + "referencedDeclaration": 4559, + "src": "32363:8:19", + "typeDescriptions": { + "typeIdentifier": "t_enum$_Rounding_$4559", + "typeString": "enum Math.Rounding" + } + }, + "visibility": "internal" + } + ], + "src": "32362:19:19" + }, + "returnParameters": { + "id": 6171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6170, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6182, + "src": "32405:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6169, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "32405:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "32404:6:19" + }, + "scope": 6204, + "src": "32337:122:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6202, + "nodeType": "Block", + "src": "32602:59:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6191, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6185, + "src": "32627:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32632:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "32627:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "323536", + "id": 6194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32635:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "323535", + "id": 6195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32640:3:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 6197, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6185, + "src": "32651:1:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6196, + "name": "log2", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5852, + 5886 + ], + "referencedDeclaration": 5852, + "src": "32646:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32646:7:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32640:13:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6190, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4836, + "src": "32619:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (bool,uint256,uint256) pure returns (uint256)" + } + }, + "id": 6200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32619:35:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6189, + "id": 6201, + "nodeType": "Return", + "src": "32612:42:19" + } + ] + }, + "documentation": { + "id": 6183, + "nodeType": "StructuredDocumentation", + "src": "32465:76:19", + "text": " @dev Counts the number of leading zero bits in a uint256." + }, + "id": 6203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "clz", + "nameLocation": "32555:3:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6186, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6185, + "mutability": "mutable", + "name": "x", + "nameLocation": "32567:1:19", + "nodeType": "VariableDeclaration", + "scope": 6203, + "src": "32559:9:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6184, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32559:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32558:11:19" + }, + "returnParameters": { + "id": 6189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6188, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6203, + "src": "32593:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32593:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32592:9:19" + }, + "scope": 6204, + "src": "32546:115:19", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 6205, + "src": "281:32382:19", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "103:32561:19" + }, + "id": 19 + }, + "@openzeppelin/contracts/utils/math/SafeCast.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol", + "exportedSymbols": { + "SafeCast": [ + 7969 + ] + }, + "id": 7970, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6206, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "192:24:20" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SafeCast", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 6207, + "nodeType": "StructuredDocumentation", + "src": "218:550:20", + "text": " @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n checks.\n Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n easily result in undesired exploitation or bugs, since developers usually\n assume that overflows raise errors. `SafeCast` restores this intuition by\n reverting the transaction when such an operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always." + }, + "fullyImplemented": true, + "id": 7969, + "linearizedBaseContracts": [ + 7969 + ], + "name": "SafeCast", + "nameLocation": "777:8:20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 6208, + "nodeType": "StructuredDocumentation", + "src": "792:67:20", + "text": " @dev Value doesn't fit in a uint of `bits` size." + }, + "errorSelector": "6dfcc650", + "id": 6214, + "name": "SafeCastOverflowedUintDowncast", + "nameLocation": "870:30:20", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6210, + "mutability": "mutable", + "name": "bits", + "nameLocation": "907:4:20", + "nodeType": "VariableDeclaration", + "scope": 6214, + "src": "901:10:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6209, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "901:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "value", + "nameLocation": "921:5:20", + "nodeType": "VariableDeclaration", + "scope": 6214, + "src": "913:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6211, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "913:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "900:27:20" + }, + "src": "864:64:20" + }, + { + "documentation": { + "id": 6215, + "nodeType": "StructuredDocumentation", + "src": "934:74:20", + "text": " @dev An int value doesn't fit in a uint of `bits` size." + }, + "errorSelector": "a8ce4432", + "id": 6219, + "name": "SafeCastOverflowedIntToUint", + "nameLocation": "1019:27:20", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6217, + "mutability": "mutable", + "name": "value", + "nameLocation": "1054:5:20", + "nodeType": "VariableDeclaration", + "scope": 6219, + "src": "1047:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 6216, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1047:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1046:14:20" + }, + "src": "1013:48:20" + }, + { + "documentation": { + "id": 6220, + "nodeType": "StructuredDocumentation", + "src": "1067:67:20", + "text": " @dev Value doesn't fit in an int of `bits` size." + }, + "errorSelector": "327269a7", + "id": 6226, + "name": "SafeCastOverflowedIntDowncast", + "nameLocation": "1145:29:20", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6222, + "mutability": "mutable", + "name": "bits", + "nameLocation": "1181:4:20", + "nodeType": "VariableDeclaration", + "scope": 6226, + "src": "1175:10:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6221, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1175:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6224, + "mutability": "mutable", + "name": "value", + "nameLocation": "1194:5:20", + "nodeType": "VariableDeclaration", + "scope": 6226, + "src": "1187:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 6223, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1187:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1174:26:20" + }, + "src": "1139:62:20" + }, + { + "documentation": { + "id": 6227, + "nodeType": "StructuredDocumentation", + "src": "1207:74:20", + "text": " @dev A uint value doesn't fit in an int of `bits` size." + }, + "errorSelector": "24775e06", + "id": 6231, + "name": "SafeCastOverflowedUintToInt", + "nameLocation": "1292:27:20", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6229, + "mutability": "mutable", + "name": "value", + "nameLocation": "1328:5:20", + "nodeType": "VariableDeclaration", + "scope": 6231, + "src": "1320:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1320:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1319:15:20" + }, + "src": "1286:49:20" + }, + { + "body": { + "id": 6258, + "nodeType": "Block", + "src": "1692:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6239, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6234, + "src": "1706:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1719:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint248_$", + "typeString": "type(uint248)" + }, + "typeName": { + "id": 6241, + "name": "uint248", + "nodeType": "ElementaryTypeName", + "src": "1719:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint248_$", + "typeString": "type(uint248)" + } + ], + "id": 6240, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1714:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1714:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint248", + "typeString": "type(uint248)" + } + }, + "id": 6244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1728:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "1714:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint248", + "typeString": "uint248" + } + }, + "src": "1706:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6252, + "nodeType": "IfStatement", + "src": "1702:105:20", + "trueBody": { + "id": 6251, + "nodeType": "Block", + "src": "1733:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323438", + "id": 6247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1785:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_248_by_1", + "typeString": "int_const 248" + }, + "value": "248" + }, + { + "id": 6248, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6234, + "src": "1790:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_248_by_1", + "typeString": "int_const 248" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6246, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "1754:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1754:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6250, + "nodeType": "RevertStatement", + "src": "1747:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6255, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6234, + "src": "1831:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1823:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint248_$", + "typeString": "type(uint248)" + }, + "typeName": { + "id": 6253, + "name": "uint248", + "nodeType": "ElementaryTypeName", + "src": "1823:7:20", + "typeDescriptions": {} + } + }, + "id": 6256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1823:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint248", + "typeString": "uint248" + } + }, + "functionReturnParameters": 6238, + "id": 6257, + "nodeType": "Return", + "src": "1816:21:20" + } + ] + }, + "documentation": { + "id": 6232, + "nodeType": "StructuredDocumentation", + "src": "1341:280:20", + "text": " @dev Returns the downcasted uint248 from uint256, reverting on\n overflow (when the input is greater than largest uint248).\n Counterpart to Solidity's `uint248` operator.\n Requirements:\n - input must fit into 248 bits" + }, + "id": 6259, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint248", + "nameLocation": "1635:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6235, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6234, + "mutability": "mutable", + "name": "value", + "nameLocation": "1653:5:20", + "nodeType": "VariableDeclaration", + "scope": 6259, + "src": "1645:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6233, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1645:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1644:15:20" + }, + "returnParameters": { + "id": 6238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6237, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6259, + "src": "1683:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint248", + "typeString": "uint248" + }, + "typeName": { + "id": 6236, + "name": "uint248", + "nodeType": "ElementaryTypeName", + "src": "1683:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint248", + "typeString": "uint248" + } + }, + "visibility": "internal" + } + ], + "src": "1682:9:20" + }, + "scope": 7969, + "src": "1626:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6286, + "nodeType": "Block", + "src": "2201:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6267, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6262, + "src": "2215:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2228:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint240_$", + "typeString": "type(uint240)" + }, + "typeName": { + "id": 6269, + "name": "uint240", + "nodeType": "ElementaryTypeName", + "src": "2228:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint240_$", + "typeString": "type(uint240)" + } + ], + "id": 6268, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "2223:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2223:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint240", + "typeString": "type(uint240)" + } + }, + "id": 6272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2237:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "2223:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint240", + "typeString": "uint240" + } + }, + "src": "2215:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6280, + "nodeType": "IfStatement", + "src": "2211:105:20", + "trueBody": { + "id": 6279, + "nodeType": "Block", + "src": "2242:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323430", + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2294:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_240_by_1", + "typeString": "int_const 240" + }, + "value": "240" + }, + { + "id": 6276, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6262, + "src": "2299:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_240_by_1", + "typeString": "int_const 240" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6274, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "2263:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2263:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6278, + "nodeType": "RevertStatement", + "src": "2256:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6283, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6262, + "src": "2340:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2332:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint240_$", + "typeString": "type(uint240)" + }, + "typeName": { + "id": 6281, + "name": "uint240", + "nodeType": "ElementaryTypeName", + "src": "2332:7:20", + "typeDescriptions": {} + } + }, + "id": 6284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2332:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint240", + "typeString": "uint240" + } + }, + "functionReturnParameters": 6266, + "id": 6285, + "nodeType": "Return", + "src": "2325:21:20" + } + ] + }, + "documentation": { + "id": 6260, + "nodeType": "StructuredDocumentation", + "src": "1850:280:20", + "text": " @dev Returns the downcasted uint240 from uint256, reverting on\n overflow (when the input is greater than largest uint240).\n Counterpart to Solidity's `uint240` operator.\n Requirements:\n - input must fit into 240 bits" + }, + "id": 6287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint240", + "nameLocation": "2144:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6262, + "mutability": "mutable", + "name": "value", + "nameLocation": "2162:5:20", + "nodeType": "VariableDeclaration", + "scope": 6287, + "src": "2154:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2154:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2153:15:20" + }, + "returnParameters": { + "id": 6266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6265, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6287, + "src": "2192:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint240", + "typeString": "uint240" + }, + "typeName": { + "id": 6264, + "name": "uint240", + "nodeType": "ElementaryTypeName", + "src": "2192:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint240", + "typeString": "uint240" + } + }, + "visibility": "internal" + } + ], + "src": "2191:9:20" + }, + "scope": 7969, + "src": "2135:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6314, + "nodeType": "Block", + "src": "2710:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6295, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6290, + "src": "2724:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2737:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint232_$", + "typeString": "type(uint232)" + }, + "typeName": { + "id": 6297, + "name": "uint232", + "nodeType": "ElementaryTypeName", + "src": "2737:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint232_$", + "typeString": "type(uint232)" + } + ], + "id": 6296, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "2732:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6299, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2732:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint232", + "typeString": "type(uint232)" + } + }, + "id": 6300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2746:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "2732:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint232", + "typeString": "uint232" + } + }, + "src": "2724:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6308, + "nodeType": "IfStatement", + "src": "2720:105:20", + "trueBody": { + "id": 6307, + "nodeType": "Block", + "src": "2751:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323332", + "id": 6303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2803:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_232_by_1", + "typeString": "int_const 232" + }, + "value": "232" + }, + { + "id": 6304, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6290, + "src": "2808:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_232_by_1", + "typeString": "int_const 232" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6302, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "2772:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2772:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6306, + "nodeType": "RevertStatement", + "src": "2765:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6311, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6290, + "src": "2849:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2841:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint232_$", + "typeString": "type(uint232)" + }, + "typeName": { + "id": 6309, + "name": "uint232", + "nodeType": "ElementaryTypeName", + "src": "2841:7:20", + "typeDescriptions": {} + } + }, + "id": 6312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2841:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint232", + "typeString": "uint232" + } + }, + "functionReturnParameters": 6294, + "id": 6313, + "nodeType": "Return", + "src": "2834:21:20" + } + ] + }, + "documentation": { + "id": 6288, + "nodeType": "StructuredDocumentation", + "src": "2359:280:20", + "text": " @dev Returns the downcasted uint232 from uint256, reverting on\n overflow (when the input is greater than largest uint232).\n Counterpart to Solidity's `uint232` operator.\n Requirements:\n - input must fit into 232 bits" + }, + "id": 6315, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint232", + "nameLocation": "2653:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6291, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6290, + "mutability": "mutable", + "name": "value", + "nameLocation": "2671:5:20", + "nodeType": "VariableDeclaration", + "scope": 6315, + "src": "2663:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2663:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2662:15:20" + }, + "returnParameters": { + "id": 6294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6293, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6315, + "src": "2701:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint232", + "typeString": "uint232" + }, + "typeName": { + "id": 6292, + "name": "uint232", + "nodeType": "ElementaryTypeName", + "src": "2701:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint232", + "typeString": "uint232" + } + }, + "visibility": "internal" + } + ], + "src": "2700:9:20" + }, + "scope": 7969, + "src": "2644:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6342, + "nodeType": "Block", + "src": "3219:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6323, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6318, + "src": "3233:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3246:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint224_$", + "typeString": "type(uint224)" + }, + "typeName": { + "id": 6325, + "name": "uint224", + "nodeType": "ElementaryTypeName", + "src": "3246:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint224_$", + "typeString": "type(uint224)" + } + ], + "id": 6324, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3241:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6327, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3241:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint224", + "typeString": "type(uint224)" + } + }, + "id": 6328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3255:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3241:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint224", + "typeString": "uint224" + } + }, + "src": "3233:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6336, + "nodeType": "IfStatement", + "src": "3229:105:20", + "trueBody": { + "id": 6335, + "nodeType": "Block", + "src": "3260:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323234", + "id": 6331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3312:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_224_by_1", + "typeString": "int_const 224" + }, + "value": "224" + }, + { + "id": 6332, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6318, + "src": "3317:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_224_by_1", + "typeString": "int_const 224" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6330, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "3281:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3281:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6334, + "nodeType": "RevertStatement", + "src": "3274:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6339, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6318, + "src": "3358:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3350:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint224_$", + "typeString": "type(uint224)" + }, + "typeName": { + "id": 6337, + "name": "uint224", + "nodeType": "ElementaryTypeName", + "src": "3350:7:20", + "typeDescriptions": {} + } + }, + "id": 6340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3350:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint224", + "typeString": "uint224" + } + }, + "functionReturnParameters": 6322, + "id": 6341, + "nodeType": "Return", + "src": "3343:21:20" + } + ] + }, + "documentation": { + "id": 6316, + "nodeType": "StructuredDocumentation", + "src": "2868:280:20", + "text": " @dev Returns the downcasted uint224 from uint256, reverting on\n overflow (when the input is greater than largest uint224).\n Counterpart to Solidity's `uint224` operator.\n Requirements:\n - input must fit into 224 bits" + }, + "id": 6343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint224", + "nameLocation": "3162:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6319, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6318, + "mutability": "mutable", + "name": "value", + "nameLocation": "3180:5:20", + "nodeType": "VariableDeclaration", + "scope": 6343, + "src": "3172:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6317, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3172:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3171:15:20" + }, + "returnParameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6321, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6343, + "src": "3210:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint224", + "typeString": "uint224" + }, + "typeName": { + "id": 6320, + "name": "uint224", + "nodeType": "ElementaryTypeName", + "src": "3210:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint224", + "typeString": "uint224" + } + }, + "visibility": "internal" + } + ], + "src": "3209:9:20" + }, + "scope": 7969, + "src": "3153:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6370, + "nodeType": "Block", + "src": "3728:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6351, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6346, + "src": "3742:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3755:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint216_$", + "typeString": "type(uint216)" + }, + "typeName": { + "id": 6353, + "name": "uint216", + "nodeType": "ElementaryTypeName", + "src": "3755:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint216_$", + "typeString": "type(uint216)" + } + ], + "id": 6352, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3750:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3750:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint216", + "typeString": "type(uint216)" + } + }, + "id": 6356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "3764:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3750:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + "src": "3742:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6364, + "nodeType": "IfStatement", + "src": "3738:105:20", + "trueBody": { + "id": 6363, + "nodeType": "Block", + "src": "3769:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323136", + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3821:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_216_by_1", + "typeString": "int_const 216" + }, + "value": "216" + }, + { + "id": 6360, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6346, + "src": "3826:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_216_by_1", + "typeString": "int_const 216" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6358, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "3790:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3790:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6362, + "nodeType": "RevertStatement", + "src": "3783:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6367, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6346, + "src": "3867:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3859:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint216_$", + "typeString": "type(uint216)" + }, + "typeName": { + "id": 6365, + "name": "uint216", + "nodeType": "ElementaryTypeName", + "src": "3859:7:20", + "typeDescriptions": {} + } + }, + "id": 6368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3859:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + "functionReturnParameters": 6350, + "id": 6369, + "nodeType": "Return", + "src": "3852:21:20" + } + ] + }, + "documentation": { + "id": 6344, + "nodeType": "StructuredDocumentation", + "src": "3377:280:20", + "text": " @dev Returns the downcasted uint216 from uint256, reverting on\n overflow (when the input is greater than largest uint216).\n Counterpart to Solidity's `uint216` operator.\n Requirements:\n - input must fit into 216 bits" + }, + "id": 6371, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint216", + "nameLocation": "3671:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6346, + "mutability": "mutable", + "name": "value", + "nameLocation": "3689:5:20", + "nodeType": "VariableDeclaration", + "scope": 6371, + "src": "3681:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3681:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3680:15:20" + }, + "returnParameters": { + "id": 6350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6349, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6371, + "src": "3719:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + }, + "typeName": { + "id": 6348, + "name": "uint216", + "nodeType": "ElementaryTypeName", + "src": "3719:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + "visibility": "internal" + } + ], + "src": "3718:9:20" + }, + "scope": 7969, + "src": "3662:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6398, + "nodeType": "Block", + "src": "4237:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6379, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6374, + "src": "4251:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4264:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint208_$", + "typeString": "type(uint208)" + }, + "typeName": { + "id": 6381, + "name": "uint208", + "nodeType": "ElementaryTypeName", + "src": "4264:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint208_$", + "typeString": "type(uint208)" + } + ], + "id": 6380, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4259:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4259:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint208", + "typeString": "type(uint208)" + } + }, + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4273:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4259:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint208", + "typeString": "uint208" + } + }, + "src": "4251:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6392, + "nodeType": "IfStatement", + "src": "4247:105:20", + "trueBody": { + "id": 6391, + "nodeType": "Block", + "src": "4278:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323038", + "id": 6387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4330:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_208_by_1", + "typeString": "int_const 208" + }, + "value": "208" + }, + { + "id": 6388, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6374, + "src": "4335:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_208_by_1", + "typeString": "int_const 208" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6386, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "4299:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4299:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6390, + "nodeType": "RevertStatement", + "src": "4292:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6395, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6374, + "src": "4376:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4368:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint208_$", + "typeString": "type(uint208)" + }, + "typeName": { + "id": 6393, + "name": "uint208", + "nodeType": "ElementaryTypeName", + "src": "4368:7:20", + "typeDescriptions": {} + } + }, + "id": 6396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4368:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint208", + "typeString": "uint208" + } + }, + "functionReturnParameters": 6378, + "id": 6397, + "nodeType": "Return", + "src": "4361:21:20" + } + ] + }, + "documentation": { + "id": 6372, + "nodeType": "StructuredDocumentation", + "src": "3886:280:20", + "text": " @dev Returns the downcasted uint208 from uint256, reverting on\n overflow (when the input is greater than largest uint208).\n Counterpart to Solidity's `uint208` operator.\n Requirements:\n - input must fit into 208 bits" + }, + "id": 6399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint208", + "nameLocation": "4180:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6375, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6374, + "mutability": "mutable", + "name": "value", + "nameLocation": "4198:5:20", + "nodeType": "VariableDeclaration", + "scope": 6399, + "src": "4190:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6373, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4190:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4189:15:20" + }, + "returnParameters": { + "id": 6378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6377, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6399, + "src": "4228:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint208", + "typeString": "uint208" + }, + "typeName": { + "id": 6376, + "name": "uint208", + "nodeType": "ElementaryTypeName", + "src": "4228:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint208", + "typeString": "uint208" + } + }, + "visibility": "internal" + } + ], + "src": "4227:9:20" + }, + "scope": 7969, + "src": "4171:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6426, + "nodeType": "Block", + "src": "4746:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6407, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "4760:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4773:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint200_$", + "typeString": "type(uint200)" + }, + "typeName": { + "id": 6409, + "name": "uint200", + "nodeType": "ElementaryTypeName", + "src": "4773:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint200_$", + "typeString": "type(uint200)" + } + ], + "id": 6408, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "4768:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4768:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint200", + "typeString": "type(uint200)" + } + }, + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "4782:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "4768:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint200", + "typeString": "uint200" + } + }, + "src": "4760:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6420, + "nodeType": "IfStatement", + "src": "4756:105:20", + "trueBody": { + "id": 6419, + "nodeType": "Block", + "src": "4787:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323030", + "id": 6415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4839:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_200_by_1", + "typeString": "int_const 200" + }, + "value": "200" + }, + { + "id": 6416, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "4844:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_200_by_1", + "typeString": "int_const 200" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6414, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "4808:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4808:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6418, + "nodeType": "RevertStatement", + "src": "4801:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6423, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "4885:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4877:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint200_$", + "typeString": "type(uint200)" + }, + "typeName": { + "id": 6421, + "name": "uint200", + "nodeType": "ElementaryTypeName", + "src": "4877:7:20", + "typeDescriptions": {} + } + }, + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4877:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint200", + "typeString": "uint200" + } + }, + "functionReturnParameters": 6406, + "id": 6425, + "nodeType": "Return", + "src": "4870:21:20" + } + ] + }, + "documentation": { + "id": 6400, + "nodeType": "StructuredDocumentation", + "src": "4395:280:20", + "text": " @dev Returns the downcasted uint200 from uint256, reverting on\n overflow (when the input is greater than largest uint200).\n Counterpart to Solidity's `uint200` operator.\n Requirements:\n - input must fit into 200 bits" + }, + "id": 6427, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint200", + "nameLocation": "4689:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6403, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6402, + "mutability": "mutable", + "name": "value", + "nameLocation": "4707:5:20", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4699:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6401, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4699:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4698:15:20" + }, + "returnParameters": { + "id": 6406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6405, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4737:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint200", + "typeString": "uint200" + }, + "typeName": { + "id": 6404, + "name": "uint200", + "nodeType": "ElementaryTypeName", + "src": "4737:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint200", + "typeString": "uint200" + } + }, + "visibility": "internal" + } + ], + "src": "4736:9:20" + }, + "scope": 7969, + "src": "4680:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6454, + "nodeType": "Block", + "src": "5255:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6435, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5269:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5282:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint192_$", + "typeString": "type(uint192)" + }, + "typeName": { + "id": 6437, + "name": "uint192", + "nodeType": "ElementaryTypeName", + "src": "5282:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint192_$", + "typeString": "type(uint192)" + } + ], + "id": 6436, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "5277:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5277:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint192", + "typeString": "type(uint192)" + } + }, + "id": 6440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5291:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "5277:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + } + }, + "src": "5269:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6448, + "nodeType": "IfStatement", + "src": "5265:105:20", + "trueBody": { + "id": 6447, + "nodeType": "Block", + "src": "5296:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313932", + "id": 6443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5348:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_192_by_1", + "typeString": "int_const 192" + }, + "value": "192" + }, + { + "id": 6444, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5353:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_192_by_1", + "typeString": "int_const 192" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6442, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "5317:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5317:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6446, + "nodeType": "RevertStatement", + "src": "5310:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6451, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5394:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5386:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint192_$", + "typeString": "type(uint192)" + }, + "typeName": { + "id": 6449, + "name": "uint192", + "nodeType": "ElementaryTypeName", + "src": "5386:7:20", + "typeDescriptions": {} + } + }, + "id": 6452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5386:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + } + }, + "functionReturnParameters": 6434, + "id": 6453, + "nodeType": "Return", + "src": "5379:21:20" + } + ] + }, + "documentation": { + "id": 6428, + "nodeType": "StructuredDocumentation", + "src": "4904:280:20", + "text": " @dev Returns the downcasted uint192 from uint256, reverting on\n overflow (when the input is greater than largest uint192).\n Counterpart to Solidity's `uint192` operator.\n Requirements:\n - input must fit into 192 bits" + }, + "id": 6455, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint192", + "nameLocation": "5198:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6430, + "mutability": "mutable", + "name": "value", + "nameLocation": "5216:5:20", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "5208:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6429, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5208:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5207:15:20" + }, + "returnParameters": { + "id": 6434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6433, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "5246:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + }, + "typeName": { + "id": 6432, + "name": "uint192", + "nodeType": "ElementaryTypeName", + "src": "5246:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint192", + "typeString": "uint192" + } + }, + "visibility": "internal" + } + ], + "src": "5245:9:20" + }, + "scope": 7969, + "src": "5189:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6482, + "nodeType": "Block", + "src": "5764:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6463, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6458, + "src": "5778:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5791:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint184_$", + "typeString": "type(uint184)" + }, + "typeName": { + "id": 6465, + "name": "uint184", + "nodeType": "ElementaryTypeName", + "src": "5791:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint184_$", + "typeString": "type(uint184)" + } + ], + "id": 6464, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "5786:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6467, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5786:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint184", + "typeString": "type(uint184)" + } + }, + "id": 6468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5800:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "5786:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint184", + "typeString": "uint184" + } + }, + "src": "5778:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6476, + "nodeType": "IfStatement", + "src": "5774:105:20", + "trueBody": { + "id": 6475, + "nodeType": "Block", + "src": "5805:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313834", + "id": 6471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5857:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_184_by_1", + "typeString": "int_const 184" + }, + "value": "184" + }, + { + "id": 6472, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6458, + "src": "5862:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_184_by_1", + "typeString": "int_const 184" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6470, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "5826:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5826:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6474, + "nodeType": "RevertStatement", + "src": "5819:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6479, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6458, + "src": "5903:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6478, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5895:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint184_$", + "typeString": "type(uint184)" + }, + "typeName": { + "id": 6477, + "name": "uint184", + "nodeType": "ElementaryTypeName", + "src": "5895:7:20", + "typeDescriptions": {} + } + }, + "id": 6480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5895:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint184", + "typeString": "uint184" + } + }, + "functionReturnParameters": 6462, + "id": 6481, + "nodeType": "Return", + "src": "5888:21:20" + } + ] + }, + "documentation": { + "id": 6456, + "nodeType": "StructuredDocumentation", + "src": "5413:280:20", + "text": " @dev Returns the downcasted uint184 from uint256, reverting on\n overflow (when the input is greater than largest uint184).\n Counterpart to Solidity's `uint184` operator.\n Requirements:\n - input must fit into 184 bits" + }, + "id": 6483, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint184", + "nameLocation": "5707:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6458, + "mutability": "mutable", + "name": "value", + "nameLocation": "5725:5:20", + "nodeType": "VariableDeclaration", + "scope": 6483, + "src": "5717:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6457, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5717:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5716:15:20" + }, + "returnParameters": { + "id": 6462, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6461, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6483, + "src": "5755:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint184", + "typeString": "uint184" + }, + "typeName": { + "id": 6460, + "name": "uint184", + "nodeType": "ElementaryTypeName", + "src": "5755:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint184", + "typeString": "uint184" + } + }, + "visibility": "internal" + } + ], + "src": "5754:9:20" + }, + "scope": 7969, + "src": "5698:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6510, + "nodeType": "Block", + "src": "6273:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6491, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6486, + "src": "6287:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6300:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint176_$", + "typeString": "type(uint176)" + }, + "typeName": { + "id": 6493, + "name": "uint176", + "nodeType": "ElementaryTypeName", + "src": "6300:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint176_$", + "typeString": "type(uint176)" + } + ], + "id": 6492, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "6295:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6295:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint176", + "typeString": "type(uint176)" + } + }, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6309:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "6295:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint176", + "typeString": "uint176" + } + }, + "src": "6287:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6504, + "nodeType": "IfStatement", + "src": "6283:105:20", + "trueBody": { + "id": 6503, + "nodeType": "Block", + "src": "6314:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313736", + "id": 6499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6366:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_176_by_1", + "typeString": "int_const 176" + }, + "value": "176" + }, + { + "id": 6500, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6486, + "src": "6371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_176_by_1", + "typeString": "int_const 176" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6498, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "6335:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6335:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6502, + "nodeType": "RevertStatement", + "src": "6328:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6507, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6486, + "src": "6412:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6404:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint176_$", + "typeString": "type(uint176)" + }, + "typeName": { + "id": 6505, + "name": "uint176", + "nodeType": "ElementaryTypeName", + "src": "6404:7:20", + "typeDescriptions": {} + } + }, + "id": 6508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6404:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint176", + "typeString": "uint176" + } + }, + "functionReturnParameters": 6490, + "id": 6509, + "nodeType": "Return", + "src": "6397:21:20" + } + ] + }, + "documentation": { + "id": 6484, + "nodeType": "StructuredDocumentation", + "src": "5922:280:20", + "text": " @dev Returns the downcasted uint176 from uint256, reverting on\n overflow (when the input is greater than largest uint176).\n Counterpart to Solidity's `uint176` operator.\n Requirements:\n - input must fit into 176 bits" + }, + "id": 6511, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint176", + "nameLocation": "6216:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6487, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6486, + "mutability": "mutable", + "name": "value", + "nameLocation": "6234:5:20", + "nodeType": "VariableDeclaration", + "scope": 6511, + "src": "6226:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6485, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6226:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6225:15:20" + }, + "returnParameters": { + "id": 6490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6489, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6511, + "src": "6264:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint176", + "typeString": "uint176" + }, + "typeName": { + "id": 6488, + "name": "uint176", + "nodeType": "ElementaryTypeName", + "src": "6264:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint176", + "typeString": "uint176" + } + }, + "visibility": "internal" + } + ], + "src": "6263:9:20" + }, + "scope": 7969, + "src": "6207:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6538, + "nodeType": "Block", + "src": "6782:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6519, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6514, + "src": "6796:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6809:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint168_$", + "typeString": "type(uint168)" + }, + "typeName": { + "id": 6521, + "name": "uint168", + "nodeType": "ElementaryTypeName", + "src": "6809:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint168_$", + "typeString": "type(uint168)" + } + ], + "id": 6520, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "6804:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6523, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6804:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint168", + "typeString": "type(uint168)" + } + }, + "id": 6524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "6818:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "6804:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint168", + "typeString": "uint168" + } + }, + "src": "6796:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6532, + "nodeType": "IfStatement", + "src": "6792:105:20", + "trueBody": { + "id": 6531, + "nodeType": "Block", + "src": "6823:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313638", + "id": 6527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6875:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_168_by_1", + "typeString": "int_const 168" + }, + "value": "168" + }, + { + "id": 6528, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6514, + "src": "6880:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_168_by_1", + "typeString": "int_const 168" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6526, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "6844:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6844:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6530, + "nodeType": "RevertStatement", + "src": "6837:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6535, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6514, + "src": "6921:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6913:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint168_$", + "typeString": "type(uint168)" + }, + "typeName": { + "id": 6533, + "name": "uint168", + "nodeType": "ElementaryTypeName", + "src": "6913:7:20", + "typeDescriptions": {} + } + }, + "id": 6536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6913:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint168", + "typeString": "uint168" + } + }, + "functionReturnParameters": 6518, + "id": 6537, + "nodeType": "Return", + "src": "6906:21:20" + } + ] + }, + "documentation": { + "id": 6512, + "nodeType": "StructuredDocumentation", + "src": "6431:280:20", + "text": " @dev Returns the downcasted uint168 from uint256, reverting on\n overflow (when the input is greater than largest uint168).\n Counterpart to Solidity's `uint168` operator.\n Requirements:\n - input must fit into 168 bits" + }, + "id": 6539, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint168", + "nameLocation": "6725:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6515, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6514, + "mutability": "mutable", + "name": "value", + "nameLocation": "6743:5:20", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6735:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6513, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6735:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6734:15:20" + }, + "returnParameters": { + "id": 6518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6517, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6773:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint168", + "typeString": "uint168" + }, + "typeName": { + "id": 6516, + "name": "uint168", + "nodeType": "ElementaryTypeName", + "src": "6773:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint168", + "typeString": "uint168" + } + }, + "visibility": "internal" + } + ], + "src": "6772:9:20" + }, + "scope": 7969, + "src": "6716:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6566, + "nodeType": "Block", + "src": "7291:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6547, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "7305:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7318:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 6549, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "7318:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + } + ], + "id": 6548, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "7313:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7313:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint160", + "typeString": "type(uint160)" + } + }, + "id": 6552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "7327:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "7313:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "src": "7305:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6560, + "nodeType": "IfStatement", + "src": "7301:105:20", + "trueBody": { + "id": 6559, + "nodeType": "Block", + "src": "7332:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313630", + "id": 6555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7384:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_160_by_1", + "typeString": "int_const 160" + }, + "value": "160" + }, + { + "id": 6556, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "7389:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_160_by_1", + "typeString": "int_const 160" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6554, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "7353:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7353:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6558, + "nodeType": "RevertStatement", + "src": "7346:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6563, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "7430:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7422:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 6561, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "7422:7:20", + "typeDescriptions": {} + } + }, + "id": 6564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7422:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "functionReturnParameters": 6546, + "id": 6565, + "nodeType": "Return", + "src": "7415:21:20" + } + ] + }, + "documentation": { + "id": 6540, + "nodeType": "StructuredDocumentation", + "src": "6940:280:20", + "text": " @dev Returns the downcasted uint160 from uint256, reverting on\n overflow (when the input is greater than largest uint160).\n Counterpart to Solidity's `uint160` operator.\n Requirements:\n - input must fit into 160 bits" + }, + "id": 6567, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint160", + "nameLocation": "7234:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6543, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6542, + "mutability": "mutable", + "name": "value", + "nameLocation": "7252:5:20", + "nodeType": "VariableDeclaration", + "scope": 6567, + "src": "7244:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6541, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7244:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7243:15:20" + }, + "returnParameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6545, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6567, + "src": "7282:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + }, + "typeName": { + "id": 6544, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "7282:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + }, + "visibility": "internal" + } + ], + "src": "7281:9:20" + }, + "scope": 7969, + "src": "7225:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6594, + "nodeType": "Block", + "src": "7800:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6575, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6570, + "src": "7814:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7827:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint152_$", + "typeString": "type(uint152)" + }, + "typeName": { + "id": 6577, + "name": "uint152", + "nodeType": "ElementaryTypeName", + "src": "7827:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint152_$", + "typeString": "type(uint152)" + } + ], + "id": 6576, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "7822:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6579, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7822:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint152", + "typeString": "type(uint152)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "7836:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "7822:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint152", + "typeString": "uint152" + } + }, + "src": "7814:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6588, + "nodeType": "IfStatement", + "src": "7810:105:20", + "trueBody": { + "id": 6587, + "nodeType": "Block", + "src": "7841:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313532", + "id": 6583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7893:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_152_by_1", + "typeString": "int_const 152" + }, + "value": "152" + }, + { + "id": 6584, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6570, + "src": "7898:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_152_by_1", + "typeString": "int_const 152" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6582, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "7862:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7862:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6586, + "nodeType": "RevertStatement", + "src": "7855:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6591, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6570, + "src": "7939:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7931:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint152_$", + "typeString": "type(uint152)" + }, + "typeName": { + "id": 6589, + "name": "uint152", + "nodeType": "ElementaryTypeName", + "src": "7931:7:20", + "typeDescriptions": {} + } + }, + "id": 6592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7931:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint152", + "typeString": "uint152" + } + }, + "functionReturnParameters": 6574, + "id": 6593, + "nodeType": "Return", + "src": "7924:21:20" + } + ] + }, + "documentation": { + "id": 6568, + "nodeType": "StructuredDocumentation", + "src": "7449:280:20", + "text": " @dev Returns the downcasted uint152 from uint256, reverting on\n overflow (when the input is greater than largest uint152).\n Counterpart to Solidity's `uint152` operator.\n Requirements:\n - input must fit into 152 bits" + }, + "id": 6595, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint152", + "nameLocation": "7743:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6570, + "mutability": "mutable", + "name": "value", + "nameLocation": "7761:5:20", + "nodeType": "VariableDeclaration", + "scope": 6595, + "src": "7753:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7753:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7752:15:20" + }, + "returnParameters": { + "id": 6574, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6573, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6595, + "src": "7791:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint152", + "typeString": "uint152" + }, + "typeName": { + "id": 6572, + "name": "uint152", + "nodeType": "ElementaryTypeName", + "src": "7791:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint152", + "typeString": "uint152" + } + }, + "visibility": "internal" + } + ], + "src": "7790:9:20" + }, + "scope": 7969, + "src": "7734:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6622, + "nodeType": "Block", + "src": "8309:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6603, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6598, + "src": "8323:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8336:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint144_$", + "typeString": "type(uint144)" + }, + "typeName": { + "id": 6605, + "name": "uint144", + "nodeType": "ElementaryTypeName", + "src": "8336:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint144_$", + "typeString": "type(uint144)" + } + ], + "id": 6604, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "8331:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8331:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint144", + "typeString": "type(uint144)" + } + }, + "id": 6608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8345:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "8331:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint144", + "typeString": "uint144" + } + }, + "src": "8323:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6616, + "nodeType": "IfStatement", + "src": "8319:105:20", + "trueBody": { + "id": 6615, + "nodeType": "Block", + "src": "8350:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313434", + "id": 6611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8402:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_144_by_1", + "typeString": "int_const 144" + }, + "value": "144" + }, + { + "id": 6612, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6598, + "src": "8407:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_144_by_1", + "typeString": "int_const 144" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6610, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "8371:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8371:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6614, + "nodeType": "RevertStatement", + "src": "8364:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6619, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6598, + "src": "8448:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8440:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint144_$", + "typeString": "type(uint144)" + }, + "typeName": { + "id": 6617, + "name": "uint144", + "nodeType": "ElementaryTypeName", + "src": "8440:7:20", + "typeDescriptions": {} + } + }, + "id": 6620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8440:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint144", + "typeString": "uint144" + } + }, + "functionReturnParameters": 6602, + "id": 6621, + "nodeType": "Return", + "src": "8433:21:20" + } + ] + }, + "documentation": { + "id": 6596, + "nodeType": "StructuredDocumentation", + "src": "7958:280:20", + "text": " @dev Returns the downcasted uint144 from uint256, reverting on\n overflow (when the input is greater than largest uint144).\n Counterpart to Solidity's `uint144` operator.\n Requirements:\n - input must fit into 144 bits" + }, + "id": 6623, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint144", + "nameLocation": "8252:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6599, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6598, + "mutability": "mutable", + "name": "value", + "nameLocation": "8270:5:20", + "nodeType": "VariableDeclaration", + "scope": 6623, + "src": "8262:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8262:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8261:15:20" + }, + "returnParameters": { + "id": 6602, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6601, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6623, + "src": "8300:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint144", + "typeString": "uint144" + }, + "typeName": { + "id": 6600, + "name": "uint144", + "nodeType": "ElementaryTypeName", + "src": "8300:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint144", + "typeString": "uint144" + } + }, + "visibility": "internal" + } + ], + "src": "8299:9:20" + }, + "scope": 7969, + "src": "8243:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6650, + "nodeType": "Block", + "src": "8818:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6631, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "8832:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6634, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8845:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint136_$", + "typeString": "type(uint136)" + }, + "typeName": { + "id": 6633, + "name": "uint136", + "nodeType": "ElementaryTypeName", + "src": "8845:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint136_$", + "typeString": "type(uint136)" + } + ], + "id": 6632, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "8840:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8840:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint136", + "typeString": "type(uint136)" + } + }, + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "8854:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "8840:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint136", + "typeString": "uint136" + } + }, + "src": "8832:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6644, + "nodeType": "IfStatement", + "src": "8828:105:20", + "trueBody": { + "id": 6643, + "nodeType": "Block", + "src": "8859:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313336", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8911:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_136_by_1", + "typeString": "int_const 136" + }, + "value": "136" + }, + { + "id": 6640, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "8916:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_136_by_1", + "typeString": "int_const 136" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6638, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "8880:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8880:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6642, + "nodeType": "RevertStatement", + "src": "8873:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6647, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "8957:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8949:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint136_$", + "typeString": "type(uint136)" + }, + "typeName": { + "id": 6645, + "name": "uint136", + "nodeType": "ElementaryTypeName", + "src": "8949:7:20", + "typeDescriptions": {} + } + }, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "8949:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint136", + "typeString": "uint136" + } + }, + "functionReturnParameters": 6630, + "id": 6649, + "nodeType": "Return", + "src": "8942:21:20" + } + ] + }, + "documentation": { + "id": 6624, + "nodeType": "StructuredDocumentation", + "src": "8467:280:20", + "text": " @dev Returns the downcasted uint136 from uint256, reverting on\n overflow (when the input is greater than largest uint136).\n Counterpart to Solidity's `uint136` operator.\n Requirements:\n - input must fit into 136 bits" + }, + "id": 6651, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint136", + "nameLocation": "8761:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6627, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6626, + "mutability": "mutable", + "name": "value", + "nameLocation": "8779:5:20", + "nodeType": "VariableDeclaration", + "scope": 6651, + "src": "8771:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6625, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8771:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8770:15:20" + }, + "returnParameters": { + "id": 6630, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6629, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6651, + "src": "8809:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint136", + "typeString": "uint136" + }, + "typeName": { + "id": 6628, + "name": "uint136", + "nodeType": "ElementaryTypeName", + "src": "8809:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint136", + "typeString": "uint136" + } + }, + "visibility": "internal" + } + ], + "src": "8808:9:20" + }, + "scope": 7969, + "src": "8752:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6678, + "nodeType": "Block", + "src": "9327:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6659, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "9341:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9354:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6661, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9354:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + } + ], + "id": 6660, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "9349:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9349:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint128", + "typeString": "type(uint128)" + } + }, + "id": 6664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "9363:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "9349:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "9341:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6672, + "nodeType": "IfStatement", + "src": "9337:105:20", + "trueBody": { + "id": 6671, + "nodeType": "Block", + "src": "9368:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313238", + "id": 6667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9420:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + { + "id": 6668, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "9425:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6666, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "9389:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9389:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6670, + "nodeType": "RevertStatement", + "src": "9382:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6675, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6654, + "src": "9466:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9458:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6673, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9458:7:20", + "typeDescriptions": {} + } + }, + "id": 6676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9458:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "functionReturnParameters": 6658, + "id": 6677, + "nodeType": "Return", + "src": "9451:21:20" + } + ] + }, + "documentation": { + "id": 6652, + "nodeType": "StructuredDocumentation", + "src": "8976:280:20", + "text": " @dev Returns the downcasted uint128 from uint256, reverting on\n overflow (when the input is greater than largest uint128).\n Counterpart to Solidity's `uint128` operator.\n Requirements:\n - input must fit into 128 bits" + }, + "id": 6679, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint128", + "nameLocation": "9270:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6655, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6654, + "mutability": "mutable", + "name": "value", + "nameLocation": "9288:5:20", + "nodeType": "VariableDeclaration", + "scope": 6679, + "src": "9280:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6653, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9280:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9279:15:20" + }, + "returnParameters": { + "id": 6658, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6657, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6679, + "src": "9318:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 6656, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9318:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "src": "9317:9:20" + }, + "scope": 7969, + "src": "9261:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6706, + "nodeType": "Block", + "src": "9836:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6687, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6682, + "src": "9850:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9863:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint120_$", + "typeString": "type(uint120)" + }, + "typeName": { + "id": 6689, + "name": "uint120", + "nodeType": "ElementaryTypeName", + "src": "9863:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint120_$", + "typeString": "type(uint120)" + } + ], + "id": 6688, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "9858:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9858:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint120", + "typeString": "type(uint120)" + } + }, + "id": 6692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "9872:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "9858:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint120", + "typeString": "uint120" + } + }, + "src": "9850:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6700, + "nodeType": "IfStatement", + "src": "9846:105:20", + "trueBody": { + "id": 6699, + "nodeType": "Block", + "src": "9877:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313230", + "id": 6695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9929:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + "value": "120" + }, + { + "id": 6696, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6682, + "src": "9934:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6694, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "9898:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9898:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6698, + "nodeType": "RevertStatement", + "src": "9891:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6703, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6682, + "src": "9975:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9967:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint120_$", + "typeString": "type(uint120)" + }, + "typeName": { + "id": 6701, + "name": "uint120", + "nodeType": "ElementaryTypeName", + "src": "9967:7:20", + "typeDescriptions": {} + } + }, + "id": 6704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "9967:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint120", + "typeString": "uint120" + } + }, + "functionReturnParameters": 6686, + "id": 6705, + "nodeType": "Return", + "src": "9960:21:20" + } + ] + }, + "documentation": { + "id": 6680, + "nodeType": "StructuredDocumentation", + "src": "9485:280:20", + "text": " @dev Returns the downcasted uint120 from uint256, reverting on\n overflow (when the input is greater than largest uint120).\n Counterpart to Solidity's `uint120` operator.\n Requirements:\n - input must fit into 120 bits" + }, + "id": 6707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint120", + "nameLocation": "9779:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6683, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6682, + "mutability": "mutable", + "name": "value", + "nameLocation": "9797:5:20", + "nodeType": "VariableDeclaration", + "scope": 6707, + "src": "9789:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6681, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9789:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9788:15:20" + }, + "returnParameters": { + "id": 6686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6685, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6707, + "src": "9827:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint120", + "typeString": "uint120" + }, + "typeName": { + "id": 6684, + "name": "uint120", + "nodeType": "ElementaryTypeName", + "src": "9827:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint120", + "typeString": "uint120" + } + }, + "visibility": "internal" + } + ], + "src": "9826:9:20" + }, + "scope": 7969, + "src": "9770:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6734, + "nodeType": "Block", + "src": "10345:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6715, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6710, + "src": "10359:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10372:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint112_$", + "typeString": "type(uint112)" + }, + "typeName": { + "id": 6717, + "name": "uint112", + "nodeType": "ElementaryTypeName", + "src": "10372:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint112_$", + "typeString": "type(uint112)" + } + ], + "id": 6716, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "10367:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6719, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10367:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint112", + "typeString": "type(uint112)" + } + }, + "id": 6720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10381:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "10367:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint112", + "typeString": "uint112" + } + }, + "src": "10359:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6728, + "nodeType": "IfStatement", + "src": "10355:105:20", + "trueBody": { + "id": 6727, + "nodeType": "Block", + "src": "10386:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313132", + "id": 6723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10438:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + "value": "112" + }, + { + "id": 6724, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6710, + "src": "10443:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6722, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "10407:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10407:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6726, + "nodeType": "RevertStatement", + "src": "10400:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6731, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6710, + "src": "10484:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10476:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint112_$", + "typeString": "type(uint112)" + }, + "typeName": { + "id": 6729, + "name": "uint112", + "nodeType": "ElementaryTypeName", + "src": "10476:7:20", + "typeDescriptions": {} + } + }, + "id": 6732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10476:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint112", + "typeString": "uint112" + } + }, + "functionReturnParameters": 6714, + "id": 6733, + "nodeType": "Return", + "src": "10469:21:20" + } + ] + }, + "documentation": { + "id": 6708, + "nodeType": "StructuredDocumentation", + "src": "9994:280:20", + "text": " @dev Returns the downcasted uint112 from uint256, reverting on\n overflow (when the input is greater than largest uint112).\n Counterpart to Solidity's `uint112` operator.\n Requirements:\n - input must fit into 112 bits" + }, + "id": 6735, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint112", + "nameLocation": "10288:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6710, + "mutability": "mutable", + "name": "value", + "nameLocation": "10306:5:20", + "nodeType": "VariableDeclaration", + "scope": 6735, + "src": "10298:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10298:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10297:15:20" + }, + "returnParameters": { + "id": 6714, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6713, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6735, + "src": "10336:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint112", + "typeString": "uint112" + }, + "typeName": { + "id": 6712, + "name": "uint112", + "nodeType": "ElementaryTypeName", + "src": "10336:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint112", + "typeString": "uint112" + } + }, + "visibility": "internal" + } + ], + "src": "10335:9:20" + }, + "scope": 7969, + "src": "10279:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6762, + "nodeType": "Block", + "src": "10854:152:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6743, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6738, + "src": "10868:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10881:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint104_$", + "typeString": "type(uint104)" + }, + "typeName": { + "id": 6745, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "10881:7:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint104_$", + "typeString": "type(uint104)" + } + ], + "id": 6744, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "10876:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10876:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint104", + "typeString": "type(uint104)" + } + }, + "id": 6748, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "10890:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "10876:17:20", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "src": "10868:25:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6756, + "nodeType": "IfStatement", + "src": "10864:105:20", + "trueBody": { + "id": 6755, + "nodeType": "Block", + "src": "10895:74:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313034", + "id": 6751, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10947:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + "value": "104" + }, + { + "id": 6752, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6738, + "src": "10952:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6750, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "10916:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10916:42:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6754, + "nodeType": "RevertStatement", + "src": "10909:49:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6759, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6738, + "src": "10993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10985:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint104_$", + "typeString": "type(uint104)" + }, + "typeName": { + "id": 6757, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "10985:7:20", + "typeDescriptions": {} + } + }, + "id": 6760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "10985:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "functionReturnParameters": 6742, + "id": 6761, + "nodeType": "Return", + "src": "10978:21:20" + } + ] + }, + "documentation": { + "id": 6736, + "nodeType": "StructuredDocumentation", + "src": "10503:280:20", + "text": " @dev Returns the downcasted uint104 from uint256, reverting on\n overflow (when the input is greater than largest uint104).\n Counterpart to Solidity's `uint104` operator.\n Requirements:\n - input must fit into 104 bits" + }, + "id": 6763, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint104", + "nameLocation": "10797:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6738, + "mutability": "mutable", + "name": "value", + "nameLocation": "10815:5:20", + "nodeType": "VariableDeclaration", + "scope": 6763, + "src": "10807:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6737, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10807:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10806:15:20" + }, + "returnParameters": { + "id": 6742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6741, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6763, + "src": "10845:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 6740, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "10845:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "visibility": "internal" + } + ], + "src": "10844:9:20" + }, + "scope": 7969, + "src": "10788:218:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6790, + "nodeType": "Block", + "src": "11357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6771, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6766, + "src": "11371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint96_$", + "typeString": "type(uint96)" + }, + "typeName": { + "id": 6773, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "11384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint96_$", + "typeString": "type(uint96)" + } + ], + "id": 6772, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "11379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint96", + "typeString": "type(uint96)" + } + }, + "id": 6776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "11379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "src": "11371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6784, + "nodeType": "IfStatement", + "src": "11367:103:20", + "trueBody": { + "id": 6783, + "nodeType": "Block", + "src": "11397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3936", + "id": 6779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + { + "id": 6780, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6766, + "src": "11453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6778, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "11418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6782, + "nodeType": "RevertStatement", + "src": "11411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6787, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6766, + "src": "11493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint96_$", + "typeString": "type(uint96)" + }, + "typeName": { + "id": 6785, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "11486:6:20", + "typeDescriptions": {} + } + }, + "id": 6788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "functionReturnParameters": 6770, + "id": 6789, + "nodeType": "Return", + "src": "11479:20:20" + } + ] + }, + "documentation": { + "id": 6764, + "nodeType": "StructuredDocumentation", + "src": "11012:276:20", + "text": " @dev Returns the downcasted uint96 from uint256, reverting on\n overflow (when the input is greater than largest uint96).\n Counterpart to Solidity's `uint96` operator.\n Requirements:\n - input must fit into 96 bits" + }, + "id": 6791, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint96", + "nameLocation": "11302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6766, + "mutability": "mutable", + "name": "value", + "nameLocation": "11319:5:20", + "nodeType": "VariableDeclaration", + "scope": 6791, + "src": "11311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6765, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11310:15:20" + }, + "returnParameters": { + "id": 6770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6769, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6791, + "src": "11349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + }, + "typeName": { + "id": 6768, + "name": "uint96", + "nodeType": "ElementaryTypeName", + "src": "11349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint96", + "typeString": "uint96" + } + }, + "visibility": "internal" + } + ], + "src": "11348:8:20" + }, + "scope": 7969, + "src": "11293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6818, + "nodeType": "Block", + "src": "11857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6799, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "11871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint88_$", + "typeString": "type(uint88)" + }, + "typeName": { + "id": 6801, + "name": "uint88", + "nodeType": "ElementaryTypeName", + "src": "11884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint88_$", + "typeString": "type(uint88)" + } + ], + "id": 6800, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "11879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint88", + "typeString": "type(uint88)" + } + }, + "id": 6804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "11892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "11879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint88", + "typeString": "uint88" + } + }, + "src": "11871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6812, + "nodeType": "IfStatement", + "src": "11867:103:20", + "trueBody": { + "id": 6811, + "nodeType": "Block", + "src": "11897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3838", + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + "value": "88" + }, + { + "id": 6808, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "11953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6806, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "11918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6810, + "nodeType": "RevertStatement", + "src": "11911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6815, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6794, + "src": "11993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint88_$", + "typeString": "type(uint88)" + }, + "typeName": { + "id": 6813, + "name": "uint88", + "nodeType": "ElementaryTypeName", + "src": "11986:6:20", + "typeDescriptions": {} + } + }, + "id": 6816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "11986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint88", + "typeString": "uint88" + } + }, + "functionReturnParameters": 6798, + "id": 6817, + "nodeType": "Return", + "src": "11979:20:20" + } + ] + }, + "documentation": { + "id": 6792, + "nodeType": "StructuredDocumentation", + "src": "11512:276:20", + "text": " @dev Returns the downcasted uint88 from uint256, reverting on\n overflow (when the input is greater than largest uint88).\n Counterpart to Solidity's `uint88` operator.\n Requirements:\n - input must fit into 88 bits" + }, + "id": 6819, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint88", + "nameLocation": "11802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6795, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6794, + "mutability": "mutable", + "name": "value", + "nameLocation": "11819:5:20", + "nodeType": "VariableDeclaration", + "scope": 6819, + "src": "11811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6793, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11810:15:20" + }, + "returnParameters": { + "id": 6798, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6797, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6819, + "src": "11849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint88", + "typeString": "uint88" + }, + "typeName": { + "id": 6796, + "name": "uint88", + "nodeType": "ElementaryTypeName", + "src": "11849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint88", + "typeString": "uint88" + } + }, + "visibility": "internal" + } + ], + "src": "11848:8:20" + }, + "scope": 7969, + "src": "11793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6846, + "nodeType": "Block", + "src": "12357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6827, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6822, + "src": "12371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6830, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint80_$", + "typeString": "type(uint80)" + }, + "typeName": { + "id": 6829, + "name": "uint80", + "nodeType": "ElementaryTypeName", + "src": "12384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint80_$", + "typeString": "type(uint80)" + } + ], + "id": 6828, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "12379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint80", + "typeString": "type(uint80)" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "12379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint80", + "typeString": "uint80" + } + }, + "src": "12371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6840, + "nodeType": "IfStatement", + "src": "12367:103:20", + "trueBody": { + "id": 6839, + "nodeType": "Block", + "src": "12397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3830", + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + "value": "80" + }, + { + "id": 6836, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6822, + "src": "12453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6834, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "12418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6838, + "nodeType": "RevertStatement", + "src": "12411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6843, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6822, + "src": "12493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint80_$", + "typeString": "type(uint80)" + }, + "typeName": { + "id": 6841, + "name": "uint80", + "nodeType": "ElementaryTypeName", + "src": "12486:6:20", + "typeDescriptions": {} + } + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint80", + "typeString": "uint80" + } + }, + "functionReturnParameters": 6826, + "id": 6845, + "nodeType": "Return", + "src": "12479:20:20" + } + ] + }, + "documentation": { + "id": 6820, + "nodeType": "StructuredDocumentation", + "src": "12012:276:20", + "text": " @dev Returns the downcasted uint80 from uint256, reverting on\n overflow (when the input is greater than largest uint80).\n Counterpart to Solidity's `uint80` operator.\n Requirements:\n - input must fit into 80 bits" + }, + "id": 6847, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint80", + "nameLocation": "12302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6823, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6822, + "mutability": "mutable", + "name": "value", + "nameLocation": "12319:5:20", + "nodeType": "VariableDeclaration", + "scope": 6847, + "src": "12311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6821, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12310:15:20" + }, + "returnParameters": { + "id": 6826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6825, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6847, + "src": "12349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint80", + "typeString": "uint80" + }, + "typeName": { + "id": 6824, + "name": "uint80", + "nodeType": "ElementaryTypeName", + "src": "12349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint80", + "typeString": "uint80" + } + }, + "visibility": "internal" + } + ], + "src": "12348:8:20" + }, + "scope": 7969, + "src": "12293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6874, + "nodeType": "Block", + "src": "12857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6855, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6850, + "src": "12871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 6857, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "12884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + } + ], + "id": 6856, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "12879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint72", + "typeString": "type(uint72)" + } + }, + "id": 6860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "12892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "12879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "src": "12871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6868, + "nodeType": "IfStatement", + "src": "12867:103:20", + "trueBody": { + "id": 6867, + "nodeType": "Block", + "src": "12897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3732", + "id": 6863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + "value": "72" + }, + { + "id": 6864, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6850, + "src": "12953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6862, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "12918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6866, + "nodeType": "RevertStatement", + "src": "12911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6871, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6850, + "src": "12993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 6869, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "12986:6:20", + "typeDescriptions": {} + } + }, + "id": 6872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "12986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "functionReturnParameters": 6854, + "id": 6873, + "nodeType": "Return", + "src": "12979:20:20" + } + ] + }, + "documentation": { + "id": 6848, + "nodeType": "StructuredDocumentation", + "src": "12512:276:20", + "text": " @dev Returns the downcasted uint72 from uint256, reverting on\n overflow (when the input is greater than largest uint72).\n Counterpart to Solidity's `uint72` operator.\n Requirements:\n - input must fit into 72 bits" + }, + "id": 6875, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint72", + "nameLocation": "12802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6851, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6850, + "mutability": "mutable", + "name": "value", + "nameLocation": "12819:5:20", + "nodeType": "VariableDeclaration", + "scope": 6875, + "src": "12811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6849, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12810:15:20" + }, + "returnParameters": { + "id": 6854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6853, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6875, + "src": "12849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "typeName": { + "id": 6852, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "12849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "visibility": "internal" + } + ], + "src": "12848:8:20" + }, + "scope": 7969, + "src": "12793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6902, + "nodeType": "Block", + "src": "13357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6883, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6878, + "src": "13371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 6885, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "13384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + } + ], + "id": 6884, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "13379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint64", + "typeString": "type(uint64)" + } + }, + "id": 6888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "13392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "13379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "13371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6896, + "nodeType": "IfStatement", + "src": "13367:103:20", + "trueBody": { + "id": 6895, + "nodeType": "Block", + "src": "13397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3634", + "id": 6891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + { + "id": 6892, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6878, + "src": "13453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6890, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "13418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6894, + "nodeType": "RevertStatement", + "src": "13411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6899, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6878, + "src": "13493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 6897, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "13486:6:20", + "typeDescriptions": {} + } + }, + "id": 6900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 6882, + "id": 6901, + "nodeType": "Return", + "src": "13479:20:20" + } + ] + }, + "documentation": { + "id": 6876, + "nodeType": "StructuredDocumentation", + "src": "13012:276:20", + "text": " @dev Returns the downcasted uint64 from uint256, reverting on\n overflow (when the input is greater than largest uint64).\n Counterpart to Solidity's `uint64` operator.\n Requirements:\n - input must fit into 64 bits" + }, + "id": 6903, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint64", + "nameLocation": "13302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6879, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6878, + "mutability": "mutable", + "name": "value", + "nameLocation": "13319:5:20", + "nodeType": "VariableDeclaration", + "scope": 6903, + "src": "13311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6877, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13310:15:20" + }, + "returnParameters": { + "id": 6882, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6881, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6903, + "src": "13349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6880, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "13349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "13348:8:20" + }, + "scope": 7969, + "src": "13293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6930, + "nodeType": "Block", + "src": "13857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6911, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6914, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint56_$", + "typeString": "type(uint56)" + }, + "typeName": { + "id": 6913, + "name": "uint56", + "nodeType": "ElementaryTypeName", + "src": "13884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint56_$", + "typeString": "type(uint56)" + } + ], + "id": 6912, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "13879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint56", + "typeString": "type(uint56)" + } + }, + "id": 6916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "13892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "13879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint56", + "typeString": "uint56" + } + }, + "src": "13871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6924, + "nodeType": "IfStatement", + "src": "13867:103:20", + "trueBody": { + "id": 6923, + "nodeType": "Block", + "src": "13897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3536", + "id": 6919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + "value": "56" + }, + { + "id": 6920, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6918, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "13918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6922, + "nodeType": "RevertStatement", + "src": "13911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6927, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint56_$", + "typeString": "type(uint56)" + }, + "typeName": { + "id": 6925, + "name": "uint56", + "nodeType": "ElementaryTypeName", + "src": "13986:6:20", + "typeDescriptions": {} + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "13986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint56", + "typeString": "uint56" + } + }, + "functionReturnParameters": 6910, + "id": 6929, + "nodeType": "Return", + "src": "13979:20:20" + } + ] + }, + "documentation": { + "id": 6904, + "nodeType": "StructuredDocumentation", + "src": "13512:276:20", + "text": " @dev Returns the downcasted uint56 from uint256, reverting on\n overflow (when the input is greater than largest uint56).\n Counterpart to Solidity's `uint56` operator.\n Requirements:\n - input must fit into 56 bits" + }, + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint56", + "nameLocation": "13802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6906, + "mutability": "mutable", + "name": "value", + "nameLocation": "13819:5:20", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "13811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6905, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13810:15:20" + }, + "returnParameters": { + "id": 6910, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "13849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint56", + "typeString": "uint56" + }, + "typeName": { + "id": 6908, + "name": "uint56", + "nodeType": "ElementaryTypeName", + "src": "13849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint56", + "typeString": "uint56" + } + }, + "visibility": "internal" + } + ], + "src": "13848:8:20" + }, + "scope": 7969, + "src": "13793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6958, + "nodeType": "Block", + "src": "14357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6939, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "14371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + }, + "typeName": { + "id": 6941, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "14384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + } + ], + "id": 6940, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "14379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint48", + "typeString": "type(uint48)" + } + }, + "id": 6944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "14392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "14379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "src": "14371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6952, + "nodeType": "IfStatement", + "src": "14367:103:20", + "trueBody": { + "id": 6951, + "nodeType": "Block", + "src": "14397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3438", + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + { + "id": 6948, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "14453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6946, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "14418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6950, + "nodeType": "RevertStatement", + "src": "14411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6955, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "14493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + }, + "typeName": { + "id": 6953, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "14486:6:20", + "typeDescriptions": {} + } + }, + "id": 6956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "functionReturnParameters": 6938, + "id": 6957, + "nodeType": "Return", + "src": "14479:20:20" + } + ] + }, + "documentation": { + "id": 6932, + "nodeType": "StructuredDocumentation", + "src": "14012:276:20", + "text": " @dev Returns the downcasted uint48 from uint256, reverting on\n overflow (when the input is greater than largest uint48).\n Counterpart to Solidity's `uint48` operator.\n Requirements:\n - input must fit into 48 bits" + }, + "id": 6959, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint48", + "nameLocation": "14302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6934, + "mutability": "mutable", + "name": "value", + "nameLocation": "14319:5:20", + "nodeType": "VariableDeclaration", + "scope": 6959, + "src": "14311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6933, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14310:15:20" + }, + "returnParameters": { + "id": 6938, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6937, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6959, + "src": "14349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + }, + "typeName": { + "id": 6936, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "14349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "visibility": "internal" + } + ], + "src": "14348:8:20" + }, + "scope": 7969, + "src": "14293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6986, + "nodeType": "Block", + "src": "14857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6967, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6962, + "src": "14871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6970, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint40_$", + "typeString": "type(uint40)" + }, + "typeName": { + "id": 6969, + "name": "uint40", + "nodeType": "ElementaryTypeName", + "src": "14884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint40_$", + "typeString": "type(uint40)" + } + ], + "id": 6968, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "14879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint40", + "typeString": "type(uint40)" + } + }, + "id": 6972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "14892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "14879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + }, + "src": "14871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6980, + "nodeType": "IfStatement", + "src": "14867:103:20", + "trueBody": { + "id": 6979, + "nodeType": "Block", + "src": "14897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3430", + "id": 6975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + { + "id": 6976, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6962, + "src": "14953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6974, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "14918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 6977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 6978, + "nodeType": "RevertStatement", + "src": "14911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6983, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6962, + "src": "14993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6982, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint40_$", + "typeString": "type(uint40)" + }, + "typeName": { + "id": 6981, + "name": "uint40", + "nodeType": "ElementaryTypeName", + "src": "14986:6:20", + "typeDescriptions": {} + } + }, + "id": 6984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "14986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + }, + "functionReturnParameters": 6966, + "id": 6985, + "nodeType": "Return", + "src": "14979:20:20" + } + ] + }, + "documentation": { + "id": 6960, + "nodeType": "StructuredDocumentation", + "src": "14512:276:20", + "text": " @dev Returns the downcasted uint40 from uint256, reverting on\n overflow (when the input is greater than largest uint40).\n Counterpart to Solidity's `uint40` operator.\n Requirements:\n - input must fit into 40 bits" + }, + "id": 6987, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint40", + "nameLocation": "14802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6963, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6962, + "mutability": "mutable", + "name": "value", + "nameLocation": "14819:5:20", + "nodeType": "VariableDeclaration", + "scope": 6987, + "src": "14811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6961, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "14810:15:20" + }, + "returnParameters": { + "id": 6966, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6965, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6987, + "src": "14849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + }, + "typeName": { + "id": 6964, + "name": "uint40", + "nodeType": "ElementaryTypeName", + "src": "14849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + }, + "visibility": "internal" + } + ], + "src": "14848:8:20" + }, + "scope": 7969, + "src": "14793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7014, + "nodeType": "Block", + "src": "15357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6995, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6990, + "src": "15371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 6998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 6997, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + } + ], + "id": 6996, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "15379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint32", + "typeString": "type(uint32)" + } + }, + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "15392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "15379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "15371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7008, + "nodeType": "IfStatement", + "src": "15367:103:20", + "trueBody": { + "id": 7007, + "nodeType": "Block", + "src": "15397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3332", + "id": 7003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + { + "id": 7004, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6990, + "src": "15453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7002, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "15418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 7005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7006, + "nodeType": "RevertStatement", + "src": "15411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7011, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6990, + "src": "15493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 7009, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15486:6:20", + "typeDescriptions": {} + } + }, + "id": 7012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "functionReturnParameters": 6994, + "id": 7013, + "nodeType": "Return", + "src": "15479:20:20" + } + ] + }, + "documentation": { + "id": 6988, + "nodeType": "StructuredDocumentation", + "src": "15012:276:20", + "text": " @dev Returns the downcasted uint32 from uint256, reverting on\n overflow (when the input is greater than largest uint32).\n Counterpart to Solidity's `uint32` operator.\n Requirements:\n - input must fit into 32 bits" + }, + "id": 7015, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint32", + "nameLocation": "15302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6990, + "mutability": "mutable", + "name": "value", + "nameLocation": "15319:5:20", + "nodeType": "VariableDeclaration", + "scope": 7015, + "src": "15311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6989, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15310:15:20" + }, + "returnParameters": { + "id": 6994, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6993, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7015, + "src": "15349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 6992, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "src": "15348:8:20" + }, + "scope": 7969, + "src": "15293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7042, + "nodeType": "Block", + "src": "15857:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7023, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "15871:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 7026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15884:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint24_$", + "typeString": "type(uint24)" + }, + "typeName": { + "id": 7025, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "15884:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint24_$", + "typeString": "type(uint24)" + } + ], + "id": 7024, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "15879:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15879:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint24", + "typeString": "type(uint24)" + } + }, + "id": 7028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "15892:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "15879:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "src": "15871:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7036, + "nodeType": "IfStatement", + "src": "15867:103:20", + "trueBody": { + "id": 7035, + "nodeType": "Block", + "src": "15897:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3234", + "id": 7031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15949:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + "value": "24" + }, + { + "id": 7032, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "15953:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7030, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "15918:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 7033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15918:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7034, + "nodeType": "RevertStatement", + "src": "15911:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7039, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "15993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7038, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint24_$", + "typeString": "type(uint24)" + }, + "typeName": { + "id": 7037, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "15986:6:20", + "typeDescriptions": {} + } + }, + "id": 7040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "15986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "functionReturnParameters": 7022, + "id": 7041, + "nodeType": "Return", + "src": "15979:20:20" + } + ] + }, + "documentation": { + "id": 7016, + "nodeType": "StructuredDocumentation", + "src": "15512:276:20", + "text": " @dev Returns the downcasted uint24 from uint256, reverting on\n overflow (when the input is greater than largest uint24).\n Counterpart to Solidity's `uint24` operator.\n Requirements:\n - input must fit into 24 bits" + }, + "id": 7043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint24", + "nameLocation": "15802:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7018, + "mutability": "mutable", + "name": "value", + "nameLocation": "15819:5:20", + "nodeType": "VariableDeclaration", + "scope": 7043, + "src": "15811:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15811:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15810:15:20" + }, + "returnParameters": { + "id": 7022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7021, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7043, + "src": "15849:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + }, + "typeName": { + "id": 7020, + "name": "uint24", + "nodeType": "ElementaryTypeName", + "src": "15849:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint24", + "typeString": "uint24" + } + }, + "visibility": "internal" + } + ], + "src": "15848:8:20" + }, + "scope": 7969, + "src": "15793:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7070, + "nodeType": "Block", + "src": "16357:149:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7051, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7046, + "src": "16371:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 7054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16384:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 7053, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "16384:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + } + ], + "id": 7052, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "16379:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16379:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint16", + "typeString": "type(uint16)" + } + }, + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "16392:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "16379:16:20", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "16371:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7064, + "nodeType": "IfStatement", + "src": "16367:103:20", + "trueBody": { + "id": 7063, + "nodeType": "Block", + "src": "16397:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3136", + "id": 7059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16449:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + { + "id": 7060, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7046, + "src": "16453:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7058, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "16418:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 7061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16418:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7062, + "nodeType": "RevertStatement", + "src": "16411:48:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7067, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7046, + "src": "16493:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16486:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 7065, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "16486:6:20", + "typeDescriptions": {} + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16486:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 7050, + "id": 7069, + "nodeType": "Return", + "src": "16479:20:20" + } + ] + }, + "documentation": { + "id": 7044, + "nodeType": "StructuredDocumentation", + "src": "16012:276:20", + "text": " @dev Returns the downcasted uint16 from uint256, reverting on\n overflow (when the input is greater than largest uint16).\n Counterpart to Solidity's `uint16` operator.\n Requirements:\n - input must fit into 16 bits" + }, + "id": 7071, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint16", + "nameLocation": "16302:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7046, + "mutability": "mutable", + "name": "value", + "nameLocation": "16319:5:20", + "nodeType": "VariableDeclaration", + "scope": 7071, + "src": "16311:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16311:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16310:15:20" + }, + "returnParameters": { + "id": 7050, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7049, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7071, + "src": "16349:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 7048, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "16349:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "visibility": "internal" + } + ], + "src": "16348:8:20" + }, + "scope": 7969, + "src": "16293:213:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7098, + "nodeType": "Block", + "src": "16851:146:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7079, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7074, + "src": "16865:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 7082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16878:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 7081, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16878:5:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + } + ], + "id": 7080, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "16873:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16873:11:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint8", + "typeString": "type(uint8)" + } + }, + "id": 7084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "16885:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "16873:15:20", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16865:23:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7092, + "nodeType": "IfStatement", + "src": "16861:101:20", + "trueBody": { + "id": 7091, + "nodeType": "Block", + "src": "16890:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "38", + "id": 7087, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16942:1:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + { + "id": 7088, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7074, + "src": "16945:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7086, + "name": "SafeCastOverflowedUintDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6214, + "src": "16911:30:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint8,uint256) pure returns (error)" + } + }, + "id": 7089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16911:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7090, + "nodeType": "RevertStatement", + "src": "16904:47:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7095, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7074, + "src": "16984:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16978:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 7093, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16978:5:20", + "typeDescriptions": {} + } + }, + "id": 7096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "16978:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 7078, + "id": 7097, + "nodeType": "Return", + "src": "16971:19:20" + } + ] + }, + "documentation": { + "id": 7072, + "nodeType": "StructuredDocumentation", + "src": "16512:272:20", + "text": " @dev Returns the downcasted uint8 from uint256, reverting on\n overflow (when the input is greater than largest uint8).\n Counterpart to Solidity's `uint8` operator.\n Requirements:\n - input must fit into 8 bits" + }, + "id": 7099, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint8", + "nameLocation": "16798:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7074, + "mutability": "mutable", + "name": "value", + "nameLocation": "16814:5:20", + "nodeType": "VariableDeclaration", + "scope": 7099, + "src": "16806:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16806:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16805:15:20" + }, + "returnParameters": { + "id": 7078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7077, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7099, + "src": "16844:5:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7076, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "16844:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "16843:7:20" + }, + "scope": 7969, + "src": "16789:208:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7121, + "nodeType": "Block", + "src": "17233:128:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7107, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7102, + "src": "17247:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "hexValue": "30", + "id": 7108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17255:1:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17247:9:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7115, + "nodeType": "IfStatement", + "src": "17243:81:20", + "trueBody": { + "id": 7114, + "nodeType": "Block", + "src": "17258:66:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 7111, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7102, + "src": "17307:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7110, + "name": "SafeCastOverflowedIntToUint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "17279:27:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_int256_$returns$_t_error_$", + "typeString": "function (int256) pure returns (error)" + } + }, + "id": 7112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17279:34:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7113, + "nodeType": "RevertStatement", + "src": "17272:41:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7118, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7102, + "src": "17348:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17340:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 7116, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17340:7:20", + "typeDescriptions": {} + } + }, + "id": 7119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17340:14:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7106, + "id": 7120, + "nodeType": "Return", + "src": "17333:21:20" + } + ] + }, + "documentation": { + "id": 7100, + "nodeType": "StructuredDocumentation", + "src": "17003:160:20", + "text": " @dev Converts a signed int256 into an unsigned uint256.\n Requirements:\n - input must be greater than or equal to 0." + }, + "id": 7122, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint256", + "nameLocation": "17177:9:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7102, + "mutability": "mutable", + "name": "value", + "nameLocation": "17194:5:20", + "nodeType": "VariableDeclaration", + "scope": 7122, + "src": "17187:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7101, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "17187:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "17186:14:20" + }, + "returnParameters": { + "id": 7106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7105, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7122, + "src": "17224:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7104, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17224:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17223:9:20" + }, + "scope": 7969, + "src": "17168:193:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7147, + "nodeType": "Block", + "src": "17758:150:20", + "statements": [ + { + "expression": { + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7130, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7128, + "src": "17768:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7133, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7125, + "src": "17788:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17781:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int248_$", + "typeString": "type(int248)" + }, + "typeName": { + "id": 7131, + "name": "int248", + "nodeType": "ElementaryTypeName", + "src": "17781:6:20", + "typeDescriptions": {} + } + }, + "id": 7134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17781:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "src": "17768:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "id": 7136, + "nodeType": "ExpressionStatement", + "src": "17768:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7137, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7128, + "src": "17808:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7138, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7125, + "src": "17822:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "17808:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7146, + "nodeType": "IfStatement", + "src": "17804:98:20", + "trueBody": { + "id": 7145, + "nodeType": "Block", + "src": "17829:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323438", + "id": 7141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17880:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_248_by_1", + "typeString": "int_const 248" + }, + "value": "248" + }, + { + "id": 7142, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7125, + "src": "17885:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_248_by_1", + "typeString": "int_const 248" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7140, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "17850:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "17850:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7144, + "nodeType": "RevertStatement", + "src": "17843:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7123, + "nodeType": "StructuredDocumentation", + "src": "17367:312:20", + "text": " @dev Returns the downcasted int248 from int256, reverting on\n overflow (when the input is less than smallest int248 or\n greater than largest int248).\n Counterpart to Solidity's `int248` operator.\n Requirements:\n - input must fit into 248 bits" + }, + "id": 7148, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt248", + "nameLocation": "17693:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7125, + "mutability": "mutable", + "name": "value", + "nameLocation": "17709:5:20", + "nodeType": "VariableDeclaration", + "scope": 7148, + "src": "17702:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7124, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "17702:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "17701:14:20" + }, + "returnParameters": { + "id": 7129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7128, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "17746:10:20", + "nodeType": "VariableDeclaration", + "scope": 7148, + "src": "17739:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + }, + "typeName": { + "id": 7127, + "name": "int248", + "nodeType": "ElementaryTypeName", + "src": "17739:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int248", + "typeString": "int248" + } + }, + "visibility": "internal" + } + ], + "src": "17738:19:20" + }, + "scope": 7969, + "src": "17684:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7173, + "nodeType": "Block", + "src": "18305:150:20", + "statements": [ + { + "expression": { + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7156, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7154, + "src": "18315:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7159, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7151, + "src": "18335:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18328:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int240_$", + "typeString": "type(int240)" + }, + "typeName": { + "id": 7157, + "name": "int240", + "nodeType": "ElementaryTypeName", + "src": "18328:6:20", + "typeDescriptions": {} + } + }, + "id": 7160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18328:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "src": "18315:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "id": 7162, + "nodeType": "ExpressionStatement", + "src": "18315:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7163, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7154, + "src": "18355:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7164, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7151, + "src": "18369:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "18355:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7172, + "nodeType": "IfStatement", + "src": "18351:98:20", + "trueBody": { + "id": 7171, + "nodeType": "Block", + "src": "18376:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323430", + "id": 7167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18427:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_240_by_1", + "typeString": "int_const 240" + }, + "value": "240" + }, + { + "id": 7168, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7151, + "src": "18432:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_240_by_1", + "typeString": "int_const 240" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7166, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "18397:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18397:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7170, + "nodeType": "RevertStatement", + "src": "18390:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7149, + "nodeType": "StructuredDocumentation", + "src": "17914:312:20", + "text": " @dev Returns the downcasted int240 from int256, reverting on\n overflow (when the input is less than smallest int240 or\n greater than largest int240).\n Counterpart to Solidity's `int240` operator.\n Requirements:\n - input must fit into 240 bits" + }, + "id": 7174, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt240", + "nameLocation": "18240:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7151, + "mutability": "mutable", + "name": "value", + "nameLocation": "18256:5:20", + "nodeType": "VariableDeclaration", + "scope": 7174, + "src": "18249:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7150, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "18249:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "18248:14:20" + }, + "returnParameters": { + "id": 7155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7154, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "18293:10:20", + "nodeType": "VariableDeclaration", + "scope": 7174, + "src": "18286:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + }, + "typeName": { + "id": 7153, + "name": "int240", + "nodeType": "ElementaryTypeName", + "src": "18286:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int240", + "typeString": "int240" + } + }, + "visibility": "internal" + } + ], + "src": "18285:19:20" + }, + "scope": 7969, + "src": "18231:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7199, + "nodeType": "Block", + "src": "18852:150:20", + "statements": [ + { + "expression": { + "id": 7187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7182, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7180, + "src": "18862:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7185, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7177, + "src": "18882:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18875:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int232_$", + "typeString": "type(int232)" + }, + "typeName": { + "id": 7183, + "name": "int232", + "nodeType": "ElementaryTypeName", + "src": "18875:6:20", + "typeDescriptions": {} + } + }, + "id": 7186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18875:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "src": "18862:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "id": 7188, + "nodeType": "ExpressionStatement", + "src": "18862:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7189, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7180, + "src": "18902:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7190, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7177, + "src": "18916:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "18902:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7198, + "nodeType": "IfStatement", + "src": "18898:98:20", + "trueBody": { + "id": 7197, + "nodeType": "Block", + "src": "18923:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323332", + "id": 7193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18974:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_232_by_1", + "typeString": "int_const 232" + }, + "value": "232" + }, + { + "id": 7194, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7177, + "src": "18979:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_232_by_1", + "typeString": "int_const 232" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7192, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "18944:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "18944:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7196, + "nodeType": "RevertStatement", + "src": "18937:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7175, + "nodeType": "StructuredDocumentation", + "src": "18461:312:20", + "text": " @dev Returns the downcasted int232 from int256, reverting on\n overflow (when the input is less than smallest int232 or\n greater than largest int232).\n Counterpart to Solidity's `int232` operator.\n Requirements:\n - input must fit into 232 bits" + }, + "id": 7200, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt232", + "nameLocation": "18787:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7177, + "mutability": "mutable", + "name": "value", + "nameLocation": "18803:5:20", + "nodeType": "VariableDeclaration", + "scope": 7200, + "src": "18796:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7176, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "18796:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "18795:14:20" + }, + "returnParameters": { + "id": 7181, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7180, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "18840:10:20", + "nodeType": "VariableDeclaration", + "scope": 7200, + "src": "18833:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + }, + "typeName": { + "id": 7179, + "name": "int232", + "nodeType": "ElementaryTypeName", + "src": "18833:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int232", + "typeString": "int232" + } + }, + "visibility": "internal" + } + ], + "src": "18832:19:20" + }, + "scope": 7969, + "src": "18778:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7225, + "nodeType": "Block", + "src": "19399:150:20", + "statements": [ + { + "expression": { + "id": 7213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7208, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7206, + "src": "19409:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7211, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7203, + "src": "19429:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "19422:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int224_$", + "typeString": "type(int224)" + }, + "typeName": { + "id": 7209, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "19422:6:20", + "typeDescriptions": {} + } + }, + "id": 7212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19422:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "src": "19409:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "id": 7214, + "nodeType": "ExpressionStatement", + "src": "19409:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7215, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7206, + "src": "19449:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7216, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7203, + "src": "19463:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "19449:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7224, + "nodeType": "IfStatement", + "src": "19445:98:20", + "trueBody": { + "id": 7223, + "nodeType": "Block", + "src": "19470:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323234", + "id": 7219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19521:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_224_by_1", + "typeString": "int_const 224" + }, + "value": "224" + }, + { + "id": 7220, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7203, + "src": "19526:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_224_by_1", + "typeString": "int_const 224" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7218, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "19491:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19491:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7222, + "nodeType": "RevertStatement", + "src": "19484:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7201, + "nodeType": "StructuredDocumentation", + "src": "19008:312:20", + "text": " @dev Returns the downcasted int224 from int256, reverting on\n overflow (when the input is less than smallest int224 or\n greater than largest int224).\n Counterpart to Solidity's `int224` operator.\n Requirements:\n - input must fit into 224 bits" + }, + "id": 7226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt224", + "nameLocation": "19334:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7203, + "mutability": "mutable", + "name": "value", + "nameLocation": "19350:5:20", + "nodeType": "VariableDeclaration", + "scope": 7226, + "src": "19343:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7202, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "19343:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "19342:14:20" + }, + "returnParameters": { + "id": 7207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7206, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "19387:10:20", + "nodeType": "VariableDeclaration", + "scope": 7226, + "src": "19380:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + }, + "typeName": { + "id": 7205, + "name": "int224", + "nodeType": "ElementaryTypeName", + "src": "19380:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int224", + "typeString": "int224" + } + }, + "visibility": "internal" + } + ], + "src": "19379:19:20" + }, + "scope": 7969, + "src": "19325:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7251, + "nodeType": "Block", + "src": "19946:150:20", + "statements": [ + { + "expression": { + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7234, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7232, + "src": "19956:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7237, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7229, + "src": "19976:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "19969:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int216_$", + "typeString": "type(int216)" + }, + "typeName": { + "id": 7235, + "name": "int216", + "nodeType": "ElementaryTypeName", + "src": "19969:6:20", + "typeDescriptions": {} + } + }, + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "19969:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "src": "19956:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "id": 7240, + "nodeType": "ExpressionStatement", + "src": "19956:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7241, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7232, + "src": "19996:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7242, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7229, + "src": "20010:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "19996:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7250, + "nodeType": "IfStatement", + "src": "19992:98:20", + "trueBody": { + "id": 7249, + "nodeType": "Block", + "src": "20017:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323136", + "id": 7245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20068:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_216_by_1", + "typeString": "int_const 216" + }, + "value": "216" + }, + { + "id": 7246, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7229, + "src": "20073:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_216_by_1", + "typeString": "int_const 216" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7244, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "20038:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20038:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7248, + "nodeType": "RevertStatement", + "src": "20031:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7227, + "nodeType": "StructuredDocumentation", + "src": "19555:312:20", + "text": " @dev Returns the downcasted int216 from int256, reverting on\n overflow (when the input is less than smallest int216 or\n greater than largest int216).\n Counterpart to Solidity's `int216` operator.\n Requirements:\n - input must fit into 216 bits" + }, + "id": 7252, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt216", + "nameLocation": "19881:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7229, + "mutability": "mutable", + "name": "value", + "nameLocation": "19897:5:20", + "nodeType": "VariableDeclaration", + "scope": 7252, + "src": "19890:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7228, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "19890:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "19889:14:20" + }, + "returnParameters": { + "id": 7233, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7232, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "19934:10:20", + "nodeType": "VariableDeclaration", + "scope": 7252, + "src": "19927:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + }, + "typeName": { + "id": 7231, + "name": "int216", + "nodeType": "ElementaryTypeName", + "src": "19927:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int216", + "typeString": "int216" + } + }, + "visibility": "internal" + } + ], + "src": "19926:19:20" + }, + "scope": 7969, + "src": "19872:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7277, + "nodeType": "Block", + "src": "20493:150:20", + "statements": [ + { + "expression": { + "id": 7265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7260, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7258, + "src": "20503:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7263, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7255, + "src": "20523:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20516:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int208_$", + "typeString": "type(int208)" + }, + "typeName": { + "id": 7261, + "name": "int208", + "nodeType": "ElementaryTypeName", + "src": "20516:6:20", + "typeDescriptions": {} + } + }, + "id": 7264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20516:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "src": "20503:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "id": 7266, + "nodeType": "ExpressionStatement", + "src": "20503:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7267, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7258, + "src": "20543:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7268, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7255, + "src": "20557:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "20543:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7276, + "nodeType": "IfStatement", + "src": "20539:98:20", + "trueBody": { + "id": 7275, + "nodeType": "Block", + "src": "20564:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323038", + "id": 7271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20615:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_208_by_1", + "typeString": "int_const 208" + }, + "value": "208" + }, + { + "id": 7272, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7255, + "src": "20620:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_208_by_1", + "typeString": "int_const 208" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7270, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "20585:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "20585:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7274, + "nodeType": "RevertStatement", + "src": "20578:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7253, + "nodeType": "StructuredDocumentation", + "src": "20102:312:20", + "text": " @dev Returns the downcasted int208 from int256, reverting on\n overflow (when the input is less than smallest int208 or\n greater than largest int208).\n Counterpart to Solidity's `int208` operator.\n Requirements:\n - input must fit into 208 bits" + }, + "id": 7278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt208", + "nameLocation": "20428:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7256, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7255, + "mutability": "mutable", + "name": "value", + "nameLocation": "20444:5:20", + "nodeType": "VariableDeclaration", + "scope": 7278, + "src": "20437:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7254, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "20437:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "20436:14:20" + }, + "returnParameters": { + "id": 7259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7258, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "20481:10:20", + "nodeType": "VariableDeclaration", + "scope": 7278, + "src": "20474:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + }, + "typeName": { + "id": 7257, + "name": "int208", + "nodeType": "ElementaryTypeName", + "src": "20474:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int208", + "typeString": "int208" + } + }, + "visibility": "internal" + } + ], + "src": "20473:19:20" + }, + "scope": 7969, + "src": "20419:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7303, + "nodeType": "Block", + "src": "21040:150:20", + "statements": [ + { + "expression": { + "id": 7291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7286, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7284, + "src": "21050:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7289, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7281, + "src": "21070:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21063:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int200_$", + "typeString": "type(int200)" + }, + "typeName": { + "id": 7287, + "name": "int200", + "nodeType": "ElementaryTypeName", + "src": "21063:6:20", + "typeDescriptions": {} + } + }, + "id": 7290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21063:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "src": "21050:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "id": 7292, + "nodeType": "ExpressionStatement", + "src": "21050:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7293, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7284, + "src": "21090:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7294, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7281, + "src": "21104:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "21090:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7302, + "nodeType": "IfStatement", + "src": "21086:98:20", + "trueBody": { + "id": 7301, + "nodeType": "Block", + "src": "21111:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "323030", + "id": 7297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21162:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_200_by_1", + "typeString": "int_const 200" + }, + "value": "200" + }, + { + "id": 7298, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7281, + "src": "21167:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_200_by_1", + "typeString": "int_const 200" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7296, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "21132:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21132:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7300, + "nodeType": "RevertStatement", + "src": "21125:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7279, + "nodeType": "StructuredDocumentation", + "src": "20649:312:20", + "text": " @dev Returns the downcasted int200 from int256, reverting on\n overflow (when the input is less than smallest int200 or\n greater than largest int200).\n Counterpart to Solidity's `int200` operator.\n Requirements:\n - input must fit into 200 bits" + }, + "id": 7304, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt200", + "nameLocation": "20975:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7282, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7281, + "mutability": "mutable", + "name": "value", + "nameLocation": "20991:5:20", + "nodeType": "VariableDeclaration", + "scope": 7304, + "src": "20984:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7280, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "20984:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "20983:14:20" + }, + "returnParameters": { + "id": 7285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7284, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "21028:10:20", + "nodeType": "VariableDeclaration", + "scope": 7304, + "src": "21021:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + }, + "typeName": { + "id": 7283, + "name": "int200", + "nodeType": "ElementaryTypeName", + "src": "21021:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int200", + "typeString": "int200" + } + }, + "visibility": "internal" + } + ], + "src": "21020:19:20" + }, + "scope": 7969, + "src": "20966:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7329, + "nodeType": "Block", + "src": "21587:150:20", + "statements": [ + { + "expression": { + "id": 7317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7312, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7310, + "src": "21597:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7315, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7307, + "src": "21617:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21610:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int192_$", + "typeString": "type(int192)" + }, + "typeName": { + "id": 7313, + "name": "int192", + "nodeType": "ElementaryTypeName", + "src": "21610:6:20", + "typeDescriptions": {} + } + }, + "id": 7316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21610:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "src": "21597:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "id": 7318, + "nodeType": "ExpressionStatement", + "src": "21597:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7319, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7310, + "src": "21637:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7320, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7307, + "src": "21651:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "21637:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7328, + "nodeType": "IfStatement", + "src": "21633:98:20", + "trueBody": { + "id": 7327, + "nodeType": "Block", + "src": "21658:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313932", + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21709:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_192_by_1", + "typeString": "int_const 192" + }, + "value": "192" + }, + { + "id": 7324, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7307, + "src": "21714:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_192_by_1", + "typeString": "int_const 192" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7322, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "21679:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "21679:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7326, + "nodeType": "RevertStatement", + "src": "21672:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7305, + "nodeType": "StructuredDocumentation", + "src": "21196:312:20", + "text": " @dev Returns the downcasted int192 from int256, reverting on\n overflow (when the input is less than smallest int192 or\n greater than largest int192).\n Counterpart to Solidity's `int192` operator.\n Requirements:\n - input must fit into 192 bits" + }, + "id": 7330, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt192", + "nameLocation": "21522:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7308, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7307, + "mutability": "mutable", + "name": "value", + "nameLocation": "21538:5:20", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21531:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7306, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "21531:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "21530:14:20" + }, + "returnParameters": { + "id": 7311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7310, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "21575:10:20", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21568:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + }, + "typeName": { + "id": 7309, + "name": "int192", + "nodeType": "ElementaryTypeName", + "src": "21568:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int192", + "typeString": "int192" + } + }, + "visibility": "internal" + } + ], + "src": "21567:19:20" + }, + "scope": 7969, + "src": "21513:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7355, + "nodeType": "Block", + "src": "22134:150:20", + "statements": [ + { + "expression": { + "id": 7343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7338, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7336, + "src": "22144:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7341, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "22164:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22157:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int184_$", + "typeString": "type(int184)" + }, + "typeName": { + "id": 7339, + "name": "int184", + "nodeType": "ElementaryTypeName", + "src": "22157:6:20", + "typeDescriptions": {} + } + }, + "id": 7342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "22157:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "src": "22144:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "id": 7344, + "nodeType": "ExpressionStatement", + "src": "22144:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7345, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7336, + "src": "22184:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7346, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "22198:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "22184:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7354, + "nodeType": "IfStatement", + "src": "22180:98:20", + "trueBody": { + "id": 7353, + "nodeType": "Block", + "src": "22205:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313834", + "id": 7349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22256:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_184_by_1", + "typeString": "int_const 184" + }, + "value": "184" + }, + { + "id": 7350, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "22261:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_184_by_1", + "typeString": "int_const 184" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7348, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "22226:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "22226:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7352, + "nodeType": "RevertStatement", + "src": "22219:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7331, + "nodeType": "StructuredDocumentation", + "src": "21743:312:20", + "text": " @dev Returns the downcasted int184 from int256, reverting on\n overflow (when the input is less than smallest int184 or\n greater than largest int184).\n Counterpart to Solidity's `int184` operator.\n Requirements:\n - input must fit into 184 bits" + }, + "id": 7356, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt184", + "nameLocation": "22069:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7333, + "mutability": "mutable", + "name": "value", + "nameLocation": "22085:5:20", + "nodeType": "VariableDeclaration", + "scope": 7356, + "src": "22078:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7332, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "22078:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "22077:14:20" + }, + "returnParameters": { + "id": 7337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7336, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "22122:10:20", + "nodeType": "VariableDeclaration", + "scope": 7356, + "src": "22115:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + }, + "typeName": { + "id": 7335, + "name": "int184", + "nodeType": "ElementaryTypeName", + "src": "22115:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int184", + "typeString": "int184" + } + }, + "visibility": "internal" + } + ], + "src": "22114:19:20" + }, + "scope": 7969, + "src": "22060:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7381, + "nodeType": "Block", + "src": "22681:150:20", + "statements": [ + { + "expression": { + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7364, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7362, + "src": "22691:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7367, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7359, + "src": "22711:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22704:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int176_$", + "typeString": "type(int176)" + }, + "typeName": { + "id": 7365, + "name": "int176", + "nodeType": "ElementaryTypeName", + "src": "22704:6:20", + "typeDescriptions": {} + } + }, + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "22704:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "src": "22691:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "id": 7370, + "nodeType": "ExpressionStatement", + "src": "22691:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7371, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7362, + "src": "22731:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7372, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7359, + "src": "22745:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "22731:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7380, + "nodeType": "IfStatement", + "src": "22727:98:20", + "trueBody": { + "id": 7379, + "nodeType": "Block", + "src": "22752:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313736", + "id": 7375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22803:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_176_by_1", + "typeString": "int_const 176" + }, + "value": "176" + }, + { + "id": 7376, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7359, + "src": "22808:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_176_by_1", + "typeString": "int_const 176" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7374, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "22773:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "22773:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7378, + "nodeType": "RevertStatement", + "src": "22766:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7357, + "nodeType": "StructuredDocumentation", + "src": "22290:312:20", + "text": " @dev Returns the downcasted int176 from int256, reverting on\n overflow (when the input is less than smallest int176 or\n greater than largest int176).\n Counterpart to Solidity's `int176` operator.\n Requirements:\n - input must fit into 176 bits" + }, + "id": 7382, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt176", + "nameLocation": "22616:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7359, + "mutability": "mutable", + "name": "value", + "nameLocation": "22632:5:20", + "nodeType": "VariableDeclaration", + "scope": 7382, + "src": "22625:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7358, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "22625:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "22624:14:20" + }, + "returnParameters": { + "id": 7363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7362, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "22669:10:20", + "nodeType": "VariableDeclaration", + "scope": 7382, + "src": "22662:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + }, + "typeName": { + "id": 7361, + "name": "int176", + "nodeType": "ElementaryTypeName", + "src": "22662:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int176", + "typeString": "int176" + } + }, + "visibility": "internal" + } + ], + "src": "22661:19:20" + }, + "scope": 7969, + "src": "22607:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7407, + "nodeType": "Block", + "src": "23228:150:20", + "statements": [ + { + "expression": { + "id": 7395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7390, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7388, + "src": "23238:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7393, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7385, + "src": "23258:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23251:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int168_$", + "typeString": "type(int168)" + }, + "typeName": { + "id": 7391, + "name": "int168", + "nodeType": "ElementaryTypeName", + "src": "23251:6:20", + "typeDescriptions": {} + } + }, + "id": 7394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "23251:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "src": "23238:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "id": 7396, + "nodeType": "ExpressionStatement", + "src": "23238:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7397, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7388, + "src": "23278:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7398, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7385, + "src": "23292:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "23278:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7406, + "nodeType": "IfStatement", + "src": "23274:98:20", + "trueBody": { + "id": 7405, + "nodeType": "Block", + "src": "23299:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313638", + "id": 7401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23350:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_168_by_1", + "typeString": "int_const 168" + }, + "value": "168" + }, + { + "id": 7402, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7385, + "src": "23355:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_168_by_1", + "typeString": "int_const 168" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7400, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "23320:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "23320:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7404, + "nodeType": "RevertStatement", + "src": "23313:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7383, + "nodeType": "StructuredDocumentation", + "src": "22837:312:20", + "text": " @dev Returns the downcasted int168 from int256, reverting on\n overflow (when the input is less than smallest int168 or\n greater than largest int168).\n Counterpart to Solidity's `int168` operator.\n Requirements:\n - input must fit into 168 bits" + }, + "id": 7408, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt168", + "nameLocation": "23163:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7386, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7385, + "mutability": "mutable", + "name": "value", + "nameLocation": "23179:5:20", + "nodeType": "VariableDeclaration", + "scope": 7408, + "src": "23172:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7384, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "23172:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "23171:14:20" + }, + "returnParameters": { + "id": 7389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7388, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "23216:10:20", + "nodeType": "VariableDeclaration", + "scope": 7408, + "src": "23209:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + }, + "typeName": { + "id": 7387, + "name": "int168", + "nodeType": "ElementaryTypeName", + "src": "23209:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int168", + "typeString": "int168" + } + }, + "visibility": "internal" + } + ], + "src": "23208:19:20" + }, + "scope": 7969, + "src": "23154:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7433, + "nodeType": "Block", + "src": "23775:150:20", + "statements": [ + { + "expression": { + "id": 7421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7416, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7414, + "src": "23785:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7419, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7411, + "src": "23805:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23798:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int160_$", + "typeString": "type(int160)" + }, + "typeName": { + "id": 7417, + "name": "int160", + "nodeType": "ElementaryTypeName", + "src": "23798:6:20", + "typeDescriptions": {} + } + }, + "id": 7420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "23798:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "src": "23785:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "id": 7422, + "nodeType": "ExpressionStatement", + "src": "23785:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7423, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7414, + "src": "23825:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7424, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7411, + "src": "23839:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "23825:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7432, + "nodeType": "IfStatement", + "src": "23821:98:20", + "trueBody": { + "id": 7431, + "nodeType": "Block", + "src": "23846:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313630", + "id": 7427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23897:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_160_by_1", + "typeString": "int_const 160" + }, + "value": "160" + }, + { + "id": 7428, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7411, + "src": "23902:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_160_by_1", + "typeString": "int_const 160" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7426, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "23867:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "23867:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7430, + "nodeType": "RevertStatement", + "src": "23860:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7409, + "nodeType": "StructuredDocumentation", + "src": "23384:312:20", + "text": " @dev Returns the downcasted int160 from int256, reverting on\n overflow (when the input is less than smallest int160 or\n greater than largest int160).\n Counterpart to Solidity's `int160` operator.\n Requirements:\n - input must fit into 160 bits" + }, + "id": 7434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt160", + "nameLocation": "23710:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7412, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7411, + "mutability": "mutable", + "name": "value", + "nameLocation": "23726:5:20", + "nodeType": "VariableDeclaration", + "scope": 7434, + "src": "23719:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7410, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "23719:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "23718:14:20" + }, + "returnParameters": { + "id": 7415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7414, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "23763:10:20", + "nodeType": "VariableDeclaration", + "scope": 7434, + "src": "23756:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + }, + "typeName": { + "id": 7413, + "name": "int160", + "nodeType": "ElementaryTypeName", + "src": "23756:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int160", + "typeString": "int160" + } + }, + "visibility": "internal" + } + ], + "src": "23755:19:20" + }, + "scope": 7969, + "src": "23701:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7459, + "nodeType": "Block", + "src": "24322:150:20", + "statements": [ + { + "expression": { + "id": 7447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7442, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7440, + "src": "24332:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7445, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7437, + "src": "24352:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24345:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int152_$", + "typeString": "type(int152)" + }, + "typeName": { + "id": 7443, + "name": "int152", + "nodeType": "ElementaryTypeName", + "src": "24345:6:20", + "typeDescriptions": {} + } + }, + "id": 7446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "24345:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "src": "24332:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "id": 7448, + "nodeType": "ExpressionStatement", + "src": "24332:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7449, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7440, + "src": "24372:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7450, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7437, + "src": "24386:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "24372:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7458, + "nodeType": "IfStatement", + "src": "24368:98:20", + "trueBody": { + "id": 7457, + "nodeType": "Block", + "src": "24393:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313532", + "id": 7453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24444:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_152_by_1", + "typeString": "int_const 152" + }, + "value": "152" + }, + { + "id": 7454, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7437, + "src": "24449:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_152_by_1", + "typeString": "int_const 152" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7452, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "24414:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "24414:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7456, + "nodeType": "RevertStatement", + "src": "24407:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7435, + "nodeType": "StructuredDocumentation", + "src": "23931:312:20", + "text": " @dev Returns the downcasted int152 from int256, reverting on\n overflow (when the input is less than smallest int152 or\n greater than largest int152).\n Counterpart to Solidity's `int152` operator.\n Requirements:\n - input must fit into 152 bits" + }, + "id": 7460, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt152", + "nameLocation": "24257:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7437, + "mutability": "mutable", + "name": "value", + "nameLocation": "24273:5:20", + "nodeType": "VariableDeclaration", + "scope": 7460, + "src": "24266:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7436, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "24266:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "24265:14:20" + }, + "returnParameters": { + "id": 7441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7440, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "24310:10:20", + "nodeType": "VariableDeclaration", + "scope": 7460, + "src": "24303:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + }, + "typeName": { + "id": 7439, + "name": "int152", + "nodeType": "ElementaryTypeName", + "src": "24303:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int152", + "typeString": "int152" + } + }, + "visibility": "internal" + } + ], + "src": "24302:19:20" + }, + "scope": 7969, + "src": "24248:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7485, + "nodeType": "Block", + "src": "24869:150:20", + "statements": [ + { + "expression": { + "id": 7473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7468, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7466, + "src": "24879:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7471, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7463, + "src": "24899:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24892:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int144_$", + "typeString": "type(int144)" + }, + "typeName": { + "id": 7469, + "name": "int144", + "nodeType": "ElementaryTypeName", + "src": "24892:6:20", + "typeDescriptions": {} + } + }, + "id": 7472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "24892:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "src": "24879:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "id": 7474, + "nodeType": "ExpressionStatement", + "src": "24879:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7475, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7466, + "src": "24919:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7476, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7463, + "src": "24933:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "24919:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7484, + "nodeType": "IfStatement", + "src": "24915:98:20", + "trueBody": { + "id": 7483, + "nodeType": "Block", + "src": "24940:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313434", + "id": 7479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24991:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_144_by_1", + "typeString": "int_const 144" + }, + "value": "144" + }, + { + "id": 7480, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7463, + "src": "24996:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_144_by_1", + "typeString": "int_const 144" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7478, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "24961:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "24961:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7482, + "nodeType": "RevertStatement", + "src": "24954:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7461, + "nodeType": "StructuredDocumentation", + "src": "24478:312:20", + "text": " @dev Returns the downcasted int144 from int256, reverting on\n overflow (when the input is less than smallest int144 or\n greater than largest int144).\n Counterpart to Solidity's `int144` operator.\n Requirements:\n - input must fit into 144 bits" + }, + "id": 7486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt144", + "nameLocation": "24804:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7464, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7463, + "mutability": "mutable", + "name": "value", + "nameLocation": "24820:5:20", + "nodeType": "VariableDeclaration", + "scope": 7486, + "src": "24813:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7462, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "24813:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "24812:14:20" + }, + "returnParameters": { + "id": 7467, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7466, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "24857:10:20", + "nodeType": "VariableDeclaration", + "scope": 7486, + "src": "24850:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + }, + "typeName": { + "id": 7465, + "name": "int144", + "nodeType": "ElementaryTypeName", + "src": "24850:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int144", + "typeString": "int144" + } + }, + "visibility": "internal" + } + ], + "src": "24849:19:20" + }, + "scope": 7969, + "src": "24795:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7511, + "nodeType": "Block", + "src": "25416:150:20", + "statements": [ + { + "expression": { + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7494, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7492, + "src": "25426:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7497, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7489, + "src": "25446:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7496, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25439:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int136_$", + "typeString": "type(int136)" + }, + "typeName": { + "id": 7495, + "name": "int136", + "nodeType": "ElementaryTypeName", + "src": "25439:6:20", + "typeDescriptions": {} + } + }, + "id": 7498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "25439:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "src": "25426:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "id": 7500, + "nodeType": "ExpressionStatement", + "src": "25426:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7501, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7492, + "src": "25466:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7502, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7489, + "src": "25480:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "25466:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7510, + "nodeType": "IfStatement", + "src": "25462:98:20", + "trueBody": { + "id": 7509, + "nodeType": "Block", + "src": "25487:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313336", + "id": 7505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25538:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_136_by_1", + "typeString": "int_const 136" + }, + "value": "136" + }, + { + "id": 7506, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7489, + "src": "25543:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_136_by_1", + "typeString": "int_const 136" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7504, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "25508:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "25508:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7508, + "nodeType": "RevertStatement", + "src": "25501:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7487, + "nodeType": "StructuredDocumentation", + "src": "25025:312:20", + "text": " @dev Returns the downcasted int136 from int256, reverting on\n overflow (when the input is less than smallest int136 or\n greater than largest int136).\n Counterpart to Solidity's `int136` operator.\n Requirements:\n - input must fit into 136 bits" + }, + "id": 7512, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt136", + "nameLocation": "25351:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7489, + "mutability": "mutable", + "name": "value", + "nameLocation": "25367:5:20", + "nodeType": "VariableDeclaration", + "scope": 7512, + "src": "25360:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7488, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "25360:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "25359:14:20" + }, + "returnParameters": { + "id": 7493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7492, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "25404:10:20", + "nodeType": "VariableDeclaration", + "scope": 7512, + "src": "25397:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + }, + "typeName": { + "id": 7491, + "name": "int136", + "nodeType": "ElementaryTypeName", + "src": "25397:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int136", + "typeString": "int136" + } + }, + "visibility": "internal" + } + ], + "src": "25396:19:20" + }, + "scope": 7969, + "src": "25342:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7537, + "nodeType": "Block", + "src": "25963:150:20", + "statements": [ + { + "expression": { + "id": 7525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7520, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7518, + "src": "25973:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7523, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7515, + "src": "25993:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7522, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25986:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int128_$", + "typeString": "type(int128)" + }, + "typeName": { + "id": 7521, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "25986:6:20", + "typeDescriptions": {} + } + }, + "id": 7524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "25986:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "src": "25973:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "id": 7526, + "nodeType": "ExpressionStatement", + "src": "25973:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7527, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7518, + "src": "26013:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7528, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7515, + "src": "26027:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "26013:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7536, + "nodeType": "IfStatement", + "src": "26009:98:20", + "trueBody": { + "id": 7535, + "nodeType": "Block", + "src": "26034:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313238", + "id": 7531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26085:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + { + "id": 7532, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7515, + "src": "26090:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7530, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "26055:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26055:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7534, + "nodeType": "RevertStatement", + "src": "26048:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7513, + "nodeType": "StructuredDocumentation", + "src": "25572:312:20", + "text": " @dev Returns the downcasted int128 from int256, reverting on\n overflow (when the input is less than smallest int128 or\n greater than largest int128).\n Counterpart to Solidity's `int128` operator.\n Requirements:\n - input must fit into 128 bits" + }, + "id": 7538, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt128", + "nameLocation": "25898:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7515, + "mutability": "mutable", + "name": "value", + "nameLocation": "25914:5:20", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25907:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7514, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "25907:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "25906:14:20" + }, + "returnParameters": { + "id": 7519, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7518, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "25951:10:20", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25944:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + }, + "typeName": { + "id": 7517, + "name": "int128", + "nodeType": "ElementaryTypeName", + "src": "25944:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int128", + "typeString": "int128" + } + }, + "visibility": "internal" + } + ], + "src": "25943:19:20" + }, + "scope": 7969, + "src": "25889:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7563, + "nodeType": "Block", + "src": "26510:150:20", + "statements": [ + { + "expression": { + "id": 7551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7546, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7544, + "src": "26520:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7549, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "26540:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26533:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int120_$", + "typeString": "type(int120)" + }, + "typeName": { + "id": 7547, + "name": "int120", + "nodeType": "ElementaryTypeName", + "src": "26533:6:20", + "typeDescriptions": {} + } + }, + "id": 7550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26533:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "src": "26520:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "id": 7552, + "nodeType": "ExpressionStatement", + "src": "26520:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7553, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7544, + "src": "26560:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7554, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "26574:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "26560:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7562, + "nodeType": "IfStatement", + "src": "26556:98:20", + "trueBody": { + "id": 7561, + "nodeType": "Block", + "src": "26581:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313230", + "id": 7557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26632:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + "value": "120" + }, + { + "id": 7558, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "26637:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7556, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "26602:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "26602:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7560, + "nodeType": "RevertStatement", + "src": "26595:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7539, + "nodeType": "StructuredDocumentation", + "src": "26119:312:20", + "text": " @dev Returns the downcasted int120 from int256, reverting on\n overflow (when the input is less than smallest int120 or\n greater than largest int120).\n Counterpart to Solidity's `int120` operator.\n Requirements:\n - input must fit into 120 bits" + }, + "id": 7564, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt120", + "nameLocation": "26445:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7541, + "mutability": "mutable", + "name": "value", + "nameLocation": "26461:5:20", + "nodeType": "VariableDeclaration", + "scope": 7564, + "src": "26454:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7540, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "26454:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "26453:14:20" + }, + "returnParameters": { + "id": 7545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7544, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "26498:10:20", + "nodeType": "VariableDeclaration", + "scope": 7564, + "src": "26491:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + }, + "typeName": { + "id": 7543, + "name": "int120", + "nodeType": "ElementaryTypeName", + "src": "26491:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int120", + "typeString": "int120" + } + }, + "visibility": "internal" + } + ], + "src": "26490:19:20" + }, + "scope": 7969, + "src": "26436:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7589, + "nodeType": "Block", + "src": "27057:150:20", + "statements": [ + { + "expression": { + "id": 7577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7572, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7570, + "src": "27067:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7575, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7567, + "src": "27087:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27080:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int112_$", + "typeString": "type(int112)" + }, + "typeName": { + "id": 7573, + "name": "int112", + "nodeType": "ElementaryTypeName", + "src": "27080:6:20", + "typeDescriptions": {} + } + }, + "id": 7576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27080:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "src": "27067:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "id": 7578, + "nodeType": "ExpressionStatement", + "src": "27067:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7579, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7570, + "src": "27107:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7580, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7567, + "src": "27121:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "27107:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7588, + "nodeType": "IfStatement", + "src": "27103:98:20", + "trueBody": { + "id": 7587, + "nodeType": "Block", + "src": "27128:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313132", + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27179:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + "value": "112" + }, + { + "id": 7584, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7567, + "src": "27184:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7582, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "27149:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27149:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7586, + "nodeType": "RevertStatement", + "src": "27142:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7565, + "nodeType": "StructuredDocumentation", + "src": "26666:312:20", + "text": " @dev Returns the downcasted int112 from int256, reverting on\n overflow (when the input is less than smallest int112 or\n greater than largest int112).\n Counterpart to Solidity's `int112` operator.\n Requirements:\n - input must fit into 112 bits" + }, + "id": 7590, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt112", + "nameLocation": "26992:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7567, + "mutability": "mutable", + "name": "value", + "nameLocation": "27008:5:20", + "nodeType": "VariableDeclaration", + "scope": 7590, + "src": "27001:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7566, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "27001:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "27000:14:20" + }, + "returnParameters": { + "id": 7571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7570, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "27045:10:20", + "nodeType": "VariableDeclaration", + "scope": 7590, + "src": "27038:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + }, + "typeName": { + "id": 7569, + "name": "int112", + "nodeType": "ElementaryTypeName", + "src": "27038:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int112", + "typeString": "int112" + } + }, + "visibility": "internal" + } + ], + "src": "27037:19:20" + }, + "scope": 7969, + "src": "26983:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7615, + "nodeType": "Block", + "src": "27604:150:20", + "statements": [ + { + "expression": { + "id": 7603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7598, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "27614:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7601, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7593, + "src": "27634:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27627:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int104_$", + "typeString": "type(int104)" + }, + "typeName": { + "id": 7599, + "name": "int104", + "nodeType": "ElementaryTypeName", + "src": "27627:6:20", + "typeDescriptions": {} + } + }, + "id": 7602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27627:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "src": "27614:26:20", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "id": 7604, + "nodeType": "ExpressionStatement", + "src": "27614:26:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7605, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "27654:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7606, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7593, + "src": "27668:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "27654:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7614, + "nodeType": "IfStatement", + "src": "27650:98:20", + "trueBody": { + "id": 7613, + "nodeType": "Block", + "src": "27675:73:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "313034", + "id": 7609, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27726:3:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + "value": "104" + }, + { + "id": 7610, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7593, + "src": "27731:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7608, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "27696:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "27696:41:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7612, + "nodeType": "RevertStatement", + "src": "27689:48:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7591, + "nodeType": "StructuredDocumentation", + "src": "27213:312:20", + "text": " @dev Returns the downcasted int104 from int256, reverting on\n overflow (when the input is less than smallest int104 or\n greater than largest int104).\n Counterpart to Solidity's `int104` operator.\n Requirements:\n - input must fit into 104 bits" + }, + "id": 7616, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt104", + "nameLocation": "27539:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7594, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7593, + "mutability": "mutable", + "name": "value", + "nameLocation": "27555:5:20", + "nodeType": "VariableDeclaration", + "scope": 7616, + "src": "27548:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7592, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "27548:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "27547:14:20" + }, + "returnParameters": { + "id": 7597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7596, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "27592:10:20", + "nodeType": "VariableDeclaration", + "scope": 7616, + "src": "27585:17:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + }, + "typeName": { + "id": 7595, + "name": "int104", + "nodeType": "ElementaryTypeName", + "src": "27585:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int104", + "typeString": "int104" + } + }, + "visibility": "internal" + } + ], + "src": "27584:19:20" + }, + "scope": 7969, + "src": "27530:224:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7641, + "nodeType": "Block", + "src": "28144:148:20", + "statements": [ + { + "expression": { + "id": 7629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7624, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7622, + "src": "28154:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7627, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7619, + "src": "28173:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28167:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int96_$", + "typeString": "type(int96)" + }, + "typeName": { + "id": 7625, + "name": "int96", + "nodeType": "ElementaryTypeName", + "src": "28167:5:20", + "typeDescriptions": {} + } + }, + "id": 7628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "28167:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "src": "28154:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "id": 7630, + "nodeType": "ExpressionStatement", + "src": "28154:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7631, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7622, + "src": "28193:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7632, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7619, + "src": "28207:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "28193:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7640, + "nodeType": "IfStatement", + "src": "28189:97:20", + "trueBody": { + "id": 7639, + "nodeType": "Block", + "src": "28214:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3936", + "id": 7635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28265:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + { + "id": 7636, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7619, + "src": "28269:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7634, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "28235:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "28235:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7638, + "nodeType": "RevertStatement", + "src": "28228:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7617, + "nodeType": "StructuredDocumentation", + "src": "27760:307:20", + "text": " @dev Returns the downcasted int96 from int256, reverting on\n overflow (when the input is less than smallest int96 or\n greater than largest int96).\n Counterpart to Solidity's `int96` operator.\n Requirements:\n - input must fit into 96 bits" + }, + "id": 7642, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt96", + "nameLocation": "28081:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7620, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7619, + "mutability": "mutable", + "name": "value", + "nameLocation": "28096:5:20", + "nodeType": "VariableDeclaration", + "scope": 7642, + "src": "28089:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7618, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "28089:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "28088:14:20" + }, + "returnParameters": { + "id": 7623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7622, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "28132:10:20", + "nodeType": "VariableDeclaration", + "scope": 7642, + "src": "28126:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + }, + "typeName": { + "id": 7621, + "name": "int96", + "nodeType": "ElementaryTypeName", + "src": "28126:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int96", + "typeString": "int96" + } + }, + "visibility": "internal" + } + ], + "src": "28125:18:20" + }, + "scope": 7969, + "src": "28072:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7667, + "nodeType": "Block", + "src": "28682:148:20", + "statements": [ + { + "expression": { + "id": 7655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7650, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7648, + "src": "28692:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7653, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7645, + "src": "28711:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28705:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int88_$", + "typeString": "type(int88)" + }, + "typeName": { + "id": 7651, + "name": "int88", + "nodeType": "ElementaryTypeName", + "src": "28705:5:20", + "typeDescriptions": {} + } + }, + "id": 7654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "28705:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "src": "28692:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "id": 7656, + "nodeType": "ExpressionStatement", + "src": "28692:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7657, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7648, + "src": "28731:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7658, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7645, + "src": "28745:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "28731:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7666, + "nodeType": "IfStatement", + "src": "28727:97:20", + "trueBody": { + "id": 7665, + "nodeType": "Block", + "src": "28752:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3838", + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28803:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + "value": "88" + }, + { + "id": 7662, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7645, + "src": "28807:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7660, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "28773:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "28773:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7664, + "nodeType": "RevertStatement", + "src": "28766:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7643, + "nodeType": "StructuredDocumentation", + "src": "28298:307:20", + "text": " @dev Returns the downcasted int88 from int256, reverting on\n overflow (when the input is less than smallest int88 or\n greater than largest int88).\n Counterpart to Solidity's `int88` operator.\n Requirements:\n - input must fit into 88 bits" + }, + "id": 7668, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt88", + "nameLocation": "28619:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7645, + "mutability": "mutable", + "name": "value", + "nameLocation": "28634:5:20", + "nodeType": "VariableDeclaration", + "scope": 7668, + "src": "28627:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7644, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "28627:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "28626:14:20" + }, + "returnParameters": { + "id": 7649, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7648, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "28670:10:20", + "nodeType": "VariableDeclaration", + "scope": 7668, + "src": "28664:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + }, + "typeName": { + "id": 7647, + "name": "int88", + "nodeType": "ElementaryTypeName", + "src": "28664:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int88", + "typeString": "int88" + } + }, + "visibility": "internal" + } + ], + "src": "28663:18:20" + }, + "scope": 7969, + "src": "28610:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7693, + "nodeType": "Block", + "src": "29220:148:20", + "statements": [ + { + "expression": { + "id": 7681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7676, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7674, + "src": "29230:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7679, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7671, + "src": "29249:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29243:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int80_$", + "typeString": "type(int80)" + }, + "typeName": { + "id": 7677, + "name": "int80", + "nodeType": "ElementaryTypeName", + "src": "29243:5:20", + "typeDescriptions": {} + } + }, + "id": 7680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29243:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "src": "29230:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "id": 7682, + "nodeType": "ExpressionStatement", + "src": "29230:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7683, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7674, + "src": "29269:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7684, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7671, + "src": "29283:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "29269:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7692, + "nodeType": "IfStatement", + "src": "29265:97:20", + "trueBody": { + "id": 7691, + "nodeType": "Block", + "src": "29290:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3830", + "id": 7687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29341:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + "value": "80" + }, + { + "id": 7688, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7671, + "src": "29345:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7686, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "29311:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29311:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7690, + "nodeType": "RevertStatement", + "src": "29304:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7669, + "nodeType": "StructuredDocumentation", + "src": "28836:307:20", + "text": " @dev Returns the downcasted int80 from int256, reverting on\n overflow (when the input is less than smallest int80 or\n greater than largest int80).\n Counterpart to Solidity's `int80` operator.\n Requirements:\n - input must fit into 80 bits" + }, + "id": 7694, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt80", + "nameLocation": "29157:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7672, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7671, + "mutability": "mutable", + "name": "value", + "nameLocation": "29172:5:20", + "nodeType": "VariableDeclaration", + "scope": 7694, + "src": "29165:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7670, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "29165:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "29164:14:20" + }, + "returnParameters": { + "id": 7675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7674, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "29208:10:20", + "nodeType": "VariableDeclaration", + "scope": 7694, + "src": "29202:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + }, + "typeName": { + "id": 7673, + "name": "int80", + "nodeType": "ElementaryTypeName", + "src": "29202:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int80", + "typeString": "int80" + } + }, + "visibility": "internal" + } + ], + "src": "29201:18:20" + }, + "scope": 7969, + "src": "29148:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7719, + "nodeType": "Block", + "src": "29758:148:20", + "statements": [ + { + "expression": { + "id": 7707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7702, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7700, + "src": "29768:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7705, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7697, + "src": "29787:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29781:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int72_$", + "typeString": "type(int72)" + }, + "typeName": { + "id": 7703, + "name": "int72", + "nodeType": "ElementaryTypeName", + "src": "29781:5:20", + "typeDescriptions": {} + } + }, + "id": 7706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29781:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "src": "29768:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "id": 7708, + "nodeType": "ExpressionStatement", + "src": "29768:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7709, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7700, + "src": "29807:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7710, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7697, + "src": "29821:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "29807:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7718, + "nodeType": "IfStatement", + "src": "29803:97:20", + "trueBody": { + "id": 7717, + "nodeType": "Block", + "src": "29828:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3732", + "id": 7713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29879:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + "value": "72" + }, + { + "id": 7714, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7697, + "src": "29883:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7712, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "29849:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "29849:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7716, + "nodeType": "RevertStatement", + "src": "29842:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7695, + "nodeType": "StructuredDocumentation", + "src": "29374:307:20", + "text": " @dev Returns the downcasted int72 from int256, reverting on\n overflow (when the input is less than smallest int72 or\n greater than largest int72).\n Counterpart to Solidity's `int72` operator.\n Requirements:\n - input must fit into 72 bits" + }, + "id": 7720, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt72", + "nameLocation": "29695:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7697, + "mutability": "mutable", + "name": "value", + "nameLocation": "29710:5:20", + "nodeType": "VariableDeclaration", + "scope": 7720, + "src": "29703:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7696, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "29703:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "29702:14:20" + }, + "returnParameters": { + "id": 7701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7700, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "29746:10:20", + "nodeType": "VariableDeclaration", + "scope": 7720, + "src": "29740:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + }, + "typeName": { + "id": 7699, + "name": "int72", + "nodeType": "ElementaryTypeName", + "src": "29740:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int72", + "typeString": "int72" + } + }, + "visibility": "internal" + } + ], + "src": "29739:18:20" + }, + "scope": 7969, + "src": "29686:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7745, + "nodeType": "Block", + "src": "30296:148:20", + "statements": [ + { + "expression": { + "id": 7733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7728, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7726, + "src": "30306:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7731, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7723, + "src": "30325:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30319:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int64_$", + "typeString": "type(int64)" + }, + "typeName": { + "id": 7729, + "name": "int64", + "nodeType": "ElementaryTypeName", + "src": "30319:5:20", + "typeDescriptions": {} + } + }, + "id": 7732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30319:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "src": "30306:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "id": 7734, + "nodeType": "ExpressionStatement", + "src": "30306:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7735, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7726, + "src": "30345:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7736, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7723, + "src": "30359:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "30345:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7744, + "nodeType": "IfStatement", + "src": "30341:97:20", + "trueBody": { + "id": 7743, + "nodeType": "Block", + "src": "30366:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3634", + "id": 7739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30417:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + { + "id": 7740, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7723, + "src": "30421:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7738, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "30387:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30387:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7742, + "nodeType": "RevertStatement", + "src": "30380:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7721, + "nodeType": "StructuredDocumentation", + "src": "29912:307:20", + "text": " @dev Returns the downcasted int64 from int256, reverting on\n overflow (when the input is less than smallest int64 or\n greater than largest int64).\n Counterpart to Solidity's `int64` operator.\n Requirements:\n - input must fit into 64 bits" + }, + "id": 7746, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt64", + "nameLocation": "30233:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7724, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7723, + "mutability": "mutable", + "name": "value", + "nameLocation": "30248:5:20", + "nodeType": "VariableDeclaration", + "scope": 7746, + "src": "30241:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7722, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "30241:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "30240:14:20" + }, + "returnParameters": { + "id": 7727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7726, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "30284:10:20", + "nodeType": "VariableDeclaration", + "scope": 7746, + "src": "30278:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + }, + "typeName": { + "id": 7725, + "name": "int64", + "nodeType": "ElementaryTypeName", + "src": "30278:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int64", + "typeString": "int64" + } + }, + "visibility": "internal" + } + ], + "src": "30277:18:20" + }, + "scope": 7969, + "src": "30224:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7771, + "nodeType": "Block", + "src": "30834:148:20", + "statements": [ + { + "expression": { + "id": 7759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7754, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7752, + "src": "30844:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7757, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7749, + "src": "30863:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30857:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int56_$", + "typeString": "type(int56)" + }, + "typeName": { + "id": 7755, + "name": "int56", + "nodeType": "ElementaryTypeName", + "src": "30857:5:20", + "typeDescriptions": {} + } + }, + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30857:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "src": "30844:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "id": 7760, + "nodeType": "ExpressionStatement", + "src": "30844:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7761, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7752, + "src": "30883:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7762, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7749, + "src": "30897:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "30883:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7770, + "nodeType": "IfStatement", + "src": "30879:97:20", + "trueBody": { + "id": 7769, + "nodeType": "Block", + "src": "30904:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3536", + "id": 7765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30955:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + "value": "56" + }, + { + "id": 7766, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7749, + "src": "30959:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7764, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "30925:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "30925:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7768, + "nodeType": "RevertStatement", + "src": "30918:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7747, + "nodeType": "StructuredDocumentation", + "src": "30450:307:20", + "text": " @dev Returns the downcasted int56 from int256, reverting on\n overflow (when the input is less than smallest int56 or\n greater than largest int56).\n Counterpart to Solidity's `int56` operator.\n Requirements:\n - input must fit into 56 bits" + }, + "id": 7772, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt56", + "nameLocation": "30771:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7750, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7749, + "mutability": "mutable", + "name": "value", + "nameLocation": "30786:5:20", + "nodeType": "VariableDeclaration", + "scope": 7772, + "src": "30779:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7748, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "30779:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "30778:14:20" + }, + "returnParameters": { + "id": 7753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7752, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "30822:10:20", + "nodeType": "VariableDeclaration", + "scope": 7772, + "src": "30816:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + }, + "typeName": { + "id": 7751, + "name": "int56", + "nodeType": "ElementaryTypeName", + "src": "30816:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int56", + "typeString": "int56" + } + }, + "visibility": "internal" + } + ], + "src": "30815:18:20" + }, + "scope": 7969, + "src": "30762:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7797, + "nodeType": "Block", + "src": "31372:148:20", + "statements": [ + { + "expression": { + "id": 7785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7780, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7778, + "src": "31382:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7783, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7775, + "src": "31401:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7782, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31395:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int48_$", + "typeString": "type(int48)" + }, + "typeName": { + "id": 7781, + "name": "int48", + "nodeType": "ElementaryTypeName", + "src": "31395:5:20", + "typeDescriptions": {} + } + }, + "id": 7784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31395:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "src": "31382:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "id": 7786, + "nodeType": "ExpressionStatement", + "src": "31382:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7787, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7778, + "src": "31421:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7788, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7775, + "src": "31435:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "31421:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7796, + "nodeType": "IfStatement", + "src": "31417:97:20", + "trueBody": { + "id": 7795, + "nodeType": "Block", + "src": "31442:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3438", + "id": 7791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31493:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + { + "id": 7792, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7775, + "src": "31497:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7790, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "31463:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31463:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7794, + "nodeType": "RevertStatement", + "src": "31456:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7773, + "nodeType": "StructuredDocumentation", + "src": "30988:307:20", + "text": " @dev Returns the downcasted int48 from int256, reverting on\n overflow (when the input is less than smallest int48 or\n greater than largest int48).\n Counterpart to Solidity's `int48` operator.\n Requirements:\n - input must fit into 48 bits" + }, + "id": 7798, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt48", + "nameLocation": "31309:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7775, + "mutability": "mutable", + "name": "value", + "nameLocation": "31324:5:20", + "nodeType": "VariableDeclaration", + "scope": 7798, + "src": "31317:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7774, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "31317:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "31316:14:20" + }, + "returnParameters": { + "id": 7779, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7778, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "31360:10:20", + "nodeType": "VariableDeclaration", + "scope": 7798, + "src": "31354:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + }, + "typeName": { + "id": 7777, + "name": "int48", + "nodeType": "ElementaryTypeName", + "src": "31354:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int48", + "typeString": "int48" + } + }, + "visibility": "internal" + } + ], + "src": "31353:18:20" + }, + "scope": 7969, + "src": "31300:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7823, + "nodeType": "Block", + "src": "31910:148:20", + "statements": [ + { + "expression": { + "id": 7811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7806, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7804, + "src": "31920:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7809, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7801, + "src": "31939:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31933:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int40_$", + "typeString": "type(int40)" + }, + "typeName": { + "id": 7807, + "name": "int40", + "nodeType": "ElementaryTypeName", + "src": "31933:5:20", + "typeDescriptions": {} + } + }, + "id": 7810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "31933:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "src": "31920:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "id": 7812, + "nodeType": "ExpressionStatement", + "src": "31920:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7813, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7804, + "src": "31959:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7814, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7801, + "src": "31973:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "31959:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7822, + "nodeType": "IfStatement", + "src": "31955:97:20", + "trueBody": { + "id": 7821, + "nodeType": "Block", + "src": "31980:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3430", + "id": 7817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32031:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + { + "id": 7818, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7801, + "src": "32035:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7816, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "32001:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32001:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7820, + "nodeType": "RevertStatement", + "src": "31994:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7799, + "nodeType": "StructuredDocumentation", + "src": "31526:307:20", + "text": " @dev Returns the downcasted int40 from int256, reverting on\n overflow (when the input is less than smallest int40 or\n greater than largest int40).\n Counterpart to Solidity's `int40` operator.\n Requirements:\n - input must fit into 40 bits" + }, + "id": 7824, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt40", + "nameLocation": "31847:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7802, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7801, + "mutability": "mutable", + "name": "value", + "nameLocation": "31862:5:20", + "nodeType": "VariableDeclaration", + "scope": 7824, + "src": "31855:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7800, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "31855:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "31854:14:20" + }, + "returnParameters": { + "id": 7805, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7804, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "31898:10:20", + "nodeType": "VariableDeclaration", + "scope": 7824, + "src": "31892:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + }, + "typeName": { + "id": 7803, + "name": "int40", + "nodeType": "ElementaryTypeName", + "src": "31892:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int40", + "typeString": "int40" + } + }, + "visibility": "internal" + } + ], + "src": "31891:18:20" + }, + "scope": 7969, + "src": "31838:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7849, + "nodeType": "Block", + "src": "32448:148:20", + "statements": [ + { + "expression": { + "id": 7837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7832, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7830, + "src": "32458:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7835, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7827, + "src": "32477:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32471:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int32_$", + "typeString": "type(int32)" + }, + "typeName": { + "id": 7833, + "name": "int32", + "nodeType": "ElementaryTypeName", + "src": "32471:5:20", + "typeDescriptions": {} + } + }, + "id": 7836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32471:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "src": "32458:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "id": 7838, + "nodeType": "ExpressionStatement", + "src": "32458:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7839, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7830, + "src": "32497:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7840, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7827, + "src": "32511:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "32497:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7848, + "nodeType": "IfStatement", + "src": "32493:97:20", + "trueBody": { + "id": 7847, + "nodeType": "Block", + "src": "32518:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3332", + "id": 7843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32569:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + { + "id": 7844, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7827, + "src": "32573:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7842, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "32539:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "32539:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7846, + "nodeType": "RevertStatement", + "src": "32532:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7825, + "nodeType": "StructuredDocumentation", + "src": "32064:307:20", + "text": " @dev Returns the downcasted int32 from int256, reverting on\n overflow (when the input is less than smallest int32 or\n greater than largest int32).\n Counterpart to Solidity's `int32` operator.\n Requirements:\n - input must fit into 32 bits" + }, + "id": 7850, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt32", + "nameLocation": "32385:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7828, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7827, + "mutability": "mutable", + "name": "value", + "nameLocation": "32400:5:20", + "nodeType": "VariableDeclaration", + "scope": 7850, + "src": "32393:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7826, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "32393:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "32392:14:20" + }, + "returnParameters": { + "id": 7831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7830, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "32436:10:20", + "nodeType": "VariableDeclaration", + "scope": 7850, + "src": "32430:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + }, + "typeName": { + "id": 7829, + "name": "int32", + "nodeType": "ElementaryTypeName", + "src": "32430:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int32", + "typeString": "int32" + } + }, + "visibility": "internal" + } + ], + "src": "32429:18:20" + }, + "scope": 7969, + "src": "32376:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7875, + "nodeType": "Block", + "src": "32986:148:20", + "statements": [ + { + "expression": { + "id": 7863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7858, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7856, + "src": "32996:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7861, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7853, + "src": "33015:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33009:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int24_$", + "typeString": "type(int24)" + }, + "typeName": { + "id": 7859, + "name": "int24", + "nodeType": "ElementaryTypeName", + "src": "33009:5:20", + "typeDescriptions": {} + } + }, + "id": 7862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "33009:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "src": "32996:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "id": 7864, + "nodeType": "ExpressionStatement", + "src": "32996:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7865, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7856, + "src": "33035:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7866, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7853, + "src": "33049:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "33035:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7874, + "nodeType": "IfStatement", + "src": "33031:97:20", + "trueBody": { + "id": 7873, + "nodeType": "Block", + "src": "33056:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3234", + "id": 7869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33107:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + "value": "24" + }, + { + "id": 7870, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7853, + "src": "33111:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7868, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "33077:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "33077:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7872, + "nodeType": "RevertStatement", + "src": "33070:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7851, + "nodeType": "StructuredDocumentation", + "src": "32602:307:20", + "text": " @dev Returns the downcasted int24 from int256, reverting on\n overflow (when the input is less than smallest int24 or\n greater than largest int24).\n Counterpart to Solidity's `int24` operator.\n Requirements:\n - input must fit into 24 bits" + }, + "id": 7876, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt24", + "nameLocation": "32923:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7853, + "mutability": "mutable", + "name": "value", + "nameLocation": "32938:5:20", + "nodeType": "VariableDeclaration", + "scope": 7876, + "src": "32931:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7852, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "32931:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "32930:14:20" + }, + "returnParameters": { + "id": 7857, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7856, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "32974:10:20", + "nodeType": "VariableDeclaration", + "scope": 7876, + "src": "32968:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + }, + "typeName": { + "id": 7855, + "name": "int24", + "nodeType": "ElementaryTypeName", + "src": "32968:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int24", + "typeString": "int24" + } + }, + "visibility": "internal" + } + ], + "src": "32967:18:20" + }, + "scope": 7969, + "src": "32914:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7901, + "nodeType": "Block", + "src": "33524:148:20", + "statements": [ + { + "expression": { + "id": 7889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7884, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7882, + "src": "33534:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7887, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7879, + "src": "33553:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33547:5:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int16_$", + "typeString": "type(int16)" + }, + "typeName": { + "id": 7885, + "name": "int16", + "nodeType": "ElementaryTypeName", + "src": "33547:5:20", + "typeDescriptions": {} + } + }, + "id": 7888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "33547:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "src": "33534:25:20", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "id": 7890, + "nodeType": "ExpressionStatement", + "src": "33534:25:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7891, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7882, + "src": "33573:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7892, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7879, + "src": "33587:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "33573:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7900, + "nodeType": "IfStatement", + "src": "33569:97:20", + "trueBody": { + "id": 7899, + "nodeType": "Block", + "src": "33594:72:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "3136", + "id": 7895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33645:2:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + { + "id": 7896, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7879, + "src": "33649:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7894, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "33615:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "33615:40:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7898, + "nodeType": "RevertStatement", + "src": "33608:47:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7877, + "nodeType": "StructuredDocumentation", + "src": "33140:307:20", + "text": " @dev Returns the downcasted int16 from int256, reverting on\n overflow (when the input is less than smallest int16 or\n greater than largest int16).\n Counterpart to Solidity's `int16` operator.\n Requirements:\n - input must fit into 16 bits" + }, + "id": 7902, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt16", + "nameLocation": "33461:7:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7879, + "mutability": "mutable", + "name": "value", + "nameLocation": "33476:5:20", + "nodeType": "VariableDeclaration", + "scope": 7902, + "src": "33469:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7878, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "33469:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "33468:14:20" + }, + "returnParameters": { + "id": 7883, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7882, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "33512:10:20", + "nodeType": "VariableDeclaration", + "scope": 7902, + "src": "33506:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + }, + "typeName": { + "id": 7881, + "name": "int16", + "nodeType": "ElementaryTypeName", + "src": "33506:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int16", + "typeString": "int16" + } + }, + "visibility": "internal" + } + ], + "src": "33505:18:20" + }, + "scope": 7969, + "src": "33452:220:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7927, + "nodeType": "Block", + "src": "34055:146:20", + "statements": [ + { + "expression": { + "id": 7915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7910, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7908, + "src": "34065:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7913, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7905, + "src": "34083:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34078:4:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int8_$", + "typeString": "type(int8)" + }, + "typeName": { + "id": 7911, + "name": "int8", + "nodeType": "ElementaryTypeName", + "src": "34078:4:20", + "typeDescriptions": {} + } + }, + "id": 7914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34078:11:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "src": "34065:24:20", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "id": 7916, + "nodeType": "ExpressionStatement", + "src": "34065:24:20" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7917, + "name": "downcasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7908, + "src": "34103:10:20", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7918, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7905, + "src": "34117:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "34103:19:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7926, + "nodeType": "IfStatement", + "src": "34099:96:20", + "trueBody": { + "id": 7925, + "nodeType": "Block", + "src": "34124:71:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "hexValue": "38", + "id": 7921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34175:1:20", + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + { + "id": 7922, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7905, + "src": "34178:5:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7920, + "name": "SafeCastOverflowedIntDowncast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6226, + "src": "34145:29:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint8_$_t_int256_$returns$_t_error_$", + "typeString": "function (uint8,int256) pure returns (error)" + } + }, + "id": 7923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34145:39:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7924, + "nodeType": "RevertStatement", + "src": "34138:46:20" + } + ] + } + } + ] + }, + "documentation": { + "id": 7903, + "nodeType": "StructuredDocumentation", + "src": "33678:302:20", + "text": " @dev Returns the downcasted int8 from int256, reverting on\n overflow (when the input is less than smallest int8 or\n greater than largest int8).\n Counterpart to Solidity's `int8` operator.\n Requirements:\n - input must fit into 8 bits" + }, + "id": 7928, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt8", + "nameLocation": "33994:6:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7905, + "mutability": "mutable", + "name": "value", + "nameLocation": "34008:5:20", + "nodeType": "VariableDeclaration", + "scope": 7928, + "src": "34001:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7904, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "34001:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "34000:14:20" + }, + "returnParameters": { + "id": 7909, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7908, + "mutability": "mutable", + "name": "downcasted", + "nameLocation": "34043:10:20", + "nodeType": "VariableDeclaration", + "scope": 7928, + "src": "34038:15:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + }, + "typeName": { + "id": 7907, + "name": "int8", + "nodeType": "ElementaryTypeName", + "src": "34038:4:20", + "typeDescriptions": { + "typeIdentifier": "t_int8", + "typeString": "int8" + } + }, + "visibility": "internal" + } + ], + "src": "34037:17:20" + }, + "scope": 7969, + "src": "33985:216:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7957, + "nodeType": "Block", + "src": "34441:250:20", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7936, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7931, + "src": "34554:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 7941, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34575:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 7940, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "34575:6:20", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + } + ], + "id": 7939, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "34570:4:20", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34570:12:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_int256", + "typeString": "type(int256)" + } + }, + "id": 7943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "34583:3:20", + "memberName": "max", + "nodeType": "MemberAccess", + "src": "34570:16:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 7938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34562:7:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 7937, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34562:7:20", + "typeDescriptions": {} + } + }, + "id": 7944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34562:25:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34554:33:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7951, + "nodeType": "IfStatement", + "src": "34550:105:20", + "trueBody": { + "id": 7950, + "nodeType": "Block", + "src": "34589:66:20", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 7947, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7931, + "src": "34638:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7946, + "name": "SafeCastOverflowedUintToInt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6231, + "src": "34610:27:20", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$_t_error_$", + "typeString": "function (uint256) pure returns (error)" + } + }, + "id": 7948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34610:34:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_error", + "typeString": "error" + } + }, + "id": 7949, + "nodeType": "RevertStatement", + "src": "34603:41:20" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 7954, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7931, + "src": "34678:5:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7953, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34671:6:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 7952, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "34671:6:20", + "typeDescriptions": {} + } + }, + "id": 7955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "34671:13:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 7935, + "id": 7956, + "nodeType": "Return", + "src": "34664:20:20" + } + ] + }, + "documentation": { + "id": 7929, + "nodeType": "StructuredDocumentation", + "src": "34207:165:20", + "text": " @dev Converts an unsigned uint256 into a signed int256.\n Requirements:\n - input must be less than or equal to maxInt256." + }, + "id": 7958, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toInt256", + "nameLocation": "34386:8:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7931, + "mutability": "mutable", + "name": "value", + "nameLocation": "34403:5:20", + "nodeType": "VariableDeclaration", + "scope": 7958, + "src": "34395:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7930, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34395:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "34394:15:20" + }, + "returnParameters": { + "id": 7935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7934, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7958, + "src": "34433:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7933, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "34433:6:20", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "34432:8:20" + }, + "scope": 7969, + "src": "34377:314:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7967, + "nodeType": "Block", + "src": "34850:87:20", + "statements": [ + { + "AST": { + "nativeSrc": "34885:46:20", + "nodeType": "YulBlock", + "src": "34885:46:20", + "statements": [ + { + "nativeSrc": "34899:22:20", + "nodeType": "YulAssignment", + "src": "34899:22:20", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "b", + "nativeSrc": "34918:1:20", + "nodeType": "YulIdentifier", + "src": "34918:1:20" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "34911:6:20", + "nodeType": "YulIdentifier", + "src": "34911:6:20" + }, + "nativeSrc": "34911:9:20", + "nodeType": "YulFunctionCall", + "src": "34911:9:20" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "34904:6:20", + "nodeType": "YulIdentifier", + "src": "34904:6:20" + }, + "nativeSrc": "34904:17:20", + "nodeType": "YulFunctionCall", + "src": "34904:17:20" + }, + "variableNames": [ + { + "name": "u", + "nativeSrc": "34899:1:20", + "nodeType": "YulIdentifier", + "src": "34899:1:20" + } + ] + } + ] + }, + "evmVersion": "cancun", + "externalReferences": [ + { + "declaration": 7961, + "isOffset": false, + "isSlot": false, + "src": "34918:1:20", + "valueSize": 1 + }, + { + "declaration": 7964, + "isOffset": false, + "isSlot": false, + "src": "34899:1:20", + "valueSize": 1 + } + ], + "flags": [ + "memory-safe" + ], + "id": 7966, + "nodeType": "InlineAssembly", + "src": "34860:71:20" + } + ] + }, + "documentation": { + "id": 7959, + "nodeType": "StructuredDocumentation", + "src": "34697:90:20", + "text": " @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump." + }, + "id": 7968, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint", + "nameLocation": "34801:6:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7962, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7961, + "mutability": "mutable", + "name": "b", + "nameLocation": "34813:1:20", + "nodeType": "VariableDeclaration", + "scope": 7968, + "src": "34808:6:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7960, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "34808:4:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "34807:8:20" + }, + "returnParameters": { + "id": 7965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7964, + "mutability": "mutable", + "name": "u", + "nameLocation": "34847:1:20", + "nodeType": "VariableDeclaration", + "scope": 7968, + "src": "34839:9:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7963, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34839:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "34838:11:20" + }, + "scope": 7969, + "src": "34792:145:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 7970, + "src": "769:34170:20", + "usedErrors": [ + 6214, + 6219, + 6226, + 6231 + ], + "usedEvents": [] + } + ], + "src": "192:34748:20" + }, + "id": 20 + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/math/SignedMath.sol", + "exportedSymbols": { + "SafeCast": [ + 7969 + ], + "SignedMath": [ + 8113 + ] + }, + "id": 8114, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7971, + "literals": [ + "solidity", + "^", + "0.8", + ".20" + ], + "nodeType": "PragmaDirective", + "src": "109:24:21" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol", + "file": "./SafeCast.sol", + "id": 7973, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8114, + "sourceUnit": 7970, + "src": "135:40:21", + "symbolAliases": [ + { + "foreign": { + "id": 7972, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "143:8:21", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SignedMath", + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 7974, + "nodeType": "StructuredDocumentation", + "src": "177:80:21", + "text": " @dev Standard signed math utilities missing in the Solidity language." + }, + "fullyImplemented": true, + "id": 8113, + "linearizedBaseContracts": [ + 8113 + ], + "name": "SignedMath", + "nameLocation": "266:10:21", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 8003, + "nodeType": "Block", + "src": "746:215:21", + "statements": [ + { + "id": 8002, + "nodeType": "UncheckedBlock", + "src": "756:199:21", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7986, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7981, + "src": "894:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 7989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7987, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7979, + "src": "900:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 7988, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7981, + "src": "904:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "900:5:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 7990, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "899:7:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 7995, + "name": "condition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7977, + "src": "932:9:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "expression": { + "id": 7993, + "name": "SafeCast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7969, + "src": "916:8:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeCast_$7969_$", + "typeString": "type(library SafeCast)" + } + }, + "id": 7994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "925:6:21", + "memberName": "toUint", + "nodeType": "MemberAccess", + "referencedDeclaration": 7968, + "src": "916:15:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) pure returns (uint256)" + } + }, + "id": 7996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "916:26:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "909:6:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 7991, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "909:6:21", + "typeDescriptions": {} + } + }, + "id": 7997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "909:34:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "899:44:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 7999, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "898:46:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "894:50:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 7985, + "id": 8001, + "nodeType": "Return", + "src": "887:57:21" + } + ] + } + ] + }, + "documentation": { + "id": 7975, + "nodeType": "StructuredDocumentation", + "src": "283:374:21", + "text": " @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n one branch when needed, making this function more expensive." + }, + "id": 8004, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ternary", + "nameLocation": "671:7:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7982, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7977, + "mutability": "mutable", + "name": "condition", + "nameLocation": "684:9:21", + "nodeType": "VariableDeclaration", + "scope": 8004, + "src": "679:14:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7976, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "679:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7979, + "mutability": "mutable", + "name": "a", + "nameLocation": "702:1:21", + "nodeType": "VariableDeclaration", + "scope": 8004, + "src": "695:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7978, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "695:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7981, + "mutability": "mutable", + "name": "b", + "nameLocation": "712:1:21", + "nodeType": "VariableDeclaration", + "scope": 8004, + "src": "705:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7980, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "705:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "678:36:21" + }, + "returnParameters": { + "id": 7985, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7984, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8004, + "src": "738:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 7983, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "738:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "737:8:21" + }, + "scope": 8113, + "src": "662:299:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8022, + "nodeType": "Block", + "src": "1102:44:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8015, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8007, + "src": "1127:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 8016, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8009, + "src": "1131:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1127:5:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 8018, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8007, + "src": "1134:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 8019, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8009, + "src": "1137:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 8014, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8004, + "src": "1119:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_int256_$_t_int256_$returns$_t_int256_$", + "typeString": "function (bool,int256,int256) pure returns (int256)" + } + }, + "id": 8020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1119:20:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 8013, + "id": 8021, + "nodeType": "Return", + "src": "1112:27:21" + } + ] + }, + "documentation": { + "id": 8005, + "nodeType": "StructuredDocumentation", + "src": "967:66:21", + "text": " @dev Returns the largest of two signed numbers." + }, + "id": 8023, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "max", + "nameLocation": "1047:3:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8007, + "mutability": "mutable", + "name": "a", + "nameLocation": "1058:1:21", + "nodeType": "VariableDeclaration", + "scope": 8023, + "src": "1051:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8006, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1051:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8009, + "mutability": "mutable", + "name": "b", + "nameLocation": "1068:1:21", + "nodeType": "VariableDeclaration", + "scope": 8023, + "src": "1061:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8008, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1061:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1050:20:21" + }, + "returnParameters": { + "id": 8013, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8012, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8023, + "src": "1094:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8011, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1094:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1093:8:21" + }, + "scope": 8113, + "src": "1038:108:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8041, + "nodeType": "Block", + "src": "1288:44:21", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8034, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8026, + "src": "1313:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 8035, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8028, + "src": "1317:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1313:5:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "id": 8037, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8026, + "src": "1320:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + { + "id": 8038, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8028, + "src": "1323:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 8033, + "name": "ternary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8004, + "src": "1305:7:21", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_int256_$_t_int256_$returns$_t_int256_$", + "typeString": "function (bool,int256,int256) pure returns (int256)" + } + }, + "id": 8039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1305:20:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 8032, + "id": 8040, + "nodeType": "Return", + "src": "1298:27:21" + } + ] + }, + "documentation": { + "id": 8024, + "nodeType": "StructuredDocumentation", + "src": "1152:67:21", + "text": " @dev Returns the smallest of two signed numbers." + }, + "id": 8042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "min", + "nameLocation": "1233:3:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8029, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8026, + "mutability": "mutable", + "name": "a", + "nameLocation": "1244:1:21", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "1237:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8025, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1237:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8028, + "mutability": "mutable", + "name": "b", + "nameLocation": "1254:1:21", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "1247:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8027, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1247:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1236:20:21" + }, + "returnParameters": { + "id": 8032, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8031, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "1280:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8030, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1280:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1279:8:21" + }, + "scope": 8113, + "src": "1224:108:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8085, + "nodeType": "Block", + "src": "1537:162:21", + "statements": [ + { + "assignments": [ + 8053 + ], + "declarations": [ + { + "constant": false, + "id": 8053, + "mutability": "mutable", + "name": "x", + "nameLocation": "1606:1:21", + "nodeType": "VariableDeclaration", + "scope": 8085, + "src": "1599:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8052, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1599:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 8066, + "initialValue": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8054, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8045, + "src": "1611:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 8055, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8047, + "src": "1615:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1611:5:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8057, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1610:7:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8058, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8045, + "src": "1622:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 8059, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8047, + "src": "1626:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1622:5:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8061, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1621:7:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "31", + "id": 8062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1632:1:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1621:12:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8064, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1620:14:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1610:24:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1599:35:21" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8067, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8053, + "src": "1651:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 8072, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8053, + "src": "1671:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 8071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1663:7:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 8070, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1663:7:21", + "typeDescriptions": {} + } + }, + "id": 8073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1663:10:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "323535", + "id": 8074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1677:3:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "1663:17:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1656:6:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 8068, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1656:6:21", + "typeDescriptions": {} + } + }, + "id": 8076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1656:25:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8077, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8045, + "src": "1685:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 8078, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8047, + "src": "1689:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1685:5:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8080, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1684:7:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1656:35:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8082, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1655:37:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "1651:41:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 8051, + "id": 8084, + "nodeType": "Return", + "src": "1644:48:21" + } + ] + }, + "documentation": { + "id": 8043, + "nodeType": "StructuredDocumentation", + "src": "1338:126:21", + "text": " @dev Returns the average of two signed numbers without overflow.\n The result is rounded towards zero." + }, + "id": 8086, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "average", + "nameLocation": "1478:7:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8048, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8045, + "mutability": "mutable", + "name": "a", + "nameLocation": "1493:1:21", + "nodeType": "VariableDeclaration", + "scope": 8086, + "src": "1486:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8044, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1486:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8047, + "mutability": "mutable", + "name": "b", + "nameLocation": "1503:1:21", + "nodeType": "VariableDeclaration", + "scope": 8086, + "src": "1496:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8046, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1496:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1485:20:21" + }, + "returnParameters": { + "id": 8051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8050, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8086, + "src": "1529:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8049, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1529:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1528:8:21" + }, + "scope": 8113, + "src": "1469:230:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8111, + "nodeType": "Block", + "src": "1843:767:21", + "statements": [ + { + "id": 8110, + "nodeType": "UncheckedBlock", + "src": "1853:751:21", + "statements": [ + { + "assignments": [ + 8095 + ], + "declarations": [ + { + "constant": false, + "id": 8095, + "mutability": "mutable", + "name": "mask", + "nameLocation": "2424:4:21", + "nodeType": "VariableDeclaration", + "scope": 8110, + "src": "2417:11:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8094, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "2417:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "id": 8099, + "initialValue": { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8096, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8089, + "src": "2431:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "hexValue": "323535", + "id": 8097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2436:3:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "2431:8:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2417:22:21" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "id": 8104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8102, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8089, + "src": "2576:1:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 8103, + "name": "mask", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8095, + "src": "2580:4:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "2576:8:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "id": 8105, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2575:10:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "BinaryOperation", + "operator": "^", + "rightExpression": { + "id": 8106, + "name": "mask", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8095, + "src": "2588:4:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "2575:17:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 8101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2567:7:21", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 8100, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2567:7:21", + "typeDescriptions": {} + } + }, + "id": 8108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2567:26:21", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8093, + "id": 8109, + "nodeType": "Return", + "src": "2560:33:21" + } + ] + } + ] + }, + "documentation": { + "id": 8087, + "nodeType": "StructuredDocumentation", + "src": "1705:78:21", + "text": " @dev Returns the absolute unsigned value of a signed value." + }, + "id": 8112, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "abs", + "nameLocation": "1797:3:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8090, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8089, + "mutability": "mutable", + "name": "n", + "nameLocation": "1808:1:21", + "nodeType": "VariableDeclaration", + "scope": 8112, + "src": "1801:8:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 8088, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "1801:6:21", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "visibility": "internal" + } + ], + "src": "1800:10:21" + }, + "returnParameters": { + "id": 8093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8092, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8112, + "src": "1834:7:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1834:7:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1833:9:21" + }, + "scope": 8113, + "src": "1788:822:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 8114, + "src": "258:2354:21", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "109:2504:21" + }, + "id": 21 + }, + "contracts/TokenRelayer.sol": { + "ast": { + "absolutePath": "contracts/TokenRelayer.sol", + "exportedSymbols": { + "ECDSA": [ + 4137 + ], + "EIP712": [ + 4364 + ], + "IERC20": [ + 340 + ], + "IERC20Permit": [ + 376 + ], + "Ownable": [ + 147 + ], + "ReentrancyGuard": [ + 1827 + ], + "SafeERC20": [ + 831 + ], + "TokenRelayer": [ + 8603 + ] + }, + "id": 8604, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 8115, + "literals": [ + "solidity", + "^", + "0.8", + ".28" + ], + "nodeType": "PragmaDirective", + "src": "32:24:22" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 8117, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 148, + "src": "58:67:22", + "symbolAliases": [ + { + "foreign": { + "id": 8116, + "name": "Ownable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 147, + "src": "66:7:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 8119, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 341, + "src": "126:70:22", + "symbolAliases": [ + { + "foreign": { + "id": 8118, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "134:6:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol", + "file": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol", + "id": 8121, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 377, + "src": "197:93:22", + "symbolAliases": [ + { + "foreign": { + "id": 8120, + "name": "IERC20Permit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "205:12:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "id": 8123, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 832, + "src": "291:82:22", + "symbolAliases": [ + { + "foreign": { + "id": 8122, + "name": "SafeERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 831, + "src": "299:9:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "id": 8125, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 1828, + "src": "374:82:22", + "symbolAliases": [ + { + "foreign": { + "id": 8124, + "name": "ReentrancyGuard", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1827, + "src": "382:15:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", + "file": "@openzeppelin/contracts/utils/cryptography/ECDSA.sol", + "id": 8127, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 4138, + "src": "457:75:22", + "symbolAliases": [ + { + "foreign": { + "id": 8126, + "name": "ECDSA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4137, + "src": "465:5:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/cryptography/EIP712.sol", + "file": "@openzeppelin/contracts/utils/cryptography/EIP712.sol", + "id": 8129, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 8604, + "sourceUnit": 4365, + "src": "533:77:22", + "symbolAliases": [ + { + "foreign": { + "id": 8128, + "name": "EIP712", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "541:6:22", + "typeDescriptions": {} + }, + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 8131, + "name": "Ownable", + "nameLocations": [ + "1183:7:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 147, + "src": "1183:7:22" + }, + "id": 8132, + "nodeType": "InheritanceSpecifier", + "src": "1183:7:22" + }, + { + "baseName": { + "id": 8133, + "name": "ReentrancyGuard", + "nameLocations": [ + "1192:15:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1827, + "src": "1192:15:22" + }, + "id": 8134, + "nodeType": "InheritanceSpecifier", + "src": "1192:15:22" + }, + { + "baseName": { + "id": 8135, + "name": "EIP712", + "nameLocations": [ + "1209:6:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4364, + "src": "1209:6:22" + }, + "id": 8136, + "nodeType": "InheritanceSpecifier", + "src": "1209:6:22" + } + ], + "canonicalName": "TokenRelayer", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 8130, + "nodeType": "StructuredDocumentation", + "src": "612:545:22", + "text": " @title TokenRelayer\n @notice A relayer contract that accepts ERC20 permit signatures and executes\n arbitrary calls to a destination contract, both authorized via signature.\n \n Flow:\n 1. User signs a permit allowing the relayer to spend their tokens\n 2. User signs a payload (e.g., transfer from relayer to another user)\n 3. Relayer:\n a. Executes permit to approve the tokens\n b. Transfers tokens from user to relayer (via transferFrom)\n c. Forwards the payload call (transfer from relayer to another user)" + }, + "fullyImplemented": true, + "id": 8603, + "linearizedBaseContracts": [ + 8603, + 4364, + 262, + 1827, + 147, + 1662 + ], + "name": "TokenRelayer", + "nameLocation": "1167:12:22", + "nodeType": "ContractDefinition", + "nodes": [ + { + "global": false, + "id": 8140, + "libraryName": { + "id": 8137, + "name": "SafeERC20", + "nameLocations": [ + "1228:9:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 831, + "src": "1228:9:22" + }, + "nodeType": "UsingForDirective", + "src": "1222:27:22", + "typeName": { + "id": 8139, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 8138, + "name": "IERC20", + "nameLocations": [ + "1242:6:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 340, + "src": "1242:6:22" + }, + "referencedDeclaration": 340, + "src": "1242:6:22", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + } + }, + { + "constant": true, + "id": 8145, + "mutability": "constant", + "name": "_TYPE_HASH_PAYLOAD", + "nameLocation": "1335:18:22", + "nodeType": "VariableDeclaration", + "scope": 8603, + "src": "1310:202:22", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8141, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1310:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "arguments": [ + { + "hexValue": "5061796c6f616428616464726573732064657374696e6174696f6e2c61646472657373206f776e65722c6164647265737320746f6b656e2c75696e743235362076616c75652c627974657320646174612c75696e743235362065746856616c75652c75696e74323536206e6f6e63652c75696e7432353620646561646c696e6529", + "id": 8143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1375:131:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844", + "typeString": "literal_string \"Payload(address destination,address owner,address token,uint256 value,bytes data,uint256 ethValue,uint256 nonce,uint256 deadline)\"" + }, + "value": "Payload(address destination,address owner,address token,uint256 value,bytes data,uint256 ethValue,uint256 nonce,uint256 deadline)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844", + "typeString": "literal_string \"Payload(address destination,address owner,address token,uint256 value,bytes data,uint256 ethValue,uint256 nonce,uint256 deadline)\"" + } + ], + "id": 8142, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1356:9:22", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 8144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1356:156:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "75bd6863", + "id": 8147, + "mutability": "immutable", + "name": "destinationContract", + "nameLocation": "1544:19:22", + "nodeType": "VariableDeclaration", + "scope": 8603, + "src": "1519:44:22", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8146, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1519:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d850124e", + "id": 8153, + "mutability": "mutable", + "name": "usedPayloadNonces", + "nameLocation": "1622:17:22", + "nodeType": "VariableDeclaration", + "scope": 8603, + "src": "1570:69:22", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + }, + "typeName": { + "id": 8152, + "keyName": "", + "keyNameLocation": "-1:-1:-1", + "keyType": { + "id": 8148, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1578:7:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1570:44:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 8151, + "keyName": "", + "keyNameLocation": "-1:-1:-1", + "keyType": { + "id": 8149, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1597:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1589:24:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + }, + "valueName": "", + "valueNameLocation": "-1:-1:-1", + "valueType": { + "id": 8150, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1608:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "visibility": "public" + }, + { + "canonicalName": "TokenRelayer.ExecuteParams", + "id": 8182, + "members": [ + { + "constant": false, + "id": 8155, + "mutability": "mutable", + "name": "token", + "nameLocation": "1768:5:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1760:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1760:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8157, + "mutability": "mutable", + "name": "owner", + "nameLocation": "1791:5:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1783:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8156, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1783:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8159, + "mutability": "mutable", + "name": "value", + "nameLocation": "1814:5:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1806:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8158, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8161, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "1837:8:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1829:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8160, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1829:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8163, + "mutability": "mutable", + "name": "permitV", + "nameLocation": "1861:7:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1855:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8162, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1855:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8165, + "mutability": "mutable", + "name": "permitR", + "nameLocation": "1886:7:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1878:15:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8164, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1878:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8167, + "mutability": "mutable", + "name": "permitS", + "nameLocation": "1911:7:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1903:15:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8166, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1903:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8169, + "mutability": "mutable", + "name": "payloadData", + "nameLocation": "1934:11:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1928:17:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 8168, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1928:5:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8171, + "mutability": "mutable", + "name": "payloadValue", + "nameLocation": "1963:12:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1955:20:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1955:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8173, + "mutability": "mutable", + "name": "payloadNonce", + "nameLocation": "1993:12:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "1985:20:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1985:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8175, + "mutability": "mutable", + "name": "payloadDeadline", + "nameLocation": "2023:15:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "2015:23:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8174, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2015:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8177, + "mutability": "mutable", + "name": "payloadV", + "nameLocation": "2054:8:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "2048:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8176, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2048:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8179, + "mutability": "mutable", + "name": "payloadR", + "nameLocation": "2080:8:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "2072:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8178, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2072:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8181, + "mutability": "mutable", + "name": "payloadS", + "nameLocation": "2106:8:22", + "nodeType": "VariableDeclaration", + "scope": 8182, + "src": "2098:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8180, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2098:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "name": "ExecuteParams", + "nameLocation": "1736:13:22", + "nodeType": "StructDefinition", + "scope": 8603, + "src": "1729:392:22", + "visibility": "public" + }, + { + "anonymous": false, + "eventSelector": "78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350", + "id": 8190, + "name": "RelayerExecuted", + "nameLocation": "2133:15:22", + "nodeType": "EventDefinition", + "parameters": { + "id": 8189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8184, + "indexed": true, + "mutability": "mutable", + "name": "signer", + "nameLocation": "2174:6:22", + "nodeType": "VariableDeclaration", + "scope": 8190, + "src": "2158:22:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2158:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8186, + "indexed": true, + "mutability": "mutable", + "name": "token", + "nameLocation": "2206:5:22", + "nodeType": "VariableDeclaration", + "scope": 8190, + "src": "2190:21:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8185, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2190:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8188, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2229:6:22", + "nodeType": "VariableDeclaration", + "scope": 8190, + "src": "2221:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2221:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2148:93:22" + }, + "src": "2127:115:22" + }, + { + "anonymous": false, + "eventSelector": "a0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e0", + "id": 8198, + "name": "TokenWithdrawn", + "nameLocation": "2294:14:22", + "nodeType": "EventDefinition", + "parameters": { + "id": 8197, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8192, + "indexed": true, + "mutability": "mutable", + "name": "token", + "nameLocation": "2325:5:22", + "nodeType": "VariableDeclaration", + "scope": 8198, + "src": "2309:21:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8191, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2309:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8194, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2340:6:22", + "nodeType": "VariableDeclaration", + "scope": 8198, + "src": "2332:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8193, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2332:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8196, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2364:2:22", + "nodeType": "VariableDeclaration", + "scope": 8198, + "src": "2348:18:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8195, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2348:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2308:59:22" + }, + "src": "2288:80:22" + }, + { + "anonymous": false, + "eventSelector": "6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc", + "id": 8204, + "name": "ETHWithdrawn", + "nameLocation": "2379:12:22", + "nodeType": "EventDefinition", + "parameters": { + "id": 8203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8200, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2400:6:22", + "nodeType": "VariableDeclaration", + "scope": 8204, + "src": "2392:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8199, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2392:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8202, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "2424:2:22", + "nodeType": "VariableDeclaration", + "scope": 8204, + "src": "2408:18:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8201, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2408:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2391:36:22" + }, + "src": "2373:55:22" + }, + { + "body": { + "id": 8231, + "nodeType": "Block", + "src": "2614:135:22", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 8223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8218, + "name": "_destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "2632:20:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 8221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2664:1:22", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 8220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2656:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8219, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2656:7:22", + "typeDescriptions": {} + } + }, + "id": 8222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2656:10:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2632:34:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c69642064657374696e6174696f6e", + "id": 8224, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2668:21:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368", + "typeString": "literal_string \"Invalid destination\"" + }, + "value": "Invalid destination" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368", + "typeString": "literal_string \"Invalid destination\"" + } + ], + "id": 8217, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2624:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2624:66:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8226, + "nodeType": "ExpressionStatement", + "src": "2624:66:22" + }, + { + "expression": { + "id": 8229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 8227, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "2700:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 8228, + "name": "_destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "2722:20:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2700:42:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 8230, + "nodeType": "ExpressionStatement", + "src": "2700:42:22" + } + ] + }, + "id": 8232, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 8209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2562:3:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2566:6:22", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2562:10:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 8211, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 8208, + "name": "Ownable", + "nameLocations": [ + "2554:7:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 147, + "src": "2554:7:22" + }, + "nodeType": "ModifierInvocation", + "src": "2554:19:22" + }, + { + "arguments": [ + { + "hexValue": "546f6b656e52656c61796572", + "id": 8213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2589:14:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_142b4a499251a4eacaab3f10318ce24bd0fa67fa5375e1dfcd0a44e62c5b47a4", + "typeString": "literal_string \"TokenRelayer\"" + }, + "value": "TokenRelayer" + }, + { + "hexValue": "31", + "id": 8214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2605:3:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "typeString": "literal_string \"1\"" + }, + "value": "1" + } + ], + "id": 8215, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 8212, + "name": "EIP712", + "nameLocations": [ + "2582:6:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 4364, + "src": "2582:6:22" + }, + "nodeType": "ModifierInvocation", + "src": "2582:27:22" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8206, + "mutability": "mutable", + "name": "_destinationContract", + "nameLocation": "2524:20:22", + "nodeType": "VariableDeclaration", + "scope": 8232, + "src": "2516:28:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2516:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2515:30:22" + }, + "returnParameters": { + "id": 8216, + "nodeType": "ParameterList", + "parameters": [], + "src": "2614:0:22" + }, + "scope": 8603, + "src": "2504:245:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8235, + "nodeType": "Block", + "src": "2852:2:22", + "statements": [] + }, + "id": 8236, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8233, + "nodeType": "ParameterList", + "parameters": [], + "src": "2832:2:22" + }, + "returnParameters": { + "id": 8234, + "nodeType": "ParameterList", + "parameters": [], + "src": "2852:0:22" + }, + "scope": 8603, + "src": "2825:29:22", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 8401, + "nodeType": "Block", + "src": "3073:1918:22", + "statements": [ + { + "assignments": [ + 8245 + ], + "declarations": [ + { + "constant": false, + "id": 8245, + "mutability": "mutable", + "name": "owner", + "nameLocation": "3091:5:22", + "nodeType": "VariableDeclaration", + "scope": 8401, + "src": "3083:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3083:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 8248, + "initialValue": { + "expression": { + "id": 8246, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3099:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3106:5:22", + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 8157, + "src": "3099:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3083:28:22" + }, + { + "assignments": [ + 8250 + ], + "declarations": [ + { + "constant": false, + "id": 8250, + "mutability": "mutable", + "name": "nonce", + "nameLocation": "3129:5:22", + "nodeType": "VariableDeclaration", + "scope": 8401, + "src": "3121:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8249, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3121:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 8253, + "initialValue": { + "expression": { + "id": 8251, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3137:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3144:12:22", + "memberName": "payloadNonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 8173, + "src": "3137:19:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3121:35:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 8260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8255, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "3201:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 8258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3218:1:22", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 8257, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3210:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8256, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3210:7:22", + "typeDescriptions": {} + } + }, + "id": 8259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3210:10:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3201:19:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c6964206f776e6572", + "id": 8261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3222:15:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae", + "typeString": "literal_string \"Invalid owner\"" + }, + "value": "Invalid owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae", + "typeString": "literal_string \"Invalid owner\"" + } + ], + "id": 8254, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3193:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3193:45:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8263, + "nodeType": "ExpressionStatement", + "src": "3193:45:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 8271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8265, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3256:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3263:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "3256:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 8269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3280:1:22", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 8268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3272:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8267, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3272:7:22", + "typeDescriptions": {} + } + }, + "id": 8270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3272:10:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3256:26:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c696420746f6b656e", + "id": 8272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3284:15:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6", + "typeString": "literal_string \"Invalid token\"" + }, + "value": "Invalid token" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6", + "typeString": "literal_string \"Invalid token\"" + } + ], + "id": 8264, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3248:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3248:52:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8274, + "nodeType": "ExpressionStatement", + "src": "3248:52:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3318:32:22", + "subExpression": { + "baseExpression": { + "baseExpression": { + "id": 8276, + "name": "usedPayloadNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8153, + "src": "3319:17:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 8278, + "indexExpression": { + "id": 8277, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "3337:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3319:24:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 8280, + "indexExpression": { + "id": 8279, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8250, + "src": "3344:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3319:31:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e6f6e63652075736564", + "id": 8282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3352:12:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21", + "typeString": "literal_string \"Nonce used\"" + }, + "value": "Nonce used" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21", + "typeString": "literal_string \"Nonce used\"" + } + ], + "id": 8275, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3310:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3310:55:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8284, + "nodeType": "ExpressionStatement", + "src": "3310:55:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8286, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "3383:5:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3389:9:22", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "3383:15:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8288, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3402:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3409:15:22", + "memberName": "payloadDeadline", + "nodeType": "MemberAccess", + "referencedDeclaration": 8175, + "src": "3402:22:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3383:41:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5061796c6f61642065787069726564", + "id": 8291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3426:17:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae", + "typeString": "literal_string \"Payload expired\"" + }, + "value": "Payload expired" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae", + "typeString": "literal_string \"Payload expired\"" + } + ], + "id": 8285, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3375:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3375:69:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8293, + "nodeType": "ExpressionStatement", + "src": "3375:69:22" + }, + { + "assignments": [ + 8295 + ], + "declarations": [ + { + "constant": false, + "id": 8295, + "mutability": "mutable", + "name": "digest", + "nameLocation": "3531:6:22", + "nodeType": "VariableDeclaration", + "scope": 8401, + "src": "3523:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8294, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3523:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8310, + "initialValue": { + "arguments": [ + { + "id": 8297, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "3568:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8298, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3587:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3594:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "3587:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8300, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3613:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3620:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 8159, + "src": "3613:12:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8302, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3639:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3646:11:22", + "memberName": "payloadData", + "nodeType": "MemberAccess", + "referencedDeclaration": 8169, + "src": "3639:18:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "expression": { + "id": 8304, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3671:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3678:12:22", + "memberName": "payloadValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 8171, + "src": "3671:19:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8306, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8250, + "src": "3704:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8307, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3723:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3730:15:22", + "memberName": "payloadDeadline", + "nodeType": "MemberAccess", + "referencedDeclaration": 8175, + "src": "3723:22:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8296, + "name": "_computeDigest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8441, + "src": "3540:14:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,address,uint256,bytes memory,uint256,uint256,uint256) view returns (bytes32)" + } + }, + "id": 8309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3540:215:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3523:232:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 8323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 8314, + "name": "digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8295, + "src": "3864:6:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8315, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3872:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3879:8:22", + "memberName": "payloadV", + "nodeType": "MemberAccess", + "referencedDeclaration": 8177, + "src": "3872:15:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 8317, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3889:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3896:8:22", + "memberName": "payloadR", + "nodeType": "MemberAccess", + "referencedDeclaration": 8179, + "src": "3889:15:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8319, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3906:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3913:8:22", + "memberName": "payloadS", + "nodeType": "MemberAccess", + "referencedDeclaration": 8181, + "src": "3906:15:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 8312, + "name": "ECDSA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4137, + "src": "3850:5:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ECDSA_$4137_$", + "typeString": "type(library ECDSA)" + } + }, + "id": 8313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3856:7:22", + "memberName": "recover", + "nodeType": "MemberAccess", + "referencedDeclaration": 4059, + "src": "3850:13:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 8321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3850:72:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 8322, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "3926:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3850:81:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e76616c696420736967", + "id": 8324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3933:13:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72", + "typeString": "literal_string \"Invalid sig\"" + }, + "value": "Invalid sig" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72", + "typeString": "literal_string \"Invalid sig\"" + } + ], + "id": 8311, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3842:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3842:105:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8326, + "nodeType": "ExpressionStatement", + "src": "3842:105:22" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8328, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3966:3:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3970:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "3966:9:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 8330, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "3979:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3986:12:22", + "memberName": "payloadValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 8171, + "src": "3979:19:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3966:32:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374204554482076616c75652070726f7669646564", + "id": 8333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4000:30:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76", + "typeString": "literal_string \"Incorrect ETH value provided\"" + }, + "value": "Incorrect ETH value provided" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76", + "typeString": "literal_string \"Incorrect ETH value provided\"" + } + ], + "id": 8327, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3958:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3958:73:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8335, + "nodeType": "ExpressionStatement", + "src": "3958:73:22" + }, + { + "expression": { + "id": 8342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 8336, + "name": "usedPayloadNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8153, + "src": "4158:17:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 8339, + "indexExpression": { + "id": 8337, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "4176:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4158:24:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 8340, + "indexExpression": { + "id": 8338, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8250, + "src": "4183:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4158:31:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 8341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4192:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "4158:38:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 8343, + "nodeType": "ExpressionStatement", + "src": "4158:38:22" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 8345, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4342:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4349:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "4342:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8347, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "4368:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8348, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4387:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4394:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 8159, + "src": "4387:12:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8350, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4413:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4420:8:22", + "memberName": "deadline", + "nodeType": "MemberAccess", + "referencedDeclaration": 8161, + "src": "4413:15:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8352, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4442:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4449:7:22", + "memberName": "permitV", + "nodeType": "MemberAccess", + "referencedDeclaration": 8163, + "src": "4442:14:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 8354, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4470:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4477:7:22", + "memberName": "permitR", + "nodeType": "MemberAccess", + "referencedDeclaration": 8165, + "src": "4470:14:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8356, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4498:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4505:7:22", + "memberName": "permitS", + "nodeType": "MemberAccess", + "referencedDeclaration": 8167, + "src": "4498:14:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 8344, + "name": "_executePermitAndTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8508, + "src": "4303:25:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32)" + } + }, + "id": 8358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4303:219:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8359, + "nodeType": "ExpressionStatement", + "src": "4303:219:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8365, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "4626:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8366, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4647:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4654:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 8159, + "src": "4647:12:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 8361, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4599:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4606:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "4599:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8360, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "4592:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4592:20:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4613:12:22", + "memberName": "forceApprove", + "nodeType": "MemberAccess", + "referencedDeclaration": 626, + "src": "4592:33:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$340_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 8368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4592:68:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8369, + "nodeType": "ExpressionStatement", + "src": "4592:68:22" + }, + { + "assignments": [ + 8371 + ], + "declarations": [ + { + "constant": false, + "id": 8371, + "mutability": "mutable", + "name": "callSuccess", + "nameLocation": "4676:11:22", + "nodeType": "VariableDeclaration", + "scope": 8401, + "src": "4671:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8370, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4671:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 8378, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 8373, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4703:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4710:11:22", + "memberName": "payloadData", + "nodeType": "MemberAccess", + "referencedDeclaration": 8169, + "src": "4703:18:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + { + "expression": { + "id": 8375, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4723:3:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 8376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4727:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "src": "4723:9:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8372, + "name": "_forwardCall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8529, + "src": "4690:12:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (bytes memory,uint256) returns (bool)" + } + }, + "id": 8377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4690:43:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4671:62:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8380, + "name": "callSuccess", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8371, + "src": "4751:11:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "43616c6c206661696c6564", + "id": 8381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4764:13:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b", + "typeString": "literal_string \"Call failed\"" + }, + "value": "Call failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b", + "typeString": "literal_string \"Call failed\"" + } + ], + "id": 8379, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4743:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4743:35:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8383, + "nodeType": "ExpressionStatement", + "src": "4743:35:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8389, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "4895:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "hexValue": "30", + "id": 8390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4916:1:22", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "id": 8385, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4868:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4875:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "4868:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8384, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "4861:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4861:20:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4882:12:22", + "memberName": "forceApprove", + "nodeType": "MemberAccess", + "referencedDeclaration": 626, + "src": "4861:33:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$340_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 8391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4861:57:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8392, + "nodeType": "ExpressionStatement", + "src": "4861:57:22" + }, + { + "eventCall": { + "arguments": [ + { + "id": 8394, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8245, + "src": "4950:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8395, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4957:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4964:5:22", + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 8155, + "src": "4957:12:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 8397, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8239, + "src": "4971:6:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams calldata" + } + }, + "id": 8398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "4978:5:22", + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 8159, + "src": "4971:12:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8393, + "name": "RelayerExecuted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8190, + "src": "4934:15:22", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 8399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "4934:50:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8400, + "nodeType": "EmitStatement", + "src": "4929:55:22" + } + ] + }, + "functionSelector": "2af83bfe", + "id": 8402, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 8242, + "kind": "modifierInvocation", + "modifierName": { + "id": 8241, + "name": "nonReentrant", + "nameLocations": [ + "3060:12:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 1757, + "src": "3060:12:22" + }, + "nodeType": "ModifierInvocation", + "src": "3060:12:22" + } + ], + "name": "execute", + "nameLocation": "3004:7:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8240, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8239, + "mutability": "mutable", + "name": "params", + "nameLocation": "3035:6:22", + "nodeType": "VariableDeclaration", + "scope": 8402, + "src": "3012:29:22", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_calldata_ptr", + "typeString": "struct TokenRelayer.ExecuteParams" + }, + "typeName": { + "id": 8238, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 8237, + "name": "ExecuteParams", + "nameLocations": [ + "3012:13:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 8182, + "src": "3012:13:22" + }, + "referencedDeclaration": 8182, + "src": "3012:13:22", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ExecuteParams_$8182_storage_ptr", + "typeString": "struct TokenRelayer.ExecuteParams" + } + }, + "visibility": "internal" + } + ], + "src": "3011:31:22" + }, + "returnParameters": { + "id": 8243, + "nodeType": "ParameterList", + "parameters": [], + "src": "3073:0:22" + }, + "scope": 8603, + "src": "2995:1996:22", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 8440, + "nodeType": "Block", + "src": "5285:400:22", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 8425, + "name": "_TYPE_HASH_PAYLOAD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8145, + "src": "5370:18:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 8426, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "5406:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8427, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8404, + "src": "5494:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8428, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8406, + "src": "5517:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8429, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8408, + "src": "5540:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 8431, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8410, + "src": "5573:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 8430, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "5563:9:22", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 8432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5563:15:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 8433, + "name": "ethValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8412, + "src": "5596:8:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8434, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8414, + "src": "5622:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8435, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8416, + "src": "5645:8:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 8423, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "5342:3:22", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 8424, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "5346:6:22", + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "5342:10:22", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 8436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5342:325:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 8422, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "5332:9:22", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 8437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5332:336:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 8421, + "name": "_hashTypedDataV4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4297, + "src": "5302:16:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32) view returns (bytes32)" + } + }, + "id": 8438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "5302:376:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8420, + "id": 8439, + "nodeType": "Return", + "src": "5295:383:22" + } + ] + }, + "id": 8441, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_computeDigest", + "nameLocation": "5062:14:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8404, + "mutability": "mutable", + "name": "owner", + "nameLocation": "5094:5:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5086:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5086:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8406, + "mutability": "mutable", + "name": "token", + "nameLocation": "5117:5:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5109:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8405, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5109:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8408, + "mutability": "mutable", + "name": "value", + "nameLocation": "5140:5:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5132:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8407, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5132:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8410, + "mutability": "mutable", + "name": "data", + "nameLocation": "5168:4:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5155:17:22", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 8409, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5155:5:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8412, + "mutability": "mutable", + "name": "ethValue", + "nameLocation": "5190:8:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5182:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5182:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8414, + "mutability": "mutable", + "name": "nonce", + "nameLocation": "5216:5:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5208:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5208:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8416, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "5239:8:22", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5231:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8415, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5231:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5076:177:22" + }, + "returnParameters": { + "id": 8420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8419, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8441, + "src": "5276:7:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8418, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5276:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5275:9:22" + }, + "scope": 8603, + "src": "5053:632:22", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 8507, + "nodeType": "Block", + "src": "6141:577:22", + "statements": [ + { + "clauses": [ + { + "block": { + "id": 8474, + "nodeType": "Block", + "src": "6291:43:22", + "statements": [] + }, + "errorName": "", + "id": 8475, + "nodeType": "TryCatchClause", + "src": "6291:43:22" + }, + { + "block": { + "id": 8492, + "nodeType": "Block", + "src": "6341:246:22", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 8481, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8446, + "src": "6472:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 8484, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6487:4:22", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + ], + "id": 8483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6479:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6479:7:22", + "typeDescriptions": {} + } + }, + "id": 8485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6479:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 8478, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8444, + "src": "6455:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8477, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "6448:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6448:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6462:9:22", + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 317, + "src": "6448:23:22", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 8486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6448:45:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 8487, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8448, + "src": "6497:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6448:54:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5065726d6974206661696c656420616e6420696e73756666696369656e7420616c6c6f77616e6365", + "id": 8489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6520:42:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15", + "typeString": "literal_string \"Permit failed and insufficient allowance\"" + }, + "value": "Permit failed and insufficient allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15", + "typeString": "literal_string \"Permit failed and insufficient allowance\"" + } + ], + "id": 8476, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6423:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6423:153:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8491, + "nodeType": "ExpressionStatement", + "src": "6423:153:22" + } + ] + }, + "errorName": "", + "id": 8493, + "nodeType": "TryCatchClause", + "src": "6335:252:22" + } + ], + "externalCall": { + "arguments": [ + { + "id": 8463, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8446, + "src": "6243:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 8466, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6258:4:22", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + ], + "id": 8465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6250:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6250:7:22", + "typeDescriptions": {} + } + }, + "id": 8467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6250:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8468, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8448, + "src": "6265:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8469, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8450, + "src": "6272:8:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 8470, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8452, + "src": "6282:1:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 8471, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8454, + "src": "6285:1:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 8472, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8456, + "src": "6288:1:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [ + { + "id": 8460, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8444, + "src": "6229:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8459, + "name": "IERC20Permit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "6216:12:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Permit_$376_$", + "typeString": "type(contract IERC20Permit)" + } + }, + "id": 8461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6216:19:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Permit_$376", + "typeString": "contract IERC20Permit" + } + }, + "id": 8462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6236:6:22", + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 361, + "src": "6216:26:22", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 8473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6216:74:22", + "tryCall": true, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8494, + "nodeType": "TryStatement", + "src": "6212:375:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8499, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8446, + "src": "6683:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 8502, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6698:4:22", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_TokenRelayer_$8603", + "typeString": "contract TokenRelayer" + } + ], + "id": 8501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6690:7:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 8500, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6690:7:22", + "typeDescriptions": {} + } + }, + "id": 8503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6690:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8504, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8448, + "src": "6705:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8496, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8444, + "src": "6659:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8495, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "6652:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6652:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6666:16:22", + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 456, + "src": "6652:30:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$340_$", + "typeString": "function (contract IERC20,address,address,uint256)" + } + }, + "id": 8505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6652:59:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8506, + "nodeType": "ExpressionStatement", + "src": "6652:59:22" + } + ] + }, + "documentation": { + "id": 8442, + "nodeType": "StructuredDocumentation", + "src": "5691:245:22", + "text": " @dev Execute permit approval and then transfer tokens from owner to self (relayer).\n Permit is wrapped in try-catch: if it was front-run, we check\n that the allowance is already sufficient before proceeding." + }, + "id": 8508, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_executePermitAndTransfer", + "nameLocation": "5950:25:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8457, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8444, + "mutability": "mutable", + "name": "token", + "nameLocation": "5993:5:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "5985:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8443, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5985:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8446, + "mutability": "mutable", + "name": "owner", + "nameLocation": "6016:5:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6008:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8445, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6008:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8448, + "mutability": "mutable", + "name": "value", + "nameLocation": "6039:5:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6031:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8447, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6031:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8450, + "mutability": "mutable", + "name": "deadline", + "nameLocation": "6062:8:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6054:16:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8449, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6054:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8452, + "mutability": "mutable", + "name": "v", + "nameLocation": "6086:1:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6080:7:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8451, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6080:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8454, + "mutability": "mutable", + "name": "r", + "nameLocation": "6105:1:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6097:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8453, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6097:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8456, + "mutability": "mutable", + "name": "s", + "nameLocation": "6124:1:22", + "nodeType": "VariableDeclaration", + "scope": 8508, + "src": "6116:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8455, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6116:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5975:156:22" + }, + "returnParameters": { + "id": 8458, + "nodeType": "ParameterList", + "parameters": [], + "src": "6141:0:22" + }, + "scope": 8603, + "src": "5941:777:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8528, + "nodeType": "Block", + "src": "6804:104:22", + "statements": [ + { + "assignments": [ + 8518, + null + ], + "declarations": [ + { + "constant": false, + "id": 8518, + "mutability": "mutable", + "name": "success", + "nameLocation": "6820:7:22", + "nodeType": "VariableDeclaration", + "scope": 8528, + "src": "6815:12:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8517, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6815:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 8525, + "initialValue": { + "arguments": [ + { + "id": 8523, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8510, + "src": "6872:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 8519, + "name": "destinationContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8147, + "src": "6833:19:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 8520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "6853:4:22", + "memberName": "call", + "nodeType": "MemberAccess", + "src": "6833:24:22", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 8522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 8521, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8512, + "src": "6865:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "6833:38:22", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 8524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "6833:44:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6814:63:22" + }, + { + "expression": { + "id": 8526, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8518, + "src": "6894:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8516, + "id": 8527, + "nodeType": "Return", + "src": "6887:14:22" + } + ] + }, + "id": 8529, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forwardCall", + "nameLocation": "6733:12:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8510, + "mutability": "mutable", + "name": "data", + "nameLocation": "6759:4:22", + "nodeType": "VariableDeclaration", + "scope": 8529, + "src": "6746:17:22", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 8509, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6746:5:22", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8512, + "mutability": "mutable", + "name": "value", + "nameLocation": "6773:5:22", + "nodeType": "VariableDeclaration", + "scope": 8529, + "src": "6765:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8511, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6765:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6745:34:22" + }, + "returnParameters": { + "id": 8516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8515, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8529, + "src": "6798:4:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8514, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6798:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "6797:6:22" + }, + "scope": 8603, + "src": "6724:184:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8555, + "nodeType": "Block", + "src": "7309:113:22", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 8543, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7346:5:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 8544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7346:7:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8545, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8534, + "src": "7355:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8540, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8532, + "src": "7326:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8539, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "7319:6:22", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$340_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 8541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7319:13:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$340", + "typeString": "contract IERC20" + } + }, + "id": 8542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7333:12:22", + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 425, + "src": "7319:26:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$340_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$340_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 8546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7319:43:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8547, + "nodeType": "ExpressionStatement", + "src": "7319:43:22" + }, + { + "eventCall": { + "arguments": [ + { + "id": 8549, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8532, + "src": "7392:5:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8550, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8534, + "src": "7399:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 8551, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7407:5:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 8552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7407:7:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8548, + "name": "TokenWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8198, + "src": "7377:14:22", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (address,uint256,address)" + } + }, + "id": 8553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7377:38:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8554, + "nodeType": "EmitStatement", + "src": "7372:43:22" + } + ] + }, + "documentation": { + "id": 8530, + "nodeType": "StructuredDocumentation", + "src": "6914:217:22", + "text": " @notice Allows the owner to recover any ERC20 tokens held by this contract.\n @param token The ERC20 token contract address.\n @param amount The amount of tokens to transfer to the owner." + }, + "functionSelector": "9e281a98", + "id": 8556, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 8537, + "kind": "modifierInvocation", + "modifierName": { + "id": 8536, + "name": "onlyOwner", + "nameLocations": [ + "7299:9:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58, + "src": "7299:9:22" + }, + "nodeType": "ModifierInvocation", + "src": "7299:9:22" + } + ], + "name": "withdrawToken", + "nameLocation": "7245:13:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8532, + "mutability": "mutable", + "name": "token", + "nameLocation": "7267:5:22", + "nodeType": "VariableDeclaration", + "scope": 8556, + "src": "7259:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8531, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7259:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8534, + "mutability": "mutable", + "name": "amount", + "nameLocation": "7282:6:22", + "nodeType": "VariableDeclaration", + "scope": 8556, + "src": "7274:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8533, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7274:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7258:31:22" + }, + "returnParameters": { + "id": 8538, + "nodeType": "ParameterList", + "parameters": [], + "src": "7309:0:22" + }, + "scope": 8603, + "src": "7236:186:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 8585, + "nodeType": "Block", + "src": "7675:160:22", + "statements": [ + { + "assignments": [ + 8565, + null + ], + "declarations": [ + { + "constant": false, + "id": 8565, + "mutability": "mutable", + "name": "success", + "nameLocation": "7691:7:22", + "nodeType": "VariableDeclaration", + "scope": 8585, + "src": "7686:12:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8564, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7686:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 8573, + "initialValue": { + "arguments": [ + { + "hexValue": "", + "id": 8571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7732:2:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 8566, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7704:5:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 8567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7704:7:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 8568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "7712:4:22", + "memberName": "call", + "nodeType": "MemberAccess", + "src": "7704:12:22", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 8570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "id": 8569, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8559, + "src": "7724:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "7704:27:22", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 8572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7704:31:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7685:50:22" + }, + { + "expression": { + "arguments": [ + { + "id": 8575, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8565, + "src": "7753:7:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "455448207472616e73666572206661696c6564", + "id": 8576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7762:21:22", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd", + "typeString": "literal_string \"ETH transfer failed\"" + }, + "value": "ETH transfer failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd", + "typeString": "literal_string \"ETH transfer failed\"" + } + ], + "id": 8574, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7745:7:22", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7745:39:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8578, + "nodeType": "ExpressionStatement", + "src": "7745:39:22" + }, + { + "eventCall": { + "arguments": [ + { + "id": 8580, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8559, + "src": "7812:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 8581, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "7820:5:22", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 8582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7820:7:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8579, + "name": "ETHWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8204, + "src": "7799:12:22", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 8583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "7799:29:22", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8584, + "nodeType": "EmitStatement", + "src": "7794:34:22" + } + ] + }, + "documentation": { + "id": 8557, + "nodeType": "StructuredDocumentation", + "src": "7428:157:22", + "text": " @notice Allows the owner to recover any native ETH held by this contract.\n @param amount The amount of ETH to transfer to the owner." + }, + "functionSelector": "f14210a6", + "id": 8586, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 8562, + "kind": "modifierInvocation", + "modifierName": { + "id": 8561, + "name": "onlyOwner", + "nameLocations": [ + "7665:9:22" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 58, + "src": "7665:9:22" + }, + "nodeType": "ModifierInvocation", + "src": "7665:9:22" + } + ], + "name": "withdrawETH", + "nameLocation": "7628:11:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8559, + "mutability": "mutable", + "name": "amount", + "nameLocation": "7648:6:22", + "nodeType": "VariableDeclaration", + "scope": 8586, + "src": "7640:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8558, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7640:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7639:16:22" + }, + "returnParameters": { + "id": 8563, + "nodeType": "ParameterList", + "parameters": [], + "src": "7675:0:22" + }, + "scope": 8603, + "src": "7619:216:22", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 8601, + "nodeType": "Block", + "src": "7997:56:22", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "id": 8595, + "name": "usedPayloadNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8153, + "src": "8014:17:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_bool_$_$", + "typeString": "mapping(address => mapping(uint256 => bool))" + } + }, + "id": 8597, + "indexExpression": { + "id": 8596, + "name": "signer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8588, + "src": "8032:6:22", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8014:25:22", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bool_$", + "typeString": "mapping(uint256 => bool)" + } + }, + "id": 8599, + "indexExpression": { + "id": 8598, + "name": "nonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8590, + "src": "8040:5:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8014:32:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8594, + "id": 8600, + "nodeType": "Return", + "src": "8007:39:22" + } + ] + }, + "functionSelector": "dcb79457", + "id": 8602, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isExecutionCompleted", + "nameLocation": "7916:20:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8591, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8588, + "mutability": "mutable", + "name": "signer", + "nameLocation": "7945:6:22", + "nodeType": "VariableDeclaration", + "scope": 8602, + "src": "7937:14:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8587, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7937:7:22", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8590, + "mutability": "mutable", + "name": "nonce", + "nameLocation": "7961:5:22", + "nodeType": "VariableDeclaration", + "scope": 8602, + "src": "7953:13:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8589, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7953:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7936:31:22" + }, + "returnParameters": { + "id": 8594, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8593, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 8602, + "src": "7991:4:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8592, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7991:4:22", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7990:6:22" + }, + "scope": 8603, + "src": "7907:146:22", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 8604, + "src": "1158:6897:22", + "usedErrors": [ + 13, + 18, + 388, + 1734, + 1841, + 1843, + 3689, + 3694, + 3699 + ], + "usedEvents": [ + 24, + 242, + 8190, + 8198, + 8204 + ] + } + ], + "src": "32:8024:22" + }, + "id": 22 + } + }, + "contracts": { + "@openzeppelin/contracts/access/Ownable.sol": { + "Ownable": { + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "owner()": "8da5cb5b", + "renounceOwnership()": "715018a6", + "transferOwnership(address)": "f2fde38b" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. The initial owner is set to the address provided by the deployer. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the address provided by the deployer as the initial owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/access/Ownable.sol\":\"Ownable\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/interfaces/IERC1363.sol": { + "IERC1363": { + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "approveAndCall(address,uint256)": "3177029f", + "approveAndCall(address,uint256,bytes)": "cae9ca51", + "balanceOf(address)": "70a08231", + "supportsInterface(bytes4)": "01ffc9a7", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferAndCall(address,uint256)": "1296ee62", + "transferAndCall(address,uint256,bytes)": "4000aea0", + "transferFrom(address,address,uint256)": "23b872dd", + "transferFromAndCall(address,address,uint256)": "d8fbe994", + "transferFromAndCall(address,address,uint256,bytes)": "c1d34b89" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transferAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transferFromAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFromAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"approveAndCall(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"value\":\"The amount of tokens to be spent.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"approveAndCall(address,uint256,bytes)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\",\"params\":{\"data\":\"Additional data with no specified format, sent in call to `spender`.\",\"spender\":\"The address which will spend the funds.\",\"value\":\"The amount of tokens to be spent.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferAndCall(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to` and then calls {IERC1363Receiver-onTransferReceived} on `to`.\",\"params\":{\"to\":\"The address which you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"transferAndCall(address,uint256,bytes)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to` and then calls {IERC1363Receiver-onTransferReceived} on `to`.\",\"params\":{\"data\":\"Additional data with no specified format, sent in call to `to`.\",\"to\":\"The address which you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFromAndCall(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism and then calls {IERC1363Receiver-onTransferReceived} on `to`.\",\"params\":{\"from\":\"The address which you want to send tokens from.\",\"to\":\"The address which you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}},\"transferFromAndCall(address,address,uint256,bytes)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism and then calls {IERC1363Receiver-onTransferReceived} on `to`.\",\"params\":{\"data\":\"Additional data with no specified format, sent in call to `to`.\",\"from\":\"The address which you want to send tokens from.\",\"to\":\"The address which you want to transfer to.\",\"value\":\"The amount of tokens to be transferred.\"},\"returns\":{\"_0\":\"A boolean value indicating whether the operation succeeded unless throwing.\"}}},\"title\":\"IERC1363\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/interfaces/IERC1363.sol\":\"IERC1363\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/interfaces/IERC5267.sol": { + "IERC5267": { + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "eip712Domain()": "84b0196e" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"}},\"kind\":\"dev\",\"methods\":{\"eip712Domain()\":{\"details\":\"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/interfaces/IERC5267.sol\":\"IERC5267\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0xfb223a85dd0b2175cfbbaa325a744e2cd74ecd17c3df2b77b0722f991d2725ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84bf1dea0589ec49c8d15d559cc6d86ee493048a89b2d4adb60fbe705a3d89ae\",\"dweb:/ipfs/Qmd56n556d529wk2pRMhYhm5nhMDhviwereodDikjs68w1\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "IERC20": { + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC-20 standard as defined in the ERC.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "IERC20Permit": { + "abi": [ + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "DOMAIN_SEPARATOR()": "3644e515", + "nonces(address)": "7ecebe00", + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't need to send a transaction, and thus is not required to hold Ether at all. ==== Security Considerations There are two important considerations concerning the use of `permit`. The first is that a valid permit signature expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be considered as an intention to spend the allowance in any specific way. The second is that because permits have built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be generally recommended is: ```solidity function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} doThing(..., value); } function doThing(..., uint256 value) public { token.safeTransferFrom(msg.sender, address(this), value); ... } ``` Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also {SafeERC20-safeTransferFrom}). Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so contracts should have entry points that don't rely on permit.\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over ``owner``'s tokens, given ``owner``'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also applies here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. CAUTION: See Security Considerations above.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":\"IERC20Permit\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x53befc41288eaa87edcd3a7be7e8475a32e44c6a29f9bf52fae789781301d9ff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a1d7fab53c4ceaf42391b83d9b36d7e9cc524a8da125cffdcd32c56560f9d1c9\",\"dweb:/ipfs/QmaRZdVhQdqNXofeimibkBG65q9GVcXVZEGpycwwX3znC6\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "SafeERC20": { + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentAllowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestedDecrease", + "type": "uint256" + } + ], + "name": "SafeERC20FailedDecreaseAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205c28a953d80cbde5965c90d7d69e4200c2946ffa7d85a8c75c36f5291a6d6e6464736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 TLOAD 0x28 0xA9 MSTORE8 0xD8 0xC 0xBD 0xE5 SWAP7 TLOAD SWAP1 0xD7 0xD6 SWAP15 TIMESTAMP STOP 0xC2 SWAP5 PUSH16 0xFA7D85A8C75C36F5291A6D6E6464736F PUSH13 0x634300081C0033000000000000 ", + "sourceMap": "698:12615:7:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;698:12615:7;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205c28a953d80cbde5965c90d7d69e4200c2946ffa7d85a8c75c36f5291a6d6e6464736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 TLOAD 0x28 0xA9 MSTORE8 0xD8 0xC 0xBD 0xE5 SWAP7 TLOAD SWAP1 0xD7 0xD6 SWAP15 TIMESTAMP STOP 0xC2 SWAP5 PUSH16 0xFA7D85A8C75C36F5291A6D6E6464736F PUSH13 0x634300081C0033000000000000 ", + "sourceMap": "698:12615:7:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestedDecrease\",\"type\":\"uint256\"}],\"name\":\"SafeERC20FailedDecreaseAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Wrappers around ERC-20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\",\"errors\":{\"SafeERC20FailedDecreaseAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failed `decreaseAllowance` request.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{},\"title\":\"SafeERC20\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x304d732678032a9781ae85c8f204c8fba3d3a5e31c02616964e75cfdc5049098\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://299ced486011781dc98f638059678323c03079fefae1482abaa2135b22fa92d0\",\"dweb:/ipfs/QmbZNbcPTBxNvwChavN2kkZZs7xHhYL7mv51KrxMhsMs3j\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/Bytes.sol": { + "Bytes": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220072fadf3f16461513580a2d3f78bb66cb36505b035a64cbbe629d90098ae436d64736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SMOD 0x2F 0xAD RETURN CALL PUSH5 0x61513580A2 0xD3 0xF7 DUP12 0xB6 PUSH13 0xB36505B035A64CBBE629D90098 0xAE NUMBER PUSH14 0x64736F6C634300081C0033000000 ", + "sourceMap": "198:14538:8:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;198:14538:8;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220072fadf3f16461513580a2d3f78bb66cb36505b035a64cbbe629d90098ae436d64736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SMOD 0x2F 0xAD RETURN CALL PUSH5 0x61513580A2 0xD3 0xF7 DUP12 0xB6 PUSH13 0xB36505B035A64CBBE629D90098 0xAE NUMBER PUSH14 0x64736F6C634300081C0033000000 ", + "sourceMap": "198:14538:8:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Bytes operations.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Bytes.sol\":\"Bytes\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/Context.sol": { + "Context": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/Panic.sol": { + "Panic": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220cca8e34ba4a10a3072e457ee409c3e14973552ffad66786674cea596605f229764736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCC 0xA8 0xE3 0x4B LOG4 LOG1 EXP ADDRESS PUSH19 0xE457EE409C3E14973552FFAD66786674CEA596 PUSH1 0x5F 0x22 SWAP8 PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "657:1315:10:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;657:1315:10;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220cca8e34ba4a10a3072e457ee409c3e14973552ffad66786674cea596605f229764736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCC 0xA8 0xE3 0x4B LOG4 LOG1 EXP ADDRESS PUSH19 0xE457EE409C3E14973552FFAD66786674CEA596 PUSH1 0x5F 0x22 SWAP8 PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "657:1315:10:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Helper library for emitting standardized panic codes. ```solidity contract Example { using Panic for uint256; // Use any of the declared internal constants function foo() { Panic.GENERIC.panic(); } // Alternatively function foo() { Panic.panic(Panic.GENERIC); } } ``` Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil]. _Available since v5.1._\",\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"ARRAY_OUT_OF_BOUNDS\":{\"details\":\"array out of bounds access\"},\"ASSERT\":{\"details\":\"used by the assert() builtin\"},\"DIVISION_BY_ZERO\":{\"details\":\"division or modulo by zero\"},\"EMPTY_ARRAY_POP\":{\"details\":\"empty array pop\"},\"ENUM_CONVERSION_ERROR\":{\"details\":\"enum conversion error\"},\"GENERIC\":{\"details\":\"generic / unspecified error\"},\"INVALID_INTERNAL_FUNCTION\":{\"details\":\"calling invalid internal function\"},\"RESOURCE_ERROR\":{\"details\":\"resource error (too large allocation or too large array)\"},\"STORAGE_ENCODING_ERROR\":{\"details\":\"invalid encoding in storage\"},\"UNDER_OVERFLOW\":{\"details\":\"arithmetic underflow or overflow\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Panic.sol\":\"Panic\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "ReentrancyGuard": { + "abi": [ + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"}],\"devdoc\":{\"custom:stateless\":\"\",\"details\":\"Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at, consider using {ReentrancyGuardTransient} instead. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. IMPORTANT: Deprecated. This storage-based reentrancy guard will be removed and replaced by the {ReentrancyGuardTransient} variant in v6.0.\",\"errors\":{\"ReentrancyGuardReentrantCall()\":[{\"details\":\"Unauthorized reentrant call.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xa516cbf1c7d15d3517c2d668601ce016c54395bf5171918a14e2686977465f53\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1e1d079e8edfb58efd23a311e315a4807b01b5d1cf153f8fa2d0608b9dec3e99\",\"dweb:/ipfs/QmTBExeX2SDTkn5xbk5ssbYSx7VqRp9H4Ux1CY4uQM4b9N\"]},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/ShortStrings.sol": { + "ShortStrings": { + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205331629f8f9bf0cbfbabc3d9173056cd00dba4e3cc0330036bc4382e2359a42464736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MSTORE8 BALANCE PUSH3 0x9F8F9B CREATE 0xCB 0xFB 0xAB 0xC3 0xD9 OR ADDRESS JUMP 0xCD STOP 0xDB LOG4 0xE3 0xCC SUB ADDRESS SUB PUSH12 0xC4382E2359A42464736F6C63 NUMBER STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "1255:3054:12:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;1255:3054:12;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205331629f8f9bf0cbfbabc3d9173056cd00dba4e3cc0330036bc4382e2359a42464736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MSTORE8 BALANCE PUSH3 0x9F8F9B CREATE 0xCB 0xFB 0xAB 0xC3 0xD9 OR ADDRESS JUMP 0xCD STOP 0xDB LOG4 0xE3 0xCC SUB ADDRESS SUB PUSH12 0xC4382E2359A42464736F6C63 NUMBER STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "1255:3054:12:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidShortString\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"StringTooLong\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"This library provides functions to convert short memory strings into a `ShortString` type that can be used as an immutable variable. Strings of arbitrary length can be optimized using this library if they are short enough (up to 31 bytes) by packing them with their length (1 byte) in a single EVM word (32 bytes). Additionally, a fallback mechanism can be used for every other case. Usage example: ```solidity contract Named { using ShortStrings for *; ShortString private immutable _name; string private _nameFallback; constructor(string memory contractName) { _name = contractName.toShortStringWithFallback(_nameFallback); } function name() external view returns (string memory) { return _name.toStringWithFallback(_nameFallback); } } ```\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/ShortStrings.sol\":\"ShortStrings\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x0768b3bdb701fe4994b3be932ca8635551dfebe04c645f77500322741bebf57c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a2059f9ca8d3c11c49ca49fc9c5fb070f18cc85d12a7688e45322ed0e2a1cb99\",\"dweb:/ipfs/QmS2gwX51RAvSw4tYbjHccY2CKbh2uvDzqHLAFXdsddgia\"]},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "StorageSlot": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202e11909616c8a357ae57cd11f3e744f7b7de3a3174b44a2b6467fa9904f2585764736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2E GT SWAP1 SWAP7 AND 0xC8 LOG3 JUMPI 0xAE JUMPI 0xCD GT RETURN 0xE7 PREVRANDAO 0xF7 0xB7 0xDE GASPRICE BALANCE PUSH21 0xB44A2B6467FA9904F2585764736F6C634300081C00 CALLER ", + "sourceMap": "1407:2774:13:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;1407:2774:13;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202e11909616c8a357ae57cd11f3e744f7b7de3a3174b44a2b6467fa9904f2585764736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2E GT SWAP1 SWAP7 AND 0xC8 LOG3 JUMPI 0xAE JUMPI 0xCD GT RETURN 0xE7 PREVRANDAO 0xF7 0xB7 0xDE GASPRICE BALANCE PUSH21 0xB44A2B6467FA9904F2585764736F6C634300081C00 CALLER ", + "sourceMap": "1407:2774:13:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for reading and writing primitive types to specific storage slots. Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. This library helps with reading and writing to such slots without the need for inline assembly. The functions in this library return Slot structs that contain a `value` member that can be used to read or write. Example usage to set ERC-1967 implementation slot: ```solidity contract ERC1967 { // Define the slot. Alternatively, use the SlotDerivation library to derive the slot. bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } function _setImplementation(address newImplementation) internal { require(newImplementation.code.length > 0); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } } ``` TIP: Consider using this library along with {SlotDerivation}.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/StorageSlot.sol\":\"StorageSlot\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "Strings": { + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "StringsInsufficientHexLength", + "type": "error" + }, + { + "inputs": [], + "name": "StringsInvalidAddressFormat", + "type": "error" + }, + { + "inputs": [], + "name": "StringsInvalidChar", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220172eadb738f4060c9567e763c4ffa1f0bf958b6bde49f20427622bab52603b4264736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 OR 0x2E 0xAD 0xB7 CODESIZE DELEGATECALL MOD 0xC SWAP6 PUSH8 0xE763C4FFA1F0BF95 DUP12 PUSH12 0xDE49F20427622BAB52603B42 PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "332:21205:14:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;332:21205:14;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220172eadb738f4060c9567e763c4ffa1f0bf958b6bde49f20427622bab52603b4264736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 OR 0x2E 0xAD 0xB7 CODESIZE DELEGATECALL MOD 0xC SWAP6 PUSH8 0xE763C4FFA1F0BF95 DUP12 PUSH12 0xDE49F20427622BAB52603B42 PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "332:21205:14:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StringsInvalidAddressFormat\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StringsInvalidChar\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"String operations.\",\"errors\":{\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}],\"StringsInvalidAddressFormat()\":[{\"details\":\"The string being parsed is not a properly formatted address.\"}],\"StringsInvalidChar()\":[{\"details\":\"The string being parsed contains characters that are not in scope of the given base.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x1fdc2de9585ab0f1c417f02a873a2b6343cd64bb7ffec6b00ffa11a4a158d9e8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ab223a3d969c6cd7610049431dd42740960c477e45878f5d8b54411f7a32bdc\",\"dweb:/ipfs/QmWumhjvhpKcwx3vDPQninsNVTc3BGvqaihkQakFkQYpaS\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/cryptography/ECDSA.sol": { + "ECDSA": { + "abi": [ + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220861fc53c54256420d26202ed953c1a6a70251bfd2cbefbfb0e98c93d2669cfb464736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP7 0x1F 0xC5 EXTCODECOPY SLOAD 0x25 PUSH5 0x20D26202ED SWAP6 EXTCODECOPY BYTE PUSH11 0x70251BFD2CBEFBFB0E98C9 RETURNDATASIZE 0x26 PUSH10 0xCFB464736F6C63430008 SHR STOP CALLER ", + "sourceMap": "344:11807:15:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;344:11807:15;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220861fc53c54256420d26202ed953c1a6a70251bfd2cbefbfb0e98c93d2669cfb464736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 DUP7 0x1F 0xC5 EXTCODECOPY SLOAD 0x25 PUSH5 0x20D26202ED SWAP6 EXTCODECOPY BYTE PUSH11 0x70251BFD2CBEFBFB0E98C9 RETURNDATASIZE 0x26 PUSH10 0xCFB464736F6C63430008 SHR STOP CALLER ", + "sourceMap": "344:11807:15:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Elliptic Curve Digital Signature Algorithm (ECDSA) operations. These functions can be used to verify that a message was signed by the holder of the private keys of a given address.\",\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature is invalid.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":\"ECDSA\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xbeb5cad8aaabe0d35d2ec1a8414d91e81e5a8ca679add4cf57e2f33476861f40\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebb272a5ee2da4e8bd5551334e0ce8dce4e9c56a04570d6bf046d260fab3116a\",\"dweb:/ipfs/QmNw6RyM769qcqFocDq6HJMG2WiEnQbvizpRaUXsACHho2\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/cryptography/EIP712.sol": { + "EIP712": { + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "eip712Domain()": "84b0196e" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidShortString\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"StringTooLong\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\",\"details\":\"https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data. The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA ({_hashTypedDataV4}). The implementation of the domain separator was designed to be as efficient as possible while still properly updating the chain id to protect against replay attacks on an eventual fork of the chain. NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\",\"events\":{\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the domain separator and parameter caches. The meaning of `name` and `version` is specified in https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]: - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. - `version`: the current major version of the signing domain. NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart contract upgrade].\"},\"eip712Domain()\":{\"details\":\"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/cryptography/EIP712.sol\":\"EIP712\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0xfb223a85dd0b2175cfbbaa325a744e2cd74ecd17c3df2b77b0722f991d2725ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84bf1dea0589ec49c8d15d559cc6d86ee493048a89b2d4adb60fbe705a3d89ae\",\"dweb:/ipfs/Qmd56n556d529wk2pRMhYhm5nhMDhviwereodDikjs68w1\"]},\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x0768b3bdb701fe4994b3be932ca8635551dfebe04c645f77500322741bebf57c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a2059f9ca8d3c11c49ca49fc9c5fb070f18cc85d12a7688e45322ed0e2a1cb99\",\"dweb:/ipfs/QmS2gwX51RAvSw4tYbjHccY2CKbh2uvDzqHLAFXdsddgia\"]},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x1fdc2de9585ab0f1c417f02a873a2b6343cd64bb7ffec6b00ffa11a4a158d9e8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ab223a3d969c6cd7610049431dd42740960c477e45878f5d8b54411f7a32bdc\",\"dweb:/ipfs/QmWumhjvhpKcwx3vDPQninsNVTc3BGvqaihkQakFkQYpaS\"]},\"@openzeppelin/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0x8440117ea216b97a7bad690a67449fd372c840d073c8375822667e14702782b4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebb6645995b8290d0b9121825e2533e4e28977b2c6befee76e15e58f0feb61d4\",\"dweb:/ipfs/QmVR72j6kL5R2txuihieDev1FeTi4KWJS1Z6ABbwL3Qtph\"]},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0x6d8579873b9650426bfbd2a754092d1725049ca05e4e3c8c2c82dd9f3453129d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fa3127a8968d55096d37124a9e212013af112affa5e30b84a1d22263c31576c\",\"dweb:/ipfs/QmetxaVcn5Q6nkpF9yXzaxPQ7d3rgrhV13sTH9BgiuzGJL\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": { + "MessageHashUtils": { + "abi": [ + { + "inputs": [], + "name": "ERC5267ExtensionsNotSupported", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206131ed8ee4dbbce47bcc4c6f88c9616eec0a3b2c76e6ecedd23ff36dd351a5da64736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH2 0x31ED DUP15 0xE4 0xDB 0xBC 0xE4 PUSH28 0xCC4C6F88C9616EEC0A3B2C76E6ECEDD23FF36DD351A5DA64736F6C63 NUMBER STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "521:8109:17:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;521:8109:17;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206131ed8ee4dbbce47bcc4c6f88c9616eec0a3b2c76e6ecedd23ff36dd351a5da64736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH2 0x31ED DUP15 0xE4 0xDB 0xBC 0xE4 PUSH28 0xCC4C6F88C9616EEC0A3B2C76E6ECEDD23FF36DD351A5DA64736F6C63 NUMBER STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "521:8109:17:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ERC5267ExtensionsNotSupported\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. The library provides methods for generating a hash of a message that conforms to the https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] specifications.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":\"MessageHashUtils\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x1fdc2de9585ab0f1c417f02a873a2b6343cd64bb7ffec6b00ffa11a4a158d9e8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ab223a3d969c6cd7610049431dd42740960c477e45878f5d8b54411f7a32bdc\",\"dweb:/ipfs/QmWumhjvhpKcwx3vDPQninsNVTc3BGvqaihkQakFkQYpaS\"]},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0x6d8579873b9650426bfbd2a754092d1725049ca05e4e3c8c2c82dd9f3453129d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fa3127a8968d55096d37124a9e212013af112affa5e30b84a1d22263c31576c\",\"dweb:/ipfs/QmetxaVcn5Q6nkpF9yXzaxPQ7d3rgrhV13sTH9BgiuzGJL\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "IERC165": { + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "methodIdentifiers": { + "supportsInterface(bytes4)": "01ffc9a7" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC-165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[ERC]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":\"IERC165\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "Math": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122091005e0c663891cd7c55899184f368372b30b74607e9cbbb4e1eb5ac7371189564736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP2 STOP MCOPY 0xC PUSH7 0x3891CD7C558991 DUP5 RETURN PUSH9 0x372B30B74607E9CBBB 0x4E 0x1E 0xB5 0xAC PUSH20 0x71189564736F6C634300081C0033000000000000 ", + "sourceMap": "281:32382:19:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;281:32382:19;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122091005e0c663891cd7c55899184f368372b30b74607e9cbbb4e1eb5ac7371189564736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP2 STOP MCOPY 0xC PUSH7 0x3891CD7C558991 DUP5 RETURN PUSH9 0x372B30B74607E9CBBB 0x4E 0x1E 0xB5 0xAC PUSH20 0x71189564736F6C634300081C0033000000000000 ", + "sourceMap": "281:32382:19:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/math/SafeCast.sol": { + "SafeCast": { + "abi": [ + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "int256", + "name": "value", + "type": "int256" + } + ], + "name": "SafeCastOverflowedIntDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "value", + "type": "int256" + } + ], + "name": "SafeCastOverflowedIntToUint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintToInt", + "type": "error" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206e23643c396df695b2797f650857ef0eb0576e47d97a4599ed83883f99aad72664736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH15 0x23643C396DF695B2797F650857EF0E 0xB0 JUMPI PUSH15 0x47D97A4599ED83883F99AAD7266473 PUSH16 0x6C634300081C00330000000000000000 ", + "sourceMap": "769:34170:20:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;769:34170:20;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206e23643c396df695b2797f650857ef0eb0576e47d97a4599ed83883f99aad72664736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH15 0x23643C396DF695B2797F650857EF0E 0xB0 JUMPI PUSH15 0x47D97A4599ED83883F99AAD7266473 PUSH16 0x6C634300081C00330000000000000000 ", + "sourceMap": "769:34170:20:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"int256\",\"name\":\"value\",\"type\":\"int256\"}],\"name\":\"SafeCastOverflowedIntDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"value\",\"type\":\"int256\"}],\"name\":\"SafeCastOverflowedIntToUint\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"bits\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintDowncast\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeCastOverflowedUintToInt\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"errors\":{\"SafeCastOverflowedIntDowncast(uint8,int256)\":[{\"details\":\"Value doesn't fit in an int of `bits` size.\"}],\"SafeCastOverflowedIntToUint(int256)\":[{\"details\":\"An int value doesn't fit in a uint of `bits` size.\"}],\"SafeCastOverflowedUintDowncast(uint8,uint256)\":[{\"details\":\"Value doesn't fit in a uint of `bits` size.\"}],\"SafeCastOverflowedUintToInt(uint256)\":[{\"details\":\"A uint value doesn't fit in an int of `bits` size.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":\"SafeCast\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]}},\"version\":1}" + } + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "SignedMath": { + "abi": [], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202c4428eb6666cae863602bfb74d48242f67136c2baeeed29a59362a5e64d7e8564736f6c634300081c0033", + "opcodes": "PUSH1 0x55 PUSH1 0x32 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x26 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2C PREVRANDAO 0x28 0xEB PUSH7 0x66CAE863602BFB PUSH21 0xD48242F67136C2BAEEED29A59362A5E64D7E856473 PUSH16 0x6C634300081C00330000000000000000 ", + "sourceMap": "258:2354:21:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;258:2354:21;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": {}, + "generatedSources": [], + "immutableReferences": {}, + "linkReferences": {}, + "object": "730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202c4428eb6666cae863602bfb74d48242f67136c2baeeed29a59362a5e64d7e8564736f6c634300081c0033", + "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 PUSH0 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2C PREVRANDAO 0x28 0xEB PUSH7 0x66CAE863602BFB PUSH21 0xD48242F67136C2BAEEED29A59362A5E64D7E856473 PUSH16 0x6C634300081C00330000000000000000 ", + "sourceMap": "258:2354:21:-:0;;;;;;;;" + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]}},\"version\":1}" + } + }, + "contracts/TokenRelayer.sol": { + "TokenRelayer": { + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_destinationContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "ETHWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RelayerExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "TokenWithdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "destinationContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "permitV", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "permitR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "permitS", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "payloadData", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "payloadValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloadNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloadDeadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "payloadV", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "payloadR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "payloadS", + "type": "bytes32" + } + ], + "internalType": "struct TokenRelayer.ExecuteParams", + "name": "params", + "type": "tuple" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "isExecutionCompleted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "usedPayloadNonces", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "evm": { + "bytecode": { + "functionDebugData": { + "@_1746": { + "entryPoint": null, + "id": 1746, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_4234": { + "entryPoint": null, + "id": 4234, + "parameterSlots": 2, + "returnSlots": 0 + }, + "@_50": { + "entryPoint": null, + "id": 50, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@_8232": { + "entryPoint": null, + "id": 8232, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@_buildDomainSeparator_4281": { + "entryPoint": null, + "id": 4281, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_reentrancyGuardStorageSlot_1826": { + "entryPoint": null, + "id": 1826, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_transferOwnership_146": { + "entryPoint": 470, + "id": 146, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@getStringSlot_2145": { + "entryPoint": null, + "id": 2145, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@getUint256Slot_2112": { + "entryPoint": null, + "id": 2112, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@toShortStringWithFallback_1985": { + "entryPoint": 549, + "id": 1985, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@toShortString_1887": { + "entryPoint": 599, + "id": 1887, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_decode_tuple_t_address_fromMemory": { + "entryPoint": 660, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address__to_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 6, + "returnSlots": 1 + }, + "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 1043, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "array_dataslot_string_storage": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "clean_up_bytearray_end_slots_string_storage": { + "entryPoint": 781, + "id": null, + "parameterSlots": 3, + "returnSlots": 0 + }, + "convert_bytes_to_fixedbytes_from_t_bytes_memory_ptr_to_t_bytes32": { + "entryPoint": 1096, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage": { + "entryPoint": 857, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "extract_byte_array_length": { + "entryPoint": 725, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "extract_used_part_and_set_length_of_short_byte_array": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "panic_error_0x41": { + "entryPoint": 705, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nativeSrc": "0:4722:23", + "nodeType": "YulBlock", + "src": "0:4722:23", + "statements": [ + { + "nativeSrc": "6:3:23", + "nodeType": "YulBlock", + "src": "6:3:23", + "statements": [] + }, + { + "body": { + "nativeSrc": "95:209:23", + "nodeType": "YulBlock", + "src": "95:209:23", + "statements": [ + { + "body": { + "nativeSrc": "141:16:23", + "nodeType": "YulBlock", + "src": "141:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "150:1:23", + "nodeType": "YulLiteral", + "src": "150:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "153:1:23", + "nodeType": "YulLiteral", + "src": "153:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "143:6:23", + "nodeType": "YulIdentifier", + "src": "143:6:23" + }, + "nativeSrc": "143:12:23", + "nodeType": "YulFunctionCall", + "src": "143:12:23" + }, + "nativeSrc": "143:12:23", + "nodeType": "YulExpressionStatement", + "src": "143:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "116:7:23", + "nodeType": "YulIdentifier", + "src": "116:7:23" + }, + { + "name": "headStart", + "nativeSrc": "125:9:23", + "nodeType": "YulIdentifier", + "src": "125:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "112:3:23", + "nodeType": "YulIdentifier", + "src": "112:3:23" + }, + "nativeSrc": "112:23:23", + "nodeType": "YulFunctionCall", + "src": "112:23:23" + }, + { + "kind": "number", + "nativeSrc": "137:2:23", + "nodeType": "YulLiteral", + "src": "137:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "108:3:23", + "nodeType": "YulIdentifier", + "src": "108:3:23" + }, + "nativeSrc": "108:32:23", + "nodeType": "YulFunctionCall", + "src": "108:32:23" + }, + "nativeSrc": "105:52:23", + "nodeType": "YulIf", + "src": "105:52:23" + }, + { + "nativeSrc": "166:29:23", + "nodeType": "YulVariableDeclaration", + "src": "166:29:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "185:9:23", + "nodeType": "YulIdentifier", + "src": "185:9:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "179:5:23", + "nodeType": "YulIdentifier", + "src": "179:5:23" + }, + "nativeSrc": "179:16:23", + "nodeType": "YulFunctionCall", + "src": "179:16:23" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "170:5:23", + "nodeType": "YulTypedName", + "src": "170:5:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "258:16:23", + "nodeType": "YulBlock", + "src": "258:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "267:1:23", + "nodeType": "YulLiteral", + "src": "267:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "270:1:23", + "nodeType": "YulLiteral", + "src": "270:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "260:6:23", + "nodeType": "YulIdentifier", + "src": "260:6:23" + }, + "nativeSrc": "260:12:23", + "nodeType": "YulFunctionCall", + "src": "260:12:23" + }, + "nativeSrc": "260:12:23", + "nodeType": "YulExpressionStatement", + "src": "260:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "217:5:23", + "nodeType": "YulIdentifier", + "src": "217:5:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "228:5:23", + "nodeType": "YulIdentifier", + "src": "228:5:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "243:3:23", + "nodeType": "YulLiteral", + "src": "243:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "248:1:23", + "nodeType": "YulLiteral", + "src": "248:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "239:3:23", + "nodeType": "YulIdentifier", + "src": "239:3:23" + }, + "nativeSrc": "239:11:23", + "nodeType": "YulFunctionCall", + "src": "239:11:23" + }, + { + "kind": "number", + "nativeSrc": "252:1:23", + "nodeType": "YulLiteral", + "src": "252:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "235:3:23", + "nodeType": "YulIdentifier", + "src": "235:3:23" + }, + "nativeSrc": "235:19:23", + "nodeType": "YulFunctionCall", + "src": "235:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "224:3:23", + "nodeType": "YulIdentifier", + "src": "224:3:23" + }, + "nativeSrc": "224:31:23", + "nodeType": "YulFunctionCall", + "src": "224:31:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "214:2:23", + "nodeType": "YulIdentifier", + "src": "214:2:23" + }, + "nativeSrc": "214:42:23", + "nodeType": "YulFunctionCall", + "src": "214:42:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "207:6:23", + "nodeType": "YulIdentifier", + "src": "207:6:23" + }, + "nativeSrc": "207:50:23", + "nodeType": "YulFunctionCall", + "src": "207:50:23" + }, + "nativeSrc": "204:70:23", + "nodeType": "YulIf", + "src": "204:70:23" + }, + { + "nativeSrc": "283:15:23", + "nodeType": "YulAssignment", + "src": "283:15:23", + "value": { + "name": "value", + "nativeSrc": "293:5:23", + "nodeType": "YulIdentifier", + "src": "293:5:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "283:6:23", + "nodeType": "YulIdentifier", + "src": "283:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address_fromMemory", + "nativeSrc": "14:290:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "61:9:23", + "nodeType": "YulTypedName", + "src": "61:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "72:7:23", + "nodeType": "YulTypedName", + "src": "72:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "84:6:23", + "nodeType": "YulTypedName", + "src": "84:6:23", + "type": "" + } + ], + "src": "14:290:23" + }, + { + "body": { + "nativeSrc": "410:102:23", + "nodeType": "YulBlock", + "src": "410:102:23", + "statements": [ + { + "nativeSrc": "420:26:23", + "nodeType": "YulAssignment", + "src": "420:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "432:9:23", + "nodeType": "YulIdentifier", + "src": "432:9:23" + }, + { + "kind": "number", + "nativeSrc": "443:2:23", + "nodeType": "YulLiteral", + "src": "443:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "428:3:23", + "nodeType": "YulIdentifier", + "src": "428:3:23" + }, + "nativeSrc": "428:18:23", + "nodeType": "YulFunctionCall", + "src": "428:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "420:4:23", + "nodeType": "YulIdentifier", + "src": "420:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "462:9:23", + "nodeType": "YulIdentifier", + "src": "462:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "477:6:23", + "nodeType": "YulIdentifier", + "src": "477:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "493:3:23", + "nodeType": "YulLiteral", + "src": "493:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "498:1:23", + "nodeType": "YulLiteral", + "src": "498:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "489:3:23", + "nodeType": "YulIdentifier", + "src": "489:3:23" + }, + "nativeSrc": "489:11:23", + "nodeType": "YulFunctionCall", + "src": "489:11:23" + }, + { + "kind": "number", + "nativeSrc": "502:1:23", + "nodeType": "YulLiteral", + "src": "502:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "485:3:23", + "nodeType": "YulIdentifier", + "src": "485:3:23" + }, + "nativeSrc": "485:19:23", + "nodeType": "YulFunctionCall", + "src": "485:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "473:3:23", + "nodeType": "YulIdentifier", + "src": "473:3:23" + }, + "nativeSrc": "473:32:23", + "nodeType": "YulFunctionCall", + "src": "473:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "455:6:23", + "nodeType": "YulIdentifier", + "src": "455:6:23" + }, + "nativeSrc": "455:51:23", + "nodeType": "YulFunctionCall", + "src": "455:51:23" + }, + "nativeSrc": "455:51:23", + "nodeType": "YulExpressionStatement", + "src": "455:51:23" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "309:203:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "379:9:23", + "nodeType": "YulTypedName", + "src": "379:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "390:6:23", + "nodeType": "YulTypedName", + "src": "390:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "401:4:23", + "nodeType": "YulTypedName", + "src": "401:4:23", + "type": "" + } + ], + "src": "309:203:23" + }, + { + "body": { + "nativeSrc": "691:169:23", + "nodeType": "YulBlock", + "src": "691:169:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "708:9:23", + "nodeType": "YulIdentifier", + "src": "708:9:23" + }, + { + "kind": "number", + "nativeSrc": "719:2:23", + "nodeType": "YulLiteral", + "src": "719:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "701:6:23", + "nodeType": "YulIdentifier", + "src": "701:6:23" + }, + "nativeSrc": "701:21:23", + "nodeType": "YulFunctionCall", + "src": "701:21:23" + }, + "nativeSrc": "701:21:23", + "nodeType": "YulExpressionStatement", + "src": "701:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "742:9:23", + "nodeType": "YulIdentifier", + "src": "742:9:23" + }, + { + "kind": "number", + "nativeSrc": "753:2:23", + "nodeType": "YulLiteral", + "src": "753:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "738:3:23", + "nodeType": "YulIdentifier", + "src": "738:3:23" + }, + "nativeSrc": "738:18:23", + "nodeType": "YulFunctionCall", + "src": "738:18:23" + }, + { + "kind": "number", + "nativeSrc": "758:2:23", + "nodeType": "YulLiteral", + "src": "758:2:23", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "731:6:23", + "nodeType": "YulIdentifier", + "src": "731:6:23" + }, + "nativeSrc": "731:30:23", + "nodeType": "YulFunctionCall", + "src": "731:30:23" + }, + "nativeSrc": "731:30:23", + "nodeType": "YulExpressionStatement", + "src": "731:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "781:9:23", + "nodeType": "YulIdentifier", + "src": "781:9:23" + }, + { + "kind": "number", + "nativeSrc": "792:2:23", + "nodeType": "YulLiteral", + "src": "792:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "777:3:23", + "nodeType": "YulIdentifier", + "src": "777:3:23" + }, + "nativeSrc": "777:18:23", + "nodeType": "YulFunctionCall", + "src": "777:18:23" + }, + { + "hexValue": "496e76616c69642064657374696e6174696f6e", + "kind": "string", + "nativeSrc": "797:21:23", + "nodeType": "YulLiteral", + "src": "797:21:23", + "type": "", + "value": "Invalid destination" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "770:6:23", + "nodeType": "YulIdentifier", + "src": "770:6:23" + }, + "nativeSrc": "770:49:23", + "nodeType": "YulFunctionCall", + "src": "770:49:23" + }, + "nativeSrc": "770:49:23", + "nodeType": "YulExpressionStatement", + "src": "770:49:23" + }, + { + "nativeSrc": "828:26:23", + "nodeType": "YulAssignment", + "src": "828:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "840:9:23", + "nodeType": "YulIdentifier", + "src": "840:9:23" + }, + { + "kind": "number", + "nativeSrc": "851:2:23", + "nodeType": "YulLiteral", + "src": "851:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "836:3:23", + "nodeType": "YulIdentifier", + "src": "836:3:23" + }, + "nativeSrc": "836:18:23", + "nodeType": "YulFunctionCall", + "src": "836:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "828:4:23", + "nodeType": "YulIdentifier", + "src": "828:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "517:343:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "668:9:23", + "nodeType": "YulTypedName", + "src": "668:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "682:4:23", + "nodeType": "YulTypedName", + "src": "682:4:23", + "type": "" + } + ], + "src": "517:343:23" + }, + { + "body": { + "nativeSrc": "897:95:23", + "nodeType": "YulBlock", + "src": "897:95:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "914:1:23", + "nodeType": "YulLiteral", + "src": "914:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "921:3:23", + "nodeType": "YulLiteral", + "src": "921:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "926:10:23", + "nodeType": "YulLiteral", + "src": "926:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "917:3:23", + "nodeType": "YulIdentifier", + "src": "917:3:23" + }, + "nativeSrc": "917:20:23", + "nodeType": "YulFunctionCall", + "src": "917:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "907:6:23", + "nodeType": "YulIdentifier", + "src": "907:6:23" + }, + "nativeSrc": "907:31:23", + "nodeType": "YulFunctionCall", + "src": "907:31:23" + }, + "nativeSrc": "907:31:23", + "nodeType": "YulExpressionStatement", + "src": "907:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "954:1:23", + "nodeType": "YulLiteral", + "src": "954:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "957:4:23", + "nodeType": "YulLiteral", + "src": "957:4:23", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "947:6:23", + "nodeType": "YulIdentifier", + "src": "947:6:23" + }, + "nativeSrc": "947:15:23", + "nodeType": "YulFunctionCall", + "src": "947:15:23" + }, + "nativeSrc": "947:15:23", + "nodeType": "YulExpressionStatement", + "src": "947:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "978:1:23", + "nodeType": "YulLiteral", + "src": "978:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "981:4:23", + "nodeType": "YulLiteral", + "src": "981:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "971:6:23", + "nodeType": "YulIdentifier", + "src": "971:6:23" + }, + "nativeSrc": "971:15:23", + "nodeType": "YulFunctionCall", + "src": "971:15:23" + }, + "nativeSrc": "971:15:23", + "nodeType": "YulExpressionStatement", + "src": "971:15:23" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "865:127:23", + "nodeType": "YulFunctionDefinition", + "src": "865:127:23" + }, + { + "body": { + "nativeSrc": "1052:325:23", + "nodeType": "YulBlock", + "src": "1052:325:23", + "statements": [ + { + "nativeSrc": "1062:22:23", + "nodeType": "YulAssignment", + "src": "1062:22:23", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1076:1:23", + "nodeType": "YulLiteral", + "src": "1076:1:23", + "type": "", + "value": "1" + }, + { + "name": "data", + "nativeSrc": "1079:4:23", + "nodeType": "YulIdentifier", + "src": "1079:4:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "1072:3:23", + "nodeType": "YulIdentifier", + "src": "1072:3:23" + }, + "nativeSrc": "1072:12:23", + "nodeType": "YulFunctionCall", + "src": "1072:12:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "1062:6:23", + "nodeType": "YulIdentifier", + "src": "1062:6:23" + } + ] + }, + { + "nativeSrc": "1093:38:23", + "nodeType": "YulVariableDeclaration", + "src": "1093:38:23", + "value": { + "arguments": [ + { + "name": "data", + "nativeSrc": "1123:4:23", + "nodeType": "YulIdentifier", + "src": "1123:4:23" + }, + { + "kind": "number", + "nativeSrc": "1129:1:23", + "nodeType": "YulLiteral", + "src": "1129:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1119:3:23", + "nodeType": "YulIdentifier", + "src": "1119:3:23" + }, + "nativeSrc": "1119:12:23", + "nodeType": "YulFunctionCall", + "src": "1119:12:23" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "1097:18:23", + "nodeType": "YulTypedName", + "src": "1097:18:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1170:31:23", + "nodeType": "YulBlock", + "src": "1170:31:23", + "statements": [ + { + "nativeSrc": "1172:27:23", + "nodeType": "YulAssignment", + "src": "1172:27:23", + "value": { + "arguments": [ + { + "name": "length", + "nativeSrc": "1186:6:23", + "nodeType": "YulIdentifier", + "src": "1186:6:23" + }, + { + "kind": "number", + "nativeSrc": "1194:4:23", + "nodeType": "YulLiteral", + "src": "1194:4:23", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1182:3:23", + "nodeType": "YulIdentifier", + "src": "1182:3:23" + }, + "nativeSrc": "1182:17:23", + "nodeType": "YulFunctionCall", + "src": "1182:17:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "1172:6:23", + "nodeType": "YulIdentifier", + "src": "1172:6:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "1150:18:23", + "nodeType": "YulIdentifier", + "src": "1150:18:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "1143:6:23", + "nodeType": "YulIdentifier", + "src": "1143:6:23" + }, + "nativeSrc": "1143:26:23", + "nodeType": "YulFunctionCall", + "src": "1143:26:23" + }, + "nativeSrc": "1140:61:23", + "nodeType": "YulIf", + "src": "1140:61:23" + }, + { + "body": { + "nativeSrc": "1260:111:23", + "nodeType": "YulBlock", + "src": "1260:111:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1281:1:23", + "nodeType": "YulLiteral", + "src": "1281:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1288:3:23", + "nodeType": "YulLiteral", + "src": "1288:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "1293:10:23", + "nodeType": "YulLiteral", + "src": "1293:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1284:3:23", + "nodeType": "YulIdentifier", + "src": "1284:3:23" + }, + "nativeSrc": "1284:20:23", + "nodeType": "YulFunctionCall", + "src": "1284:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1274:6:23", + "nodeType": "YulIdentifier", + "src": "1274:6:23" + }, + "nativeSrc": "1274:31:23", + "nodeType": "YulFunctionCall", + "src": "1274:31:23" + }, + "nativeSrc": "1274:31:23", + "nodeType": "YulExpressionStatement", + "src": "1274:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1325:1:23", + "nodeType": "YulLiteral", + "src": "1325:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "1328:4:23", + "nodeType": "YulLiteral", + "src": "1328:4:23", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1318:6:23", + "nodeType": "YulIdentifier", + "src": "1318:6:23" + }, + "nativeSrc": "1318:15:23", + "nodeType": "YulFunctionCall", + "src": "1318:15:23" + }, + "nativeSrc": "1318:15:23", + "nodeType": "YulExpressionStatement", + "src": "1318:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1353:1:23", + "nodeType": "YulLiteral", + "src": "1353:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1356:4:23", + "nodeType": "YulLiteral", + "src": "1356:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "1346:6:23", + "nodeType": "YulIdentifier", + "src": "1346:6:23" + }, + "nativeSrc": "1346:15:23", + "nodeType": "YulFunctionCall", + "src": "1346:15:23" + }, + "nativeSrc": "1346:15:23", + "nodeType": "YulExpressionStatement", + "src": "1346:15:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "1216:18:23", + "nodeType": "YulIdentifier", + "src": "1216:18:23" + }, + { + "arguments": [ + { + "name": "length", + "nativeSrc": "1239:6:23", + "nodeType": "YulIdentifier", + "src": "1239:6:23" + }, + { + "kind": "number", + "nativeSrc": "1247:2:23", + "nodeType": "YulLiteral", + "src": "1247:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1236:2:23", + "nodeType": "YulIdentifier", + "src": "1236:2:23" + }, + "nativeSrc": "1236:14:23", + "nodeType": "YulFunctionCall", + "src": "1236:14:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "1213:2:23", + "nodeType": "YulIdentifier", + "src": "1213:2:23" + }, + "nativeSrc": "1213:38:23", + "nodeType": "YulFunctionCall", + "src": "1213:38:23" + }, + "nativeSrc": "1210:161:23", + "nodeType": "YulIf", + "src": "1210:161:23" + } + ] + }, + "name": "extract_byte_array_length", + "nativeSrc": "997:380:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nativeSrc": "1032:4:23", + "nodeType": "YulTypedName", + "src": "1032:4:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nativeSrc": "1041:6:23", + "nodeType": "YulTypedName", + "src": "1041:6:23", + "type": "" + } + ], + "src": "997:380:23" + }, + { + "body": { + "nativeSrc": "1438:65:23", + "nodeType": "YulBlock", + "src": "1438:65:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1455:1:23", + "nodeType": "YulLiteral", + "src": "1455:1:23", + "type": "", + "value": "0" + }, + { + "name": "ptr", + "nativeSrc": "1458:3:23", + "nodeType": "YulIdentifier", + "src": "1458:3:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1448:6:23", + "nodeType": "YulIdentifier", + "src": "1448:6:23" + }, + "nativeSrc": "1448:14:23", + "nodeType": "YulFunctionCall", + "src": "1448:14:23" + }, + "nativeSrc": "1448:14:23", + "nodeType": "YulExpressionStatement", + "src": "1448:14:23" + }, + { + "nativeSrc": "1471:26:23", + "nodeType": "YulAssignment", + "src": "1471:26:23", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1489:1:23", + "nodeType": "YulLiteral", + "src": "1489:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1492:4:23", + "nodeType": "YulLiteral", + "src": "1492:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "1479:9:23", + "nodeType": "YulIdentifier", + "src": "1479:9:23" + }, + "nativeSrc": "1479:18:23", + "nodeType": "YulFunctionCall", + "src": "1479:18:23" + }, + "variableNames": [ + { + "name": "data", + "nativeSrc": "1471:4:23", + "nodeType": "YulIdentifier", + "src": "1471:4:23" + } + ] + } + ] + }, + "name": "array_dataslot_string_storage", + "nativeSrc": "1382:121:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "ptr", + "nativeSrc": "1421:3:23", + "nodeType": "YulTypedName", + "src": "1421:3:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "data", + "nativeSrc": "1429:4:23", + "nodeType": "YulTypedName", + "src": "1429:4:23", + "type": "" + } + ], + "src": "1382:121:23" + }, + { + "body": { + "nativeSrc": "1589:437:23", + "nodeType": "YulBlock", + "src": "1589:437:23", + "statements": [ + { + "body": { + "nativeSrc": "1622:398:23", + "nodeType": "YulBlock", + "src": "1622:398:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1643:1:23", + "nodeType": "YulLiteral", + "src": "1643:1:23", + "type": "", + "value": "0" + }, + { + "name": "array", + "nativeSrc": "1646:5:23", + "nodeType": "YulIdentifier", + "src": "1646:5:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1636:6:23", + "nodeType": "YulIdentifier", + "src": "1636:6:23" + }, + "nativeSrc": "1636:16:23", + "nodeType": "YulFunctionCall", + "src": "1636:16:23" + }, + "nativeSrc": "1636:16:23", + "nodeType": "YulExpressionStatement", + "src": "1636:16:23" + }, + { + "nativeSrc": "1665:30:23", + "nodeType": "YulVariableDeclaration", + "src": "1665:30:23", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1687:1:23", + "nodeType": "YulLiteral", + "src": "1687:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "1690:4:23", + "nodeType": "YulLiteral", + "src": "1690:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "keccak256", + "nativeSrc": "1677:9:23", + "nodeType": "YulIdentifier", + "src": "1677:9:23" + }, + "nativeSrc": "1677:18:23", + "nodeType": "YulFunctionCall", + "src": "1677:18:23" + }, + "variables": [ + { + "name": "data", + "nativeSrc": "1669:4:23", + "nodeType": "YulTypedName", + "src": "1669:4:23", + "type": "" + } + ] + }, + { + "nativeSrc": "1708:57:23", + "nodeType": "YulVariableDeclaration", + "src": "1708:57:23", + "value": { + "arguments": [ + { + "name": "data", + "nativeSrc": "1731:4:23", + "nodeType": "YulIdentifier", + "src": "1731:4:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1741:1:23", + "nodeType": "YulLiteral", + "src": "1741:1:23", + "type": "", + "value": "5" + }, + { + "arguments": [ + { + "name": "startIndex", + "nativeSrc": "1748:10:23", + "nodeType": "YulIdentifier", + "src": "1748:10:23" + }, + { + "kind": "number", + "nativeSrc": "1760:2:23", + "nodeType": "YulLiteral", + "src": "1760:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1744:3:23", + "nodeType": "YulIdentifier", + "src": "1744:3:23" + }, + "nativeSrc": "1744:19:23", + "nodeType": "YulFunctionCall", + "src": "1744:19:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "1737:3:23", + "nodeType": "YulIdentifier", + "src": "1737:3:23" + }, + "nativeSrc": "1737:27:23", + "nodeType": "YulFunctionCall", + "src": "1737:27:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1727:3:23", + "nodeType": "YulIdentifier", + "src": "1727:3:23" + }, + "nativeSrc": "1727:38:23", + "nodeType": "YulFunctionCall", + "src": "1727:38:23" + }, + "variables": [ + { + "name": "deleteStart", + "nativeSrc": "1712:11:23", + "nodeType": "YulTypedName", + "src": "1712:11:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1802:23:23", + "nodeType": "YulBlock", + "src": "1802:23:23", + "statements": [ + { + "nativeSrc": "1804:19:23", + "nodeType": "YulAssignment", + "src": "1804:19:23", + "value": { + "name": "data", + "nativeSrc": "1819:4:23", + "nodeType": "YulIdentifier", + "src": "1819:4:23" + }, + "variableNames": [ + { + "name": "deleteStart", + "nativeSrc": "1804:11:23", + "nodeType": "YulIdentifier", + "src": "1804:11:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "startIndex", + "nativeSrc": "1784:10:23", + "nodeType": "YulIdentifier", + "src": "1784:10:23" + }, + { + "kind": "number", + "nativeSrc": "1796:4:23", + "nodeType": "YulLiteral", + "src": "1796:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1781:2:23", + "nodeType": "YulIdentifier", + "src": "1781:2:23" + }, + "nativeSrc": "1781:20:23", + "nodeType": "YulFunctionCall", + "src": "1781:20:23" + }, + "nativeSrc": "1778:47:23", + "nodeType": "YulIf", + "src": "1778:47:23" + }, + { + "nativeSrc": "1838:41:23", + "nodeType": "YulVariableDeclaration", + "src": "1838:41:23", + "value": { + "arguments": [ + { + "name": "data", + "nativeSrc": "1852:4:23", + "nodeType": "YulIdentifier", + "src": "1852:4:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1862:1:23", + "nodeType": "YulLiteral", + "src": "1862:1:23", + "type": "", + "value": "5" + }, + { + "arguments": [ + { + "name": "len", + "nativeSrc": "1869:3:23", + "nodeType": "YulIdentifier", + "src": "1869:3:23" + }, + { + "kind": "number", + "nativeSrc": "1874:2:23", + "nodeType": "YulLiteral", + "src": "1874:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1865:3:23", + "nodeType": "YulIdentifier", + "src": "1865:3:23" + }, + "nativeSrc": "1865:12:23", + "nodeType": "YulFunctionCall", + "src": "1865:12:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "1858:3:23", + "nodeType": "YulIdentifier", + "src": "1858:3:23" + }, + "nativeSrc": "1858:20:23", + "nodeType": "YulFunctionCall", + "src": "1858:20:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1848:3:23", + "nodeType": "YulIdentifier", + "src": "1848:3:23" + }, + "nativeSrc": "1848:31:23", + "nodeType": "YulFunctionCall", + "src": "1848:31:23" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "1842:2:23", + "nodeType": "YulTypedName", + "src": "1842:2:23", + "type": "" + } + ] + }, + { + "nativeSrc": "1892:24:23", + "nodeType": "YulVariableDeclaration", + "src": "1892:24:23", + "value": { + "name": "deleteStart", + "nativeSrc": "1905:11:23", + "nodeType": "YulIdentifier", + "src": "1905:11:23" + }, + "variables": [ + { + "name": "start", + "nativeSrc": "1896:5:23", + "nodeType": "YulTypedName", + "src": "1896:5:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "1990:20:23", + "nodeType": "YulBlock", + "src": "1990:20:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "start", + "nativeSrc": "1999:5:23", + "nodeType": "YulIdentifier", + "src": "1999:5:23" + }, + { + "kind": "number", + "nativeSrc": "2006:1:23", + "nodeType": "YulLiteral", + "src": "2006:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "1992:6:23", + "nodeType": "YulIdentifier", + "src": "1992:6:23" + }, + "nativeSrc": "1992:16:23", + "nodeType": "YulFunctionCall", + "src": "1992:16:23" + }, + "nativeSrc": "1992:16:23", + "nodeType": "YulExpressionStatement", + "src": "1992:16:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "start", + "nativeSrc": "1940:5:23", + "nodeType": "YulIdentifier", + "src": "1940:5:23" + }, + { + "name": "_1", + "nativeSrc": "1947:2:23", + "nodeType": "YulIdentifier", + "src": "1947:2:23" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1937:2:23", + "nodeType": "YulIdentifier", + "src": "1937:2:23" + }, + "nativeSrc": "1937:13:23", + "nodeType": "YulFunctionCall", + "src": "1937:13:23" + }, + "nativeSrc": "1929:81:23", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "1951:26:23", + "nodeType": "YulBlock", + "src": "1951:26:23", + "statements": [ + { + "nativeSrc": "1953:22:23", + "nodeType": "YulAssignment", + "src": "1953:22:23", + "value": { + "arguments": [ + { + "name": "start", + "nativeSrc": "1966:5:23", + "nodeType": "YulIdentifier", + "src": "1966:5:23" + }, + { + "kind": "number", + "nativeSrc": "1973:1:23", + "nodeType": "YulLiteral", + "src": "1973:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1962:3:23", + "nodeType": "YulIdentifier", + "src": "1962:3:23" + }, + "nativeSrc": "1962:13:23", + "nodeType": "YulFunctionCall", + "src": "1962:13:23" + }, + "variableNames": [ + { + "name": "start", + "nativeSrc": "1953:5:23", + "nodeType": "YulIdentifier", + "src": "1953:5:23" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "1933:3:23", + "nodeType": "YulBlock", + "src": "1933:3:23", + "statements": [] + }, + "src": "1929:81:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "len", + "nativeSrc": "1605:3:23", + "nodeType": "YulIdentifier", + "src": "1605:3:23" + }, + { + "kind": "number", + "nativeSrc": "1610:2:23", + "nodeType": "YulLiteral", + "src": "1610:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "1602:2:23", + "nodeType": "YulIdentifier", + "src": "1602:2:23" + }, + "nativeSrc": "1602:11:23", + "nodeType": "YulFunctionCall", + "src": "1602:11:23" + }, + "nativeSrc": "1599:421:23", + "nodeType": "YulIf", + "src": "1599:421:23" + } + ] + }, + "name": "clean_up_bytearray_end_slots_string_storage", + "nativeSrc": "1508:518:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "array", + "nativeSrc": "1561:5:23", + "nodeType": "YulTypedName", + "src": "1561:5:23", + "type": "" + }, + { + "name": "len", + "nativeSrc": "1568:3:23", + "nodeType": "YulTypedName", + "src": "1568:3:23", + "type": "" + }, + { + "name": "startIndex", + "nativeSrc": "1573:10:23", + "nodeType": "YulTypedName", + "src": "1573:10:23", + "type": "" + } + ], + "src": "1508:518:23" + }, + { + "body": { + "nativeSrc": "2116:81:23", + "nodeType": "YulBlock", + "src": "2116:81:23", + "statements": [ + { + "nativeSrc": "2126:65:23", + "nodeType": "YulAssignment", + "src": "2126:65:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "data", + "nativeSrc": "2141:4:23", + "nodeType": "YulIdentifier", + "src": "2141:4:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2159:1:23", + "nodeType": "YulLiteral", + "src": "2159:1:23", + "type": "", + "value": "3" + }, + { + "name": "len", + "nativeSrc": "2162:3:23", + "nodeType": "YulIdentifier", + "src": "2162:3:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2155:3:23", + "nodeType": "YulIdentifier", + "src": "2155:3:23" + }, + "nativeSrc": "2155:11:23", + "nodeType": "YulFunctionCall", + "src": "2155:11:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2172:1:23", + "nodeType": "YulLiteral", + "src": "2172:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "2168:3:23", + "nodeType": "YulIdentifier", + "src": "2168:3:23" + }, + "nativeSrc": "2168:6:23", + "nodeType": "YulFunctionCall", + "src": "2168:6:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "2151:3:23", + "nodeType": "YulIdentifier", + "src": "2151:3:23" + }, + "nativeSrc": "2151:24:23", + "nodeType": "YulFunctionCall", + "src": "2151:24:23" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "2147:3:23", + "nodeType": "YulIdentifier", + "src": "2147:3:23" + }, + "nativeSrc": "2147:29:23", + "nodeType": "YulFunctionCall", + "src": "2147:29:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2137:3:23", + "nodeType": "YulIdentifier", + "src": "2137:3:23" + }, + "nativeSrc": "2137:40:23", + "nodeType": "YulFunctionCall", + "src": "2137:40:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2183:1:23", + "nodeType": "YulLiteral", + "src": "2183:1:23", + "type": "", + "value": "1" + }, + { + "name": "len", + "nativeSrc": "2186:3:23", + "nodeType": "YulIdentifier", + "src": "2186:3:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2179:3:23", + "nodeType": "YulIdentifier", + "src": "2179:3:23" + }, + "nativeSrc": "2179:11:23", + "nodeType": "YulFunctionCall", + "src": "2179:11:23" + } + ], + "functionName": { + "name": "or", + "nativeSrc": "2134:2:23", + "nodeType": "YulIdentifier", + "src": "2134:2:23" + }, + "nativeSrc": "2134:57:23", + "nodeType": "YulFunctionCall", + "src": "2134:57:23" + }, + "variableNames": [ + { + "name": "used", + "nativeSrc": "2126:4:23", + "nodeType": "YulIdentifier", + "src": "2126:4:23" + } + ] + } + ] + }, + "name": "extract_used_part_and_set_length_of_short_byte_array", + "nativeSrc": "2031:166:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nativeSrc": "2093:4:23", + "nodeType": "YulTypedName", + "src": "2093:4:23", + "type": "" + }, + { + "name": "len", + "nativeSrc": "2099:3:23", + "nodeType": "YulTypedName", + "src": "2099:3:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "used", + "nativeSrc": "2107:4:23", + "nodeType": "YulTypedName", + "src": "2107:4:23", + "type": "" + } + ], + "src": "2031:166:23" + }, + { + "body": { + "nativeSrc": "2298:1203:23", + "nodeType": "YulBlock", + "src": "2298:1203:23", + "statements": [ + { + "nativeSrc": "2308:24:23", + "nodeType": "YulVariableDeclaration", + "src": "2308:24:23", + "value": { + "arguments": [ + { + "name": "src", + "nativeSrc": "2328:3:23", + "nodeType": "YulIdentifier", + "src": "2328:3:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2322:5:23", + "nodeType": "YulIdentifier", + "src": "2322:5:23" + }, + "nativeSrc": "2322:10:23", + "nodeType": "YulFunctionCall", + "src": "2322:10:23" + }, + "variables": [ + { + "name": "newLen", + "nativeSrc": "2312:6:23", + "nodeType": "YulTypedName", + "src": "2312:6:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2375:22:23", + "nodeType": "YulBlock", + "src": "2375:22:23", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nativeSrc": "2377:16:23", + "nodeType": "YulIdentifier", + "src": "2377:16:23" + }, + "nativeSrc": "2377:18:23", + "nodeType": "YulFunctionCall", + "src": "2377:18:23" + }, + "nativeSrc": "2377:18:23", + "nodeType": "YulExpressionStatement", + "src": "2377:18:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "newLen", + "nativeSrc": "2347:6:23", + "nodeType": "YulIdentifier", + "src": "2347:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2363:2:23", + "nodeType": "YulLiteral", + "src": "2363:2:23", + "type": "", + "value": "64" + }, + { + "kind": "number", + "nativeSrc": "2367:1:23", + "nodeType": "YulLiteral", + "src": "2367:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2359:3:23", + "nodeType": "YulIdentifier", + "src": "2359:3:23" + }, + "nativeSrc": "2359:10:23", + "nodeType": "YulFunctionCall", + "src": "2359:10:23" + }, + { + "kind": "number", + "nativeSrc": "2371:1:23", + "nodeType": "YulLiteral", + "src": "2371:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2355:3:23", + "nodeType": "YulIdentifier", + "src": "2355:3:23" + }, + "nativeSrc": "2355:18:23", + "nodeType": "YulFunctionCall", + "src": "2355:18:23" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "2344:2:23", + "nodeType": "YulIdentifier", + "src": "2344:2:23" + }, + "nativeSrc": "2344:30:23", + "nodeType": "YulFunctionCall", + "src": "2344:30:23" + }, + "nativeSrc": "2341:56:23", + "nodeType": "YulIf", + "src": "2341:56:23" + }, + { + "expression": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "2450:4:23", + "nodeType": "YulIdentifier", + "src": "2450:4:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "slot", + "nativeSrc": "2488:4:23", + "nodeType": "YulIdentifier", + "src": "2488:4:23" + } + ], + "functionName": { + "name": "sload", + "nativeSrc": "2482:5:23", + "nodeType": "YulIdentifier", + "src": "2482:5:23" + }, + "nativeSrc": "2482:11:23", + "nodeType": "YulFunctionCall", + "src": "2482:11:23" + } + ], + "functionName": { + "name": "extract_byte_array_length", + "nativeSrc": "2456:25:23", + "nodeType": "YulIdentifier", + "src": "2456:25:23" + }, + "nativeSrc": "2456:38:23", + "nodeType": "YulFunctionCall", + "src": "2456:38:23" + }, + { + "name": "newLen", + "nativeSrc": "2496:6:23", + "nodeType": "YulIdentifier", + "src": "2496:6:23" + } + ], + "functionName": { + "name": "clean_up_bytearray_end_slots_string_storage", + "nativeSrc": "2406:43:23", + "nodeType": "YulIdentifier", + "src": "2406:43:23" + }, + "nativeSrc": "2406:97:23", + "nodeType": "YulFunctionCall", + "src": "2406:97:23" + }, + "nativeSrc": "2406:97:23", + "nodeType": "YulExpressionStatement", + "src": "2406:97:23" + }, + { + "nativeSrc": "2512:18:23", + "nodeType": "YulVariableDeclaration", + "src": "2512:18:23", + "value": { + "kind": "number", + "nativeSrc": "2529:1:23", + "nodeType": "YulLiteral", + "src": "2529:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "srcOffset", + "nativeSrc": "2516:9:23", + "nodeType": "YulTypedName", + "src": "2516:9:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2539:17:23", + "nodeType": "YulAssignment", + "src": "2539:17:23", + "value": { + "kind": "number", + "nativeSrc": "2552:4:23", + "nodeType": "YulLiteral", + "src": "2552:4:23", + "type": "", + "value": "0x20" + }, + "variableNames": [ + { + "name": "srcOffset", + "nativeSrc": "2539:9:23", + "nodeType": "YulIdentifier", + "src": "2539:9:23" + } + ] + }, + { + "cases": [ + { + "body": { + "nativeSrc": "2602:642:23", + "nodeType": "YulBlock", + "src": "2602:642:23", + "statements": [ + { + "nativeSrc": "2616:35:23", + "nodeType": "YulVariableDeclaration", + "src": "2616:35:23", + "value": { + "arguments": [ + { + "name": "newLen", + "nativeSrc": "2635:6:23", + "nodeType": "YulIdentifier", + "src": "2635:6:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2647:2:23", + "nodeType": "YulLiteral", + "src": "2647:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "2643:3:23", + "nodeType": "YulIdentifier", + "src": "2643:3:23" + }, + "nativeSrc": "2643:7:23", + "nodeType": "YulFunctionCall", + "src": "2643:7:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2631:3:23", + "nodeType": "YulIdentifier", + "src": "2631:3:23" + }, + "nativeSrc": "2631:20:23", + "nodeType": "YulFunctionCall", + "src": "2631:20:23" + }, + "variables": [ + { + "name": "loopEnd", + "nativeSrc": "2620:7:23", + "nodeType": "YulTypedName", + "src": "2620:7:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2664:49:23", + "nodeType": "YulVariableDeclaration", + "src": "2664:49:23", + "value": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "2708:4:23", + "nodeType": "YulIdentifier", + "src": "2708:4:23" + } + ], + "functionName": { + "name": "array_dataslot_string_storage", + "nativeSrc": "2678:29:23", + "nodeType": "YulIdentifier", + "src": "2678:29:23" + }, + "nativeSrc": "2678:35:23", + "nodeType": "YulFunctionCall", + "src": "2678:35:23" + }, + "variables": [ + { + "name": "dstPtr", + "nativeSrc": "2668:6:23", + "nodeType": "YulTypedName", + "src": "2668:6:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2726:10:23", + "nodeType": "YulVariableDeclaration", + "src": "2726:10:23", + "value": { + "kind": "number", + "nativeSrc": "2735:1:23", + "nodeType": "YulLiteral", + "src": "2735:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "2730:1:23", + "nodeType": "YulTypedName", + "src": "2730:1:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2806:165:23", + "nodeType": "YulBlock", + "src": "2806:165:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "dstPtr", + "nativeSrc": "2831:6:23", + "nodeType": "YulIdentifier", + "src": "2831:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "2849:3:23", + "nodeType": "YulIdentifier", + "src": "2849:3:23" + }, + { + "name": "srcOffset", + "nativeSrc": "2854:9:23", + "nodeType": "YulIdentifier", + "src": "2854:9:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2845:3:23", + "nodeType": "YulIdentifier", + "src": "2845:3:23" + }, + "nativeSrc": "2845:19:23", + "nodeType": "YulFunctionCall", + "src": "2845:19:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2839:5:23", + "nodeType": "YulIdentifier", + "src": "2839:5:23" + }, + "nativeSrc": "2839:26:23", + "nodeType": "YulFunctionCall", + "src": "2839:26:23" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "2824:6:23", + "nodeType": "YulIdentifier", + "src": "2824:6:23" + }, + "nativeSrc": "2824:42:23", + "nodeType": "YulFunctionCall", + "src": "2824:42:23" + }, + "nativeSrc": "2824:42:23", + "nodeType": "YulExpressionStatement", + "src": "2824:42:23" + }, + { + "nativeSrc": "2883:24:23", + "nodeType": "YulAssignment", + "src": "2883:24:23", + "value": { + "arguments": [ + { + "name": "dstPtr", + "nativeSrc": "2897:6:23", + "nodeType": "YulIdentifier", + "src": "2897:6:23" + }, + { + "kind": "number", + "nativeSrc": "2905:1:23", + "nodeType": "YulLiteral", + "src": "2905:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2893:3:23", + "nodeType": "YulIdentifier", + "src": "2893:3:23" + }, + "nativeSrc": "2893:14:23", + "nodeType": "YulFunctionCall", + "src": "2893:14:23" + }, + "variableNames": [ + { + "name": "dstPtr", + "nativeSrc": "2883:6:23", + "nodeType": "YulIdentifier", + "src": "2883:6:23" + } + ] + }, + { + "nativeSrc": "2924:33:23", + "nodeType": "YulAssignment", + "src": "2924:33:23", + "value": { + "arguments": [ + { + "name": "srcOffset", + "nativeSrc": "2941:9:23", + "nodeType": "YulIdentifier", + "src": "2941:9:23" + }, + { + "kind": "number", + "nativeSrc": "2952:4:23", + "nodeType": "YulLiteral", + "src": "2952:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2937:3:23", + "nodeType": "YulIdentifier", + "src": "2937:3:23" + }, + "nativeSrc": "2937:20:23", + "nodeType": "YulFunctionCall", + "src": "2937:20:23" + }, + "variableNames": [ + { + "name": "srcOffset", + "nativeSrc": "2924:9:23", + "nodeType": "YulIdentifier", + "src": "2924:9:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "2760:1:23", + "nodeType": "YulIdentifier", + "src": "2760:1:23" + }, + { + "name": "loopEnd", + "nativeSrc": "2763:7:23", + "nodeType": "YulIdentifier", + "src": "2763:7:23" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "2757:2:23", + "nodeType": "YulIdentifier", + "src": "2757:2:23" + }, + "nativeSrc": "2757:14:23", + "nodeType": "YulFunctionCall", + "src": "2757:14:23" + }, + "nativeSrc": "2749:222:23", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "2772:21:23", + "nodeType": "YulBlock", + "src": "2772:21:23", + "statements": [ + { + "nativeSrc": "2774:17:23", + "nodeType": "YulAssignment", + "src": "2774:17:23", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "2783:1:23", + "nodeType": "YulIdentifier", + "src": "2783:1:23" + }, + { + "kind": "number", + "nativeSrc": "2786:4:23", + "nodeType": "YulLiteral", + "src": "2786:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2779:3:23", + "nodeType": "YulIdentifier", + "src": "2779:3:23" + }, + "nativeSrc": "2779:12:23", + "nodeType": "YulFunctionCall", + "src": "2779:12:23" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "2774:1:23", + "nodeType": "YulIdentifier", + "src": "2774:1:23" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "2753:3:23", + "nodeType": "YulBlock", + "src": "2753:3:23", + "statements": [] + }, + "src": "2749:222:23" + }, + { + "body": { + "nativeSrc": "3019:166:23", + "nodeType": "YulBlock", + "src": "3019:166:23", + "statements": [ + { + "nativeSrc": "3037:43:23", + "nodeType": "YulVariableDeclaration", + "src": "3037:43:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "3064:3:23", + "nodeType": "YulIdentifier", + "src": "3064:3:23" + }, + { + "name": "srcOffset", + "nativeSrc": "3069:9:23", + "nodeType": "YulIdentifier", + "src": "3069:9:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3060:3:23", + "nodeType": "YulIdentifier", + "src": "3060:3:23" + }, + "nativeSrc": "3060:19:23", + "nodeType": "YulFunctionCall", + "src": "3060:19:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3054:5:23", + "nodeType": "YulIdentifier", + "src": "3054:5:23" + }, + "nativeSrc": "3054:26:23", + "nodeType": "YulFunctionCall", + "src": "3054:26:23" + }, + "variables": [ + { + "name": "lastValue", + "nativeSrc": "3041:9:23", + "nodeType": "YulTypedName", + "src": "3041:9:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "dstPtr", + "nativeSrc": "3104:6:23", + "nodeType": "YulIdentifier", + "src": "3104:6:23" + }, + { + "arguments": [ + { + "name": "lastValue", + "nativeSrc": "3116:9:23", + "nodeType": "YulIdentifier", + "src": "3116:9:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3143:1:23", + "nodeType": "YulLiteral", + "src": "3143:1:23", + "type": "", + "value": "3" + }, + { + "name": "newLen", + "nativeSrc": "3146:6:23", + "nodeType": "YulIdentifier", + "src": "3146:6:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3139:3:23", + "nodeType": "YulIdentifier", + "src": "3139:3:23" + }, + "nativeSrc": "3139:14:23", + "nodeType": "YulFunctionCall", + "src": "3139:14:23" + }, + { + "kind": "number", + "nativeSrc": "3155:3:23", + "nodeType": "YulLiteral", + "src": "3155:3:23", + "type": "", + "value": "248" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3135:3:23", + "nodeType": "YulIdentifier", + "src": "3135:3:23" + }, + "nativeSrc": "3135:24:23", + "nodeType": "YulFunctionCall", + "src": "3135:24:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3165:1:23", + "nodeType": "YulLiteral", + "src": "3165:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "3161:3:23", + "nodeType": "YulIdentifier", + "src": "3161:3:23" + }, + "nativeSrc": "3161:6:23", + "nodeType": "YulFunctionCall", + "src": "3161:6:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "3131:3:23", + "nodeType": "YulIdentifier", + "src": "3131:3:23" + }, + "nativeSrc": "3131:37:23", + "nodeType": "YulFunctionCall", + "src": "3131:37:23" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "3127:3:23", + "nodeType": "YulIdentifier", + "src": "3127:3:23" + }, + "nativeSrc": "3127:42:23", + "nodeType": "YulFunctionCall", + "src": "3127:42:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3112:3:23", + "nodeType": "YulIdentifier", + "src": "3112:3:23" + }, + "nativeSrc": "3112:58:23", + "nodeType": "YulFunctionCall", + "src": "3112:58:23" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "3097:6:23", + "nodeType": "YulIdentifier", + "src": "3097:6:23" + }, + "nativeSrc": "3097:74:23", + "nodeType": "YulFunctionCall", + "src": "3097:74:23" + }, + "nativeSrc": "3097:74:23", + "nodeType": "YulExpressionStatement", + "src": "3097:74:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "loopEnd", + "nativeSrc": "2990:7:23", + "nodeType": "YulIdentifier", + "src": "2990:7:23" + }, + { + "name": "newLen", + "nativeSrc": "2999:6:23", + "nodeType": "YulIdentifier", + "src": "2999:6:23" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "2987:2:23", + "nodeType": "YulIdentifier", + "src": "2987:2:23" + }, + "nativeSrc": "2987:19:23", + "nodeType": "YulFunctionCall", + "src": "2987:19:23" + }, + "nativeSrc": "2984:201:23", + "nodeType": "YulIf", + "src": "2984:201:23" + }, + { + "expression": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "3205:4:23", + "nodeType": "YulIdentifier", + "src": "3205:4:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3219:1:23", + "nodeType": "YulLiteral", + "src": "3219:1:23", + "type": "", + "value": "1" + }, + { + "name": "newLen", + "nativeSrc": "3222:6:23", + "nodeType": "YulIdentifier", + "src": "3222:6:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3215:3:23", + "nodeType": "YulIdentifier", + "src": "3215:3:23" + }, + "nativeSrc": "3215:14:23", + "nodeType": "YulFunctionCall", + "src": "3215:14:23" + }, + { + "kind": "number", + "nativeSrc": "3231:1:23", + "nodeType": "YulLiteral", + "src": "3231:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3211:3:23", + "nodeType": "YulIdentifier", + "src": "3211:3:23" + }, + "nativeSrc": "3211:22:23", + "nodeType": "YulFunctionCall", + "src": "3211:22:23" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "3198:6:23", + "nodeType": "YulIdentifier", + "src": "3198:6:23" + }, + "nativeSrc": "3198:36:23", + "nodeType": "YulFunctionCall", + "src": "3198:36:23" + }, + "nativeSrc": "3198:36:23", + "nodeType": "YulExpressionStatement", + "src": "3198:36:23" + } + ] + }, + "nativeSrc": "2595:649:23", + "nodeType": "YulCase", + "src": "2595:649:23", + "value": { + "kind": "number", + "nativeSrc": "2600:1:23", + "nodeType": "YulLiteral", + "src": "2600:1:23", + "type": "", + "value": "1" + } + }, + { + "body": { + "nativeSrc": "3261:234:23", + "nodeType": "YulBlock", + "src": "3261:234:23", + "statements": [ + { + "nativeSrc": "3275:14:23", + "nodeType": "YulVariableDeclaration", + "src": "3275:14:23", + "value": { + "kind": "number", + "nativeSrc": "3288:1:23", + "nodeType": "YulLiteral", + "src": "3288:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "3279:5:23", + "nodeType": "YulTypedName", + "src": "3279:5:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "3324:67:23", + "nodeType": "YulBlock", + "src": "3324:67:23", + "statements": [ + { + "nativeSrc": "3342:35:23", + "nodeType": "YulAssignment", + "src": "3342:35:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nativeSrc": "3361:3:23", + "nodeType": "YulIdentifier", + "src": "3361:3:23" + }, + { + "name": "srcOffset", + "nativeSrc": "3366:9:23", + "nodeType": "YulIdentifier", + "src": "3366:9:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3357:3:23", + "nodeType": "YulIdentifier", + "src": "3357:3:23" + }, + "nativeSrc": "3357:19:23", + "nodeType": "YulFunctionCall", + "src": "3357:19:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "3351:5:23", + "nodeType": "YulIdentifier", + "src": "3351:5:23" + }, + "nativeSrc": "3351:26:23", + "nodeType": "YulFunctionCall", + "src": "3351:26:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "3342:5:23", + "nodeType": "YulIdentifier", + "src": "3342:5:23" + } + ] + } + ] + }, + "condition": { + "name": "newLen", + "nativeSrc": "3305:6:23", + "nodeType": "YulIdentifier", + "src": "3305:6:23" + }, + "nativeSrc": "3302:89:23", + "nodeType": "YulIf", + "src": "3302:89:23" + }, + { + "expression": { + "arguments": [ + { + "name": "slot", + "nativeSrc": "3411:4:23", + "nodeType": "YulIdentifier", + "src": "3411:4:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "3470:5:23", + "nodeType": "YulIdentifier", + "src": "3470:5:23" + }, + { + "name": "newLen", + "nativeSrc": "3477:6:23", + "nodeType": "YulIdentifier", + "src": "3477:6:23" + } + ], + "functionName": { + "name": "extract_used_part_and_set_length_of_short_byte_array", + "nativeSrc": "3417:52:23", + "nodeType": "YulIdentifier", + "src": "3417:52:23" + }, + "nativeSrc": "3417:67:23", + "nodeType": "YulFunctionCall", + "src": "3417:67:23" + } + ], + "functionName": { + "name": "sstore", + "nativeSrc": "3404:6:23", + "nodeType": "YulIdentifier", + "src": "3404:6:23" + }, + "nativeSrc": "3404:81:23", + "nodeType": "YulFunctionCall", + "src": "3404:81:23" + }, + "nativeSrc": "3404:81:23", + "nodeType": "YulExpressionStatement", + "src": "3404:81:23" + } + ] + }, + "nativeSrc": "3253:242:23", + "nodeType": "YulCase", + "src": "3253:242:23", + "value": "default" + } + ], + "expression": { + "arguments": [ + { + "name": "newLen", + "nativeSrc": "2575:6:23", + "nodeType": "YulIdentifier", + "src": "2575:6:23" + }, + { + "kind": "number", + "nativeSrc": "2583:2:23", + "nodeType": "YulLiteral", + "src": "2583:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "2572:2:23", + "nodeType": "YulIdentifier", + "src": "2572:2:23" + }, + "nativeSrc": "2572:14:23", + "nodeType": "YulFunctionCall", + "src": "2572:14:23" + }, + "nativeSrc": "2565:930:23", + "nodeType": "YulSwitch", + "src": "2565:930:23" + } + ] + }, + "name": "copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage", + "nativeSrc": "2202:1299:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "slot", + "nativeSrc": "2283:4:23", + "nodeType": "YulTypedName", + "src": "2283:4:23", + "type": "" + }, + { + "name": "src", + "nativeSrc": "2289:3:23", + "nodeType": "YulTypedName", + "src": "2289:3:23", + "type": "" + } + ], + "src": "2202:1299:23" + }, + { + "body": { + "nativeSrc": "3719:276:23", + "nodeType": "YulBlock", + "src": "3719:276:23", + "statements": [ + { + "nativeSrc": "3729:27:23", + "nodeType": "YulAssignment", + "src": "3729:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3741:9:23", + "nodeType": "YulIdentifier", + "src": "3741:9:23" + }, + { + "kind": "number", + "nativeSrc": "3752:3:23", + "nodeType": "YulLiteral", + "src": "3752:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3737:3:23", + "nodeType": "YulIdentifier", + "src": "3737:3:23" + }, + "nativeSrc": "3737:19:23", + "nodeType": "YulFunctionCall", + "src": "3737:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3729:4:23", + "nodeType": "YulIdentifier", + "src": "3729:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3772:9:23", + "nodeType": "YulIdentifier", + "src": "3772:9:23" + }, + { + "name": "value0", + "nativeSrc": "3783:6:23", + "nodeType": "YulIdentifier", + "src": "3783:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3765:6:23", + "nodeType": "YulIdentifier", + "src": "3765:6:23" + }, + "nativeSrc": "3765:25:23", + "nodeType": "YulFunctionCall", + "src": "3765:25:23" + }, + "nativeSrc": "3765:25:23", + "nodeType": "YulExpressionStatement", + "src": "3765:25:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3810:9:23", + "nodeType": "YulIdentifier", + "src": "3810:9:23" + }, + { + "kind": "number", + "nativeSrc": "3821:2:23", + "nodeType": "YulLiteral", + "src": "3821:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3806:3:23", + "nodeType": "YulIdentifier", + "src": "3806:3:23" + }, + "nativeSrc": "3806:18:23", + "nodeType": "YulFunctionCall", + "src": "3806:18:23" + }, + { + "name": "value1", + "nativeSrc": "3826:6:23", + "nodeType": "YulIdentifier", + "src": "3826:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3799:6:23", + "nodeType": "YulIdentifier", + "src": "3799:6:23" + }, + "nativeSrc": "3799:34:23", + "nodeType": "YulFunctionCall", + "src": "3799:34:23" + }, + "nativeSrc": "3799:34:23", + "nodeType": "YulExpressionStatement", + "src": "3799:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3853:9:23", + "nodeType": "YulIdentifier", + "src": "3853:9:23" + }, + { + "kind": "number", + "nativeSrc": "3864:2:23", + "nodeType": "YulLiteral", + "src": "3864:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3849:3:23", + "nodeType": "YulIdentifier", + "src": "3849:3:23" + }, + "nativeSrc": "3849:18:23", + "nodeType": "YulFunctionCall", + "src": "3849:18:23" + }, + { + "name": "value2", + "nativeSrc": "3869:6:23", + "nodeType": "YulIdentifier", + "src": "3869:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3842:6:23", + "nodeType": "YulIdentifier", + "src": "3842:6:23" + }, + "nativeSrc": "3842:34:23", + "nodeType": "YulFunctionCall", + "src": "3842:34:23" + }, + "nativeSrc": "3842:34:23", + "nodeType": "YulExpressionStatement", + "src": "3842:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3896:9:23", + "nodeType": "YulIdentifier", + "src": "3896:9:23" + }, + { + "kind": "number", + "nativeSrc": "3907:2:23", + "nodeType": "YulLiteral", + "src": "3907:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3892:3:23", + "nodeType": "YulIdentifier", + "src": "3892:3:23" + }, + "nativeSrc": "3892:18:23", + "nodeType": "YulFunctionCall", + "src": "3892:18:23" + }, + { + "name": "value3", + "nativeSrc": "3912:6:23", + "nodeType": "YulIdentifier", + "src": "3912:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3885:6:23", + "nodeType": "YulIdentifier", + "src": "3885:6:23" + }, + "nativeSrc": "3885:34:23", + "nodeType": "YulFunctionCall", + "src": "3885:34:23" + }, + "nativeSrc": "3885:34:23", + "nodeType": "YulExpressionStatement", + "src": "3885:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3939:9:23", + "nodeType": "YulIdentifier", + "src": "3939:9:23" + }, + { + "kind": "number", + "nativeSrc": "3950:3:23", + "nodeType": "YulLiteral", + "src": "3950:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3935:3:23", + "nodeType": "YulIdentifier", + "src": "3935:3:23" + }, + "nativeSrc": "3935:19:23", + "nodeType": "YulFunctionCall", + "src": "3935:19:23" + }, + { + "arguments": [ + { + "name": "value4", + "nativeSrc": "3960:6:23", + "nodeType": "YulIdentifier", + "src": "3960:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3976:3:23", + "nodeType": "YulLiteral", + "src": "3976:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "3981:1:23", + "nodeType": "YulLiteral", + "src": "3981:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "3972:3:23", + "nodeType": "YulIdentifier", + "src": "3972:3:23" + }, + "nativeSrc": "3972:11:23", + "nodeType": "YulFunctionCall", + "src": "3972:11:23" + }, + { + "kind": "number", + "nativeSrc": "3985:1:23", + "nodeType": "YulLiteral", + "src": "3985:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3968:3:23", + "nodeType": "YulIdentifier", + "src": "3968:3:23" + }, + "nativeSrc": "3968:19:23", + "nodeType": "YulFunctionCall", + "src": "3968:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "3956:3:23", + "nodeType": "YulIdentifier", + "src": "3956:3:23" + }, + "nativeSrc": "3956:32:23", + "nodeType": "YulFunctionCall", + "src": "3956:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3928:6:23", + "nodeType": "YulIdentifier", + "src": "3928:6:23" + }, + "nativeSrc": "3928:61:23", + "nodeType": "YulFunctionCall", + "src": "3928:61:23" + }, + "nativeSrc": "3928:61:23", + "nodeType": "YulExpressionStatement", + "src": "3928:61:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed", + "nativeSrc": "3506:489:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3656:9:23", + "nodeType": "YulTypedName", + "src": "3656:9:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "3667:6:23", + "nodeType": "YulTypedName", + "src": "3667:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "3675:6:23", + "nodeType": "YulTypedName", + "src": "3675:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "3683:6:23", + "nodeType": "YulTypedName", + "src": "3683:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "3691:6:23", + "nodeType": "YulTypedName", + "src": "3691:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "3699:6:23", + "nodeType": "YulTypedName", + "src": "3699:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3710:4:23", + "nodeType": "YulTypedName", + "src": "3710:4:23", + "type": "" + } + ], + "src": "3506:489:23" + }, + { + "body": { + "nativeSrc": "4121:297:23", + "nodeType": "YulBlock", + "src": "4121:297:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4138:9:23", + "nodeType": "YulIdentifier", + "src": "4138:9:23" + }, + { + "kind": "number", + "nativeSrc": "4149:2:23", + "nodeType": "YulLiteral", + "src": "4149:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4131:6:23", + "nodeType": "YulIdentifier", + "src": "4131:6:23" + }, + "nativeSrc": "4131:21:23", + "nodeType": "YulFunctionCall", + "src": "4131:21:23" + }, + "nativeSrc": "4131:21:23", + "nodeType": "YulExpressionStatement", + "src": "4131:21:23" + }, + { + "nativeSrc": "4161:27:23", + "nodeType": "YulVariableDeclaration", + "src": "4161:27:23", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4181:6:23", + "nodeType": "YulIdentifier", + "src": "4181:6:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4175:5:23", + "nodeType": "YulIdentifier", + "src": "4175:5:23" + }, + "nativeSrc": "4175:13:23", + "nodeType": "YulFunctionCall", + "src": "4175:13:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "4165:6:23", + "nodeType": "YulTypedName", + "src": "4165:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4208:9:23", + "nodeType": "YulIdentifier", + "src": "4208:9:23" + }, + { + "kind": "number", + "nativeSrc": "4219:2:23", + "nodeType": "YulLiteral", + "src": "4219:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4204:3:23", + "nodeType": "YulIdentifier", + "src": "4204:3:23" + }, + "nativeSrc": "4204:18:23", + "nodeType": "YulFunctionCall", + "src": "4204:18:23" + }, + { + "name": "length", + "nativeSrc": "4224:6:23", + "nodeType": "YulIdentifier", + "src": "4224:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4197:6:23", + "nodeType": "YulIdentifier", + "src": "4197:6:23" + }, + "nativeSrc": "4197:34:23", + "nodeType": "YulFunctionCall", + "src": "4197:34:23" + }, + "nativeSrc": "4197:34:23", + "nodeType": "YulExpressionStatement", + "src": "4197:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4250:9:23", + "nodeType": "YulIdentifier", + "src": "4250:9:23" + }, + { + "kind": "number", + "nativeSrc": "4261:2:23", + "nodeType": "YulLiteral", + "src": "4261:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4246:3:23", + "nodeType": "YulIdentifier", + "src": "4246:3:23" + }, + "nativeSrc": "4246:18:23", + "nodeType": "YulFunctionCall", + "src": "4246:18:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "4270:6:23", + "nodeType": "YulIdentifier", + "src": "4270:6:23" + }, + { + "kind": "number", + "nativeSrc": "4278:2:23", + "nodeType": "YulLiteral", + "src": "4278:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4266:3:23", + "nodeType": "YulIdentifier", + "src": "4266:3:23" + }, + "nativeSrc": "4266:15:23", + "nodeType": "YulFunctionCall", + "src": "4266:15:23" + }, + { + "name": "length", + "nativeSrc": "4283:6:23", + "nodeType": "YulIdentifier", + "src": "4283:6:23" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "4240:5:23", + "nodeType": "YulIdentifier", + "src": "4240:5:23" + }, + "nativeSrc": "4240:50:23", + "nodeType": "YulFunctionCall", + "src": "4240:50:23" + }, + "nativeSrc": "4240:50:23", + "nodeType": "YulExpressionStatement", + "src": "4240:50:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4314:9:23", + "nodeType": "YulIdentifier", + "src": "4314:9:23" + }, + { + "name": "length", + "nativeSrc": "4325:6:23", + "nodeType": "YulIdentifier", + "src": "4325:6:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4310:3:23", + "nodeType": "YulIdentifier", + "src": "4310:3:23" + }, + "nativeSrc": "4310:22:23", + "nodeType": "YulFunctionCall", + "src": "4310:22:23" + }, + { + "kind": "number", + "nativeSrc": "4334:2:23", + "nodeType": "YulLiteral", + "src": "4334:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4306:3:23", + "nodeType": "YulIdentifier", + "src": "4306:3:23" + }, + "nativeSrc": "4306:31:23", + "nodeType": "YulFunctionCall", + "src": "4306:31:23" + }, + { + "kind": "number", + "nativeSrc": "4339:1:23", + "nodeType": "YulLiteral", + "src": "4339:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4299:6:23", + "nodeType": "YulIdentifier", + "src": "4299:6:23" + }, + "nativeSrc": "4299:42:23", + "nodeType": "YulFunctionCall", + "src": "4299:42:23" + }, + "nativeSrc": "4299:42:23", + "nodeType": "YulExpressionStatement", + "src": "4299:42:23" + }, + { + "nativeSrc": "4350:62:23", + "nodeType": "YulAssignment", + "src": "4350:62:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4366:9:23", + "nodeType": "YulIdentifier", + "src": "4366:9:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "4385:6:23", + "nodeType": "YulIdentifier", + "src": "4385:6:23" + }, + { + "kind": "number", + "nativeSrc": "4393:2:23", + "nodeType": "YulLiteral", + "src": "4393:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4381:3:23", + "nodeType": "YulIdentifier", + "src": "4381:3:23" + }, + "nativeSrc": "4381:15:23", + "nodeType": "YulFunctionCall", + "src": "4381:15:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4402:2:23", + "nodeType": "YulLiteral", + "src": "4402:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4398:3:23", + "nodeType": "YulIdentifier", + "src": "4398:3:23" + }, + "nativeSrc": "4398:7:23", + "nodeType": "YulFunctionCall", + "src": "4398:7:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4377:3:23", + "nodeType": "YulIdentifier", + "src": "4377:3:23" + }, + "nativeSrc": "4377:29:23", + "nodeType": "YulFunctionCall", + "src": "4377:29:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4362:3:23", + "nodeType": "YulIdentifier", + "src": "4362:3:23" + }, + "nativeSrc": "4362:45:23", + "nodeType": "YulFunctionCall", + "src": "4362:45:23" + }, + { + "kind": "number", + "nativeSrc": "4409:2:23", + "nodeType": "YulLiteral", + "src": "4409:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4358:3:23", + "nodeType": "YulIdentifier", + "src": "4358:3:23" + }, + "nativeSrc": "4358:54:23", + "nodeType": "YulFunctionCall", + "src": "4358:54:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4350:4:23", + "nodeType": "YulIdentifier", + "src": "4350:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "4000:418:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4090:9:23", + "nodeType": "YulTypedName", + "src": "4090:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "4101:6:23", + "nodeType": "YulTypedName", + "src": "4101:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4112:4:23", + "nodeType": "YulTypedName", + "src": "4112:4:23", + "type": "" + } + ], + "src": "4000:418:23" + }, + { + "body": { + "nativeSrc": "4517:203:23", + "nodeType": "YulBlock", + "src": "4517:203:23", + "statements": [ + { + "nativeSrc": "4527:26:23", + "nodeType": "YulVariableDeclaration", + "src": "4527:26:23", + "value": { + "arguments": [ + { + "name": "array", + "nativeSrc": "4547:5:23", + "nodeType": "YulIdentifier", + "src": "4547:5:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4541:5:23", + "nodeType": "YulIdentifier", + "src": "4541:5:23" + }, + "nativeSrc": "4541:12:23", + "nodeType": "YulFunctionCall", + "src": "4541:12:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "4531:6:23", + "nodeType": "YulTypedName", + "src": "4531:6:23", + "type": "" + } + ] + }, + { + "nativeSrc": "4562:32:23", + "nodeType": "YulAssignment", + "src": "4562:32:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "array", + "nativeSrc": "4581:5:23", + "nodeType": "YulIdentifier", + "src": "4581:5:23" + }, + { + "kind": "number", + "nativeSrc": "4588:4:23", + "nodeType": "YulLiteral", + "src": "4588:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4577:3:23", + "nodeType": "YulIdentifier", + "src": "4577:3:23" + }, + "nativeSrc": "4577:16:23", + "nodeType": "YulFunctionCall", + "src": "4577:16:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "4571:5:23", + "nodeType": "YulIdentifier", + "src": "4571:5:23" + }, + "nativeSrc": "4571:23:23", + "nodeType": "YulFunctionCall", + "src": "4571:23:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "4562:5:23", + "nodeType": "YulIdentifier", + "src": "4562:5:23" + } + ] + }, + { + "body": { + "nativeSrc": "4631:83:23", + "nodeType": "YulBlock", + "src": "4631:83:23", + "statements": [ + { + "nativeSrc": "4645:59:23", + "nodeType": "YulAssignment", + "src": "4645:59:23", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "4658:5:23", + "nodeType": "YulIdentifier", + "src": "4658:5:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4673:1:23", + "nodeType": "YulLiteral", + "src": "4673:1:23", + "type": "", + "value": "3" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4680:4:23", + "nodeType": "YulLiteral", + "src": "4680:4:23", + "type": "", + "value": "0x20" + }, + { + "name": "length", + "nativeSrc": "4686:6:23", + "nodeType": "YulIdentifier", + "src": "4686:6:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4676:3:23", + "nodeType": "YulIdentifier", + "src": "4676:3:23" + }, + "nativeSrc": "4676:17:23", + "nodeType": "YulFunctionCall", + "src": "4676:17:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4669:3:23", + "nodeType": "YulIdentifier", + "src": "4669:3:23" + }, + "nativeSrc": "4669:25:23", + "nodeType": "YulFunctionCall", + "src": "4669:25:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4700:1:23", + "nodeType": "YulLiteral", + "src": "4700:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4696:3:23", + "nodeType": "YulIdentifier", + "src": "4696:3:23" + }, + "nativeSrc": "4696:6:23", + "nodeType": "YulFunctionCall", + "src": "4696:6:23" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "4665:3:23", + "nodeType": "YulIdentifier", + "src": "4665:3:23" + }, + "nativeSrc": "4665:38:23", + "nodeType": "YulFunctionCall", + "src": "4665:38:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "4654:3:23", + "nodeType": "YulIdentifier", + "src": "4654:3:23" + }, + "nativeSrc": "4654:50:23", + "nodeType": "YulFunctionCall", + "src": "4654:50:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "4645:5:23", + "nodeType": "YulIdentifier", + "src": "4645:5:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nativeSrc": "4609:6:23", + "nodeType": "YulIdentifier", + "src": "4609:6:23" + }, + { + "kind": "number", + "nativeSrc": "4617:4:23", + "nodeType": "YulLiteral", + "src": "4617:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "4606:2:23", + "nodeType": "YulIdentifier", + "src": "4606:2:23" + }, + "nativeSrc": "4606:16:23", + "nodeType": "YulFunctionCall", + "src": "4606:16:23" + }, + "nativeSrc": "4603:111:23", + "nodeType": "YulIf", + "src": "4603:111:23" + } + ] + }, + "name": "convert_bytes_to_fixedbytes_from_t_bytes_memory_ptr_to_t_bytes32", + "nativeSrc": "4423:297:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "array", + "nativeSrc": "4497:5:23", + "nodeType": "YulTypedName", + "src": "4497:5:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nativeSrc": "4507:5:23", + "nodeType": "YulTypedName", + "src": "4507:5:23", + "type": "" + } + ], + "src": "4423:297:23" + } + ] + }, + "contents": "{\n { }\n function abi_decode_tuple_t_address_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_stringliteral_480a3d2cf1e4838d740f40eac57f23eb6facc0baaf1a65a7b61df6a5a00ed368__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 19)\n mstore(add(headStart, 64), \"Invalid destination\")\n tail := add(headStart, 96)\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function extract_byte_array_length(data) -> length\n {\n length := shr(1, data)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) { length := and(length, 0x7f) }\n if eq(outOfPlaceEncoding, lt(length, 32))\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n }\n function array_dataslot_string_storage(ptr) -> data\n {\n mstore(0, ptr)\n data := keccak256(0, 0x20)\n }\n function clean_up_bytearray_end_slots_string_storage(array, len, startIndex)\n {\n if gt(len, 31)\n {\n mstore(0, array)\n let data := keccak256(0, 0x20)\n let deleteStart := add(data, shr(5, add(startIndex, 31)))\n if lt(startIndex, 0x20) { deleteStart := data }\n let _1 := add(data, shr(5, add(len, 31)))\n let start := deleteStart\n for { } lt(start, _1) { start := add(start, 1) }\n { sstore(start, 0) }\n }\n }\n function extract_used_part_and_set_length_of_short_byte_array(data, len) -> used\n {\n used := or(and(data, not(shr(shl(3, len), not(0)))), shl(1, len))\n }\n function copy_byte_array_to_storage_from_t_string_memory_ptr_to_t_string_storage(slot, src)\n {\n let newLen := mload(src)\n if gt(newLen, sub(shl(64, 1), 1)) { panic_error_0x41() }\n clean_up_bytearray_end_slots_string_storage(slot, extract_byte_array_length(sload(slot)), newLen)\n let srcOffset := 0\n srcOffset := 0x20\n switch gt(newLen, 31)\n case 1 {\n let loopEnd := and(newLen, not(31))\n let dstPtr := array_dataslot_string_storage(slot)\n let i := 0\n for { } lt(i, loopEnd) { i := add(i, 0x20) }\n {\n sstore(dstPtr, mload(add(src, srcOffset)))\n dstPtr := add(dstPtr, 1)\n srcOffset := add(srcOffset, 0x20)\n }\n if lt(loopEnd, newLen)\n {\n let lastValue := mload(add(src, srcOffset))\n sstore(dstPtr, and(lastValue, not(shr(and(shl(3, newLen), 248), not(0)))))\n }\n sstore(slot, add(shl(1, newLen), 1))\n }\n default {\n let value := 0\n if newLen\n {\n value := mload(add(src, srcOffset))\n }\n sstore(slot, extract_used_part_and_set_length_of_short_byte_array(value, newLen))\n }\n }\n function abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed(headStart, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 160)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), and(value4, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n mstore(headStart, 32)\n let length := mload(value0)\n mstore(add(headStart, 32), length)\n mcopy(add(headStart, 64), add(value0, 32), length)\n mstore(add(add(headStart, length), 64), 0)\n tail := add(add(headStart, and(add(length, 31), not(31))), 64)\n }\n function convert_bytes_to_fixedbytes_from_t_bytes_memory_ptr_to_t_bytes32(array) -> value\n {\n let length := mload(array)\n value := mload(add(array, 0x20))\n if lt(length, 0x20)\n {\n value := and(value, shl(shl(3, sub(0x20, length)), not(0)))\n }\n }\n}", + "id": 23, + "language": "Yul", + "name": "#utility.yul" + } + ], + "linkReferences": {}, + "object": "610180604052348015610010575f5ffd5b50604051611a4d380380611a4d83398101604081905261002f91610294565b604080518082018252600c81526b2a37b5b2b72932b630bcb2b960a11b602080830191909152825180840190935260018352603160f81b9083015290338061009157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61009a816101d6565b5060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00556100ca826001610225565b610120526100d9816002610225565b61014052815160208084019190912060e052815190820120610100524660a05261016560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166101c45760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642064657374696e6174696f6e000000000000000000000000006044820152606401610088565b6001600160a01b03166101605261046b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6020835110156102405761023983610257565b9050610251565b8161024b8482610359565b5060ff90505b92915050565b5f5f829050601f81511115610281578260405163305a27a960e01b81526004016100889190610413565b805161028c82610448565b179392505050565b5f602082840312156102a4575f5ffd5b81516001600160a01b03811681146102ba575f5ffd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102e957607f821691505b60208210810361030757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561035457805f5260205f20601f840160051c810160208510156103325750805b601f840160051c820191505b81811015610351575f815560010161033e565b50505b505050565b81516001600160401b03811115610372576103726102c1565b6103868161038084546102d5565b8461030d565b6020601f8211600181146103b8575f83156103a15750848201515b5f19600385901b1c1916600184901b178455610351565b5f84815260208120601f198516915b828110156103e757878501518255602094850194600190920191016103c7565b508482101561040457868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610307575f1960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161156c6104e15f395f818160d701528181610525015281816105f4015281816109500152610bf801525f610d2d01525f610cfb01525f6111bc01525f61119401525f6110ef01525f61111901525f611143015261156c5ff3fe608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033", + "opcodes": "PUSH2 0x180 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x1A4D CODESIZE SUB DUP1 PUSH2 0x1A4D DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x294 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0xC DUP2 MSTORE PUSH12 0x2A37B5B2B72932B630BCB2B9 PUSH1 0xA1 SHL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP3 MLOAD DUP1 DUP5 ADD SWAP1 SWAP4 MSTORE PUSH1 0x1 DUP4 MSTORE PUSH1 0x31 PUSH1 0xF8 SHL SWAP1 DUP4 ADD MSTORE SWAP1 CALLER DUP1 PUSH2 0x91 JUMPI PUSH1 0x40 MLOAD PUSH4 0x1E4FBDF7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH0 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH2 0x9A DUP2 PUSH2 0x1D6 JUMP JUMPDEST POP PUSH1 0x1 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE PUSH2 0xCA DUP3 PUSH1 0x1 PUSH2 0x225 JUMP JUMPDEST PUSH2 0x120 MSTORE PUSH2 0xD9 DUP2 PUSH1 0x2 PUSH2 0x225 JUMP JUMPDEST PUSH2 0x140 MSTORE DUP2 MLOAD PUSH1 0x20 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 KECCAK256 PUSH1 0xE0 MSTORE DUP2 MLOAD SWAP1 DUP3 ADD KECCAK256 PUSH2 0x100 MSTORE CHAINID PUSH1 0xA0 MSTORE PUSH2 0x165 PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH1 0x20 DUP3 ADD MSTORE SWAP1 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP3 ADD MSTORE CHAINID PUSH1 0x80 DUP3 ADD MSTORE ADDRESS PUSH1 0xA0 DUP3 ADD MSTORE PUSH0 SWAP1 PUSH1 0xC0 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x80 MSTORE POP POP ADDRESS PUSH1 0xC0 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x1C4 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x496E76616C69642064657374696E6174696F6E00000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x88 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x160 MSTORE PUSH2 0x46B JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP4 AND DUP2 OR DUP5 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP1 SWAP3 AND SWAP3 DUP4 SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP4 MLOAD LT ISZERO PUSH2 0x240 JUMPI PUSH2 0x239 DUP4 PUSH2 0x257 JUMP JUMPDEST SWAP1 POP PUSH2 0x251 JUMP JUMPDEST DUP2 PUSH2 0x24B DUP5 DUP3 PUSH2 0x359 JUMP JUMPDEST POP PUSH1 0xFF SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH0 PUSH0 DUP3 SWAP1 POP PUSH1 0x1F DUP2 MLOAD GT ISZERO PUSH2 0x281 JUMPI DUP3 PUSH1 0x40 MLOAD PUSH4 0x305A27A9 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x88 SWAP2 SWAP1 PUSH2 0x413 JUMP JUMPDEST DUP1 MLOAD PUSH2 0x28C DUP3 PUSH2 0x448 JUMP JUMPDEST OR SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x2A4 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x2BA JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH1 0x1 DUP2 DUP2 SHR SWAP1 DUP3 AND DUP1 PUSH2 0x2E9 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x307 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1F DUP3 GT ISZERO PUSH2 0x354 JUMPI DUP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 PUSH1 0x1F DUP5 ADD PUSH1 0x5 SHR DUP2 ADD PUSH1 0x20 DUP6 LT ISZERO PUSH2 0x332 JUMPI POP DUP1 JUMPDEST PUSH1 0x1F DUP5 ADD PUSH1 0x5 SHR DUP3 ADD SWAP2 POP JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x351 JUMPI PUSH0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x33E JUMP JUMPDEST POP POP JUMPDEST POP POP POP JUMP JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x372 JUMPI PUSH2 0x372 PUSH2 0x2C1 JUMP JUMPDEST PUSH2 0x386 DUP2 PUSH2 0x380 DUP5 SLOAD PUSH2 0x2D5 JUMP JUMPDEST DUP5 PUSH2 0x30D JUMP JUMPDEST PUSH1 0x20 PUSH1 0x1F DUP3 GT PUSH1 0x1 DUP2 EQ PUSH2 0x3B8 JUMPI PUSH0 DUP4 ISZERO PUSH2 0x3A1 JUMPI POP DUP5 DUP3 ADD MLOAD JUMPDEST PUSH0 NOT PUSH1 0x3 DUP6 SWAP1 SHL SHR NOT AND PUSH1 0x1 DUP5 SWAP1 SHL OR DUP5 SSTORE PUSH2 0x351 JUMP JUMPDEST PUSH0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 KECCAK256 PUSH1 0x1F NOT DUP6 AND SWAP2 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x3E7 JUMPI DUP8 DUP6 ADD MLOAD DUP3 SSTORE PUSH1 0x20 SWAP5 DUP6 ADD SWAP5 PUSH1 0x1 SWAP1 SWAP3 ADD SWAP2 ADD PUSH2 0x3C7 JUMP JUMPDEST POP DUP5 DUP3 LT ISZERO PUSH2 0x404 JUMPI DUP7 DUP5 ADD MLOAD PUSH0 NOT PUSH1 0x3 DUP8 SWAP1 SHL PUSH1 0xF8 AND SHR NOT AND DUP2 SSTORE JUMPDEST POP POP POP POP PUSH1 0x1 SWAP1 DUP2 SHL ADD SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x20 DUP2 MSTORE PUSH0 DUP3 MLOAD DUP1 PUSH1 0x20 DUP5 ADD MSTORE DUP1 PUSH1 0x20 DUP6 ADD PUSH1 0x40 DUP6 ADD MCOPY PUSH0 PUSH1 0x40 DUP3 DUP6 ADD ADD MSTORE PUSH1 0x40 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP5 ADD ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP1 DUP4 ADD MLOAD SWAP2 SWAP1 DUP2 LT ISZERO PUSH2 0x307 JUMPI PUSH0 NOT PUSH1 0x20 SWAP2 SWAP1 SWAP2 SUB PUSH1 0x3 SHL SHL AND SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x120 MLOAD PUSH2 0x140 MLOAD PUSH2 0x160 MLOAD PUSH2 0x156C PUSH2 0x4E1 PUSH0 CODECOPY PUSH0 DUP2 DUP2 PUSH1 0xD7 ADD MSTORE DUP2 DUP2 PUSH2 0x525 ADD MSTORE DUP2 DUP2 PUSH2 0x5F4 ADD MSTORE DUP2 DUP2 PUSH2 0x950 ADD MSTORE PUSH2 0xBF8 ADD MSTORE PUSH0 PUSH2 0xD2D ADD MSTORE PUSH0 PUSH2 0xCFB ADD MSTORE PUSH0 PUSH2 0x11BC ADD MSTORE PUSH0 PUSH2 0x1194 ADD MSTORE PUSH0 PUSH2 0x10EF ADD MSTORE PUSH0 PUSH2 0x1119 ADD MSTORE PUSH0 PUSH2 0x1143 ADD MSTORE PUSH2 0x156C PUSH0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x92 JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9E281A98 GT PUSH2 0x57 JUMPI DUP1 PUSH4 0x9E281A98 EQ PUSH2 0x159 JUMPI DUP1 PUSH4 0xD850124E EQ PUSH2 0x178 JUMPI DUP1 PUSH4 0xDCB79457 EQ PUSH2 0x1C1 JUMPI DUP1 PUSH4 0xF14210A6 EQ PUSH2 0x1E0 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x1FF JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP1 PUSH4 0x2AF83BFE EQ PUSH2 0x9D JUMPI DUP1 PUSH4 0x715018A6 EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0x75BD6863 EQ PUSH2 0xC6 JUMPI DUP1 PUSH4 0x84B0196E EQ PUSH2 0x116 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x13D JUMPI PUSH0 PUSH0 REVERT JUMPDEST CALLDATASIZE PUSH2 0x99 JUMPI STOP JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0xB0 PUSH2 0xAB CALLDATASIZE PUSH1 0x4 PUSH2 0x12DD JUMP JUMPDEST PUSH2 0x21E JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xBD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x6AE JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xD1 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xF9 PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x121 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x12A PUSH2 0x6C1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x10D SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x134A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x148 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xF9 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x164 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x173 CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH2 0x703 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x183 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x192 CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x10D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CC JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x1DB CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH2 0x78B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1EB JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x1FA CALLDATASIZE PUSH1 0x4 PUSH2 0x1423 JUMP JUMPDEST PUSH2 0x7B8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x20A JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x219 CALLDATASIZE PUSH1 0x4 PUSH2 0x143A JUMP JUMPDEST PUSH2 0x8A7 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x8E1 JUMP JUMPDEST PUSH0 PUSH2 0x237 PUSH1 0x40 DUP4 ADD PUSH1 0x20 DUP5 ADD PUSH2 0x143A JUMP JUMPDEST SWAP1 POP PUSH2 0x120 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x28A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x24B73B30B634B21037BBB732B9 PUSH1 0x99 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH2 0x298 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SUB PUSH2 0x2DE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x24B73B30B634B2103A37B5B2B7 PUSH1 0x99 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x33E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xA PUSH1 0x24 DUP3 ADD MSTORE PUSH10 0x139BDB98D9481D5CD959 PUSH1 0xB2 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST DUP3 PUSH2 0x140 ADD CALLDATALOAD TIMESTAMP GT ISZERO PUSH2 0x385 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xF PUSH1 0x24 DUP3 ADD MSTORE PUSH15 0x14185E5B1BD85908195E1C1A5C9959 PUSH1 0x8A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 PUSH2 0x3EE DUP4 PUSH2 0x397 PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH2 0x3A9 PUSH1 0xE0 DUP10 ADD DUP10 PUSH2 0x1453 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP POP POP POP PUSH2 0x100 DUP10 ADD CALLDATALOAD DUP8 PUSH2 0x140 DUP12 ADD CALLDATALOAD PUSH2 0x90F JUMP JUMPDEST SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x421 DUP3 PUSH2 0x410 PUSH2 0x180 DUP9 ADD PUSH2 0x160 DUP10 ADD PUSH2 0x149D JUMP JUMPDEST DUP8 PUSH2 0x180 ADD CALLDATALOAD DUP9 PUSH2 0x1A0 ADD CALLDATALOAD PUSH2 0x9DB JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x465 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xB PUSH1 0x24 DUP3 ADD MSTORE PUSH11 0x496E76616C696420736967 PUSH1 0xA8 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST DUP4 PUSH2 0x100 ADD CALLDATALOAD CALLVALUE EQ PUSH2 0x4B9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1C PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x496E636F7272656374204554482076616C75652070726F766964656400000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP6 DUP5 MSTORE DUP3 MSTORE SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH2 0x520 SWAP1 PUSH2 0x4F6 SWAP1 DUP7 ADD DUP7 PUSH2 0x143A JUMP JUMPDEST DUP5 PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH1 0x60 DUP9 ADD CALLDATALOAD PUSH2 0x511 PUSH1 0xA0 DUP11 ADD PUSH1 0x80 DUP12 ADD PUSH2 0x149D JUMP JUMPDEST DUP10 PUSH1 0xA0 ADD CALLDATALOAD DUP11 PUSH1 0xC0 ADD CALLDATALOAD PUSH2 0xA07 JUMP JUMPDEST PUSH2 0x566 PUSH32 0x0 PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH2 0x556 PUSH1 0x20 DUP9 ADD DUP9 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 SWAP1 PUSH2 0xB75 JUMP JUMPDEST PUSH0 PUSH2 0x5B2 PUSH2 0x577 PUSH1 0xE0 DUP8 ADD DUP8 PUSH2 0x1453 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP CALLVALUE SWAP3 POP PUSH2 0xBF4 SWAP2 POP POP JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x5EF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xB PUSH1 0x24 DUP3 ADD MSTORE PUSH11 0x10D85B1B0819985A5B1959 PUSH1 0xAA SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0x621 PUSH32 0x0 PUSH0 PUSH2 0x556 PUSH1 0x20 DUP10 ADD DUP10 PUSH2 0x143A JUMP JUMPDEST PUSH2 0x62E PUSH1 0x20 DUP7 ADD DUP7 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x78129A649632642D8E9F346C85D9EFB70D32D50A36774C4585491A9228BBD350 DUP8 PUSH1 0x40 ADD CALLDATALOAD PUSH1 0x40 MLOAD PUSH2 0x676 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP PUSH2 0x6AB PUSH1 0x1 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x6B6 PUSH2 0xC79 JUMP JUMPDEST PUSH2 0x6BF PUSH0 PUSH2 0xCA5 JUMP JUMPDEST JUMP JUMPDEST PUSH0 PUSH1 0x60 DUP1 PUSH0 PUSH0 PUSH0 PUSH1 0x60 PUSH2 0x6D2 PUSH2 0xCF4 JUMP JUMPDEST PUSH2 0x6DA PUSH2 0xD26 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 SWAP3 MSTORE PUSH1 0xF PUSH1 0xF8 SHL SWAP12 SWAP4 SWAP11 POP SWAP2 SWAP9 POP CHAINID SWAP8 POP ADDRESS SWAP7 POP SWAP5 POP SWAP3 POP SWAP1 POP JUMP JUMPDEST PUSH2 0x70B PUSH2 0xC79 JUMP JUMPDEST PUSH2 0x730 PUSH2 0x71F PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 DUP4 PUSH2 0xD53 JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0xA0524EE0FD8662D6C046D199DA2A6D3DC49445182CEC055873A5BB9C2843C8E0 DUP4 PUSH1 0x40 MLOAD PUSH2 0x77F SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x7C0 PUSH2 0xC79 JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 DUP4 SWAP1 DUP4 DUP2 DUP2 DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH0 DUP2 EQ PUSH2 0x80A JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x80F JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH2 0x856 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x115512081D1C985B9CD9995C8819985A5B1959 PUSH1 0x6A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x6148672A948A12B8E0BF92A9338349B9AC890FAD62A234ABAF0A4DA99F62CFCC DUP4 PUSH1 0x40 MLOAD PUSH2 0x89B SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH2 0x8AF PUSH2 0xC79 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x8D8 JUMPI PUSH1 0x40 MLOAD PUSH4 0x1E4FBDF7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH0 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0x6AB DUP2 PUSH2 0xCA5 JUMP JUMPDEST PUSH2 0x8E9 PUSH2 0xD60 JUMP JUMPDEST PUSH1 0x2 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE JUMP JUMPDEST DUP4 MLOAD PUSH1 0x20 DUP1 DUP7 ADD SWAP2 SWAP1 SWAP2 KECCAK256 PUSH1 0x40 DUP1 MLOAD PUSH32 0xF0543E2024FD0AE16CCB842686C2733758EC65ACFD69FB599C05B286F8DB8844 SWAP4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 DUP2 AND SWAP2 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP11 AND PUSH1 0x60 DUP5 ADD MSTORE DUP9 AND PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0xA0 DUP3 ADD DUP8 SWAP1 MSTORE PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xE0 DUP2 ADD DUP5 SWAP1 MSTORE PUSH2 0x100 DUP2 ADD DUP4 SWAP1 MSTORE PUSH2 0x120 DUP2 ADD DUP3 SWAP1 MSTORE PUSH0 SWAP1 PUSH2 0x9CF SWAP1 PUSH2 0x140 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH2 0xDA2 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH0 PUSH0 PUSH2 0x9EB DUP9 DUP9 DUP9 DUP9 PUSH2 0xDCE JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x9FB DUP3 DUP3 PUSH2 0xE96 JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xD505ACCF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE ADDRESS PUSH1 0x24 DUP4 ADD MSTORE PUSH1 0x44 DUP3 ADD DUP8 SWAP1 MSTORE PUSH1 0x64 DUP3 ADD DUP7 SWAP1 MSTORE PUSH1 0xFF DUP6 AND PUSH1 0x84 DUP4 ADD MSTORE PUSH1 0xA4 DUP3 ADD DUP5 SWAP1 MSTORE PUSH1 0xC4 DUP3 ADD DUP4 SWAP1 MSTORE DUP9 AND SWAP1 PUSH4 0xD505ACCF SWAP1 PUSH1 0xE4 ADD PUSH0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA72 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0xA83 JUMPI POP PUSH1 0x1 JUMPDEST PUSH2 0xB57 JUMPI PUSH1 0x40 MLOAD PUSH4 0x6EB1769F PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE ADDRESS PUSH1 0x24 DUP4 ADD MSTORE DUP7 SWAP2 SWAP1 DUP10 AND SWAP1 PUSH4 0xDD62ED3E SWAP1 PUSH1 0x44 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xAD4 JUMPI RETURNDATASIZE PUSH0 PUSH0 RETURNDATACOPY RETURNDATASIZE PUSH0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xAF8 SWAP2 SWAP1 PUSH2 0x14BD JUMP JUMPDEST LT ISZERO PUSH2 0xB57 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x28 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x5065726D6974206661696C656420616E6420696E73756666696369656E742061 PUSH1 0x44 DUP3 ADD MSTORE PUSH8 0x6C6C6F77616E6365 PUSH1 0xC0 SHL PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0xB6C PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP8 ADDRESS DUP9 PUSH2 0xF52 JUMP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0xB81 DUP4 DUP4 DUP4 PUSH0 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBEF JUMPI PUSH2 0xB92 DUP4 DUP4 PUSH0 PUSH1 0x1 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBBA JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0xBC7 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBEF JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 DUP6 PUSH1 0x40 MLOAD PUSH2 0xC2F SWAP2 SWAP1 PUSH2 0x14D4 JUMP JUMPDEST PUSH0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH0 DUP2 EQ PUSH2 0xC69 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0xC6E JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP1 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x6BF JUMPI PUSH1 0x40 MLOAD PUSH4 0x118CDAA7 PUSH1 0xE0 SHL DUP2 MSTORE CALLER PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP4 AND DUP2 OR DUP5 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP1 SWAP3 AND SWAP3 DUP4 SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0xD21 PUSH32 0x0 PUSH1 0x1 PUSH2 0xFF0 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0xD21 PUSH32 0x0 PUSH1 0x2 PUSH2 0xFF0 JUMP JUMPDEST PUSH2 0xBC7 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0x1099 JUMP JUMPDEST PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SLOAD PUSH1 0x2 SUB PUSH2 0x6BF JUMPI PUSH1 0x40 MLOAD PUSH4 0x3EE5AEB5 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH2 0x7B2 PUSH2 0xDAE PUSH2 0x10E3 JUMP JUMPDEST DUP4 PUSH1 0x40 MLOAD PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH0 DUP1 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP5 GT ISZERO PUSH2 0xE07 JUMPI POP PUSH0 SWAP2 POP PUSH1 0x3 SWAP1 POP DUP3 PUSH2 0xE8C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP11 SWAP1 MSTORE PUSH1 0xFF DUP10 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xE58 JUMPI RETURNDATASIZE PUSH0 PUSH0 RETURNDATACOPY RETURNDATASIZE PUSH0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0xE83 JUMPI POP PUSH0 SWAP3 POP PUSH1 0x1 SWAP2 POP DUP3 SWAP1 POP PUSH2 0xE8C JUMP JUMPDEST SWAP3 POP PUSH0 SWAP2 POP DUP2 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 POP SWAP5 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEA9 JUMPI PUSH2 0xEA9 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xEB2 JUMPI POP POP JUMP JUMPDEST PUSH1 0x1 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEC6 JUMPI PUSH2 0xEC6 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xEE4 JUMPI PUSH1 0x40 MLOAD PUSH4 0xF645EEDF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEF8 JUMPI PUSH2 0xEF8 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xF19 JUMPI PUSH1 0x40 MLOAD PUSH4 0xFCE698F7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x3 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xF2D JUMPI PUSH2 0xF2D PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xF4E JUMPI PUSH1 0x40 MLOAD PUSH4 0x35E2F383 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xF60 DUP5 DUP5 DUP5 DUP5 PUSH1 0x1 PUSH2 0x120C JUMP JUMPDEST PUSH2 0xF88 JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x95EA7B3 PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x44 DUP2 DUP1 DUP12 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0xFE4 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0xFD8 JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 DUP8 EXTCODESIZE GT RETURNDATASIZE ISZERO AND DUP4 AND SWAP3 POP JUMPDEST PUSH1 0x40 MSTORE POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0xFF DUP4 EQ PUSH2 0x100A JUMPI PUSH2 0x1003 DUP4 PUSH2 0x1279 JUMP JUMPDEST SWAP1 POP PUSH2 0x7B2 JUMP JUMPDEST DUP2 DUP1 SLOAD PUSH2 0x1016 SWAP1 PUSH2 0x14FE JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x1042 SWAP1 PUSH2 0x14FE JUMP JUMPDEST DUP1 ISZERO PUSH2 0x108D JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1064 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x108D JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1070 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP PUSH2 0x7B2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xA9059CBB PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x44 DUP2 DUP1 DUP12 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0xFE4 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0xFD8 JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND EQ DUP1 ISZERO PUSH2 0x113B JUMPI POP PUSH32 0x0 CHAINID EQ JUMPDEST ISZERO PUSH2 0x1165 JUMPI POP PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0xD21 PUSH1 0x40 DUP1 MLOAD PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH1 0x20 DUP3 ADD MSTORE PUSH32 0x0 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH32 0x0 PUSH1 0x60 DUP3 ADD MSTORE CHAINID PUSH1 0x80 DUP3 ADD MSTORE ADDRESS PUSH1 0xA0 DUP3 ADD MSTORE PUSH0 SWAP1 PUSH1 0xC0 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x23B872DD PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 MSTORE DUP7 AND PUSH1 0x24 MSTORE PUSH1 0x44 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x64 DUP2 DUP1 DUP13 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0x1268 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0x125C JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 DUP9 EXTCODESIZE GT RETURNDATASIZE ISZERO AND DUP4 AND SWAP3 POP JUMPDEST PUSH1 0x40 MSTORE POP PUSH0 PUSH1 0x60 MSTORE SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH0 PUSH2 0x1285 DUP4 PUSH2 0x12B6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE SWAP2 SWAP3 POP PUSH0 SWAP2 SWAP1 PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY POP POP POP SWAP2 DUP3 MSTORE POP PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE POP SWAP1 JUMP JUMPDEST PUSH0 PUSH1 0xFF DUP3 AND PUSH1 0x1F DUP2 GT ISZERO PUSH2 0x7B2 JUMPI PUSH1 0x40 MLOAD PUSH4 0x2CD44AC3 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x12ED JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1303 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP3 ADD PUSH2 0x1C0 DUP2 DUP6 SUB SLT ISZERO PUSH2 0x1315 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP7 ADD MCOPY PUSH0 PUSH1 0x20 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x20 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xFF PUSH1 0xF8 SHL DUP9 AND DUP2 MSTORE PUSH1 0xE0 PUSH1 0x20 DUP3 ADD MSTORE PUSH0 PUSH2 0x1368 PUSH1 0xE0 DUP4 ADD DUP10 PUSH2 0x131C JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x137A DUP2 DUP10 PUSH2 0x131C JUMP JUMPDEST PUSH1 0x60 DUP5 ADD DUP9 SWAP1 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0xA0 DUP5 ADD DUP7 SWAP1 MSTORE DUP4 DUP2 SUB PUSH1 0xC0 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE PUSH1 0x20 DUP1 DUP8 ADD SWAP4 POP SWAP1 SWAP2 ADD SWAP1 PUSH0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x13CF JUMPI DUP4 MLOAD DUP4 MSTORE PUSH1 0x20 SWAP4 DUP5 ADD SWAP4 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x13B1 JUMP JUMPDEST POP SWAP1 SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x13F6 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH0 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x140C JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x1415 DUP4 PUSH2 0x13E0 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1433 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x144A JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x1315 DUP3 PUSH2 0x13E0 JUMP JUMPDEST PUSH0 PUSH0 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1468 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1482 JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0x1496 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x14AD JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1315 JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x14CD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 MLOAD DUP1 PUSH1 0x20 DUP6 ADD DUP5 MCOPY PUSH0 SWAP3 ADD SWAP2 DUP3 MSTORE POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH1 0x1 DUP2 DUP2 SHR SWAP1 DUP3 AND DUP1 PUSH2 0x1512 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x1530 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP13 CALLVALUE 0xDB 0x2F PUSH16 0x83AF136A5340CCE7FE8EF554EA8EB633 PUSH6 0x6FBF9BFF3BD7 BALANCE 0xAE 0xC4 0xF PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "1158:6897:22:-:0;;;2504:245;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3428:431:16;;;;;;;;;;;-1:-1:-1;;;3428:431:16;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3428:431:16;;;;;2562:10:22;;1269:95:0;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;455:51:23;428:18;;1322:31:0;;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;2365:1:11;1505:66;2539;3501:45:16;:4;3532:13;3501:30;:45::i;:::-;3493:53;;3567:51;:7;3601:16;3567:33;:51::i;:::-;3556:62;;3642:22;;;;;;;;;;3628:36;;3691:25;;;;;;3674:42;;3744:13;3727:30;;3792:23;4326:11;;4339:14;;4304:80;;;2079:95;4304:80;;;3765:25:23;3806:18;;;3799:34;;;;3849:18;;;3842:34;4355:13:16;3892:18:23;;;3885:34;4378:4:16;3935:19:23;;;3928:61;4268:7:16;;3737:19:23;;4304:80:16;;;;;;;;;;;;4294:91;;;;;;4287:98;;4213:179;;3792:23;3767:48;;-1:-1:-1;;3847:4:16;3825:27;;-1:-1:-1;;;;;2632:34:22;::::2;2624:66;;;::::0;-1:-1:-1;;;2624:66:22;;719:2:23;2624:66:22::2;::::0;::::2;701:21:23::0;758:2;738:18;;;731:30;797:21;777:18;;;770:49;836:18;;2624:66:22::2;517:343:23::0;2624:66:22::2;-1:-1:-1::0;;;;;2700:42:22::2;;::::0;1158:6897;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;2893:342:12:-;2989:11;3038:4;3022:5;3016:19;:26;3012:217;;;3065:20;3079:5;3065:13;:20::i;:::-;3058:27;;;;3012:217;3142:5;3116:46;3157:5;3142;3116:46;:::i;:::-;-1:-1:-1;1390:66:12;;-1:-1:-1;3012:217:12;2893:342;;;;:::o;1708:288::-;1773:11;1796:17;1822:3;1796:30;;1854:4;1840;:11;:18;1836:74;;;1895:3;1881:18;;-1:-1:-1;;;1881:18:12;;;;;;;;:::i;1836:74::-;1976:11;;1959:13;1976:4;1959:13;:::i;:::-;1951:36;;1708:288;-1:-1:-1;;;1708:288:12:o;14:290:23:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:23;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:23:o;865:127::-;926:10;921:3;917:20;914:1;907:31;957:4;954:1;947:15;981:4;978:1;971:15;997:380;1076:1;1072:12;;;;1119;;;1140:61;;1194:4;1186:6;1182:17;1172:27;;1140:61;1247:2;1239:6;1236:14;1216:18;1213:38;1210:161;;1293:10;1288:3;1284:20;1281:1;1274:31;1328:4;1325:1;1318:15;1356:4;1353:1;1346:15;1210:161;;997:380;;;:::o;1508:518::-;1610:2;1605:3;1602:11;1599:421;;;1646:5;1643:1;1636:16;1690:4;1687:1;1677:18;1760:2;1748:10;1744:19;1741:1;1737:27;1731:4;1727:38;1796:4;1784:10;1781:20;1778:47;;;-1:-1:-1;1819:4:23;1778:47;1874:2;1869:3;1865:12;1862:1;1858:20;1852:4;1848:31;1838:41;;1929:81;1947:2;1940:5;1937:13;1929:81;;;2006:1;1992:16;;1973:1;1962:13;1929:81;;;1933:3;;1599:421;1508:518;;;:::o;2202:1299::-;2322:10;;-1:-1:-1;;;;;2344:30:23;;2341:56;;;2377:18;;:::i;:::-;2406:97;2496:6;2456:38;2488:4;2482:11;2456:38;:::i;:::-;2450:4;2406:97;:::i;:::-;2552:4;2583:2;2572:14;;2600:1;2595:649;;;;3288:1;3305:6;3302:89;;;-1:-1:-1;3357:19:23;;;3351:26;3302:89;-1:-1:-1;;2159:1:23;2155:11;;;2151:24;2147:29;2137:40;2183:1;2179:11;;;2134:57;3404:81;;2565:930;;2595:649;1455:1;1448:14;;;1492:4;1479:18;;-1:-1:-1;;2631:20:23;;;2749:222;2763:7;2760:1;2757:14;2749:222;;;2845:19;;;2839:26;2824:42;;2952:4;2937:20;;;;2905:1;2893:14;;;;2779:12;2749:222;;;2753:3;2999:6;2990:7;2987:19;2984:201;;;3060:19;;;3054:26;-1:-1:-1;;3143:1:23;3139:14;;;3155:3;3135:24;3131:37;3127:42;3112:58;3097:74;;2984:201;-1:-1:-1;;;;3231:1:23;3215:14;;;3211:22;3198:36;;-1:-1:-1;2202:1299:23:o;4000:418::-;4149:2;4138:9;4131:21;4112:4;4181:6;4175:13;4224:6;4219:2;4208:9;4204:18;4197:34;4283:6;4278:2;4270:6;4266:15;4261:2;4250:9;4246:18;4240:50;4339:1;4334:2;4325:6;4314:9;4310:22;4306:31;4299:42;4409:2;4402;4398:7;4393:2;4385:6;4381:15;4377:29;4366:9;4362:45;4358:54;4350:62;;;4000:418;;;;:::o;4423:297::-;4541:12;;4588:4;4577:16;;;4571:23;;4541:12;4606:16;;4603:111;;;-1:-1:-1;;4680:4:23;4676:17;;;;4673:1;4669:25;4665:38;4654:50;;4423:297;-1:-1:-1;4423:297:23:o;:::-;1158:6897:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": { + "@_8236": { + "entryPoint": null, + "id": 8236, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_EIP712Name_4351": { + "entryPoint": 3316, + "id": 4351, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_EIP712Version_4363": { + "entryPoint": 3366, + "id": 4363, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_buildDomainSeparator_4281": { + "entryPoint": null, + "id": 4281, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_checkOwner_84": { + "entryPoint": 3193, + "id": 84, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_computeDigest_8441": { + "entryPoint": 2319, + "id": 8441, + "parameterSlots": 7, + "returnSlots": 1 + }, + "@_domainSeparatorV4_4260": { + "entryPoint": 4323, + "id": 4260, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_executePermitAndTransfer_8508": { + "entryPoint": 2567, + "id": 8508, + "parameterSlots": 7, + "returnSlots": 0 + }, + "@_forwardCall_8529": { + "entryPoint": 3060, + "id": 8529, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@_hashTypedDataV4_4297": { + "entryPoint": 3490, + "id": 4297, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@_msgSender_1644": { + "entryPoint": null, + "id": 1644, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_nonReentrantAfter_1803": { + "entryPoint": null, + "id": 1803, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_nonReentrantBeforeView_1776": { + "entryPoint": 3424, + "id": 1776, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_nonReentrantBefore_1791": { + "entryPoint": 2273, + "id": 1791, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@_reentrancyGuardEntered_1818": { + "entryPoint": null, + "id": 1818, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_reentrancyGuardStorageSlot_1826": { + "entryPoint": null, + "id": 1826, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@_safeApprove_830": { + "entryPoint": 3982, + "id": 830, + "parameterSlots": 4, + "returnSlots": 1 + }, + "@_safeTransferFrom_807": { + "entryPoint": 4620, + "id": 807, + "parameterSlots": 5, + "returnSlots": 1 + }, + "@_safeTransfer_782": { + "entryPoint": 4249, + "id": 782, + "parameterSlots": 4, + "returnSlots": 1 + }, + "@_throwError_4136": { + "entryPoint": 3734, + "id": 4136, + "parameterSlots": 2, + "returnSlots": 0 + }, + "@_transferOwnership_146": { + "entryPoint": 3237, + "id": 146, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@byteLength_1945": { + "entryPoint": 4790, + "id": 1945, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@destinationContract_8147": { + "entryPoint": null, + "id": 8147, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@eip712Domain_4339": { + "entryPoint": 1729, + "id": 4339, + "parameterSlots": 0, + "returnSlots": 7 + }, + "@execute_8402": { + "entryPoint": 542, + "id": 8402, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@forceApprove_626": { + "entryPoint": 2933, + "id": 626, + "parameterSlots": 3, + "returnSlots": 0 + }, + "@getUint256Slot_2112": { + "entryPoint": null, + "id": 2112, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@isExecutionCompleted_8602": { + "entryPoint": 1931, + "id": 8602, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@owner_67": { + "entryPoint": null, + "id": 67, + "parameterSlots": 0, + "returnSlots": 1 + }, + "@recover_4059": { + "entryPoint": 2523, + "id": 4059, + "parameterSlots": 4, + "returnSlots": 1 + }, + "@renounceOwnership_98": { + "entryPoint": 1710, + "id": 98, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@safeTransferFrom_456": { + "entryPoint": 3922, + "id": 456, + "parameterSlots": 4, + "returnSlots": 0 + }, + "@safeTransfer_425": { + "entryPoint": 3411, + "id": 425, + "parameterSlots": 3, + "returnSlots": 0 + }, + "@toStringWithFallback_2012": { + "entryPoint": 4080, + "id": 2012, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@toString_1913": { + "entryPoint": 4729, + "id": 1913, + "parameterSlots": 1, + "returnSlots": 1 + }, + "@toTypedDataHash_4451": { + "entryPoint": null, + "id": 4451, + "parameterSlots": 2, + "returnSlots": 1 + }, + "@transferOwnership_126": { + "entryPoint": 2215, + "id": 126, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@tryRecover_4023": { + "entryPoint": 3534, + "id": 4023, + "parameterSlots": 4, + "returnSlots": 3 + }, + "@usedPayloadNonces_8153": { + "entryPoint": null, + "id": 8153, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@withdrawETH_8586": { + "entryPoint": 1976, + "id": 8586, + "parameterSlots": 1, + "returnSlots": 0 + }, + "@withdrawToken_8556": { + "entryPoint": 1795, + "id": 8556, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_decode_address": { + "entryPoint": 5088, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_decode_tuple_t_address": { + "entryPoint": 5178, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_addresst_uint256": { + "entryPoint": 5115, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "abi_decode_tuple_t_struct$_ExecuteParams_$8182_calldata_ptr": { + "entryPoint": 4829, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint256": { + "entryPoint": 5155, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint256_fromMemory": { + "entryPoint": 5309, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint8": { + "entryPoint": 5277, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_string": { + "entryPoint": 4892, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed": { + "entryPoint": 5332, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address__to_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 3, + "returnSlots": 1 + }, + "abi_encode_tuple_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__to_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 8, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__to_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed": { + "entryPoint": 4938, + "id": null, + "parameterSlots": 8, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__to_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 10, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 6, + "returnSlots": 1 + }, + "abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 5, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": { + "entryPoint": null, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "access_calldata_tail_t_bytes_calldata_ptr": { + "entryPoint": 5203, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "extract_byte_array_length": { + "entryPoint": 5374, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "panic_error_0x21": { + "entryPoint": 5354, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "panic_error_0x41": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nativeSrc": "0:11637:23", + "nodeType": "YulBlock", + "src": "0:11637:23", + "statements": [ + { + "nativeSrc": "6:3:23", + "nodeType": "YulBlock", + "src": "6:3:23", + "statements": [] + }, + { + "body": { + "nativeSrc": "117:290:23", + "nodeType": "YulBlock", + "src": "117:290:23", + "statements": [ + { + "body": { + "nativeSrc": "163:16:23", + "nodeType": "YulBlock", + "src": "163:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "172:1:23", + "nodeType": "YulLiteral", + "src": "172:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "175:1:23", + "nodeType": "YulLiteral", + "src": "175:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "165:6:23", + "nodeType": "YulIdentifier", + "src": "165:6:23" + }, + "nativeSrc": "165:12:23", + "nodeType": "YulFunctionCall", + "src": "165:12:23" + }, + "nativeSrc": "165:12:23", + "nodeType": "YulExpressionStatement", + "src": "165:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "138:7:23", + "nodeType": "YulIdentifier", + "src": "138:7:23" + }, + { + "name": "headStart", + "nativeSrc": "147:9:23", + "nodeType": "YulIdentifier", + "src": "147:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "134:3:23", + "nodeType": "YulIdentifier", + "src": "134:3:23" + }, + "nativeSrc": "134:23:23", + "nodeType": "YulFunctionCall", + "src": "134:23:23" + }, + { + "kind": "number", + "nativeSrc": "159:2:23", + "nodeType": "YulLiteral", + "src": "159:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "130:3:23", + "nodeType": "YulIdentifier", + "src": "130:3:23" + }, + "nativeSrc": "130:32:23", + "nodeType": "YulFunctionCall", + "src": "130:32:23" + }, + "nativeSrc": "127:52:23", + "nodeType": "YulIf", + "src": "127:52:23" + }, + { + "nativeSrc": "188:37:23", + "nodeType": "YulVariableDeclaration", + "src": "188:37:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "215:9:23", + "nodeType": "YulIdentifier", + "src": "215:9:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "202:12:23", + "nodeType": "YulIdentifier", + "src": "202:12:23" + }, + "nativeSrc": "202:23:23", + "nodeType": "YulFunctionCall", + "src": "202:23:23" + }, + "variables": [ + { + "name": "offset", + "nativeSrc": "192:6:23", + "nodeType": "YulTypedName", + "src": "192:6:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "268:16:23", + "nodeType": "YulBlock", + "src": "268:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "277:1:23", + "nodeType": "YulLiteral", + "src": "277:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "280:1:23", + "nodeType": "YulLiteral", + "src": "280:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "270:6:23", + "nodeType": "YulIdentifier", + "src": "270:6:23" + }, + "nativeSrc": "270:12:23", + "nodeType": "YulFunctionCall", + "src": "270:12:23" + }, + "nativeSrc": "270:12:23", + "nodeType": "YulExpressionStatement", + "src": "270:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "240:6:23", + "nodeType": "YulIdentifier", + "src": "240:6:23" + }, + { + "kind": "number", + "nativeSrc": "248:18:23", + "nodeType": "YulLiteral", + "src": "248:18:23", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "237:2:23", + "nodeType": "YulIdentifier", + "src": "237:2:23" + }, + "nativeSrc": "237:30:23", + "nodeType": "YulFunctionCall", + "src": "237:30:23" + }, + "nativeSrc": "234:50:23", + "nodeType": "YulIf", + "src": "234:50:23" + }, + { + "nativeSrc": "293:32:23", + "nodeType": "YulVariableDeclaration", + "src": "293:32:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "307:9:23", + "nodeType": "YulIdentifier", + "src": "307:9:23" + }, + { + "name": "offset", + "nativeSrc": "318:6:23", + "nodeType": "YulIdentifier", + "src": "318:6:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "303:3:23", + "nodeType": "YulIdentifier", + "src": "303:3:23" + }, + "nativeSrc": "303:22:23", + "nodeType": "YulFunctionCall", + "src": "303:22:23" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "297:2:23", + "nodeType": "YulTypedName", + "src": "297:2:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "364:16:23", + "nodeType": "YulBlock", + "src": "364:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "373:1:23", + "nodeType": "YulLiteral", + "src": "373:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "376:1:23", + "nodeType": "YulLiteral", + "src": "376:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "366:6:23", + "nodeType": "YulIdentifier", + "src": "366:6:23" + }, + "nativeSrc": "366:12:23", + "nodeType": "YulFunctionCall", + "src": "366:12:23" + }, + "nativeSrc": "366:12:23", + "nodeType": "YulExpressionStatement", + "src": "366:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "345:7:23", + "nodeType": "YulIdentifier", + "src": "345:7:23" + }, + { + "name": "_1", + "nativeSrc": "354:2:23", + "nodeType": "YulIdentifier", + "src": "354:2:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "341:3:23", + "nodeType": "YulIdentifier", + "src": "341:3:23" + }, + "nativeSrc": "341:16:23", + "nodeType": "YulFunctionCall", + "src": "341:16:23" + }, + { + "kind": "number", + "nativeSrc": "359:3:23", + "nodeType": "YulLiteral", + "src": "359:3:23", + "type": "", + "value": "448" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "337:3:23", + "nodeType": "YulIdentifier", + "src": "337:3:23" + }, + "nativeSrc": "337:26:23", + "nodeType": "YulFunctionCall", + "src": "337:26:23" + }, + "nativeSrc": "334:46:23", + "nodeType": "YulIf", + "src": "334:46:23" + }, + { + "nativeSrc": "389:12:23", + "nodeType": "YulAssignment", + "src": "389:12:23", + "value": { + "name": "_1", + "nativeSrc": "399:2:23", + "nodeType": "YulIdentifier", + "src": "399:2:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "389:6:23", + "nodeType": "YulIdentifier", + "src": "389:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_struct$_ExecuteParams_$8182_calldata_ptr", + "nativeSrc": "14:393:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "83:9:23", + "nodeType": "YulTypedName", + "src": "83:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "94:7:23", + "nodeType": "YulTypedName", + "src": "94:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "106:6:23", + "nodeType": "YulTypedName", + "src": "106:6:23", + "type": "" + } + ], + "src": "14:393:23" + }, + { + "body": { + "nativeSrc": "513:102:23", + "nodeType": "YulBlock", + "src": "513:102:23", + "statements": [ + { + "nativeSrc": "523:26:23", + "nodeType": "YulAssignment", + "src": "523:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "535:9:23", + "nodeType": "YulIdentifier", + "src": "535:9:23" + }, + { + "kind": "number", + "nativeSrc": "546:2:23", + "nodeType": "YulLiteral", + "src": "546:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "531:3:23", + "nodeType": "YulIdentifier", + "src": "531:3:23" + }, + "nativeSrc": "531:18:23", + "nodeType": "YulFunctionCall", + "src": "531:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "523:4:23", + "nodeType": "YulIdentifier", + "src": "523:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "565:9:23", + "nodeType": "YulIdentifier", + "src": "565:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "580:6:23", + "nodeType": "YulIdentifier", + "src": "580:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "596:3:23", + "nodeType": "YulLiteral", + "src": "596:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "601:1:23", + "nodeType": "YulLiteral", + "src": "601:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "592:3:23", + "nodeType": "YulIdentifier", + "src": "592:3:23" + }, + "nativeSrc": "592:11:23", + "nodeType": "YulFunctionCall", + "src": "592:11:23" + }, + { + "kind": "number", + "nativeSrc": "605:1:23", + "nodeType": "YulLiteral", + "src": "605:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "588:3:23", + "nodeType": "YulIdentifier", + "src": "588:3:23" + }, + "nativeSrc": "588:19:23", + "nodeType": "YulFunctionCall", + "src": "588:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "576:3:23", + "nodeType": "YulIdentifier", + "src": "576:3:23" + }, + "nativeSrc": "576:32:23", + "nodeType": "YulFunctionCall", + "src": "576:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "558:6:23", + "nodeType": "YulIdentifier", + "src": "558:6:23" + }, + "nativeSrc": "558:51:23", + "nodeType": "YulFunctionCall", + "src": "558:51:23" + }, + "nativeSrc": "558:51:23", + "nodeType": "YulExpressionStatement", + "src": "558:51:23" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nativeSrc": "412:203:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "482:9:23", + "nodeType": "YulTypedName", + "src": "482:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "493:6:23", + "nodeType": "YulTypedName", + "src": "493:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "504:4:23", + "nodeType": "YulTypedName", + "src": "504:4:23", + "type": "" + } + ], + "src": "412:203:23" + }, + { + "body": { + "nativeSrc": "670:239:23", + "nodeType": "YulBlock", + "src": "670:239:23", + "statements": [ + { + "nativeSrc": "680:26:23", + "nodeType": "YulVariableDeclaration", + "src": "680:26:23", + "value": { + "arguments": [ + { + "name": "value", + "nativeSrc": "700:5:23", + "nodeType": "YulIdentifier", + "src": "700:5:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "694:5:23", + "nodeType": "YulIdentifier", + "src": "694:5:23" + }, + "nativeSrc": "694:12:23", + "nodeType": "YulFunctionCall", + "src": "694:12:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "684:6:23", + "nodeType": "YulTypedName", + "src": "684:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "722:3:23", + "nodeType": "YulIdentifier", + "src": "722:3:23" + }, + { + "name": "length", + "nativeSrc": "727:6:23", + "nodeType": "YulIdentifier", + "src": "727:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "715:6:23", + "nodeType": "YulIdentifier", + "src": "715:6:23" + }, + "nativeSrc": "715:19:23", + "nodeType": "YulFunctionCall", + "src": "715:19:23" + }, + "nativeSrc": "715:19:23", + "nodeType": "YulExpressionStatement", + "src": "715:19:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "753:3:23", + "nodeType": "YulIdentifier", + "src": "753:3:23" + }, + { + "kind": "number", + "nativeSrc": "758:4:23", + "nodeType": "YulLiteral", + "src": "758:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "749:3:23", + "nodeType": "YulIdentifier", + "src": "749:3:23" + }, + "nativeSrc": "749:14:23", + "nodeType": "YulFunctionCall", + "src": "749:14:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "769:5:23", + "nodeType": "YulIdentifier", + "src": "769:5:23" + }, + { + "kind": "number", + "nativeSrc": "776:4:23", + "nodeType": "YulLiteral", + "src": "776:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "765:3:23", + "nodeType": "YulIdentifier", + "src": "765:3:23" + }, + "nativeSrc": "765:16:23", + "nodeType": "YulFunctionCall", + "src": "765:16:23" + }, + { + "name": "length", + "nativeSrc": "783:6:23", + "nodeType": "YulIdentifier", + "src": "783:6:23" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "743:5:23", + "nodeType": "YulIdentifier", + "src": "743:5:23" + }, + "nativeSrc": "743:47:23", + "nodeType": "YulFunctionCall", + "src": "743:47:23" + }, + "nativeSrc": "743:47:23", + "nodeType": "YulExpressionStatement", + "src": "743:47:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "814:3:23", + "nodeType": "YulIdentifier", + "src": "814:3:23" + }, + { + "name": "length", + "nativeSrc": "819:6:23", + "nodeType": "YulIdentifier", + "src": "819:6:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "810:3:23", + "nodeType": "YulIdentifier", + "src": "810:3:23" + }, + "nativeSrc": "810:16:23", + "nodeType": "YulFunctionCall", + "src": "810:16:23" + }, + { + "kind": "number", + "nativeSrc": "828:4:23", + "nodeType": "YulLiteral", + "src": "828:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "806:3:23", + "nodeType": "YulIdentifier", + "src": "806:3:23" + }, + "nativeSrc": "806:27:23", + "nodeType": "YulFunctionCall", + "src": "806:27:23" + }, + { + "kind": "number", + "nativeSrc": "835:1:23", + "nodeType": "YulLiteral", + "src": "835:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "799:6:23", + "nodeType": "YulIdentifier", + "src": "799:6:23" + }, + "nativeSrc": "799:38:23", + "nodeType": "YulFunctionCall", + "src": "799:38:23" + }, + "nativeSrc": "799:38:23", + "nodeType": "YulExpressionStatement", + "src": "799:38:23" + }, + { + "nativeSrc": "846:57:23", + "nodeType": "YulAssignment", + "src": "846:57:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nativeSrc": "861:3:23", + "nodeType": "YulIdentifier", + "src": "861:3:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nativeSrc": "874:6:23", + "nodeType": "YulIdentifier", + "src": "874:6:23" + }, + { + "kind": "number", + "nativeSrc": "882:2:23", + "nodeType": "YulLiteral", + "src": "882:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "870:3:23", + "nodeType": "YulIdentifier", + "src": "870:3:23" + }, + "nativeSrc": "870:15:23", + "nodeType": "YulFunctionCall", + "src": "870:15:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "891:2:23", + "nodeType": "YulLiteral", + "src": "891:2:23", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "887:3:23", + "nodeType": "YulIdentifier", + "src": "887:3:23" + }, + "nativeSrc": "887:7:23", + "nodeType": "YulFunctionCall", + "src": "887:7:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "866:3:23", + "nodeType": "YulIdentifier", + "src": "866:3:23" + }, + "nativeSrc": "866:29:23", + "nodeType": "YulFunctionCall", + "src": "866:29:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "857:3:23", + "nodeType": "YulIdentifier", + "src": "857:3:23" + }, + "nativeSrc": "857:39:23", + "nodeType": "YulFunctionCall", + "src": "857:39:23" + }, + { + "kind": "number", + "nativeSrc": "898:4:23", + "nodeType": "YulLiteral", + "src": "898:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "853:3:23", + "nodeType": "YulIdentifier", + "src": "853:3:23" + }, + "nativeSrc": "853:50:23", + "nodeType": "YulFunctionCall", + "src": "853:50:23" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "846:3:23", + "nodeType": "YulIdentifier", + "src": "846:3:23" + } + ] + } + ] + }, + "name": "abi_encode_string", + "nativeSrc": "620:289:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nativeSrc": "647:5:23", + "nodeType": "YulTypedName", + "src": "647:5:23", + "type": "" + }, + { + "name": "pos", + "nativeSrc": "654:3:23", + "nodeType": "YulTypedName", + "src": "654:3:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "662:3:23", + "nodeType": "YulTypedName", + "src": "662:3:23", + "type": "" + } + ], + "src": "620:289:23" + }, + { + "body": { + "nativeSrc": "1271:881:23", + "nodeType": "YulBlock", + "src": "1271:881:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1288:9:23", + "nodeType": "YulIdentifier", + "src": "1288:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "1303:6:23", + "nodeType": "YulIdentifier", + "src": "1303:6:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1315:3:23", + "nodeType": "YulLiteral", + "src": "1315:3:23", + "type": "", + "value": "248" + }, + { + "kind": "number", + "nativeSrc": "1320:3:23", + "nodeType": "YulLiteral", + "src": "1320:3:23", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1311:3:23", + "nodeType": "YulIdentifier", + "src": "1311:3:23" + }, + "nativeSrc": "1311:13:23", + "nodeType": "YulFunctionCall", + "src": "1311:13:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1299:3:23", + "nodeType": "YulIdentifier", + "src": "1299:3:23" + }, + "nativeSrc": "1299:26:23", + "nodeType": "YulFunctionCall", + "src": "1299:26:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1281:6:23", + "nodeType": "YulIdentifier", + "src": "1281:6:23" + }, + "nativeSrc": "1281:45:23", + "nodeType": "YulFunctionCall", + "src": "1281:45:23" + }, + "nativeSrc": "1281:45:23", + "nodeType": "YulExpressionStatement", + "src": "1281:45:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1346:9:23", + "nodeType": "YulIdentifier", + "src": "1346:9:23" + }, + { + "kind": "number", + "nativeSrc": "1357:2:23", + "nodeType": "YulLiteral", + "src": "1357:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1342:3:23", + "nodeType": "YulIdentifier", + "src": "1342:3:23" + }, + "nativeSrc": "1342:18:23", + "nodeType": "YulFunctionCall", + "src": "1342:18:23" + }, + { + "kind": "number", + "nativeSrc": "1362:3:23", + "nodeType": "YulLiteral", + "src": "1362:3:23", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1335:6:23", + "nodeType": "YulIdentifier", + "src": "1335:6:23" + }, + "nativeSrc": "1335:31:23", + "nodeType": "YulFunctionCall", + "src": "1335:31:23" + }, + "nativeSrc": "1335:31:23", + "nodeType": "YulExpressionStatement", + "src": "1335:31:23" + }, + { + "nativeSrc": "1375:60:23", + "nodeType": "YulVariableDeclaration", + "src": "1375:60:23", + "value": { + "arguments": [ + { + "name": "value1", + "nativeSrc": "1407:6:23", + "nodeType": "YulIdentifier", + "src": "1407:6:23" + }, + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1419:9:23", + "nodeType": "YulIdentifier", + "src": "1419:9:23" + }, + { + "kind": "number", + "nativeSrc": "1430:3:23", + "nodeType": "YulLiteral", + "src": "1430:3:23", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1415:3:23", + "nodeType": "YulIdentifier", + "src": "1415:3:23" + }, + "nativeSrc": "1415:19:23", + "nodeType": "YulFunctionCall", + "src": "1415:19:23" + } + ], + "functionName": { + "name": "abi_encode_string", + "nativeSrc": "1389:17:23", + "nodeType": "YulIdentifier", + "src": "1389:17:23" + }, + "nativeSrc": "1389:46:23", + "nodeType": "YulFunctionCall", + "src": "1389:46:23" + }, + "variables": [ + { + "name": "tail_1", + "nativeSrc": "1379:6:23", + "nodeType": "YulTypedName", + "src": "1379:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1455:9:23", + "nodeType": "YulIdentifier", + "src": "1455:9:23" + }, + { + "kind": "number", + "nativeSrc": "1466:2:23", + "nodeType": "YulLiteral", + "src": "1466:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1451:3:23", + "nodeType": "YulIdentifier", + "src": "1451:3:23" + }, + "nativeSrc": "1451:18:23", + "nodeType": "YulFunctionCall", + "src": "1451:18:23" + }, + { + "arguments": [ + { + "name": "tail_1", + "nativeSrc": "1475:6:23", + "nodeType": "YulIdentifier", + "src": "1475:6:23" + }, + { + "name": "headStart", + "nativeSrc": "1483:9:23", + "nodeType": "YulIdentifier", + "src": "1483:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1471:3:23", + "nodeType": "YulIdentifier", + "src": "1471:3:23" + }, + "nativeSrc": "1471:22:23", + "nodeType": "YulFunctionCall", + "src": "1471:22:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1444:6:23", + "nodeType": "YulIdentifier", + "src": "1444:6:23" + }, + "nativeSrc": "1444:50:23", + "nodeType": "YulFunctionCall", + "src": "1444:50:23" + }, + "nativeSrc": "1444:50:23", + "nodeType": "YulExpressionStatement", + "src": "1444:50:23" + }, + { + "nativeSrc": "1503:47:23", + "nodeType": "YulVariableDeclaration", + "src": "1503:47:23", + "value": { + "arguments": [ + { + "name": "value2", + "nativeSrc": "1535:6:23", + "nodeType": "YulIdentifier", + "src": "1535:6:23" + }, + { + "name": "tail_1", + "nativeSrc": "1543:6:23", + "nodeType": "YulIdentifier", + "src": "1543:6:23" + } + ], + "functionName": { + "name": "abi_encode_string", + "nativeSrc": "1517:17:23", + "nodeType": "YulIdentifier", + "src": "1517:17:23" + }, + "nativeSrc": "1517:33:23", + "nodeType": "YulFunctionCall", + "src": "1517:33:23" + }, + "variables": [ + { + "name": "tail_2", + "nativeSrc": "1507:6:23", + "nodeType": "YulTypedName", + "src": "1507:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1570:9:23", + "nodeType": "YulIdentifier", + "src": "1570:9:23" + }, + { + "kind": "number", + "nativeSrc": "1581:2:23", + "nodeType": "YulLiteral", + "src": "1581:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1566:3:23", + "nodeType": "YulIdentifier", + "src": "1566:3:23" + }, + "nativeSrc": "1566:18:23", + "nodeType": "YulFunctionCall", + "src": "1566:18:23" + }, + { + "name": "value3", + "nativeSrc": "1586:6:23", + "nodeType": "YulIdentifier", + "src": "1586:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1559:6:23", + "nodeType": "YulIdentifier", + "src": "1559:6:23" + }, + "nativeSrc": "1559:34:23", + "nodeType": "YulFunctionCall", + "src": "1559:34:23" + }, + "nativeSrc": "1559:34:23", + "nodeType": "YulExpressionStatement", + "src": "1559:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1613:9:23", + "nodeType": "YulIdentifier", + "src": "1613:9:23" + }, + { + "kind": "number", + "nativeSrc": "1624:3:23", + "nodeType": "YulLiteral", + "src": "1624:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1609:3:23", + "nodeType": "YulIdentifier", + "src": "1609:3:23" + }, + "nativeSrc": "1609:19:23", + "nodeType": "YulFunctionCall", + "src": "1609:19:23" + }, + { + "arguments": [ + { + "name": "value4", + "nativeSrc": "1634:6:23", + "nodeType": "YulIdentifier", + "src": "1634:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "1650:3:23", + "nodeType": "YulLiteral", + "src": "1650:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "1655:1:23", + "nodeType": "YulLiteral", + "src": "1655:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "1646:3:23", + "nodeType": "YulIdentifier", + "src": "1646:3:23" + }, + "nativeSrc": "1646:11:23", + "nodeType": "YulFunctionCall", + "src": "1646:11:23" + }, + { + "kind": "number", + "nativeSrc": "1659:1:23", + "nodeType": "YulLiteral", + "src": "1659:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1642:3:23", + "nodeType": "YulIdentifier", + "src": "1642:3:23" + }, + "nativeSrc": "1642:19:23", + "nodeType": "YulFunctionCall", + "src": "1642:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "1630:3:23", + "nodeType": "YulIdentifier", + "src": "1630:3:23" + }, + "nativeSrc": "1630:32:23", + "nodeType": "YulFunctionCall", + "src": "1630:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1602:6:23", + "nodeType": "YulIdentifier", + "src": "1602:6:23" + }, + "nativeSrc": "1602:61:23", + "nodeType": "YulFunctionCall", + "src": "1602:61:23" + }, + "nativeSrc": "1602:61:23", + "nodeType": "YulExpressionStatement", + "src": "1602:61:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1683:9:23", + "nodeType": "YulIdentifier", + "src": "1683:9:23" + }, + { + "kind": "number", + "nativeSrc": "1694:3:23", + "nodeType": "YulLiteral", + "src": "1694:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1679:3:23", + "nodeType": "YulIdentifier", + "src": "1679:3:23" + }, + "nativeSrc": "1679:19:23", + "nodeType": "YulFunctionCall", + "src": "1679:19:23" + }, + { + "name": "value5", + "nativeSrc": "1700:6:23", + "nodeType": "YulIdentifier", + "src": "1700:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1672:6:23", + "nodeType": "YulIdentifier", + "src": "1672:6:23" + }, + "nativeSrc": "1672:35:23", + "nodeType": "YulFunctionCall", + "src": "1672:35:23" + }, + "nativeSrc": "1672:35:23", + "nodeType": "YulExpressionStatement", + "src": "1672:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "1727:9:23", + "nodeType": "YulIdentifier", + "src": "1727:9:23" + }, + { + "kind": "number", + "nativeSrc": "1738:3:23", + "nodeType": "YulLiteral", + "src": "1738:3:23", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1723:3:23", + "nodeType": "YulIdentifier", + "src": "1723:3:23" + }, + "nativeSrc": "1723:19:23", + "nodeType": "YulFunctionCall", + "src": "1723:19:23" + }, + { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "1748:6:23", + "nodeType": "YulIdentifier", + "src": "1748:6:23" + }, + { + "name": "headStart", + "nativeSrc": "1756:9:23", + "nodeType": "YulIdentifier", + "src": "1756:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "1744:3:23", + "nodeType": "YulIdentifier", + "src": "1744:3:23" + }, + "nativeSrc": "1744:22:23", + "nodeType": "YulFunctionCall", + "src": "1744:22:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1716:6:23", + "nodeType": "YulIdentifier", + "src": "1716:6:23" + }, + "nativeSrc": "1716:51:23", + "nodeType": "YulFunctionCall", + "src": "1716:51:23" + }, + "nativeSrc": "1716:51:23", + "nodeType": "YulExpressionStatement", + "src": "1716:51:23" + }, + { + "nativeSrc": "1776:17:23", + "nodeType": "YulVariableDeclaration", + "src": "1776:17:23", + "value": { + "name": "tail_2", + "nativeSrc": "1787:6:23", + "nodeType": "YulIdentifier", + "src": "1787:6:23" + }, + "variables": [ + { + "name": "pos", + "nativeSrc": "1780:3:23", + "nodeType": "YulTypedName", + "src": "1780:3:23", + "type": "" + } + ] + }, + { + "nativeSrc": "1802:27:23", + "nodeType": "YulVariableDeclaration", + "src": "1802:27:23", + "value": { + "arguments": [ + { + "name": "value6", + "nativeSrc": "1822:6:23", + "nodeType": "YulIdentifier", + "src": "1822:6:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "1816:5:23", + "nodeType": "YulIdentifier", + "src": "1816:5:23" + }, + "nativeSrc": "1816:13:23", + "nodeType": "YulFunctionCall", + "src": "1816:13:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "1806:6:23", + "nodeType": "YulTypedName", + "src": "1806:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "1845:6:23", + "nodeType": "YulIdentifier", + "src": "1845:6:23" + }, + { + "name": "length", + "nativeSrc": "1853:6:23", + "nodeType": "YulIdentifier", + "src": "1853:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "1838:6:23", + "nodeType": "YulIdentifier", + "src": "1838:6:23" + }, + "nativeSrc": "1838:22:23", + "nodeType": "YulFunctionCall", + "src": "1838:22:23" + }, + "nativeSrc": "1838:22:23", + "nodeType": "YulExpressionStatement", + "src": "1838:22:23" + }, + { + "nativeSrc": "1869:22:23", + "nodeType": "YulAssignment", + "src": "1869:22:23", + "value": { + "arguments": [ + { + "name": "tail_2", + "nativeSrc": "1880:6:23", + "nodeType": "YulIdentifier", + "src": "1880:6:23" + }, + { + "kind": "number", + "nativeSrc": "1888:2:23", + "nodeType": "YulLiteral", + "src": "1888:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1876:3:23", + "nodeType": "YulIdentifier", + "src": "1876:3:23" + }, + "nativeSrc": "1876:15:23", + "nodeType": "YulFunctionCall", + "src": "1876:15:23" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "1869:3:23", + "nodeType": "YulIdentifier", + "src": "1869:3:23" + } + ] + }, + { + "nativeSrc": "1900:29:23", + "nodeType": "YulVariableDeclaration", + "src": "1900:29:23", + "value": { + "arguments": [ + { + "name": "value6", + "nativeSrc": "1918:6:23", + "nodeType": "YulIdentifier", + "src": "1918:6:23" + }, + { + "kind": "number", + "nativeSrc": "1926:2:23", + "nodeType": "YulLiteral", + "src": "1926:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1914:3:23", + "nodeType": "YulIdentifier", + "src": "1914:3:23" + }, + "nativeSrc": "1914:15:23", + "nodeType": "YulFunctionCall", + "src": "1914:15:23" + }, + "variables": [ + { + "name": "srcPtr", + "nativeSrc": "1904:6:23", + "nodeType": "YulTypedName", + "src": "1904:6:23", + "type": "" + } + ] + }, + { + "nativeSrc": "1938:10:23", + "nodeType": "YulVariableDeclaration", + "src": "1938:10:23", + "value": { + "kind": "number", + "nativeSrc": "1947:1:23", + "nodeType": "YulLiteral", + "src": "1947:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nativeSrc": "1942:1:23", + "nodeType": "YulTypedName", + "src": "1942:1:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "2006:120:23", + "nodeType": "YulBlock", + "src": "2006:120:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2027:3:23", + "nodeType": "YulIdentifier", + "src": "2027:3:23" + }, + { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "2038:6:23", + "nodeType": "YulIdentifier", + "src": "2038:6:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "2032:5:23", + "nodeType": "YulIdentifier", + "src": "2032:5:23" + }, + "nativeSrc": "2032:13:23", + "nodeType": "YulFunctionCall", + "src": "2032:13:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2020:6:23", + "nodeType": "YulIdentifier", + "src": "2020:6:23" + }, + "nativeSrc": "2020:26:23", + "nodeType": "YulFunctionCall", + "src": "2020:26:23" + }, + "nativeSrc": "2020:26:23", + "nodeType": "YulExpressionStatement", + "src": "2020:26:23" + }, + { + "nativeSrc": "2059:19:23", + "nodeType": "YulAssignment", + "src": "2059:19:23", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "2070:3:23", + "nodeType": "YulIdentifier", + "src": "2070:3:23" + }, + { + "kind": "number", + "nativeSrc": "2075:2:23", + "nodeType": "YulLiteral", + "src": "2075:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2066:3:23", + "nodeType": "YulIdentifier", + "src": "2066:3:23" + }, + "nativeSrc": "2066:12:23", + "nodeType": "YulFunctionCall", + "src": "2066:12:23" + }, + "variableNames": [ + { + "name": "pos", + "nativeSrc": "2059:3:23", + "nodeType": "YulIdentifier", + "src": "2059:3:23" + } + ] + }, + { + "nativeSrc": "2091:25:23", + "nodeType": "YulAssignment", + "src": "2091:25:23", + "value": { + "arguments": [ + { + "name": "srcPtr", + "nativeSrc": "2105:6:23", + "nodeType": "YulIdentifier", + "src": "2105:6:23" + }, + { + "kind": "number", + "nativeSrc": "2113:2:23", + "nodeType": "YulLiteral", + "src": "2113:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2101:3:23", + "nodeType": "YulIdentifier", + "src": "2101:3:23" + }, + "nativeSrc": "2101:15:23", + "nodeType": "YulFunctionCall", + "src": "2101:15:23" + }, + "variableNames": [ + { + "name": "srcPtr", + "nativeSrc": "2091:6:23", + "nodeType": "YulIdentifier", + "src": "2091:6:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nativeSrc": "1968:1:23", + "nodeType": "YulIdentifier", + "src": "1968:1:23" + }, + { + "name": "length", + "nativeSrc": "1971:6:23", + "nodeType": "YulIdentifier", + "src": "1971:6:23" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "1965:2:23", + "nodeType": "YulIdentifier", + "src": "1965:2:23" + }, + "nativeSrc": "1965:13:23", + "nodeType": "YulFunctionCall", + "src": "1965:13:23" + }, + "nativeSrc": "1957:169:23", + "nodeType": "YulForLoop", + "post": { + "nativeSrc": "1979:18:23", + "nodeType": "YulBlock", + "src": "1979:18:23", + "statements": [ + { + "nativeSrc": "1981:14:23", + "nodeType": "YulAssignment", + "src": "1981:14:23", + "value": { + "arguments": [ + { + "name": "i", + "nativeSrc": "1990:1:23", + "nodeType": "YulIdentifier", + "src": "1990:1:23" + }, + { + "kind": "number", + "nativeSrc": "1993:1:23", + "nodeType": "YulLiteral", + "src": "1993:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "1986:3:23", + "nodeType": "YulIdentifier", + "src": "1986:3:23" + }, + "nativeSrc": "1986:9:23", + "nodeType": "YulFunctionCall", + "src": "1986:9:23" + }, + "variableNames": [ + { + "name": "i", + "nativeSrc": "1981:1:23", + "nodeType": "YulIdentifier", + "src": "1981:1:23" + } + ] + } + ] + }, + "pre": { + "nativeSrc": "1961:3:23", + "nodeType": "YulBlock", + "src": "1961:3:23", + "statements": [] + }, + "src": "1957:169:23" + }, + { + "nativeSrc": "2135:11:23", + "nodeType": "YulAssignment", + "src": "2135:11:23", + "value": { + "name": "pos", + "nativeSrc": "2143:3:23", + "nodeType": "YulIdentifier", + "src": "2143:3:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2135:4:23", + "nodeType": "YulIdentifier", + "src": "2135:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__to_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed", + "nativeSrc": "914:1238:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "1192:9:23", + "nodeType": "YulTypedName", + "src": "1192:9:23", + "type": "" + }, + { + "name": "value6", + "nativeSrc": "1203:6:23", + "nodeType": "YulTypedName", + "src": "1203:6:23", + "type": "" + }, + { + "name": "value5", + "nativeSrc": "1211:6:23", + "nodeType": "YulTypedName", + "src": "1211:6:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "1219:6:23", + "nodeType": "YulTypedName", + "src": "1219:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "1227:6:23", + "nodeType": "YulTypedName", + "src": "1227:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "1235:6:23", + "nodeType": "YulTypedName", + "src": "1235:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "1243:6:23", + "nodeType": "YulTypedName", + "src": "1243:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "1251:6:23", + "nodeType": "YulTypedName", + "src": "1251:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "1262:4:23", + "nodeType": "YulTypedName", + "src": "1262:4:23", + "type": "" + } + ], + "src": "914:1238:23" + }, + { + "body": { + "nativeSrc": "2206:124:23", + "nodeType": "YulBlock", + "src": "2206:124:23", + "statements": [ + { + "nativeSrc": "2216:29:23", + "nodeType": "YulAssignment", + "src": "2216:29:23", + "value": { + "arguments": [ + { + "name": "offset", + "nativeSrc": "2238:6:23", + "nodeType": "YulIdentifier", + "src": "2238:6:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2225:12:23", + "nodeType": "YulIdentifier", + "src": "2225:12:23" + }, + "nativeSrc": "2225:20:23", + "nodeType": "YulFunctionCall", + "src": "2225:20:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "2216:5:23", + "nodeType": "YulIdentifier", + "src": "2216:5:23" + } + ] + }, + { + "body": { + "nativeSrc": "2308:16:23", + "nodeType": "YulBlock", + "src": "2308:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2317:1:23", + "nodeType": "YulLiteral", + "src": "2317:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2320:1:23", + "nodeType": "YulLiteral", + "src": "2320:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2310:6:23", + "nodeType": "YulIdentifier", + "src": "2310:6:23" + }, + "nativeSrc": "2310:12:23", + "nodeType": "YulFunctionCall", + "src": "2310:12:23" + }, + "nativeSrc": "2310:12:23", + "nodeType": "YulExpressionStatement", + "src": "2310:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2267:5:23", + "nodeType": "YulIdentifier", + "src": "2267:5:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "2278:5:23", + "nodeType": "YulIdentifier", + "src": "2278:5:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2293:3:23", + "nodeType": "YulLiteral", + "src": "2293:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "2298:1:23", + "nodeType": "YulLiteral", + "src": "2298:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "2289:3:23", + "nodeType": "YulIdentifier", + "src": "2289:3:23" + }, + "nativeSrc": "2289:11:23", + "nodeType": "YulFunctionCall", + "src": "2289:11:23" + }, + { + "kind": "number", + "nativeSrc": "2302:1:23", + "nodeType": "YulLiteral", + "src": "2302:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2285:3:23", + "nodeType": "YulIdentifier", + "src": "2285:3:23" + }, + "nativeSrc": "2285:19:23", + "nodeType": "YulFunctionCall", + "src": "2285:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "2274:3:23", + "nodeType": "YulIdentifier", + "src": "2274:3:23" + }, + "nativeSrc": "2274:31:23", + "nodeType": "YulFunctionCall", + "src": "2274:31:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "2264:2:23", + "nodeType": "YulIdentifier", + "src": "2264:2:23" + }, + "nativeSrc": "2264:42:23", + "nodeType": "YulFunctionCall", + "src": "2264:42:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2257:6:23", + "nodeType": "YulIdentifier", + "src": "2257:6:23" + }, + "nativeSrc": "2257:50:23", + "nodeType": "YulFunctionCall", + "src": "2257:50:23" + }, + "nativeSrc": "2254:70:23", + "nodeType": "YulIf", + "src": "2254:70:23" + } + ] + }, + "name": "abi_decode_address", + "nativeSrc": "2157:173:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nativeSrc": "2185:6:23", + "nodeType": "YulTypedName", + "src": "2185:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nativeSrc": "2196:5:23", + "nodeType": "YulTypedName", + "src": "2196:5:23", + "type": "" + } + ], + "src": "2157:173:23" + }, + { + "body": { + "nativeSrc": "2422:213:23", + "nodeType": "YulBlock", + "src": "2422:213:23", + "statements": [ + { + "body": { + "nativeSrc": "2468:16:23", + "nodeType": "YulBlock", + "src": "2468:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2477:1:23", + "nodeType": "YulLiteral", + "src": "2477:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2480:1:23", + "nodeType": "YulLiteral", + "src": "2480:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2470:6:23", + "nodeType": "YulIdentifier", + "src": "2470:6:23" + }, + "nativeSrc": "2470:12:23", + "nodeType": "YulFunctionCall", + "src": "2470:12:23" + }, + "nativeSrc": "2470:12:23", + "nodeType": "YulExpressionStatement", + "src": "2470:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "2443:7:23", + "nodeType": "YulIdentifier", + "src": "2443:7:23" + }, + { + "name": "headStart", + "nativeSrc": "2452:9:23", + "nodeType": "YulIdentifier", + "src": "2452:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2439:3:23", + "nodeType": "YulIdentifier", + "src": "2439:3:23" + }, + "nativeSrc": "2439:23:23", + "nodeType": "YulFunctionCall", + "src": "2439:23:23" + }, + { + "kind": "number", + "nativeSrc": "2464:2:23", + "nodeType": "YulLiteral", + "src": "2464:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "2435:3:23", + "nodeType": "YulIdentifier", + "src": "2435:3:23" + }, + "nativeSrc": "2435:32:23", + "nodeType": "YulFunctionCall", + "src": "2435:32:23" + }, + "nativeSrc": "2432:52:23", + "nodeType": "YulIf", + "src": "2432:52:23" + }, + { + "nativeSrc": "2493:39:23", + "nodeType": "YulAssignment", + "src": "2493:39:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2522:9:23", + "nodeType": "YulIdentifier", + "src": "2522:9:23" + } + ], + "functionName": { + "name": "abi_decode_address", + "nativeSrc": "2503:18:23", + "nodeType": "YulIdentifier", + "src": "2503:18:23" + }, + "nativeSrc": "2503:29:23", + "nodeType": "YulFunctionCall", + "src": "2503:29:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "2493:6:23", + "nodeType": "YulIdentifier", + "src": "2493:6:23" + } + ] + }, + { + "nativeSrc": "2541:14:23", + "nodeType": "YulVariableDeclaration", + "src": "2541:14:23", + "value": { + "kind": "number", + "nativeSrc": "2554:1:23", + "nodeType": "YulLiteral", + "src": "2554:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "2545:5:23", + "nodeType": "YulTypedName", + "src": "2545:5:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2564:41:23", + "nodeType": "YulAssignment", + "src": "2564:41:23", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2590:9:23", + "nodeType": "YulIdentifier", + "src": "2590:9:23" + }, + { + "kind": "number", + "nativeSrc": "2601:2:23", + "nodeType": "YulLiteral", + "src": "2601:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2586:3:23", + "nodeType": "YulIdentifier", + "src": "2586:3:23" + }, + "nativeSrc": "2586:18:23", + "nodeType": "YulFunctionCall", + "src": "2586:18:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "2573:12:23", + "nodeType": "YulIdentifier", + "src": "2573:12:23" + }, + "nativeSrc": "2573:32:23", + "nodeType": "YulFunctionCall", + "src": "2573:32:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "2564:5:23", + "nodeType": "YulIdentifier", + "src": "2564:5:23" + } + ] + }, + { + "nativeSrc": "2614:15:23", + "nodeType": "YulAssignment", + "src": "2614:15:23", + "value": { + "name": "value", + "nativeSrc": "2624:5:23", + "nodeType": "YulIdentifier", + "src": "2624:5:23" + }, + "variableNames": [ + { + "name": "value1", + "nativeSrc": "2614:6:23", + "nodeType": "YulIdentifier", + "src": "2614:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_addresst_uint256", + "nativeSrc": "2335:300:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2380:9:23", + "nodeType": "YulTypedName", + "src": "2380:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "2391:7:23", + "nodeType": "YulTypedName", + "src": "2391:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "2403:6:23", + "nodeType": "YulTypedName", + "src": "2403:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "2411:6:23", + "nodeType": "YulTypedName", + "src": "2411:6:23", + "type": "" + } + ], + "src": "2335:300:23" + }, + { + "body": { + "nativeSrc": "2735:92:23", + "nodeType": "YulBlock", + "src": "2735:92:23", + "statements": [ + { + "nativeSrc": "2745:26:23", + "nodeType": "YulAssignment", + "src": "2745:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2757:9:23", + "nodeType": "YulIdentifier", + "src": "2757:9:23" + }, + { + "kind": "number", + "nativeSrc": "2768:2:23", + "nodeType": "YulLiteral", + "src": "2768:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "2753:3:23", + "nodeType": "YulIdentifier", + "src": "2753:3:23" + }, + "nativeSrc": "2753:18:23", + "nodeType": "YulFunctionCall", + "src": "2753:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "2745:4:23", + "nodeType": "YulIdentifier", + "src": "2745:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "2787:9:23", + "nodeType": "YulIdentifier", + "src": "2787:9:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "2812:6:23", + "nodeType": "YulIdentifier", + "src": "2812:6:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2805:6:23", + "nodeType": "YulIdentifier", + "src": "2805:6:23" + }, + "nativeSrc": "2805:14:23", + "nodeType": "YulFunctionCall", + "src": "2805:14:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "2798:6:23", + "nodeType": "YulIdentifier", + "src": "2798:6:23" + }, + "nativeSrc": "2798:22:23", + "nodeType": "YulFunctionCall", + "src": "2798:22:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "2780:6:23", + "nodeType": "YulIdentifier", + "src": "2780:6:23" + }, + "nativeSrc": "2780:41:23", + "nodeType": "YulFunctionCall", + "src": "2780:41:23" + }, + "nativeSrc": "2780:41:23", + "nodeType": "YulExpressionStatement", + "src": "2780:41:23" + } + ] + }, + "name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed", + "nativeSrc": "2640:187:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2704:9:23", + "nodeType": "YulTypedName", + "src": "2704:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "2715:6:23", + "nodeType": "YulTypedName", + "src": "2715:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "2726:4:23", + "nodeType": "YulTypedName", + "src": "2726:4:23", + "type": "" + } + ], + "src": "2640:187:23" + }, + { + "body": { + "nativeSrc": "2902:156:23", + "nodeType": "YulBlock", + "src": "2902:156:23", + "statements": [ + { + "body": { + "nativeSrc": "2948:16:23", + "nodeType": "YulBlock", + "src": "2948:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "2957:1:23", + "nodeType": "YulLiteral", + "src": "2957:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "2960:1:23", + "nodeType": "YulLiteral", + "src": "2960:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "2950:6:23", + "nodeType": "YulIdentifier", + "src": "2950:6:23" + }, + "nativeSrc": "2950:12:23", + "nodeType": "YulFunctionCall", + "src": "2950:12:23" + }, + "nativeSrc": "2950:12:23", + "nodeType": "YulExpressionStatement", + "src": "2950:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "2923:7:23", + "nodeType": "YulIdentifier", + "src": "2923:7:23" + }, + { + "name": "headStart", + "nativeSrc": "2932:9:23", + "nodeType": "YulIdentifier", + "src": "2932:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "2919:3:23", + "nodeType": "YulIdentifier", + "src": "2919:3:23" + }, + "nativeSrc": "2919:23:23", + "nodeType": "YulFunctionCall", + "src": "2919:23:23" + }, + { + "kind": "number", + "nativeSrc": "2944:2:23", + "nodeType": "YulLiteral", + "src": "2944:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "2915:3:23", + "nodeType": "YulIdentifier", + "src": "2915:3:23" + }, + "nativeSrc": "2915:32:23", + "nodeType": "YulFunctionCall", + "src": "2915:32:23" + }, + "nativeSrc": "2912:52:23", + "nodeType": "YulIf", + "src": "2912:52:23" + }, + { + "nativeSrc": "2973:14:23", + "nodeType": "YulVariableDeclaration", + "src": "2973:14:23", + "value": { + "kind": "number", + "nativeSrc": "2986:1:23", + "nodeType": "YulLiteral", + "src": "2986:1:23", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "2977:5:23", + "nodeType": "YulTypedName", + "src": "2977:5:23", + "type": "" + } + ] + }, + { + "nativeSrc": "2996:32:23", + "nodeType": "YulAssignment", + "src": "2996:32:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3018:9:23", + "nodeType": "YulIdentifier", + "src": "3018:9:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "3005:12:23", + "nodeType": "YulIdentifier", + "src": "3005:12:23" + }, + "nativeSrc": "3005:23:23", + "nodeType": "YulFunctionCall", + "src": "3005:23:23" + }, + "variableNames": [ + { + "name": "value", + "nativeSrc": "2996:5:23", + "nodeType": "YulIdentifier", + "src": "2996:5:23" + } + ] + }, + { + "nativeSrc": "3037:15:23", + "nodeType": "YulAssignment", + "src": "3037:15:23", + "value": { + "name": "value", + "nativeSrc": "3047:5:23", + "nodeType": "YulIdentifier", + "src": "3047:5:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "3037:6:23", + "nodeType": "YulIdentifier", + "src": "3037:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256", + "nativeSrc": "2832:226:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "2868:9:23", + "nodeType": "YulTypedName", + "src": "2868:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "2879:7:23", + "nodeType": "YulTypedName", + "src": "2879:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "2891:6:23", + "nodeType": "YulTypedName", + "src": "2891:6:23", + "type": "" + } + ], + "src": "2832:226:23" + }, + { + "body": { + "nativeSrc": "3133:116:23", + "nodeType": "YulBlock", + "src": "3133:116:23", + "statements": [ + { + "body": { + "nativeSrc": "3179:16:23", + "nodeType": "YulBlock", + "src": "3179:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "3188:1:23", + "nodeType": "YulLiteral", + "src": "3188:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "3191:1:23", + "nodeType": "YulLiteral", + "src": "3191:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "3181:6:23", + "nodeType": "YulIdentifier", + "src": "3181:6:23" + }, + "nativeSrc": "3181:12:23", + "nodeType": "YulFunctionCall", + "src": "3181:12:23" + }, + "nativeSrc": "3181:12:23", + "nodeType": "YulExpressionStatement", + "src": "3181:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "3154:7:23", + "nodeType": "YulIdentifier", + "src": "3154:7:23" + }, + { + "name": "headStart", + "nativeSrc": "3163:9:23", + "nodeType": "YulIdentifier", + "src": "3163:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "3150:3:23", + "nodeType": "YulIdentifier", + "src": "3150:3:23" + }, + "nativeSrc": "3150:23:23", + "nodeType": "YulFunctionCall", + "src": "3150:23:23" + }, + { + "kind": "number", + "nativeSrc": "3175:2:23", + "nodeType": "YulLiteral", + "src": "3175:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "3146:3:23", + "nodeType": "YulIdentifier", + "src": "3146:3:23" + }, + "nativeSrc": "3146:32:23", + "nodeType": "YulFunctionCall", + "src": "3146:32:23" + }, + "nativeSrc": "3143:52:23", + "nodeType": "YulIf", + "src": "3143:52:23" + }, + { + "nativeSrc": "3204:39:23", + "nodeType": "YulAssignment", + "src": "3204:39:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3233:9:23", + "nodeType": "YulIdentifier", + "src": "3233:9:23" + } + ], + "functionName": { + "name": "abi_decode_address", + "nativeSrc": "3214:18:23", + "nodeType": "YulIdentifier", + "src": "3214:18:23" + }, + "nativeSrc": "3214:29:23", + "nodeType": "YulFunctionCall", + "src": "3214:29:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "3204:6:23", + "nodeType": "YulIdentifier", + "src": "3204:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address", + "nativeSrc": "3063:186:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3099:9:23", + "nodeType": "YulTypedName", + "src": "3099:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "3110:7:23", + "nodeType": "YulTypedName", + "src": "3110:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "3122:6:23", + "nodeType": "YulTypedName", + "src": "3122:6:23", + "type": "" + } + ], + "src": "3063:186:23" + }, + { + "body": { + "nativeSrc": "3428:163:23", + "nodeType": "YulBlock", + "src": "3428:163:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3445:9:23", + "nodeType": "YulIdentifier", + "src": "3445:9:23" + }, + { + "kind": "number", + "nativeSrc": "3456:2:23", + "nodeType": "YulLiteral", + "src": "3456:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3438:6:23", + "nodeType": "YulIdentifier", + "src": "3438:6:23" + }, + "nativeSrc": "3438:21:23", + "nodeType": "YulFunctionCall", + "src": "3438:21:23" + }, + "nativeSrc": "3438:21:23", + "nodeType": "YulExpressionStatement", + "src": "3438:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3479:9:23", + "nodeType": "YulIdentifier", + "src": "3479:9:23" + }, + { + "kind": "number", + "nativeSrc": "3490:2:23", + "nodeType": "YulLiteral", + "src": "3490:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3475:3:23", + "nodeType": "YulIdentifier", + "src": "3475:3:23" + }, + "nativeSrc": "3475:18:23", + "nodeType": "YulFunctionCall", + "src": "3475:18:23" + }, + { + "kind": "number", + "nativeSrc": "3495:2:23", + "nodeType": "YulLiteral", + "src": "3495:2:23", + "type": "", + "value": "13" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3468:6:23", + "nodeType": "YulIdentifier", + "src": "3468:6:23" + }, + "nativeSrc": "3468:30:23", + "nodeType": "YulFunctionCall", + "src": "3468:30:23" + }, + "nativeSrc": "3468:30:23", + "nodeType": "YulExpressionStatement", + "src": "3468:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3518:9:23", + "nodeType": "YulIdentifier", + "src": "3518:9:23" + }, + { + "kind": "number", + "nativeSrc": "3529:2:23", + "nodeType": "YulLiteral", + "src": "3529:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3514:3:23", + "nodeType": "YulIdentifier", + "src": "3514:3:23" + }, + "nativeSrc": "3514:18:23", + "nodeType": "YulFunctionCall", + "src": "3514:18:23" + }, + { + "hexValue": "496e76616c6964206f776e6572", + "kind": "string", + "nativeSrc": "3534:15:23", + "nodeType": "YulLiteral", + "src": "3534:15:23", + "type": "", + "value": "Invalid owner" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3507:6:23", + "nodeType": "YulIdentifier", + "src": "3507:6:23" + }, + "nativeSrc": "3507:43:23", + "nodeType": "YulFunctionCall", + "src": "3507:43:23" + }, + "nativeSrc": "3507:43:23", + "nodeType": "YulExpressionStatement", + "src": "3507:43:23" + }, + { + "nativeSrc": "3559:26:23", + "nodeType": "YulAssignment", + "src": "3559:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3571:9:23", + "nodeType": "YulIdentifier", + "src": "3571:9:23" + }, + { + "kind": "number", + "nativeSrc": "3582:2:23", + "nodeType": "YulLiteral", + "src": "3582:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3567:3:23", + "nodeType": "YulIdentifier", + "src": "3567:3:23" + }, + "nativeSrc": "3567:18:23", + "nodeType": "YulFunctionCall", + "src": "3567:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3559:4:23", + "nodeType": "YulIdentifier", + "src": "3559:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3254:337:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3405:9:23", + "nodeType": "YulTypedName", + "src": "3405:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3419:4:23", + "nodeType": "YulTypedName", + "src": "3419:4:23", + "type": "" + } + ], + "src": "3254:337:23" + }, + { + "body": { + "nativeSrc": "3770:163:23", + "nodeType": "YulBlock", + "src": "3770:163:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3787:9:23", + "nodeType": "YulIdentifier", + "src": "3787:9:23" + }, + { + "kind": "number", + "nativeSrc": "3798:2:23", + "nodeType": "YulLiteral", + "src": "3798:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3780:6:23", + "nodeType": "YulIdentifier", + "src": "3780:6:23" + }, + "nativeSrc": "3780:21:23", + "nodeType": "YulFunctionCall", + "src": "3780:21:23" + }, + "nativeSrc": "3780:21:23", + "nodeType": "YulExpressionStatement", + "src": "3780:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3821:9:23", + "nodeType": "YulIdentifier", + "src": "3821:9:23" + }, + { + "kind": "number", + "nativeSrc": "3832:2:23", + "nodeType": "YulLiteral", + "src": "3832:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3817:3:23", + "nodeType": "YulIdentifier", + "src": "3817:3:23" + }, + "nativeSrc": "3817:18:23", + "nodeType": "YulFunctionCall", + "src": "3817:18:23" + }, + { + "kind": "number", + "nativeSrc": "3837:2:23", + "nodeType": "YulLiteral", + "src": "3837:2:23", + "type": "", + "value": "13" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3810:6:23", + "nodeType": "YulIdentifier", + "src": "3810:6:23" + }, + "nativeSrc": "3810:30:23", + "nodeType": "YulFunctionCall", + "src": "3810:30:23" + }, + "nativeSrc": "3810:30:23", + "nodeType": "YulExpressionStatement", + "src": "3810:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3860:9:23", + "nodeType": "YulIdentifier", + "src": "3860:9:23" + }, + { + "kind": "number", + "nativeSrc": "3871:2:23", + "nodeType": "YulLiteral", + "src": "3871:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3856:3:23", + "nodeType": "YulIdentifier", + "src": "3856:3:23" + }, + "nativeSrc": "3856:18:23", + "nodeType": "YulFunctionCall", + "src": "3856:18:23" + }, + { + "hexValue": "496e76616c696420746f6b656e", + "kind": "string", + "nativeSrc": "3876:15:23", + "nodeType": "YulLiteral", + "src": "3876:15:23", + "type": "", + "value": "Invalid token" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "3849:6:23", + "nodeType": "YulIdentifier", + "src": "3849:6:23" + }, + "nativeSrc": "3849:43:23", + "nodeType": "YulFunctionCall", + "src": "3849:43:23" + }, + "nativeSrc": "3849:43:23", + "nodeType": "YulExpressionStatement", + "src": "3849:43:23" + }, + { + "nativeSrc": "3901:26:23", + "nodeType": "YulAssignment", + "src": "3901:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "3913:9:23", + "nodeType": "YulIdentifier", + "src": "3913:9:23" + }, + { + "kind": "number", + "nativeSrc": "3924:2:23", + "nodeType": "YulLiteral", + "src": "3924:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "3909:3:23", + "nodeType": "YulIdentifier", + "src": "3909:3:23" + }, + "nativeSrc": "3909:18:23", + "nodeType": "YulFunctionCall", + "src": "3909:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "3901:4:23", + "nodeType": "YulIdentifier", + "src": "3901:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3596:337:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "3747:9:23", + "nodeType": "YulTypedName", + "src": "3747:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "3761:4:23", + "nodeType": "YulTypedName", + "src": "3761:4:23", + "type": "" + } + ], + "src": "3596:337:23" + }, + { + "body": { + "nativeSrc": "4112:160:23", + "nodeType": "YulBlock", + "src": "4112:160:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4129:9:23", + "nodeType": "YulIdentifier", + "src": "4129:9:23" + }, + { + "kind": "number", + "nativeSrc": "4140:2:23", + "nodeType": "YulLiteral", + "src": "4140:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4122:6:23", + "nodeType": "YulIdentifier", + "src": "4122:6:23" + }, + "nativeSrc": "4122:21:23", + "nodeType": "YulFunctionCall", + "src": "4122:21:23" + }, + "nativeSrc": "4122:21:23", + "nodeType": "YulExpressionStatement", + "src": "4122:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4163:9:23", + "nodeType": "YulIdentifier", + "src": "4163:9:23" + }, + { + "kind": "number", + "nativeSrc": "4174:2:23", + "nodeType": "YulLiteral", + "src": "4174:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4159:3:23", + "nodeType": "YulIdentifier", + "src": "4159:3:23" + }, + "nativeSrc": "4159:18:23", + "nodeType": "YulFunctionCall", + "src": "4159:18:23" + }, + { + "kind": "number", + "nativeSrc": "4179:2:23", + "nodeType": "YulLiteral", + "src": "4179:2:23", + "type": "", + "value": "10" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4152:6:23", + "nodeType": "YulIdentifier", + "src": "4152:6:23" + }, + "nativeSrc": "4152:30:23", + "nodeType": "YulFunctionCall", + "src": "4152:30:23" + }, + "nativeSrc": "4152:30:23", + "nodeType": "YulExpressionStatement", + "src": "4152:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4202:9:23", + "nodeType": "YulIdentifier", + "src": "4202:9:23" + }, + { + "kind": "number", + "nativeSrc": "4213:2:23", + "nodeType": "YulLiteral", + "src": "4213:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4198:3:23", + "nodeType": "YulIdentifier", + "src": "4198:3:23" + }, + "nativeSrc": "4198:18:23", + "nodeType": "YulFunctionCall", + "src": "4198:18:23" + }, + { + "hexValue": "4e6f6e63652075736564", + "kind": "string", + "nativeSrc": "4218:12:23", + "nodeType": "YulLiteral", + "src": "4218:12:23", + "type": "", + "value": "Nonce used" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4191:6:23", + "nodeType": "YulIdentifier", + "src": "4191:6:23" + }, + "nativeSrc": "4191:40:23", + "nodeType": "YulFunctionCall", + "src": "4191:40:23" + }, + "nativeSrc": "4191:40:23", + "nodeType": "YulExpressionStatement", + "src": "4191:40:23" + }, + { + "nativeSrc": "4240:26:23", + "nodeType": "YulAssignment", + "src": "4240:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4252:9:23", + "nodeType": "YulIdentifier", + "src": "4252:9:23" + }, + { + "kind": "number", + "nativeSrc": "4263:2:23", + "nodeType": "YulLiteral", + "src": "4263:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4248:3:23", + "nodeType": "YulIdentifier", + "src": "4248:3:23" + }, + "nativeSrc": "4248:18:23", + "nodeType": "YulFunctionCall", + "src": "4248:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4240:4:23", + "nodeType": "YulIdentifier", + "src": "4240:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "3938:334:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4089:9:23", + "nodeType": "YulTypedName", + "src": "4089:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4103:4:23", + "nodeType": "YulTypedName", + "src": "4103:4:23", + "type": "" + } + ], + "src": "3938:334:23" + }, + { + "body": { + "nativeSrc": "4451:165:23", + "nodeType": "YulBlock", + "src": "4451:165:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4468:9:23", + "nodeType": "YulIdentifier", + "src": "4468:9:23" + }, + { + "kind": "number", + "nativeSrc": "4479:2:23", + "nodeType": "YulLiteral", + "src": "4479:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4461:6:23", + "nodeType": "YulIdentifier", + "src": "4461:6:23" + }, + "nativeSrc": "4461:21:23", + "nodeType": "YulFunctionCall", + "src": "4461:21:23" + }, + "nativeSrc": "4461:21:23", + "nodeType": "YulExpressionStatement", + "src": "4461:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4502:9:23", + "nodeType": "YulIdentifier", + "src": "4502:9:23" + }, + { + "kind": "number", + "nativeSrc": "4513:2:23", + "nodeType": "YulLiteral", + "src": "4513:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4498:3:23", + "nodeType": "YulIdentifier", + "src": "4498:3:23" + }, + "nativeSrc": "4498:18:23", + "nodeType": "YulFunctionCall", + "src": "4498:18:23" + }, + { + "kind": "number", + "nativeSrc": "4518:2:23", + "nodeType": "YulLiteral", + "src": "4518:2:23", + "type": "", + "value": "15" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4491:6:23", + "nodeType": "YulIdentifier", + "src": "4491:6:23" + }, + "nativeSrc": "4491:30:23", + "nodeType": "YulFunctionCall", + "src": "4491:30:23" + }, + "nativeSrc": "4491:30:23", + "nodeType": "YulExpressionStatement", + "src": "4491:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4541:9:23", + "nodeType": "YulIdentifier", + "src": "4541:9:23" + }, + { + "kind": "number", + "nativeSrc": "4552:2:23", + "nodeType": "YulLiteral", + "src": "4552:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4537:3:23", + "nodeType": "YulIdentifier", + "src": "4537:3:23" + }, + "nativeSrc": "4537:18:23", + "nodeType": "YulFunctionCall", + "src": "4537:18:23" + }, + { + "hexValue": "5061796c6f61642065787069726564", + "kind": "string", + "nativeSrc": "4557:17:23", + "nodeType": "YulLiteral", + "src": "4557:17:23", + "type": "", + "value": "Payload expired" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "4530:6:23", + "nodeType": "YulIdentifier", + "src": "4530:6:23" + }, + "nativeSrc": "4530:45:23", + "nodeType": "YulFunctionCall", + "src": "4530:45:23" + }, + "nativeSrc": "4530:45:23", + "nodeType": "YulExpressionStatement", + "src": "4530:45:23" + }, + { + "nativeSrc": "4584:26:23", + "nodeType": "YulAssignment", + "src": "4584:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "4596:9:23", + "nodeType": "YulIdentifier", + "src": "4596:9:23" + }, + { + "kind": "number", + "nativeSrc": "4607:2:23", + "nodeType": "YulLiteral", + "src": "4607:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4592:3:23", + "nodeType": "YulIdentifier", + "src": "4592:3:23" + }, + "nativeSrc": "4592:18:23", + "nodeType": "YulFunctionCall", + "src": "4592:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "4584:4:23", + "nodeType": "YulIdentifier", + "src": "4584:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "4277:339:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "4428:9:23", + "nodeType": "YulTypedName", + "src": "4428:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "4442:4:23", + "nodeType": "YulTypedName", + "src": "4442:4:23", + "type": "" + } + ], + "src": "4277:339:23" + }, + { + "body": { + "nativeSrc": "4715:427:23", + "nodeType": "YulBlock", + "src": "4715:427:23", + "statements": [ + { + "nativeSrc": "4725:51:23", + "nodeType": "YulVariableDeclaration", + "src": "4725:51:23", + "value": { + "arguments": [ + { + "name": "ptr_to_tail", + "nativeSrc": "4764:11:23", + "nodeType": "YulIdentifier", + "src": "4764:11:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "4751:12:23", + "nodeType": "YulIdentifier", + "src": "4751:12:23" + }, + "nativeSrc": "4751:25:23", + "nodeType": "YulFunctionCall", + "src": "4751:25:23" + }, + "variables": [ + { + "name": "rel_offset_of_tail", + "nativeSrc": "4729:18:23", + "nodeType": "YulTypedName", + "src": "4729:18:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "4865:16:23", + "nodeType": "YulBlock", + "src": "4865:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4874:1:23", + "nodeType": "YulLiteral", + "src": "4874:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "4877:1:23", + "nodeType": "YulLiteral", + "src": "4877:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "4867:6:23", + "nodeType": "YulIdentifier", + "src": "4867:6:23" + }, + "nativeSrc": "4867:12:23", + "nodeType": "YulFunctionCall", + "src": "4867:12:23" + }, + "nativeSrc": "4867:12:23", + "nodeType": "YulExpressionStatement", + "src": "4867:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "rel_offset_of_tail", + "nativeSrc": "4799:18:23", + "nodeType": "YulIdentifier", + "src": "4799:18:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nativeSrc": "4827:12:23", + "nodeType": "YulIdentifier", + "src": "4827:12:23" + }, + "nativeSrc": "4827:14:23", + "nodeType": "YulFunctionCall", + "src": "4827:14:23" + }, + { + "name": "base_ref", + "nativeSrc": "4843:8:23", + "nodeType": "YulIdentifier", + "src": "4843:8:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "4823:3:23", + "nodeType": "YulIdentifier", + "src": "4823:3:23" + }, + "nativeSrc": "4823:29:23", + "nodeType": "YulFunctionCall", + "src": "4823:29:23" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "4858:2:23", + "nodeType": "YulLiteral", + "src": "4858:2:23", + "type": "", + "value": "30" + } + ], + "functionName": { + "name": "not", + "nativeSrc": "4854:3:23", + "nodeType": "YulIdentifier", + "src": "4854:3:23" + }, + "nativeSrc": "4854:7:23", + "nodeType": "YulFunctionCall", + "src": "4854:7:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4819:3:23", + "nodeType": "YulIdentifier", + "src": "4819:3:23" + }, + "nativeSrc": "4819:43:23", + "nodeType": "YulFunctionCall", + "src": "4819:43:23" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "4795:3:23", + "nodeType": "YulIdentifier", + "src": "4795:3:23" + }, + "nativeSrc": "4795:68:23", + "nodeType": "YulFunctionCall", + "src": "4795:68:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "4788:6:23", + "nodeType": "YulIdentifier", + "src": "4788:6:23" + }, + "nativeSrc": "4788:76:23", + "nodeType": "YulFunctionCall", + "src": "4788:76:23" + }, + "nativeSrc": "4785:96:23", + "nodeType": "YulIf", + "src": "4785:96:23" + }, + { + "nativeSrc": "4890:47:23", + "nodeType": "YulVariableDeclaration", + "src": "4890:47:23", + "value": { + "arguments": [ + { + "name": "base_ref", + "nativeSrc": "4908:8:23", + "nodeType": "YulIdentifier", + "src": "4908:8:23" + }, + { + "name": "rel_offset_of_tail", + "nativeSrc": "4918:18:23", + "nodeType": "YulIdentifier", + "src": "4918:18:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "4904:3:23", + "nodeType": "YulIdentifier", + "src": "4904:3:23" + }, + "nativeSrc": "4904:33:23", + "nodeType": "YulFunctionCall", + "src": "4904:33:23" + }, + "variables": [ + { + "name": "addr_1", + "nativeSrc": "4894:6:23", + "nodeType": "YulTypedName", + "src": "4894:6:23", + "type": "" + } + ] + }, + { + "nativeSrc": "4946:30:23", + "nodeType": "YulAssignment", + "src": "4946:30:23", + "value": { + "arguments": [ + { + "name": "addr_1", + "nativeSrc": "4969:6:23", + "nodeType": "YulIdentifier", + "src": "4969:6:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "4956:12:23", + "nodeType": "YulIdentifier", + "src": "4956:12:23" + }, + "nativeSrc": "4956:20:23", + "nodeType": "YulFunctionCall", + "src": "4956:20:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "4946:6:23", + "nodeType": "YulIdentifier", + "src": "4946:6:23" + } + ] + }, + { + "body": { + "nativeSrc": "5019:16:23", + "nodeType": "YulBlock", + "src": "5019:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5028:1:23", + "nodeType": "YulLiteral", + "src": "5028:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5031:1:23", + "nodeType": "YulLiteral", + "src": "5031:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5021:6:23", + "nodeType": "YulIdentifier", + "src": "5021:6:23" + }, + "nativeSrc": "5021:12:23", + "nodeType": "YulFunctionCall", + "src": "5021:12:23" + }, + "nativeSrc": "5021:12:23", + "nodeType": "YulExpressionStatement", + "src": "5021:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nativeSrc": "4991:6:23", + "nodeType": "YulIdentifier", + "src": "4991:6:23" + }, + { + "kind": "number", + "nativeSrc": "4999:18:23", + "nodeType": "YulLiteral", + "src": "4999:18:23", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nativeSrc": "4988:2:23", + "nodeType": "YulIdentifier", + "src": "4988:2:23" + }, + "nativeSrc": "4988:30:23", + "nodeType": "YulFunctionCall", + "src": "4988:30:23" + }, + "nativeSrc": "4985:50:23", + "nodeType": "YulIf", + "src": "4985:50:23" + }, + { + "nativeSrc": "5044:25:23", + "nodeType": "YulAssignment", + "src": "5044:25:23", + "value": { + "arguments": [ + { + "name": "addr_1", + "nativeSrc": "5056:6:23", + "nodeType": "YulIdentifier", + "src": "5056:6:23" + }, + { + "kind": "number", + "nativeSrc": "5064:4:23", + "nodeType": "YulLiteral", + "src": "5064:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5052:3:23", + "nodeType": "YulIdentifier", + "src": "5052:3:23" + }, + "nativeSrc": "5052:17:23", + "nodeType": "YulFunctionCall", + "src": "5052:17:23" + }, + "variableNames": [ + { + "name": "addr", + "nativeSrc": "5044:4:23", + "nodeType": "YulIdentifier", + "src": "5044:4:23" + } + ] + }, + { + "body": { + "nativeSrc": "5120:16:23", + "nodeType": "YulBlock", + "src": "5120:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5129:1:23", + "nodeType": "YulLiteral", + "src": "5129:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5132:1:23", + "nodeType": "YulLiteral", + "src": "5132:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5122:6:23", + "nodeType": "YulIdentifier", + "src": "5122:6:23" + }, + "nativeSrc": "5122:12:23", + "nodeType": "YulFunctionCall", + "src": "5122:12:23" + }, + "nativeSrc": "5122:12:23", + "nodeType": "YulExpressionStatement", + "src": "5122:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "addr", + "nativeSrc": "5085:4:23", + "nodeType": "YulIdentifier", + "src": "5085:4:23" + }, + { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nativeSrc": "5095:12:23", + "nodeType": "YulIdentifier", + "src": "5095:12:23" + }, + "nativeSrc": "5095:14:23", + "nodeType": "YulFunctionCall", + "src": "5095:14:23" + }, + { + "name": "length", + "nativeSrc": "5111:6:23", + "nodeType": "YulIdentifier", + "src": "5111:6:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5091:3:23", + "nodeType": "YulIdentifier", + "src": "5091:3:23" + }, + "nativeSrc": "5091:27:23", + "nodeType": "YulFunctionCall", + "src": "5091:27:23" + } + ], + "functionName": { + "name": "sgt", + "nativeSrc": "5081:3:23", + "nodeType": "YulIdentifier", + "src": "5081:3:23" + }, + "nativeSrc": "5081:38:23", + "nodeType": "YulFunctionCall", + "src": "5081:38:23" + }, + "nativeSrc": "5078:58:23", + "nodeType": "YulIf", + "src": "5078:58:23" + } + ] + }, + "name": "access_calldata_tail_t_bytes_calldata_ptr", + "nativeSrc": "4621:521:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "base_ref", + "nativeSrc": "4672:8:23", + "nodeType": "YulTypedName", + "src": "4672:8:23", + "type": "" + }, + { + "name": "ptr_to_tail", + "nativeSrc": "4682:11:23", + "nodeType": "YulTypedName", + "src": "4682:11:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "addr", + "nativeSrc": "4698:4:23", + "nodeType": "YulTypedName", + "src": "4698:4:23", + "type": "" + }, + { + "name": "length", + "nativeSrc": "4704:6:23", + "nodeType": "YulTypedName", + "src": "4704:6:23", + "type": "" + } + ], + "src": "4621:521:23" + }, + { + "body": { + "nativeSrc": "5215:201:23", + "nodeType": "YulBlock", + "src": "5215:201:23", + "statements": [ + { + "body": { + "nativeSrc": "5261:16:23", + "nodeType": "YulBlock", + "src": "5261:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5270:1:23", + "nodeType": "YulLiteral", + "src": "5270:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5273:1:23", + "nodeType": "YulLiteral", + "src": "5273:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5263:6:23", + "nodeType": "YulIdentifier", + "src": "5263:6:23" + }, + "nativeSrc": "5263:12:23", + "nodeType": "YulFunctionCall", + "src": "5263:12:23" + }, + "nativeSrc": "5263:12:23", + "nodeType": "YulExpressionStatement", + "src": "5263:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "5236:7:23", + "nodeType": "YulIdentifier", + "src": "5236:7:23" + }, + { + "name": "headStart", + "nativeSrc": "5245:9:23", + "nodeType": "YulIdentifier", + "src": "5245:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "5232:3:23", + "nodeType": "YulIdentifier", + "src": "5232:3:23" + }, + "nativeSrc": "5232:23:23", + "nodeType": "YulFunctionCall", + "src": "5232:23:23" + }, + { + "kind": "number", + "nativeSrc": "5257:2:23", + "nodeType": "YulLiteral", + "src": "5257:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "5228:3:23", + "nodeType": "YulIdentifier", + "src": "5228:3:23" + }, + "nativeSrc": "5228:32:23", + "nodeType": "YulFunctionCall", + "src": "5228:32:23" + }, + "nativeSrc": "5225:52:23", + "nodeType": "YulIf", + "src": "5225:52:23" + }, + { + "nativeSrc": "5286:36:23", + "nodeType": "YulVariableDeclaration", + "src": "5286:36:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5312:9:23", + "nodeType": "YulIdentifier", + "src": "5312:9:23" + } + ], + "functionName": { + "name": "calldataload", + "nativeSrc": "5299:12:23", + "nodeType": "YulIdentifier", + "src": "5299:12:23" + }, + "nativeSrc": "5299:23:23", + "nodeType": "YulFunctionCall", + "src": "5299:23:23" + }, + "variables": [ + { + "name": "value", + "nativeSrc": "5290:5:23", + "nodeType": "YulTypedName", + "src": "5290:5:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "5370:16:23", + "nodeType": "YulBlock", + "src": "5370:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "5379:1:23", + "nodeType": "YulLiteral", + "src": "5379:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "5382:1:23", + "nodeType": "YulLiteral", + "src": "5382:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "5372:6:23", + "nodeType": "YulIdentifier", + "src": "5372:6:23" + }, + "nativeSrc": "5372:12:23", + "nodeType": "YulFunctionCall", + "src": "5372:12:23" + }, + "nativeSrc": "5372:12:23", + "nodeType": "YulExpressionStatement", + "src": "5372:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nativeSrc": "5344:5:23", + "nodeType": "YulIdentifier", + "src": "5344:5:23" + }, + { + "arguments": [ + { + "name": "value", + "nativeSrc": "5355:5:23", + "nodeType": "YulIdentifier", + "src": "5355:5:23" + }, + { + "kind": "number", + "nativeSrc": "5362:4:23", + "nodeType": "YulLiteral", + "src": "5362:4:23", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "5351:3:23", + "nodeType": "YulIdentifier", + "src": "5351:3:23" + }, + "nativeSrc": "5351:16:23", + "nodeType": "YulFunctionCall", + "src": "5351:16:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "5341:2:23", + "nodeType": "YulIdentifier", + "src": "5341:2:23" + }, + "nativeSrc": "5341:27:23", + "nodeType": "YulFunctionCall", + "src": "5341:27:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "5334:6:23", + "nodeType": "YulIdentifier", + "src": "5334:6:23" + }, + "nativeSrc": "5334:35:23", + "nodeType": "YulFunctionCall", + "src": "5334:35:23" + }, + "nativeSrc": "5331:55:23", + "nodeType": "YulIf", + "src": "5331:55:23" + }, + { + "nativeSrc": "5395:15:23", + "nodeType": "YulAssignment", + "src": "5395:15:23", + "value": { + "name": "value", + "nativeSrc": "5405:5:23", + "nodeType": "YulIdentifier", + "src": "5405:5:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "5395:6:23", + "nodeType": "YulIdentifier", + "src": "5395:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint8", + "nativeSrc": "5147:269:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5181:9:23", + "nodeType": "YulTypedName", + "src": "5181:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "5192:7:23", + "nodeType": "YulTypedName", + "src": "5192:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "5204:6:23", + "nodeType": "YulTypedName", + "src": "5204:6:23", + "type": "" + } + ], + "src": "5147:269:23" + }, + { + "body": { + "nativeSrc": "5595:161:23", + "nodeType": "YulBlock", + "src": "5595:161:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5612:9:23", + "nodeType": "YulIdentifier", + "src": "5612:9:23" + }, + { + "kind": "number", + "nativeSrc": "5623:2:23", + "nodeType": "YulLiteral", + "src": "5623:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5605:6:23", + "nodeType": "YulIdentifier", + "src": "5605:6:23" + }, + "nativeSrc": "5605:21:23", + "nodeType": "YulFunctionCall", + "src": "5605:21:23" + }, + "nativeSrc": "5605:21:23", + "nodeType": "YulExpressionStatement", + "src": "5605:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5646:9:23", + "nodeType": "YulIdentifier", + "src": "5646:9:23" + }, + { + "kind": "number", + "nativeSrc": "5657:2:23", + "nodeType": "YulLiteral", + "src": "5657:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5642:3:23", + "nodeType": "YulIdentifier", + "src": "5642:3:23" + }, + "nativeSrc": "5642:18:23", + "nodeType": "YulFunctionCall", + "src": "5642:18:23" + }, + { + "kind": "number", + "nativeSrc": "5662:2:23", + "nodeType": "YulLiteral", + "src": "5662:2:23", + "type": "", + "value": "11" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5635:6:23", + "nodeType": "YulIdentifier", + "src": "5635:6:23" + }, + "nativeSrc": "5635:30:23", + "nodeType": "YulFunctionCall", + "src": "5635:30:23" + }, + "nativeSrc": "5635:30:23", + "nodeType": "YulExpressionStatement", + "src": "5635:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5685:9:23", + "nodeType": "YulIdentifier", + "src": "5685:9:23" + }, + { + "kind": "number", + "nativeSrc": "5696:2:23", + "nodeType": "YulLiteral", + "src": "5696:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5681:3:23", + "nodeType": "YulIdentifier", + "src": "5681:3:23" + }, + "nativeSrc": "5681:18:23", + "nodeType": "YulFunctionCall", + "src": "5681:18:23" + }, + { + "hexValue": "496e76616c696420736967", + "kind": "string", + "nativeSrc": "5701:13:23", + "nodeType": "YulLiteral", + "src": "5701:13:23", + "type": "", + "value": "Invalid sig" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5674:6:23", + "nodeType": "YulIdentifier", + "src": "5674:6:23" + }, + "nativeSrc": "5674:41:23", + "nodeType": "YulFunctionCall", + "src": "5674:41:23" + }, + "nativeSrc": "5674:41:23", + "nodeType": "YulExpressionStatement", + "src": "5674:41:23" + }, + { + "nativeSrc": "5724:26:23", + "nodeType": "YulAssignment", + "src": "5724:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5736:9:23", + "nodeType": "YulIdentifier", + "src": "5736:9:23" + }, + { + "kind": "number", + "nativeSrc": "5747:2:23", + "nodeType": "YulLiteral", + "src": "5747:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5732:3:23", + "nodeType": "YulIdentifier", + "src": "5732:3:23" + }, + "nativeSrc": "5732:18:23", + "nodeType": "YulFunctionCall", + "src": "5732:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "5724:4:23", + "nodeType": "YulIdentifier", + "src": "5724:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "5421:335:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5572:9:23", + "nodeType": "YulTypedName", + "src": "5572:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5586:4:23", + "nodeType": "YulTypedName", + "src": "5586:4:23", + "type": "" + } + ], + "src": "5421:335:23" + }, + { + "body": { + "nativeSrc": "5935:178:23", + "nodeType": "YulBlock", + "src": "5935:178:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5952:9:23", + "nodeType": "YulIdentifier", + "src": "5952:9:23" + }, + { + "kind": "number", + "nativeSrc": "5963:2:23", + "nodeType": "YulLiteral", + "src": "5963:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5945:6:23", + "nodeType": "YulIdentifier", + "src": "5945:6:23" + }, + "nativeSrc": "5945:21:23", + "nodeType": "YulFunctionCall", + "src": "5945:21:23" + }, + "nativeSrc": "5945:21:23", + "nodeType": "YulExpressionStatement", + "src": "5945:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "5986:9:23", + "nodeType": "YulIdentifier", + "src": "5986:9:23" + }, + { + "kind": "number", + "nativeSrc": "5997:2:23", + "nodeType": "YulLiteral", + "src": "5997:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "5982:3:23", + "nodeType": "YulIdentifier", + "src": "5982:3:23" + }, + "nativeSrc": "5982:18:23", + "nodeType": "YulFunctionCall", + "src": "5982:18:23" + }, + { + "kind": "number", + "nativeSrc": "6002:2:23", + "nodeType": "YulLiteral", + "src": "6002:2:23", + "type": "", + "value": "28" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "5975:6:23", + "nodeType": "YulIdentifier", + "src": "5975:6:23" + }, + "nativeSrc": "5975:30:23", + "nodeType": "YulFunctionCall", + "src": "5975:30:23" + }, + "nativeSrc": "5975:30:23", + "nodeType": "YulExpressionStatement", + "src": "5975:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6025:9:23", + "nodeType": "YulIdentifier", + "src": "6025:9:23" + }, + { + "kind": "number", + "nativeSrc": "6036:2:23", + "nodeType": "YulLiteral", + "src": "6036:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6021:3:23", + "nodeType": "YulIdentifier", + "src": "6021:3:23" + }, + "nativeSrc": "6021:18:23", + "nodeType": "YulFunctionCall", + "src": "6021:18:23" + }, + { + "hexValue": "496e636f7272656374204554482076616c75652070726f7669646564", + "kind": "string", + "nativeSrc": "6041:30:23", + "nodeType": "YulLiteral", + "src": "6041:30:23", + "type": "", + "value": "Incorrect ETH value provided" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6014:6:23", + "nodeType": "YulIdentifier", + "src": "6014:6:23" + }, + "nativeSrc": "6014:58:23", + "nodeType": "YulFunctionCall", + "src": "6014:58:23" + }, + "nativeSrc": "6014:58:23", + "nodeType": "YulExpressionStatement", + "src": "6014:58:23" + }, + { + "nativeSrc": "6081:26:23", + "nodeType": "YulAssignment", + "src": "6081:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6093:9:23", + "nodeType": "YulIdentifier", + "src": "6093:9:23" + }, + { + "kind": "number", + "nativeSrc": "6104:2:23", + "nodeType": "YulLiteral", + "src": "6104:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6089:3:23", + "nodeType": "YulIdentifier", + "src": "6089:3:23" + }, + "nativeSrc": "6089:18:23", + "nodeType": "YulFunctionCall", + "src": "6089:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6081:4:23", + "nodeType": "YulIdentifier", + "src": "6081:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "5761:352:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "5912:9:23", + "nodeType": "YulTypedName", + "src": "5912:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "5926:4:23", + "nodeType": "YulTypedName", + "src": "5926:4:23", + "type": "" + } + ], + "src": "5761:352:23" + }, + { + "body": { + "nativeSrc": "6292:161:23", + "nodeType": "YulBlock", + "src": "6292:161:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6309:9:23", + "nodeType": "YulIdentifier", + "src": "6309:9:23" + }, + { + "kind": "number", + "nativeSrc": "6320:2:23", + "nodeType": "YulLiteral", + "src": "6320:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6302:6:23", + "nodeType": "YulIdentifier", + "src": "6302:6:23" + }, + "nativeSrc": "6302:21:23", + "nodeType": "YulFunctionCall", + "src": "6302:21:23" + }, + "nativeSrc": "6302:21:23", + "nodeType": "YulExpressionStatement", + "src": "6302:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6343:9:23", + "nodeType": "YulIdentifier", + "src": "6343:9:23" + }, + { + "kind": "number", + "nativeSrc": "6354:2:23", + "nodeType": "YulLiteral", + "src": "6354:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6339:3:23", + "nodeType": "YulIdentifier", + "src": "6339:3:23" + }, + "nativeSrc": "6339:18:23", + "nodeType": "YulFunctionCall", + "src": "6339:18:23" + }, + { + "kind": "number", + "nativeSrc": "6359:2:23", + "nodeType": "YulLiteral", + "src": "6359:2:23", + "type": "", + "value": "11" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6332:6:23", + "nodeType": "YulIdentifier", + "src": "6332:6:23" + }, + "nativeSrc": "6332:30:23", + "nodeType": "YulFunctionCall", + "src": "6332:30:23" + }, + "nativeSrc": "6332:30:23", + "nodeType": "YulExpressionStatement", + "src": "6332:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6382:9:23", + "nodeType": "YulIdentifier", + "src": "6382:9:23" + }, + { + "kind": "number", + "nativeSrc": "6393:2:23", + "nodeType": "YulLiteral", + "src": "6393:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6378:3:23", + "nodeType": "YulIdentifier", + "src": "6378:3:23" + }, + "nativeSrc": "6378:18:23", + "nodeType": "YulFunctionCall", + "src": "6378:18:23" + }, + { + "hexValue": "43616c6c206661696c6564", + "kind": "string", + "nativeSrc": "6398:13:23", + "nodeType": "YulLiteral", + "src": "6398:13:23", + "type": "", + "value": "Call failed" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6371:6:23", + "nodeType": "YulIdentifier", + "src": "6371:6:23" + }, + "nativeSrc": "6371:41:23", + "nodeType": "YulFunctionCall", + "src": "6371:41:23" + }, + "nativeSrc": "6371:41:23", + "nodeType": "YulExpressionStatement", + "src": "6371:41:23" + }, + { + "nativeSrc": "6421:26:23", + "nodeType": "YulAssignment", + "src": "6421:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6433:9:23", + "nodeType": "YulIdentifier", + "src": "6433:9:23" + }, + { + "kind": "number", + "nativeSrc": "6444:2:23", + "nodeType": "YulLiteral", + "src": "6444:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6429:3:23", + "nodeType": "YulIdentifier", + "src": "6429:3:23" + }, + "nativeSrc": "6429:18:23", + "nodeType": "YulFunctionCall", + "src": "6429:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6421:4:23", + "nodeType": "YulIdentifier", + "src": "6421:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "6118:335:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6269:9:23", + "nodeType": "YulTypedName", + "src": "6269:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6283:4:23", + "nodeType": "YulTypedName", + "src": "6283:4:23", + "type": "" + } + ], + "src": "6118:335:23" + }, + { + "body": { + "nativeSrc": "6559:76:23", + "nodeType": "YulBlock", + "src": "6559:76:23", + "statements": [ + { + "nativeSrc": "6569:26:23", + "nodeType": "YulAssignment", + "src": "6569:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6581:9:23", + "nodeType": "YulIdentifier", + "src": "6581:9:23" + }, + { + "kind": "number", + "nativeSrc": "6592:2:23", + "nodeType": "YulLiteral", + "src": "6592:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "6577:3:23", + "nodeType": "YulIdentifier", + "src": "6577:3:23" + }, + "nativeSrc": "6577:18:23", + "nodeType": "YulFunctionCall", + "src": "6577:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "6569:4:23", + "nodeType": "YulIdentifier", + "src": "6569:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "6611:9:23", + "nodeType": "YulIdentifier", + "src": "6611:9:23" + }, + { + "name": "value0", + "nativeSrc": "6622:6:23", + "nodeType": "YulIdentifier", + "src": "6622:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6604:6:23", + "nodeType": "YulIdentifier", + "src": "6604:6:23" + }, + "nativeSrc": "6604:25:23", + "nodeType": "YulFunctionCall", + "src": "6604:25:23" + }, + "nativeSrc": "6604:25:23", + "nodeType": "YulExpressionStatement", + "src": "6604:25:23" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nativeSrc": "6458:177:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "6528:9:23", + "nodeType": "YulTypedName", + "src": "6528:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "6539:6:23", + "nodeType": "YulTypedName", + "src": "6539:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "6550:4:23", + "nodeType": "YulTypedName", + "src": "6550:4:23", + "type": "" + } + ], + "src": "6458:177:23" + }, + { + "body": { + "nativeSrc": "6672:95:23", + "nodeType": "YulBlock", + "src": "6672:95:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6689:1:23", + "nodeType": "YulLiteral", + "src": "6689:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6696:3:23", + "nodeType": "YulLiteral", + "src": "6696:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "6701:10:23", + "nodeType": "YulLiteral", + "src": "6701:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "6692:3:23", + "nodeType": "YulIdentifier", + "src": "6692:3:23" + }, + "nativeSrc": "6692:20:23", + "nodeType": "YulFunctionCall", + "src": "6692:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6682:6:23", + "nodeType": "YulIdentifier", + "src": "6682:6:23" + }, + "nativeSrc": "6682:31:23", + "nodeType": "YulFunctionCall", + "src": "6682:31:23" + }, + "nativeSrc": "6682:31:23", + "nodeType": "YulExpressionStatement", + "src": "6682:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6729:1:23", + "nodeType": "YulLiteral", + "src": "6729:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "6732:4:23", + "nodeType": "YulLiteral", + "src": "6732:4:23", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "6722:6:23", + "nodeType": "YulIdentifier", + "src": "6722:6:23" + }, + "nativeSrc": "6722:15:23", + "nodeType": "YulFunctionCall", + "src": "6722:15:23" + }, + "nativeSrc": "6722:15:23", + "nodeType": "YulExpressionStatement", + "src": "6722:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "6753:1:23", + "nodeType": "YulLiteral", + "src": "6753:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "6756:4:23", + "nodeType": "YulLiteral", + "src": "6756:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "6746:6:23", + "nodeType": "YulIdentifier", + "src": "6746:6:23" + }, + "nativeSrc": "6746:15:23", + "nodeType": "YulFunctionCall", + "src": "6746:15:23" + }, + "nativeSrc": "6746:15:23", + "nodeType": "YulExpressionStatement", + "src": "6746:15:23" + } + ] + }, + "name": "panic_error_0x41", + "nativeSrc": "6640:127:23", + "nodeType": "YulFunctionDefinition", + "src": "6640:127:23" + }, + { + "body": { + "nativeSrc": "6963:14:23", + "nodeType": "YulBlock", + "src": "6963:14:23", + "statements": [ + { + "nativeSrc": "6965:10:23", + "nodeType": "YulAssignment", + "src": "6965:10:23", + "value": { + "name": "pos", + "nativeSrc": "6972:3:23", + "nodeType": "YulIdentifier", + "src": "6972:3:23" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "6965:3:23", + "nodeType": "YulIdentifier", + "src": "6965:3:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "6772:205:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "6947:3:23", + "nodeType": "YulTypedName", + "src": "6947:3:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "6955:3:23", + "nodeType": "YulTypedName", + "src": "6955:3:23", + "type": "" + } + ], + "src": "6772:205:23" + }, + { + "body": { + "nativeSrc": "7156:169:23", + "nodeType": "YulBlock", + "src": "7156:169:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7173:9:23", + "nodeType": "YulIdentifier", + "src": "7173:9:23" + }, + { + "kind": "number", + "nativeSrc": "7184:2:23", + "nodeType": "YulLiteral", + "src": "7184:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7166:6:23", + "nodeType": "YulIdentifier", + "src": "7166:6:23" + }, + "nativeSrc": "7166:21:23", + "nodeType": "YulFunctionCall", + "src": "7166:21:23" + }, + "nativeSrc": "7166:21:23", + "nodeType": "YulExpressionStatement", + "src": "7166:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7207:9:23", + "nodeType": "YulIdentifier", + "src": "7207:9:23" + }, + { + "kind": "number", + "nativeSrc": "7218:2:23", + "nodeType": "YulLiteral", + "src": "7218:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7203:3:23", + "nodeType": "YulIdentifier", + "src": "7203:3:23" + }, + "nativeSrc": "7203:18:23", + "nodeType": "YulFunctionCall", + "src": "7203:18:23" + }, + { + "kind": "number", + "nativeSrc": "7223:2:23", + "nodeType": "YulLiteral", + "src": "7223:2:23", + "type": "", + "value": "19" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7196:6:23", + "nodeType": "YulIdentifier", + "src": "7196:6:23" + }, + "nativeSrc": "7196:30:23", + "nodeType": "YulFunctionCall", + "src": "7196:30:23" + }, + "nativeSrc": "7196:30:23", + "nodeType": "YulExpressionStatement", + "src": "7196:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7246:9:23", + "nodeType": "YulIdentifier", + "src": "7246:9:23" + }, + { + "kind": "number", + "nativeSrc": "7257:2:23", + "nodeType": "YulLiteral", + "src": "7257:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7242:3:23", + "nodeType": "YulIdentifier", + "src": "7242:3:23" + }, + "nativeSrc": "7242:18:23", + "nodeType": "YulFunctionCall", + "src": "7242:18:23" + }, + { + "hexValue": "455448207472616e73666572206661696c6564", + "kind": "string", + "nativeSrc": "7262:21:23", + "nodeType": "YulLiteral", + "src": "7262:21:23", + "type": "", + "value": "ETH transfer failed" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7235:6:23", + "nodeType": "YulIdentifier", + "src": "7235:6:23" + }, + "nativeSrc": "7235:49:23", + "nodeType": "YulFunctionCall", + "src": "7235:49:23" + }, + "nativeSrc": "7235:49:23", + "nodeType": "YulExpressionStatement", + "src": "7235:49:23" + }, + { + "nativeSrc": "7293:26:23", + "nodeType": "YulAssignment", + "src": "7293:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7305:9:23", + "nodeType": "YulIdentifier", + "src": "7305:9:23" + }, + { + "kind": "number", + "nativeSrc": "7316:2:23", + "nodeType": "YulLiteral", + "src": "7316:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7301:3:23", + "nodeType": "YulIdentifier", + "src": "7301:3:23" + }, + "nativeSrc": "7301:18:23", + "nodeType": "YulFunctionCall", + "src": "7301:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "7293:4:23", + "nodeType": "YulIdentifier", + "src": "7293:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "6982:343:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "7133:9:23", + "nodeType": "YulTypedName", + "src": "7133:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "7147:4:23", + "nodeType": "YulTypedName", + "src": "7147:4:23", + "type": "" + } + ], + "src": "6982:343:23" + }, + { + "body": { + "nativeSrc": "7655:504:23", + "nodeType": "YulBlock", + "src": "7655:504:23", + "statements": [ + { + "nativeSrc": "7665:27:23", + "nodeType": "YulAssignment", + "src": "7665:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7677:9:23", + "nodeType": "YulIdentifier", + "src": "7677:9:23" + }, + { + "kind": "number", + "nativeSrc": "7688:3:23", + "nodeType": "YulLiteral", + "src": "7688:3:23", + "type": "", + "value": "288" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7673:3:23", + "nodeType": "YulIdentifier", + "src": "7673:3:23" + }, + "nativeSrc": "7673:19:23", + "nodeType": "YulFunctionCall", + "src": "7673:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "7665:4:23", + "nodeType": "YulIdentifier", + "src": "7665:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7708:9:23", + "nodeType": "YulIdentifier", + "src": "7708:9:23" + }, + { + "name": "value0", + "nativeSrc": "7719:6:23", + "nodeType": "YulIdentifier", + "src": "7719:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7701:6:23", + "nodeType": "YulIdentifier", + "src": "7701:6:23" + }, + "nativeSrc": "7701:25:23", + "nodeType": "YulFunctionCall", + "src": "7701:25:23" + }, + "nativeSrc": "7701:25:23", + "nodeType": "YulExpressionStatement", + "src": "7701:25:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7746:9:23", + "nodeType": "YulIdentifier", + "src": "7746:9:23" + }, + { + "kind": "number", + "nativeSrc": "7757:2:23", + "nodeType": "YulLiteral", + "src": "7757:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7742:3:23", + "nodeType": "YulIdentifier", + "src": "7742:3:23" + }, + "nativeSrc": "7742:18:23", + "nodeType": "YulFunctionCall", + "src": "7742:18:23" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "7766:6:23", + "nodeType": "YulIdentifier", + "src": "7766:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7782:3:23", + "nodeType": "YulLiteral", + "src": "7782:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "7787:1:23", + "nodeType": "YulLiteral", + "src": "7787:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7778:3:23", + "nodeType": "YulIdentifier", + "src": "7778:3:23" + }, + "nativeSrc": "7778:11:23", + "nodeType": "YulFunctionCall", + "src": "7778:11:23" + }, + { + "kind": "number", + "nativeSrc": "7791:1:23", + "nodeType": "YulLiteral", + "src": "7791:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7774:3:23", + "nodeType": "YulIdentifier", + "src": "7774:3:23" + }, + "nativeSrc": "7774:19:23", + "nodeType": "YulFunctionCall", + "src": "7774:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7762:3:23", + "nodeType": "YulIdentifier", + "src": "7762:3:23" + }, + "nativeSrc": "7762:32:23", + "nodeType": "YulFunctionCall", + "src": "7762:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7735:6:23", + "nodeType": "YulIdentifier", + "src": "7735:6:23" + }, + "nativeSrc": "7735:60:23", + "nodeType": "YulFunctionCall", + "src": "7735:60:23" + }, + "nativeSrc": "7735:60:23", + "nodeType": "YulExpressionStatement", + "src": "7735:60:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7815:9:23", + "nodeType": "YulIdentifier", + "src": "7815:9:23" + }, + { + "kind": "number", + "nativeSrc": "7826:2:23", + "nodeType": "YulLiteral", + "src": "7826:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7811:3:23", + "nodeType": "YulIdentifier", + "src": "7811:3:23" + }, + "nativeSrc": "7811:18:23", + "nodeType": "YulFunctionCall", + "src": "7811:18:23" + }, + { + "arguments": [ + { + "name": "value2", + "nativeSrc": "7835:6:23", + "nodeType": "YulIdentifier", + "src": "7835:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7851:3:23", + "nodeType": "YulLiteral", + "src": "7851:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "7856:1:23", + "nodeType": "YulLiteral", + "src": "7856:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7847:3:23", + "nodeType": "YulIdentifier", + "src": "7847:3:23" + }, + "nativeSrc": "7847:11:23", + "nodeType": "YulFunctionCall", + "src": "7847:11:23" + }, + { + "kind": "number", + "nativeSrc": "7860:1:23", + "nodeType": "YulLiteral", + "src": "7860:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7843:3:23", + "nodeType": "YulIdentifier", + "src": "7843:3:23" + }, + "nativeSrc": "7843:19:23", + "nodeType": "YulFunctionCall", + "src": "7843:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7831:3:23", + "nodeType": "YulIdentifier", + "src": "7831:3:23" + }, + "nativeSrc": "7831:32:23", + "nodeType": "YulFunctionCall", + "src": "7831:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7804:6:23", + "nodeType": "YulIdentifier", + "src": "7804:6:23" + }, + "nativeSrc": "7804:60:23", + "nodeType": "YulFunctionCall", + "src": "7804:60:23" + }, + "nativeSrc": "7804:60:23", + "nodeType": "YulExpressionStatement", + "src": "7804:60:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7884:9:23", + "nodeType": "YulIdentifier", + "src": "7884:9:23" + }, + { + "kind": "number", + "nativeSrc": "7895:2:23", + "nodeType": "YulLiteral", + "src": "7895:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7880:3:23", + "nodeType": "YulIdentifier", + "src": "7880:3:23" + }, + "nativeSrc": "7880:18:23", + "nodeType": "YulFunctionCall", + "src": "7880:18:23" + }, + { + "arguments": [ + { + "name": "value3", + "nativeSrc": "7904:6:23", + "nodeType": "YulIdentifier", + "src": "7904:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "7920:3:23", + "nodeType": "YulLiteral", + "src": "7920:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "7925:1:23", + "nodeType": "YulLiteral", + "src": "7925:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "7916:3:23", + "nodeType": "YulIdentifier", + "src": "7916:3:23" + }, + "nativeSrc": "7916:11:23", + "nodeType": "YulFunctionCall", + "src": "7916:11:23" + }, + { + "kind": "number", + "nativeSrc": "7929:1:23", + "nodeType": "YulLiteral", + "src": "7929:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "7912:3:23", + "nodeType": "YulIdentifier", + "src": "7912:3:23" + }, + "nativeSrc": "7912:19:23", + "nodeType": "YulFunctionCall", + "src": "7912:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "7900:3:23", + "nodeType": "YulIdentifier", + "src": "7900:3:23" + }, + "nativeSrc": "7900:32:23", + "nodeType": "YulFunctionCall", + "src": "7900:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7873:6:23", + "nodeType": "YulIdentifier", + "src": "7873:6:23" + }, + "nativeSrc": "7873:60:23", + "nodeType": "YulFunctionCall", + "src": "7873:60:23" + }, + "nativeSrc": "7873:60:23", + "nodeType": "YulExpressionStatement", + "src": "7873:60:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7953:9:23", + "nodeType": "YulIdentifier", + "src": "7953:9:23" + }, + { + "kind": "number", + "nativeSrc": "7964:3:23", + "nodeType": "YulLiteral", + "src": "7964:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7949:3:23", + "nodeType": "YulIdentifier", + "src": "7949:3:23" + }, + "nativeSrc": "7949:19:23", + "nodeType": "YulFunctionCall", + "src": "7949:19:23" + }, + { + "name": "value4", + "nativeSrc": "7970:6:23", + "nodeType": "YulIdentifier", + "src": "7970:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7942:6:23", + "nodeType": "YulIdentifier", + "src": "7942:6:23" + }, + "nativeSrc": "7942:35:23", + "nodeType": "YulFunctionCall", + "src": "7942:35:23" + }, + "nativeSrc": "7942:35:23", + "nodeType": "YulExpressionStatement", + "src": "7942:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "7997:9:23", + "nodeType": "YulIdentifier", + "src": "7997:9:23" + }, + { + "kind": "number", + "nativeSrc": "8008:3:23", + "nodeType": "YulLiteral", + "src": "8008:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "7993:3:23", + "nodeType": "YulIdentifier", + "src": "7993:3:23" + }, + "nativeSrc": "7993:19:23", + "nodeType": "YulFunctionCall", + "src": "7993:19:23" + }, + { + "name": "value5", + "nativeSrc": "8014:6:23", + "nodeType": "YulIdentifier", + "src": "8014:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "7986:6:23", + "nodeType": "YulIdentifier", + "src": "7986:6:23" + }, + "nativeSrc": "7986:35:23", + "nodeType": "YulFunctionCall", + "src": "7986:35:23" + }, + "nativeSrc": "7986:35:23", + "nodeType": "YulExpressionStatement", + "src": "7986:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8041:9:23", + "nodeType": "YulIdentifier", + "src": "8041:9:23" + }, + { + "kind": "number", + "nativeSrc": "8052:3:23", + "nodeType": "YulLiteral", + "src": "8052:3:23", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8037:3:23", + "nodeType": "YulIdentifier", + "src": "8037:3:23" + }, + "nativeSrc": "8037:19:23", + "nodeType": "YulFunctionCall", + "src": "8037:19:23" + }, + { + "name": "value6", + "nativeSrc": "8058:6:23", + "nodeType": "YulIdentifier", + "src": "8058:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8030:6:23", + "nodeType": "YulIdentifier", + "src": "8030:6:23" + }, + "nativeSrc": "8030:35:23", + "nodeType": "YulFunctionCall", + "src": "8030:35:23" + }, + "nativeSrc": "8030:35:23", + "nodeType": "YulExpressionStatement", + "src": "8030:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8085:9:23", + "nodeType": "YulIdentifier", + "src": "8085:9:23" + }, + { + "kind": "number", + "nativeSrc": "8096:3:23", + "nodeType": "YulLiteral", + "src": "8096:3:23", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8081:3:23", + "nodeType": "YulIdentifier", + "src": "8081:3:23" + }, + "nativeSrc": "8081:19:23", + "nodeType": "YulFunctionCall", + "src": "8081:19:23" + }, + { + "name": "value7", + "nativeSrc": "8102:6:23", + "nodeType": "YulIdentifier", + "src": "8102:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8074:6:23", + "nodeType": "YulIdentifier", + "src": "8074:6:23" + }, + "nativeSrc": "8074:35:23", + "nodeType": "YulFunctionCall", + "src": "8074:35:23" + }, + "nativeSrc": "8074:35:23", + "nodeType": "YulExpressionStatement", + "src": "8074:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8129:9:23", + "nodeType": "YulIdentifier", + "src": "8129:9:23" + }, + { + "kind": "number", + "nativeSrc": "8140:3:23", + "nodeType": "YulLiteral", + "src": "8140:3:23", + "type": "", + "value": "256" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8125:3:23", + "nodeType": "YulIdentifier", + "src": "8125:3:23" + }, + "nativeSrc": "8125:19:23", + "nodeType": "YulFunctionCall", + "src": "8125:19:23" + }, + { + "name": "value8", + "nativeSrc": "8146:6:23", + "nodeType": "YulIdentifier", + "src": "8146:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8118:6:23", + "nodeType": "YulIdentifier", + "src": "8118:6:23" + }, + "nativeSrc": "8118:35:23", + "nodeType": "YulFunctionCall", + "src": "8118:35:23" + }, + "nativeSrc": "8118:35:23", + "nodeType": "YulExpressionStatement", + "src": "8118:35:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__to_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__fromStack_reversed", + "nativeSrc": "7330:829:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "7560:9:23", + "nodeType": "YulTypedName", + "src": "7560:9:23", + "type": "" + }, + { + "name": "value8", + "nativeSrc": "7571:6:23", + "nodeType": "YulTypedName", + "src": "7571:6:23", + "type": "" + }, + { + "name": "value7", + "nativeSrc": "7579:6:23", + "nodeType": "YulTypedName", + "src": "7579:6:23", + "type": "" + }, + { + "name": "value6", + "nativeSrc": "7587:6:23", + "nodeType": "YulTypedName", + "src": "7587:6:23", + "type": "" + }, + { + "name": "value5", + "nativeSrc": "7595:6:23", + "nodeType": "YulTypedName", + "src": "7595:6:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "7603:6:23", + "nodeType": "YulTypedName", + "src": "7603:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "7611:6:23", + "nodeType": "YulTypedName", + "src": "7611:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "7619:6:23", + "nodeType": "YulTypedName", + "src": "7619:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "7627:6:23", + "nodeType": "YulTypedName", + "src": "7627:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "7635:6:23", + "nodeType": "YulTypedName", + "src": "7635:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "7646:4:23", + "nodeType": "YulTypedName", + "src": "7646:4:23", + "type": "" + } + ], + "src": "7330:829:23" + }, + { + "body": { + "nativeSrc": "8429:401:23", + "nodeType": "YulBlock", + "src": "8429:401:23", + "statements": [ + { + "nativeSrc": "8439:27:23", + "nodeType": "YulAssignment", + "src": "8439:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8451:9:23", + "nodeType": "YulIdentifier", + "src": "8451:9:23" + }, + { + "kind": "number", + "nativeSrc": "8462:3:23", + "nodeType": "YulLiteral", + "src": "8462:3:23", + "type": "", + "value": "224" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8447:3:23", + "nodeType": "YulIdentifier", + "src": "8447:3:23" + }, + "nativeSrc": "8447:19:23", + "nodeType": "YulFunctionCall", + "src": "8447:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "8439:4:23", + "nodeType": "YulIdentifier", + "src": "8439:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8482:9:23", + "nodeType": "YulIdentifier", + "src": "8482:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "8497:6:23", + "nodeType": "YulIdentifier", + "src": "8497:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8513:3:23", + "nodeType": "YulLiteral", + "src": "8513:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "8518:1:23", + "nodeType": "YulLiteral", + "src": "8518:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "8509:3:23", + "nodeType": "YulIdentifier", + "src": "8509:3:23" + }, + "nativeSrc": "8509:11:23", + "nodeType": "YulFunctionCall", + "src": "8509:11:23" + }, + { + "kind": "number", + "nativeSrc": "8522:1:23", + "nodeType": "YulLiteral", + "src": "8522:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8505:3:23", + "nodeType": "YulIdentifier", + "src": "8505:3:23" + }, + "nativeSrc": "8505:19:23", + "nodeType": "YulFunctionCall", + "src": "8505:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8493:3:23", + "nodeType": "YulIdentifier", + "src": "8493:3:23" + }, + "nativeSrc": "8493:32:23", + "nodeType": "YulFunctionCall", + "src": "8493:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8475:6:23", + "nodeType": "YulIdentifier", + "src": "8475:6:23" + }, + "nativeSrc": "8475:51:23", + "nodeType": "YulFunctionCall", + "src": "8475:51:23" + }, + "nativeSrc": "8475:51:23", + "nodeType": "YulExpressionStatement", + "src": "8475:51:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8546:9:23", + "nodeType": "YulIdentifier", + "src": "8546:9:23" + }, + { + "kind": "number", + "nativeSrc": "8557:2:23", + "nodeType": "YulLiteral", + "src": "8557:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8542:3:23", + "nodeType": "YulIdentifier", + "src": "8542:3:23" + }, + "nativeSrc": "8542:18:23", + "nodeType": "YulFunctionCall", + "src": "8542:18:23" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "8566:6:23", + "nodeType": "YulIdentifier", + "src": "8566:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "8582:3:23", + "nodeType": "YulLiteral", + "src": "8582:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "8587:1:23", + "nodeType": "YulLiteral", + "src": "8587:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "8578:3:23", + "nodeType": "YulIdentifier", + "src": "8578:3:23" + }, + "nativeSrc": "8578:11:23", + "nodeType": "YulFunctionCall", + "src": "8578:11:23" + }, + { + "kind": "number", + "nativeSrc": "8591:1:23", + "nodeType": "YulLiteral", + "src": "8591:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "8574:3:23", + "nodeType": "YulIdentifier", + "src": "8574:3:23" + }, + "nativeSrc": "8574:19:23", + "nodeType": "YulFunctionCall", + "src": "8574:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8562:3:23", + "nodeType": "YulIdentifier", + "src": "8562:3:23" + }, + "nativeSrc": "8562:32:23", + "nodeType": "YulFunctionCall", + "src": "8562:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8535:6:23", + "nodeType": "YulIdentifier", + "src": "8535:6:23" + }, + "nativeSrc": "8535:60:23", + "nodeType": "YulFunctionCall", + "src": "8535:60:23" + }, + "nativeSrc": "8535:60:23", + "nodeType": "YulExpressionStatement", + "src": "8535:60:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8615:9:23", + "nodeType": "YulIdentifier", + "src": "8615:9:23" + }, + { + "kind": "number", + "nativeSrc": "8626:2:23", + "nodeType": "YulLiteral", + "src": "8626:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8611:3:23", + "nodeType": "YulIdentifier", + "src": "8611:3:23" + }, + "nativeSrc": "8611:18:23", + "nodeType": "YulFunctionCall", + "src": "8611:18:23" + }, + { + "name": "value2", + "nativeSrc": "8631:6:23", + "nodeType": "YulIdentifier", + "src": "8631:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8604:6:23", + "nodeType": "YulIdentifier", + "src": "8604:6:23" + }, + "nativeSrc": "8604:34:23", + "nodeType": "YulFunctionCall", + "src": "8604:34:23" + }, + "nativeSrc": "8604:34:23", + "nodeType": "YulExpressionStatement", + "src": "8604:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8658:9:23", + "nodeType": "YulIdentifier", + "src": "8658:9:23" + }, + { + "kind": "number", + "nativeSrc": "8669:2:23", + "nodeType": "YulLiteral", + "src": "8669:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8654:3:23", + "nodeType": "YulIdentifier", + "src": "8654:3:23" + }, + "nativeSrc": "8654:18:23", + "nodeType": "YulFunctionCall", + "src": "8654:18:23" + }, + { + "name": "value3", + "nativeSrc": "8674:6:23", + "nodeType": "YulIdentifier", + "src": "8674:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8647:6:23", + "nodeType": "YulIdentifier", + "src": "8647:6:23" + }, + "nativeSrc": "8647:34:23", + "nodeType": "YulFunctionCall", + "src": "8647:34:23" + }, + "nativeSrc": "8647:34:23", + "nodeType": "YulExpressionStatement", + "src": "8647:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8701:9:23", + "nodeType": "YulIdentifier", + "src": "8701:9:23" + }, + { + "kind": "number", + "nativeSrc": "8712:3:23", + "nodeType": "YulLiteral", + "src": "8712:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8697:3:23", + "nodeType": "YulIdentifier", + "src": "8697:3:23" + }, + "nativeSrc": "8697:19:23", + "nodeType": "YulFunctionCall", + "src": "8697:19:23" + }, + { + "arguments": [ + { + "name": "value4", + "nativeSrc": "8722:6:23", + "nodeType": "YulIdentifier", + "src": "8722:6:23" + }, + { + "kind": "number", + "nativeSrc": "8730:4:23", + "nodeType": "YulLiteral", + "src": "8730:4:23", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "8718:3:23", + "nodeType": "YulIdentifier", + "src": "8718:3:23" + }, + "nativeSrc": "8718:17:23", + "nodeType": "YulFunctionCall", + "src": "8718:17:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8690:6:23", + "nodeType": "YulIdentifier", + "src": "8690:6:23" + }, + "nativeSrc": "8690:46:23", + "nodeType": "YulFunctionCall", + "src": "8690:46:23" + }, + "nativeSrc": "8690:46:23", + "nodeType": "YulExpressionStatement", + "src": "8690:46:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8756:9:23", + "nodeType": "YulIdentifier", + "src": "8756:9:23" + }, + { + "kind": "number", + "nativeSrc": "8767:3:23", + "nodeType": "YulLiteral", + "src": "8767:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8752:3:23", + "nodeType": "YulIdentifier", + "src": "8752:3:23" + }, + "nativeSrc": "8752:19:23", + "nodeType": "YulFunctionCall", + "src": "8752:19:23" + }, + { + "name": "value5", + "nativeSrc": "8773:6:23", + "nodeType": "YulIdentifier", + "src": "8773:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8745:6:23", + "nodeType": "YulIdentifier", + "src": "8745:6:23" + }, + "nativeSrc": "8745:35:23", + "nodeType": "YulFunctionCall", + "src": "8745:35:23" + }, + "nativeSrc": "8745:35:23", + "nodeType": "YulExpressionStatement", + "src": "8745:35:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8800:9:23", + "nodeType": "YulIdentifier", + "src": "8800:9:23" + }, + { + "kind": "number", + "nativeSrc": "8811:3:23", + "nodeType": "YulLiteral", + "src": "8811:3:23", + "type": "", + "value": "192" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8796:3:23", + "nodeType": "YulIdentifier", + "src": "8796:3:23" + }, + "nativeSrc": "8796:19:23", + "nodeType": "YulFunctionCall", + "src": "8796:19:23" + }, + { + "name": "value6", + "nativeSrc": "8817:6:23", + "nodeType": "YulIdentifier", + "src": "8817:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "8789:6:23", + "nodeType": "YulIdentifier", + "src": "8789:6:23" + }, + "nativeSrc": "8789:35:23", + "nodeType": "YulFunctionCall", + "src": "8789:35:23" + }, + "nativeSrc": "8789:35:23", + "nodeType": "YulExpressionStatement", + "src": "8789:35:23" + } + ] + }, + "name": "abi_encode_tuple_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__to_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__fromStack_reversed", + "nativeSrc": "8164:666:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "8350:9:23", + "nodeType": "YulTypedName", + "src": "8350:9:23", + "type": "" + }, + { + "name": "value6", + "nativeSrc": "8361:6:23", + "nodeType": "YulTypedName", + "src": "8361:6:23", + "type": "" + }, + { + "name": "value5", + "nativeSrc": "8369:6:23", + "nodeType": "YulTypedName", + "src": "8369:6:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "8377:6:23", + "nodeType": "YulTypedName", + "src": "8377:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "8385:6:23", + "nodeType": "YulTypedName", + "src": "8385:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "8393:6:23", + "nodeType": "YulTypedName", + "src": "8393:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "8401:6:23", + "nodeType": "YulTypedName", + "src": "8401:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "8409:6:23", + "nodeType": "YulTypedName", + "src": "8409:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "8420:4:23", + "nodeType": "YulTypedName", + "src": "8420:4:23", + "type": "" + } + ], + "src": "8164:666:23" + }, + { + "body": { + "nativeSrc": "8964:171:23", + "nodeType": "YulBlock", + "src": "8964:171:23", + "statements": [ + { + "nativeSrc": "8974:26:23", + "nodeType": "YulAssignment", + "src": "8974:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "8986:9:23", + "nodeType": "YulIdentifier", + "src": "8986:9:23" + }, + { + "kind": "number", + "nativeSrc": "8997:2:23", + "nodeType": "YulLiteral", + "src": "8997:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "8982:3:23", + "nodeType": "YulIdentifier", + "src": "8982:3:23" + }, + "nativeSrc": "8982:18:23", + "nodeType": "YulFunctionCall", + "src": "8982:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "8974:4:23", + "nodeType": "YulIdentifier", + "src": "8974:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9016:9:23", + "nodeType": "YulIdentifier", + "src": "9016:9:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9031:6:23", + "nodeType": "YulIdentifier", + "src": "9031:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9047:3:23", + "nodeType": "YulLiteral", + "src": "9047:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "9052:1:23", + "nodeType": "YulLiteral", + "src": "9052:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9043:3:23", + "nodeType": "YulIdentifier", + "src": "9043:3:23" + }, + "nativeSrc": "9043:11:23", + "nodeType": "YulFunctionCall", + "src": "9043:11:23" + }, + { + "kind": "number", + "nativeSrc": "9056:1:23", + "nodeType": "YulLiteral", + "src": "9056:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9039:3:23", + "nodeType": "YulIdentifier", + "src": "9039:3:23" + }, + "nativeSrc": "9039:19:23", + "nodeType": "YulFunctionCall", + "src": "9039:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9027:3:23", + "nodeType": "YulIdentifier", + "src": "9027:3:23" + }, + "nativeSrc": "9027:32:23", + "nodeType": "YulFunctionCall", + "src": "9027:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9009:6:23", + "nodeType": "YulIdentifier", + "src": "9009:6:23" + }, + "nativeSrc": "9009:51:23", + "nodeType": "YulFunctionCall", + "src": "9009:51:23" + }, + "nativeSrc": "9009:51:23", + "nodeType": "YulExpressionStatement", + "src": "9009:51:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9080:9:23", + "nodeType": "YulIdentifier", + "src": "9080:9:23" + }, + { + "kind": "number", + "nativeSrc": "9091:2:23", + "nodeType": "YulLiteral", + "src": "9091:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9076:3:23", + "nodeType": "YulIdentifier", + "src": "9076:3:23" + }, + "nativeSrc": "9076:18:23", + "nodeType": "YulFunctionCall", + "src": "9076:18:23" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "9100:6:23", + "nodeType": "YulIdentifier", + "src": "9100:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9116:3:23", + "nodeType": "YulLiteral", + "src": "9116:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "9121:1:23", + "nodeType": "YulLiteral", + "src": "9121:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "9112:3:23", + "nodeType": "YulIdentifier", + "src": "9112:3:23" + }, + "nativeSrc": "9112:11:23", + "nodeType": "YulFunctionCall", + "src": "9112:11:23" + }, + { + "kind": "number", + "nativeSrc": "9125:1:23", + "nodeType": "YulLiteral", + "src": "9125:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9108:3:23", + "nodeType": "YulIdentifier", + "src": "9108:3:23" + }, + "nativeSrc": "9108:19:23", + "nodeType": "YulFunctionCall", + "src": "9108:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "9096:3:23", + "nodeType": "YulIdentifier", + "src": "9096:3:23" + }, + "nativeSrc": "9096:32:23", + "nodeType": "YulFunctionCall", + "src": "9096:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9069:6:23", + "nodeType": "YulIdentifier", + "src": "9069:6:23" + }, + "nativeSrc": "9069:60:23", + "nodeType": "YulFunctionCall", + "src": "9069:60:23" + }, + "nativeSrc": "9069:60:23", + "nodeType": "YulExpressionStatement", + "src": "9069:60:23" + } + ] + }, + "name": "abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed", + "nativeSrc": "8835:300:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "8925:9:23", + "nodeType": "YulTypedName", + "src": "8925:9:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "8936:6:23", + "nodeType": "YulTypedName", + "src": "8936:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "8944:6:23", + "nodeType": "YulTypedName", + "src": "8944:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "8955:4:23", + "nodeType": "YulTypedName", + "src": "8955:4:23", + "type": "" + } + ], + "src": "8835:300:23" + }, + { + "body": { + "nativeSrc": "9221:103:23", + "nodeType": "YulBlock", + "src": "9221:103:23", + "statements": [ + { + "body": { + "nativeSrc": "9267:16:23", + "nodeType": "YulBlock", + "src": "9267:16:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "9276:1:23", + "nodeType": "YulLiteral", + "src": "9276:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "9279:1:23", + "nodeType": "YulLiteral", + "src": "9279:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "9269:6:23", + "nodeType": "YulIdentifier", + "src": "9269:6:23" + }, + "nativeSrc": "9269:12:23", + "nodeType": "YulFunctionCall", + "src": "9269:12:23" + }, + "nativeSrc": "9269:12:23", + "nodeType": "YulExpressionStatement", + "src": "9269:12:23" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nativeSrc": "9242:7:23", + "nodeType": "YulIdentifier", + "src": "9242:7:23" + }, + { + "name": "headStart", + "nativeSrc": "9251:9:23", + "nodeType": "YulIdentifier", + "src": "9251:9:23" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "9238:3:23", + "nodeType": "YulIdentifier", + "src": "9238:3:23" + }, + "nativeSrc": "9238:23:23", + "nodeType": "YulFunctionCall", + "src": "9238:23:23" + }, + { + "kind": "number", + "nativeSrc": "9263:2:23", + "nodeType": "YulLiteral", + "src": "9263:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nativeSrc": "9234:3:23", + "nodeType": "YulIdentifier", + "src": "9234:3:23" + }, + "nativeSrc": "9234:32:23", + "nodeType": "YulFunctionCall", + "src": "9234:32:23" + }, + "nativeSrc": "9231:52:23", + "nodeType": "YulIf", + "src": "9231:52:23" + }, + { + "nativeSrc": "9292:26:23", + "nodeType": "YulAssignment", + "src": "9292:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9308:9:23", + "nodeType": "YulIdentifier", + "src": "9308:9:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9302:5:23", + "nodeType": "YulIdentifier", + "src": "9302:5:23" + }, + "nativeSrc": "9302:16:23", + "nodeType": "YulFunctionCall", + "src": "9302:16:23" + }, + "variableNames": [ + { + "name": "value0", + "nativeSrc": "9292:6:23", + "nodeType": "YulIdentifier", + "src": "9292:6:23" + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256_fromMemory", + "nativeSrc": "9140:184:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "9187:9:23", + "nodeType": "YulTypedName", + "src": "9187:9:23", + "type": "" + }, + { + "name": "dataEnd", + "nativeSrc": "9198:7:23", + "nodeType": "YulTypedName", + "src": "9198:7:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nativeSrc": "9210:6:23", + "nodeType": "YulTypedName", + "src": "9210:6:23", + "type": "" + } + ], + "src": "9140:184:23" + }, + { + "body": { + "nativeSrc": "9503:230:23", + "nodeType": "YulBlock", + "src": "9503:230:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9520:9:23", + "nodeType": "YulIdentifier", + "src": "9520:9:23" + }, + { + "kind": "number", + "nativeSrc": "9531:2:23", + "nodeType": "YulLiteral", + "src": "9531:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9513:6:23", + "nodeType": "YulIdentifier", + "src": "9513:6:23" + }, + "nativeSrc": "9513:21:23", + "nodeType": "YulFunctionCall", + "src": "9513:21:23" + }, + "nativeSrc": "9513:21:23", + "nodeType": "YulExpressionStatement", + "src": "9513:21:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9554:9:23", + "nodeType": "YulIdentifier", + "src": "9554:9:23" + }, + { + "kind": "number", + "nativeSrc": "9565:2:23", + "nodeType": "YulLiteral", + "src": "9565:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9550:3:23", + "nodeType": "YulIdentifier", + "src": "9550:3:23" + }, + "nativeSrc": "9550:18:23", + "nodeType": "YulFunctionCall", + "src": "9550:18:23" + }, + { + "kind": "number", + "nativeSrc": "9570:2:23", + "nodeType": "YulLiteral", + "src": "9570:2:23", + "type": "", + "value": "40" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9543:6:23", + "nodeType": "YulIdentifier", + "src": "9543:6:23" + }, + "nativeSrc": "9543:30:23", + "nodeType": "YulFunctionCall", + "src": "9543:30:23" + }, + "nativeSrc": "9543:30:23", + "nodeType": "YulExpressionStatement", + "src": "9543:30:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9593:9:23", + "nodeType": "YulIdentifier", + "src": "9593:9:23" + }, + { + "kind": "number", + "nativeSrc": "9604:2:23", + "nodeType": "YulLiteral", + "src": "9604:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9589:3:23", + "nodeType": "YulIdentifier", + "src": "9589:3:23" + }, + "nativeSrc": "9589:18:23", + "nodeType": "YulFunctionCall", + "src": "9589:18:23" + }, + { + "hexValue": "5065726d6974206661696c656420616e6420696e73756666696369656e742061", + "kind": "string", + "nativeSrc": "9609:34:23", + "nodeType": "YulLiteral", + "src": "9609:34:23", + "type": "", + "value": "Permit failed and insufficient a" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9582:6:23", + "nodeType": "YulIdentifier", + "src": "9582:6:23" + }, + "nativeSrc": "9582:62:23", + "nodeType": "YulFunctionCall", + "src": "9582:62:23" + }, + "nativeSrc": "9582:62:23", + "nodeType": "YulExpressionStatement", + "src": "9582:62:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9664:9:23", + "nodeType": "YulIdentifier", + "src": "9664:9:23" + }, + { + "kind": "number", + "nativeSrc": "9675:2:23", + "nodeType": "YulLiteral", + "src": "9675:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9660:3:23", + "nodeType": "YulIdentifier", + "src": "9660:3:23" + }, + "nativeSrc": "9660:18:23", + "nodeType": "YulFunctionCall", + "src": "9660:18:23" + }, + { + "hexValue": "6c6c6f77616e6365", + "kind": "string", + "nativeSrc": "9680:10:23", + "nodeType": "YulLiteral", + "src": "9680:10:23", + "type": "", + "value": "llowance" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "9653:6:23", + "nodeType": "YulIdentifier", + "src": "9653:6:23" + }, + "nativeSrc": "9653:38:23", + "nodeType": "YulFunctionCall", + "src": "9653:38:23" + }, + "nativeSrc": "9653:38:23", + "nodeType": "YulExpressionStatement", + "src": "9653:38:23" + }, + { + "nativeSrc": "9700:27:23", + "nodeType": "YulAssignment", + "src": "9700:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "9712:9:23", + "nodeType": "YulIdentifier", + "src": "9712:9:23" + }, + { + "kind": "number", + "nativeSrc": "9723:3:23", + "nodeType": "YulLiteral", + "src": "9723:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9708:3:23", + "nodeType": "YulIdentifier", + "src": "9708:3:23" + }, + "nativeSrc": "9708:19:23", + "nodeType": "YulFunctionCall", + "src": "9708:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "9700:4:23", + "nodeType": "YulIdentifier", + "src": "9700:4:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15__to_t_string_memory_ptr__fromStack_reversed", + "nativeSrc": "9329:404:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "9480:9:23", + "nodeType": "YulTypedName", + "src": "9480:9:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "9494:4:23", + "nodeType": "YulTypedName", + "src": "9494:4:23", + "type": "" + } + ], + "src": "9329:404:23" + }, + { + "body": { + "nativeSrc": "9875:164:23", + "nodeType": "YulBlock", + "src": "9875:164:23", + "statements": [ + { + "nativeSrc": "9885:27:23", + "nodeType": "YulVariableDeclaration", + "src": "9885:27:23", + "value": { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9905:6:23", + "nodeType": "YulIdentifier", + "src": "9905:6:23" + } + ], + "functionName": { + "name": "mload", + "nativeSrc": "9899:5:23", + "nodeType": "YulIdentifier", + "src": "9899:5:23" + }, + "nativeSrc": "9899:13:23", + "nodeType": "YulFunctionCall", + "src": "9899:13:23" + }, + "variables": [ + { + "name": "length", + "nativeSrc": "9889:6:23", + "nodeType": "YulTypedName", + "src": "9889:6:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "9927:3:23", + "nodeType": "YulIdentifier", + "src": "9927:3:23" + }, + { + "arguments": [ + { + "name": "value0", + "nativeSrc": "9936:6:23", + "nodeType": "YulIdentifier", + "src": "9936:6:23" + }, + { + "kind": "number", + "nativeSrc": "9944:4:23", + "nodeType": "YulLiteral", + "src": "9944:4:23", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9932:3:23", + "nodeType": "YulIdentifier", + "src": "9932:3:23" + }, + "nativeSrc": "9932:17:23", + "nodeType": "YulFunctionCall", + "src": "9932:17:23" + }, + { + "name": "length", + "nativeSrc": "9951:6:23", + "nodeType": "YulIdentifier", + "src": "9951:6:23" + } + ], + "functionName": { + "name": "mcopy", + "nativeSrc": "9921:5:23", + "nodeType": "YulIdentifier", + "src": "9921:5:23" + }, + "nativeSrc": "9921:37:23", + "nodeType": "YulFunctionCall", + "src": "9921:37:23" + }, + "nativeSrc": "9921:37:23", + "nodeType": "YulExpressionStatement", + "src": "9921:37:23" + }, + { + "nativeSrc": "9967:26:23", + "nodeType": "YulVariableDeclaration", + "src": "9967:26:23", + "value": { + "arguments": [ + { + "name": "pos", + "nativeSrc": "9981:3:23", + "nodeType": "YulIdentifier", + "src": "9981:3:23" + }, + { + "name": "length", + "nativeSrc": "9986:6:23", + "nodeType": "YulIdentifier", + "src": "9986:6:23" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "9977:3:23", + "nodeType": "YulIdentifier", + "src": "9977:3:23" + }, + "nativeSrc": "9977:16:23", + "nodeType": "YulFunctionCall", + "src": "9977:16:23" + }, + "variables": [ + { + "name": "_1", + "nativeSrc": "9971:2:23", + "nodeType": "YulTypedName", + "src": "9971:2:23", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "_1", + "nativeSrc": "10009:2:23", + "nodeType": "YulIdentifier", + "src": "10009:2:23" + }, + { + "kind": "number", + "nativeSrc": "10013:1:23", + "nodeType": "YulLiteral", + "src": "10013:1:23", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10002:6:23", + "nodeType": "YulIdentifier", + "src": "10002:6:23" + }, + "nativeSrc": "10002:13:23", + "nodeType": "YulFunctionCall", + "src": "10002:13:23" + }, + "nativeSrc": "10002:13:23", + "nodeType": "YulExpressionStatement", + "src": "10002:13:23" + }, + { + "nativeSrc": "10024:9:23", + "nodeType": "YulAssignment", + "src": "10024:9:23", + "value": { + "name": "_1", + "nativeSrc": "10031:2:23", + "nodeType": "YulIdentifier", + "src": "10031:2:23" + }, + "variableNames": [ + { + "name": "end", + "nativeSrc": "10024:3:23", + "nodeType": "YulIdentifier", + "src": "10024:3:23" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nativeSrc": "9738:301:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nativeSrc": "9851:3:23", + "nodeType": "YulTypedName", + "src": "9851:3:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "9856:6:23", + "nodeType": "YulTypedName", + "src": "9856:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nativeSrc": "9867:3:23", + "nodeType": "YulTypedName", + "src": "9867:3:23", + "type": "" + } + ], + "src": "9738:301:23" + }, + { + "body": { + "nativeSrc": "10225:217:23", + "nodeType": "YulBlock", + "src": "10225:217:23", + "statements": [ + { + "nativeSrc": "10235:27:23", + "nodeType": "YulAssignment", + "src": "10235:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10247:9:23", + "nodeType": "YulIdentifier", + "src": "10247:9:23" + }, + { + "kind": "number", + "nativeSrc": "10258:3:23", + "nodeType": "YulLiteral", + "src": "10258:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10243:3:23", + "nodeType": "YulIdentifier", + "src": "10243:3:23" + }, + "nativeSrc": "10243:19:23", + "nodeType": "YulFunctionCall", + "src": "10243:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "10235:4:23", + "nodeType": "YulIdentifier", + "src": "10235:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10278:9:23", + "nodeType": "YulIdentifier", + "src": "10278:9:23" + }, + { + "name": "value0", + "nativeSrc": "10289:6:23", + "nodeType": "YulIdentifier", + "src": "10289:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10271:6:23", + "nodeType": "YulIdentifier", + "src": "10271:6:23" + }, + "nativeSrc": "10271:25:23", + "nodeType": "YulFunctionCall", + "src": "10271:25:23" + }, + "nativeSrc": "10271:25:23", + "nodeType": "YulExpressionStatement", + "src": "10271:25:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10316:9:23", + "nodeType": "YulIdentifier", + "src": "10316:9:23" + }, + { + "kind": "number", + "nativeSrc": "10327:2:23", + "nodeType": "YulLiteral", + "src": "10327:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10312:3:23", + "nodeType": "YulIdentifier", + "src": "10312:3:23" + }, + "nativeSrc": "10312:18:23", + "nodeType": "YulFunctionCall", + "src": "10312:18:23" + }, + { + "arguments": [ + { + "name": "value1", + "nativeSrc": "10336:6:23", + "nodeType": "YulIdentifier", + "src": "10336:6:23" + }, + { + "kind": "number", + "nativeSrc": "10344:4:23", + "nodeType": "YulLiteral", + "src": "10344:4:23", + "type": "", + "value": "0xff" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10332:3:23", + "nodeType": "YulIdentifier", + "src": "10332:3:23" + }, + "nativeSrc": "10332:17:23", + "nodeType": "YulFunctionCall", + "src": "10332:17:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10305:6:23", + "nodeType": "YulIdentifier", + "src": "10305:6:23" + }, + "nativeSrc": "10305:45:23", + "nodeType": "YulFunctionCall", + "src": "10305:45:23" + }, + "nativeSrc": "10305:45:23", + "nodeType": "YulExpressionStatement", + "src": "10305:45:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10370:9:23", + "nodeType": "YulIdentifier", + "src": "10370:9:23" + }, + { + "kind": "number", + "nativeSrc": "10381:2:23", + "nodeType": "YulLiteral", + "src": "10381:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10366:3:23", + "nodeType": "YulIdentifier", + "src": "10366:3:23" + }, + "nativeSrc": "10366:18:23", + "nodeType": "YulFunctionCall", + "src": "10366:18:23" + }, + { + "name": "value2", + "nativeSrc": "10386:6:23", + "nodeType": "YulIdentifier", + "src": "10386:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10359:6:23", + "nodeType": "YulIdentifier", + "src": "10359:6:23" + }, + "nativeSrc": "10359:34:23", + "nodeType": "YulFunctionCall", + "src": "10359:34:23" + }, + "nativeSrc": "10359:34:23", + "nodeType": "YulExpressionStatement", + "src": "10359:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10413:9:23", + "nodeType": "YulIdentifier", + "src": "10413:9:23" + }, + { + "kind": "number", + "nativeSrc": "10424:2:23", + "nodeType": "YulLiteral", + "src": "10424:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10409:3:23", + "nodeType": "YulIdentifier", + "src": "10409:3:23" + }, + "nativeSrc": "10409:18:23", + "nodeType": "YulFunctionCall", + "src": "10409:18:23" + }, + { + "name": "value3", + "nativeSrc": "10429:6:23", + "nodeType": "YulIdentifier", + "src": "10429:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10402:6:23", + "nodeType": "YulIdentifier", + "src": "10402:6:23" + }, + "nativeSrc": "10402:34:23", + "nodeType": "YulFunctionCall", + "src": "10402:34:23" + }, + "nativeSrc": "10402:34:23", + "nodeType": "YulExpressionStatement", + "src": "10402:34:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed", + "nativeSrc": "10044:398:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "10170:9:23", + "nodeType": "YulTypedName", + "src": "10170:9:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "10181:6:23", + "nodeType": "YulTypedName", + "src": "10181:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "10189:6:23", + "nodeType": "YulTypedName", + "src": "10189:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "10197:6:23", + "nodeType": "YulTypedName", + "src": "10197:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "10205:6:23", + "nodeType": "YulTypedName", + "src": "10205:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "10216:4:23", + "nodeType": "YulTypedName", + "src": "10216:4:23", + "type": "" + } + ], + "src": "10044:398:23" + }, + { + "body": { + "nativeSrc": "10479:95:23", + "nodeType": "YulBlock", + "src": "10479:95:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10496:1:23", + "nodeType": "YulLiteral", + "src": "10496:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10503:3:23", + "nodeType": "YulLiteral", + "src": "10503:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "10508:10:23", + "nodeType": "YulLiteral", + "src": "10508:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "10499:3:23", + "nodeType": "YulIdentifier", + "src": "10499:3:23" + }, + "nativeSrc": "10499:20:23", + "nodeType": "YulFunctionCall", + "src": "10499:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10489:6:23", + "nodeType": "YulIdentifier", + "src": "10489:6:23" + }, + "nativeSrc": "10489:31:23", + "nodeType": "YulFunctionCall", + "src": "10489:31:23" + }, + "nativeSrc": "10489:31:23", + "nodeType": "YulExpressionStatement", + "src": "10489:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10536:1:23", + "nodeType": "YulLiteral", + "src": "10536:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "10539:4:23", + "nodeType": "YulLiteral", + "src": "10539:4:23", + "type": "", + "value": "0x21" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10529:6:23", + "nodeType": "YulIdentifier", + "src": "10529:6:23" + }, + "nativeSrc": "10529:15:23", + "nodeType": "YulFunctionCall", + "src": "10529:15:23" + }, + "nativeSrc": "10529:15:23", + "nodeType": "YulExpressionStatement", + "src": "10529:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10560:1:23", + "nodeType": "YulLiteral", + "src": "10560:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "10563:4:23", + "nodeType": "YulLiteral", + "src": "10563:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "10553:6:23", + "nodeType": "YulIdentifier", + "src": "10553:6:23" + }, + "nativeSrc": "10553:15:23", + "nodeType": "YulFunctionCall", + "src": "10553:15:23" + }, + "nativeSrc": "10553:15:23", + "nodeType": "YulExpressionStatement", + "src": "10553:15:23" + } + ] + }, + "name": "panic_error_0x21", + "nativeSrc": "10447:127:23", + "nodeType": "YulFunctionDefinition", + "src": "10447:127:23" + }, + { + "body": { + "nativeSrc": "10680:76:23", + "nodeType": "YulBlock", + "src": "10680:76:23", + "statements": [ + { + "nativeSrc": "10690:26:23", + "nodeType": "YulAssignment", + "src": "10690:26:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10702:9:23", + "nodeType": "YulIdentifier", + "src": "10702:9:23" + }, + { + "kind": "number", + "nativeSrc": "10713:2:23", + "nodeType": "YulLiteral", + "src": "10713:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "10698:3:23", + "nodeType": "YulIdentifier", + "src": "10698:3:23" + }, + "nativeSrc": "10698:18:23", + "nodeType": "YulFunctionCall", + "src": "10698:18:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "10690:4:23", + "nodeType": "YulIdentifier", + "src": "10690:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "10732:9:23", + "nodeType": "YulIdentifier", + "src": "10732:9:23" + }, + { + "name": "value0", + "nativeSrc": "10743:6:23", + "nodeType": "YulIdentifier", + "src": "10743:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "10725:6:23", + "nodeType": "YulIdentifier", + "src": "10725:6:23" + }, + "nativeSrc": "10725:25:23", + "nodeType": "YulFunctionCall", + "src": "10725:25:23" + }, + "nativeSrc": "10725:25:23", + "nodeType": "YulExpressionStatement", + "src": "10725:25:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed", + "nativeSrc": "10579:177:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "10649:9:23", + "nodeType": "YulTypedName", + "src": "10649:9:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "10660:6:23", + "nodeType": "YulTypedName", + "src": "10660:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "10671:4:23", + "nodeType": "YulTypedName", + "src": "10671:4:23", + "type": "" + } + ], + "src": "10579:177:23" + }, + { + "body": { + "nativeSrc": "10816:325:23", + "nodeType": "YulBlock", + "src": "10816:325:23", + "statements": [ + { + "nativeSrc": "10826:22:23", + "nodeType": "YulAssignment", + "src": "10826:22:23", + "value": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "10840:1:23", + "nodeType": "YulLiteral", + "src": "10840:1:23", + "type": "", + "value": "1" + }, + { + "name": "data", + "nativeSrc": "10843:4:23", + "nodeType": "YulIdentifier", + "src": "10843:4:23" + } + ], + "functionName": { + "name": "shr", + "nativeSrc": "10836:3:23", + "nodeType": "YulIdentifier", + "src": "10836:3:23" + }, + "nativeSrc": "10836:12:23", + "nodeType": "YulFunctionCall", + "src": "10836:12:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "10826:6:23", + "nodeType": "YulIdentifier", + "src": "10826:6:23" + } + ] + }, + { + "nativeSrc": "10857:38:23", + "nodeType": "YulVariableDeclaration", + "src": "10857:38:23", + "value": { + "arguments": [ + { + "name": "data", + "nativeSrc": "10887:4:23", + "nodeType": "YulIdentifier", + "src": "10887:4:23" + }, + { + "kind": "number", + "nativeSrc": "10893:1:23", + "nodeType": "YulLiteral", + "src": "10893:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10883:3:23", + "nodeType": "YulIdentifier", + "src": "10883:3:23" + }, + "nativeSrc": "10883:12:23", + "nodeType": "YulFunctionCall", + "src": "10883:12:23" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "10861:18:23", + "nodeType": "YulTypedName", + "src": "10861:18:23", + "type": "" + } + ] + }, + { + "body": { + "nativeSrc": "10934:31:23", + "nodeType": "YulBlock", + "src": "10934:31:23", + "statements": [ + { + "nativeSrc": "10936:27:23", + "nodeType": "YulAssignment", + "src": "10936:27:23", + "value": { + "arguments": [ + { + "name": "length", + "nativeSrc": "10950:6:23", + "nodeType": "YulIdentifier", + "src": "10950:6:23" + }, + { + "kind": "number", + "nativeSrc": "10958:4:23", + "nodeType": "YulLiteral", + "src": "10958:4:23", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "10946:3:23", + "nodeType": "YulIdentifier", + "src": "10946:3:23" + }, + "nativeSrc": "10946:17:23", + "nodeType": "YulFunctionCall", + "src": "10946:17:23" + }, + "variableNames": [ + { + "name": "length", + "nativeSrc": "10936:6:23", + "nodeType": "YulIdentifier", + "src": "10936:6:23" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "10914:18:23", + "nodeType": "YulIdentifier", + "src": "10914:18:23" + } + ], + "functionName": { + "name": "iszero", + "nativeSrc": "10907:6:23", + "nodeType": "YulIdentifier", + "src": "10907:6:23" + }, + "nativeSrc": "10907:26:23", + "nodeType": "YulFunctionCall", + "src": "10907:26:23" + }, + "nativeSrc": "10904:61:23", + "nodeType": "YulIf", + "src": "10904:61:23" + }, + { + "body": { + "nativeSrc": "11024:111:23", + "nodeType": "YulBlock", + "src": "11024:111:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11045:1:23", + "nodeType": "YulLiteral", + "src": "11045:1:23", + "type": "", + "value": "0" + }, + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11052:3:23", + "nodeType": "YulLiteral", + "src": "11052:3:23", + "type": "", + "value": "224" + }, + { + "kind": "number", + "nativeSrc": "11057:10:23", + "nodeType": "YulLiteral", + "src": "11057:10:23", + "type": "", + "value": "0x4e487b71" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "11048:3:23", + "nodeType": "YulIdentifier", + "src": "11048:3:23" + }, + "nativeSrc": "11048:20:23", + "nodeType": "YulFunctionCall", + "src": "11048:20:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11038:6:23", + "nodeType": "YulIdentifier", + "src": "11038:6:23" + }, + "nativeSrc": "11038:31:23", + "nodeType": "YulFunctionCall", + "src": "11038:31:23" + }, + "nativeSrc": "11038:31:23", + "nodeType": "YulExpressionStatement", + "src": "11038:31:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11089:1:23", + "nodeType": "YulLiteral", + "src": "11089:1:23", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nativeSrc": "11092:4:23", + "nodeType": "YulLiteral", + "src": "11092:4:23", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11082:6:23", + "nodeType": "YulIdentifier", + "src": "11082:6:23" + }, + "nativeSrc": "11082:15:23", + "nodeType": "YulFunctionCall", + "src": "11082:15:23" + }, + "nativeSrc": "11082:15:23", + "nodeType": "YulExpressionStatement", + "src": "11082:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11117:1:23", + "nodeType": "YulLiteral", + "src": "11117:1:23", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nativeSrc": "11120:4:23", + "nodeType": "YulLiteral", + "src": "11120:4:23", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nativeSrc": "11110:6:23", + "nodeType": "YulIdentifier", + "src": "11110:6:23" + }, + "nativeSrc": "11110:15:23", + "nodeType": "YulFunctionCall", + "src": "11110:15:23" + }, + "nativeSrc": "11110:15:23", + "nodeType": "YulExpressionStatement", + "src": "11110:15:23" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nativeSrc": "10980:18:23", + "nodeType": "YulIdentifier", + "src": "10980:18:23" + }, + { + "arguments": [ + { + "name": "length", + "nativeSrc": "11003:6:23", + "nodeType": "YulIdentifier", + "src": "11003:6:23" + }, + { + "kind": "number", + "nativeSrc": "11011:2:23", + "nodeType": "YulLiteral", + "src": "11011:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nativeSrc": "11000:2:23", + "nodeType": "YulIdentifier", + "src": "11000:2:23" + }, + "nativeSrc": "11000:14:23", + "nodeType": "YulFunctionCall", + "src": "11000:14:23" + } + ], + "functionName": { + "name": "eq", + "nativeSrc": "10977:2:23", + "nodeType": "YulIdentifier", + "src": "10977:2:23" + }, + "nativeSrc": "10977:38:23", + "nodeType": "YulFunctionCall", + "src": "10977:38:23" + }, + "nativeSrc": "10974:161:23", + "nodeType": "YulIf", + "src": "10974:161:23" + } + ] + }, + "name": "extract_byte_array_length", + "nativeSrc": "10761:380:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nativeSrc": "10796:4:23", + "nodeType": "YulTypedName", + "src": "10796:4:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nativeSrc": "10805:6:23", + "nodeType": "YulTypedName", + "src": "10805:6:23", + "type": "" + } + ], + "src": "10761:380:23" + }, + { + "body": { + "nativeSrc": "11359:276:23", + "nodeType": "YulBlock", + "src": "11359:276:23", + "statements": [ + { + "nativeSrc": "11369:27:23", + "nodeType": "YulAssignment", + "src": "11369:27:23", + "value": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11381:9:23", + "nodeType": "YulIdentifier", + "src": "11381:9:23" + }, + { + "kind": "number", + "nativeSrc": "11392:3:23", + "nodeType": "YulLiteral", + "src": "11392:3:23", + "type": "", + "value": "160" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11377:3:23", + "nodeType": "YulIdentifier", + "src": "11377:3:23" + }, + "nativeSrc": "11377:19:23", + "nodeType": "YulFunctionCall", + "src": "11377:19:23" + }, + "variableNames": [ + { + "name": "tail", + "nativeSrc": "11369:4:23", + "nodeType": "YulIdentifier", + "src": "11369:4:23" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11412:9:23", + "nodeType": "YulIdentifier", + "src": "11412:9:23" + }, + { + "name": "value0", + "nativeSrc": "11423:6:23", + "nodeType": "YulIdentifier", + "src": "11423:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11405:6:23", + "nodeType": "YulIdentifier", + "src": "11405:6:23" + }, + "nativeSrc": "11405:25:23", + "nodeType": "YulFunctionCall", + "src": "11405:25:23" + }, + "nativeSrc": "11405:25:23", + "nodeType": "YulExpressionStatement", + "src": "11405:25:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11450:9:23", + "nodeType": "YulIdentifier", + "src": "11450:9:23" + }, + { + "kind": "number", + "nativeSrc": "11461:2:23", + "nodeType": "YulLiteral", + "src": "11461:2:23", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11446:3:23", + "nodeType": "YulIdentifier", + "src": "11446:3:23" + }, + "nativeSrc": "11446:18:23", + "nodeType": "YulFunctionCall", + "src": "11446:18:23" + }, + { + "name": "value1", + "nativeSrc": "11466:6:23", + "nodeType": "YulIdentifier", + "src": "11466:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11439:6:23", + "nodeType": "YulIdentifier", + "src": "11439:6:23" + }, + "nativeSrc": "11439:34:23", + "nodeType": "YulFunctionCall", + "src": "11439:34:23" + }, + "nativeSrc": "11439:34:23", + "nodeType": "YulExpressionStatement", + "src": "11439:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11493:9:23", + "nodeType": "YulIdentifier", + "src": "11493:9:23" + }, + { + "kind": "number", + "nativeSrc": "11504:2:23", + "nodeType": "YulLiteral", + "src": "11504:2:23", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11489:3:23", + "nodeType": "YulIdentifier", + "src": "11489:3:23" + }, + "nativeSrc": "11489:18:23", + "nodeType": "YulFunctionCall", + "src": "11489:18:23" + }, + { + "name": "value2", + "nativeSrc": "11509:6:23", + "nodeType": "YulIdentifier", + "src": "11509:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11482:6:23", + "nodeType": "YulIdentifier", + "src": "11482:6:23" + }, + "nativeSrc": "11482:34:23", + "nodeType": "YulFunctionCall", + "src": "11482:34:23" + }, + "nativeSrc": "11482:34:23", + "nodeType": "YulExpressionStatement", + "src": "11482:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11536:9:23", + "nodeType": "YulIdentifier", + "src": "11536:9:23" + }, + { + "kind": "number", + "nativeSrc": "11547:2:23", + "nodeType": "YulLiteral", + "src": "11547:2:23", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11532:3:23", + "nodeType": "YulIdentifier", + "src": "11532:3:23" + }, + "nativeSrc": "11532:18:23", + "nodeType": "YulFunctionCall", + "src": "11532:18:23" + }, + { + "name": "value3", + "nativeSrc": "11552:6:23", + "nodeType": "YulIdentifier", + "src": "11552:6:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11525:6:23", + "nodeType": "YulIdentifier", + "src": "11525:6:23" + }, + "nativeSrc": "11525:34:23", + "nodeType": "YulFunctionCall", + "src": "11525:34:23" + }, + "nativeSrc": "11525:34:23", + "nodeType": "YulExpressionStatement", + "src": "11525:34:23" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nativeSrc": "11579:9:23", + "nodeType": "YulIdentifier", + "src": "11579:9:23" + }, + { + "kind": "number", + "nativeSrc": "11590:3:23", + "nodeType": "YulLiteral", + "src": "11590:3:23", + "type": "", + "value": "128" + } + ], + "functionName": { + "name": "add", + "nativeSrc": "11575:3:23", + "nodeType": "YulIdentifier", + "src": "11575:3:23" + }, + "nativeSrc": "11575:19:23", + "nodeType": "YulFunctionCall", + "src": "11575:19:23" + }, + { + "arguments": [ + { + "name": "value4", + "nativeSrc": "11600:6:23", + "nodeType": "YulIdentifier", + "src": "11600:6:23" + }, + { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nativeSrc": "11616:3:23", + "nodeType": "YulLiteral", + "src": "11616:3:23", + "type": "", + "value": "160" + }, + { + "kind": "number", + "nativeSrc": "11621:1:23", + "nodeType": "YulLiteral", + "src": "11621:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "shl", + "nativeSrc": "11612:3:23", + "nodeType": "YulIdentifier", + "src": "11612:3:23" + }, + "nativeSrc": "11612:11:23", + "nodeType": "YulFunctionCall", + "src": "11612:11:23" + }, + { + "kind": "number", + "nativeSrc": "11625:1:23", + "nodeType": "YulLiteral", + "src": "11625:1:23", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "sub", + "nativeSrc": "11608:3:23", + "nodeType": "YulIdentifier", + "src": "11608:3:23" + }, + "nativeSrc": "11608:19:23", + "nodeType": "YulFunctionCall", + "src": "11608:19:23" + } + ], + "functionName": { + "name": "and", + "nativeSrc": "11596:3:23", + "nodeType": "YulIdentifier", + "src": "11596:3:23" + }, + "nativeSrc": "11596:32:23", + "nodeType": "YulFunctionCall", + "src": "11596:32:23" + } + ], + "functionName": { + "name": "mstore", + "nativeSrc": "11568:6:23", + "nodeType": "YulIdentifier", + "src": "11568:6:23" + }, + "nativeSrc": "11568:61:23", + "nodeType": "YulFunctionCall", + "src": "11568:61:23" + }, + "nativeSrc": "11568:61:23", + "nodeType": "YulExpressionStatement", + "src": "11568:61:23" + } + ] + }, + "name": "abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed", + "nativeSrc": "11146:489:23", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nativeSrc": "11296:9:23", + "nodeType": "YulTypedName", + "src": "11296:9:23", + "type": "" + }, + { + "name": "value4", + "nativeSrc": "11307:6:23", + "nodeType": "YulTypedName", + "src": "11307:6:23", + "type": "" + }, + { + "name": "value3", + "nativeSrc": "11315:6:23", + "nodeType": "YulTypedName", + "src": "11315:6:23", + "type": "" + }, + { + "name": "value2", + "nativeSrc": "11323:6:23", + "nodeType": "YulTypedName", + "src": "11323:6:23", + "type": "" + }, + { + "name": "value1", + "nativeSrc": "11331:6:23", + "nodeType": "YulTypedName", + "src": "11331:6:23", + "type": "" + }, + { + "name": "value0", + "nativeSrc": "11339:6:23", + "nodeType": "YulTypedName", + "src": "11339:6:23", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nativeSrc": "11350:4:23", + "nodeType": "YulTypedName", + "src": "11350:4:23", + "type": "" + } + ], + "src": "11146:489:23" + } + ] + }, + "contents": "{\n { }\n function abi_decode_tuple_t_struct$_ExecuteParams_$8182_calldata_ptr(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let _1 := add(headStart, offset)\n if slt(sub(dataEnd, _1), 448) { revert(0, 0) }\n value0 := _1\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_string(value, pos) -> end\n {\n let length := mload(value)\n mstore(pos, length)\n mcopy(add(pos, 0x20), add(value, 0x20), length)\n mstore(add(add(pos, length), 0x20), 0)\n end := add(add(pos, and(add(length, 31), not(31))), 0x20)\n }\n function abi_encode_tuple_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__to_t_bytes1_t_string_memory_ptr_t_string_memory_ptr_t_uint256_t_address_t_bytes32_t_array$_t_uint256_$dyn_memory_ptr__fromStack_reversed(headStart, value6, value5, value4, value3, value2, value1, value0) -> tail\n {\n mstore(headStart, and(value0, shl(248, 255)))\n mstore(add(headStart, 32), 224)\n let tail_1 := abi_encode_string(value1, add(headStart, 224))\n mstore(add(headStart, 64), sub(tail_1, headStart))\n let tail_2 := abi_encode_string(value2, tail_1)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), and(value4, sub(shl(160, 1), 1)))\n mstore(add(headStart, 160), value5)\n mstore(add(headStart, 192), sub(tail_2, headStart))\n let pos := tail_2\n let length := mload(value6)\n mstore(tail_2, length)\n pos := add(tail_2, 32)\n let srcPtr := add(value6, 32)\n let i := 0\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(pos, mload(srcPtr))\n pos := add(pos, 32)\n srcPtr := add(srcPtr, 32)\n }\n tail := pos\n }\n function abi_decode_address(offset) -> value\n {\n value := calldataload(offset)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_addresst_uint256(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n value0 := abi_decode_address(headStart)\n let value := 0\n value := calldataload(add(headStart, 32))\n value1 := value\n }\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, iszero(iszero(value0)))\n }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := 0\n value := calldataload(headStart)\n value0 := value\n }\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := abi_decode_address(headStart)\n }\n function abi_encode_tuple_t_stringliteral_110461b12e459dc76e692e7a47f9621cf45c7d48020c3c7b2066107cdf1f52ae__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 13)\n mstore(add(headStart, 64), \"Invalid owner\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_5e70ebd1d4072d337a7fabaa7bda70fa2633d6e3f89d5cb725a16b10d07e54c6__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 13)\n mstore(add(headStart, 64), \"Invalid token\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_15d72127d094a30af360ead73641c61eda3d745ce4d04d12675a5e9a899f8b21__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 10)\n mstore(add(headStart, 64), \"Nonce used\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_27859e47e6c2167c8e8d38addfca16b9afb9d8e9750b6a1e67c29196d4d99fae__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 15)\n mstore(add(headStart, 64), \"Payload expired\")\n tail := add(headStart, 96)\n }\n function access_calldata_tail_t_bytes_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), length)) { revert(0, 0) }\n }\n function abi_decode_tuple_t_uint8(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, 0xff))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_stringliteral_31734eed34fab74fa1579246aaad104a344891a284044483c0c5a792a9f83a72__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 11)\n mstore(add(headStart, 64), \"Invalid sig\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_a793dc5bde52ab2d5349f1208a34905b1d68ab9298f549a2e514542cba0a8c76__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 28)\n mstore(add(headStart, 64), \"Incorrect ETH value provided\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_066ad49a0ed9e5d6a9f3c20fca13a038f0a5d629f0aaf09d634ae2a7c232ac2b__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 11)\n mstore(add(headStart, 64), \"Call failed\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function panic_error_0x41()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos) -> end\n { end := pos }\n function abi_encode_tuple_t_stringliteral_c7c2be2f1b63a3793f6e2d447ce95ba2239687186a7fd6b5268a969dcdb42dcd__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 19)\n mstore(add(headStart, 64), \"ETH transfer failed\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__to_t_bytes32_t_address_t_address_t_address_t_uint256_t_bytes32_t_uint256_t_uint256_t_uint256__fromStack_reversed(headStart, value8, value7, value6, value5, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 288)\n mstore(headStart, value0)\n mstore(add(headStart, 32), and(value1, sub(shl(160, 1), 1)))\n mstore(add(headStart, 64), and(value2, sub(shl(160, 1), 1)))\n mstore(add(headStart, 96), and(value3, sub(shl(160, 1), 1)))\n mstore(add(headStart, 128), value4)\n mstore(add(headStart, 160), value5)\n mstore(add(headStart, 192), value6)\n mstore(add(headStart, 224), value7)\n mstore(add(headStart, 256), value8)\n }\n function abi_encode_tuple_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__to_t_address_t_address_t_uint256_t_uint256_t_uint8_t_bytes32_t_bytes32__fromStack_reversed(headStart, value6, value5, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 224)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n mstore(add(headStart, 32), and(value1, sub(shl(160, 1), 1)))\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), and(value4, 0xff))\n mstore(add(headStart, 160), value5)\n mstore(add(headStart, 192), value6)\n }\n function abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n mstore(add(headStart, 32), and(value1, sub(shl(160, 1), 1)))\n }\n function abi_decode_tuple_t_uint256_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := mload(headStart)\n }\n function abi_encode_tuple_t_stringliteral_0acc7f0c8df1a6717d2b423ae4591ac135687015764ac37dd4cf0150a9322b15__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 40)\n mstore(add(headStart, 64), \"Permit failed and insufficient a\")\n mstore(add(headStart, 96), \"llowance\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n let length := mload(value0)\n mcopy(pos, add(value0, 0x20), length)\n let _1 := add(pos, length)\n mstore(_1, 0)\n end := _1\n }\n function abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed(headStart, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 128)\n mstore(headStart, value0)\n mstore(add(headStart, 32), and(value1, 0xff))\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n }\n function panic_error_0x21()\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x21)\n revert(0, 0x24)\n }\n function abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function extract_byte_array_length(data) -> length\n {\n length := shr(1, data)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) { length := and(length, 0x7f) }\n if eq(outOfPlaceEncoding, lt(length, 32))\n {\n mstore(0, shl(224, 0x4e487b71))\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n }\n function abi_encode_tuple_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__to_t_bytes32_t_bytes32_t_bytes32_t_uint256_t_address__fromStack_reversed(headStart, value4, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 160)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n mstore(add(headStart, 128), and(value4, sub(shl(160, 1), 1)))\n }\n}", + "id": 23, + "language": "Yul", + "name": "#utility.yul" + } + ], + "immutableReferences": { + "4158": [ + { + "length": 32, + "start": 4419 + } + ], + "4160": [ + { + "length": 32, + "start": 4377 + } + ], + "4162": [ + { + "length": 32, + "start": 4335 + } + ], + "4164": [ + { + "length": 32, + "start": 4500 + } + ], + "4166": [ + { + "length": 32, + "start": 4540 + } + ], + "4169": [ + { + "length": 32, + "start": 3323 + } + ], + "4172": [ + { + "length": 32, + "start": 3373 + } + ], + "8147": [ + { + "length": 32, + "start": 215 + }, + { + "length": 32, + "start": 1317 + }, + { + "length": 32, + "start": 1524 + }, + { + "length": 32, + "start": 2384 + }, + { + "length": 32, + "start": 3064 + } + ] + }, + "linkReferences": {}, + "object": "608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x92 JUMPI PUSH0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9E281A98 GT PUSH2 0x57 JUMPI DUP1 PUSH4 0x9E281A98 EQ PUSH2 0x159 JUMPI DUP1 PUSH4 0xD850124E EQ PUSH2 0x178 JUMPI DUP1 PUSH4 0xDCB79457 EQ PUSH2 0x1C1 JUMPI DUP1 PUSH4 0xF14210A6 EQ PUSH2 0x1E0 JUMPI DUP1 PUSH4 0xF2FDE38B EQ PUSH2 0x1FF JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP1 PUSH4 0x2AF83BFE EQ PUSH2 0x9D JUMPI DUP1 PUSH4 0x715018A6 EQ PUSH2 0xB2 JUMPI DUP1 PUSH4 0x75BD6863 EQ PUSH2 0xC6 JUMPI DUP1 PUSH4 0x84B0196E EQ PUSH2 0x116 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x13D JUMPI PUSH0 PUSH0 REVERT JUMPDEST CALLDATASIZE PUSH2 0x99 JUMPI STOP JUMPDEST PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0xB0 PUSH2 0xAB CALLDATASIZE PUSH1 0x4 PUSH2 0x12DD JUMP JUMPDEST PUSH2 0x21E JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xBD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x6AE JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xD1 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xF9 PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x121 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x12A PUSH2 0x6C1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x10D SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x134A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x148 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0xF9 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x164 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x173 CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH2 0x703 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x183 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x192 CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x10D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CC JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x1DB CALLDATASIZE PUSH1 0x4 PUSH2 0x13FB JUMP JUMPDEST PUSH2 0x78B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1EB JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x1FA CALLDATASIZE PUSH1 0x4 PUSH2 0x1423 JUMP JUMPDEST PUSH2 0x7B8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x20A JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP PUSH2 0xB0 PUSH2 0x219 CALLDATASIZE PUSH1 0x4 PUSH2 0x143A JUMP JUMPDEST PUSH2 0x8A7 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x8E1 JUMP JUMPDEST PUSH0 PUSH2 0x237 PUSH1 0x40 DUP4 ADD PUSH1 0x20 DUP5 ADD PUSH2 0x143A JUMP JUMPDEST SWAP1 POP PUSH2 0x120 DUP3 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH2 0x28A JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x24B73B30B634B21037BBB732B9 PUSH1 0x99 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH2 0x298 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SUB PUSH2 0x2DE JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xD PUSH1 0x24 DUP3 ADD MSTORE PUSH13 0x24B73B30B634B2103A37B5B2B7 PUSH1 0x99 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x33E JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xA PUSH1 0x24 DUP3 ADD MSTORE PUSH10 0x139BDB98D9481D5CD959 PUSH1 0xB2 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST DUP3 PUSH2 0x140 ADD CALLDATALOAD TIMESTAMP GT ISZERO PUSH2 0x385 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xF PUSH1 0x24 DUP3 ADD MSTORE PUSH15 0x14185E5B1BD85908195E1C1A5C9959 PUSH1 0x8A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 PUSH2 0x3EE DUP4 PUSH2 0x397 PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH2 0x3A9 PUSH1 0xE0 DUP10 ADD DUP10 PUSH2 0x1453 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP POP POP POP PUSH2 0x100 DUP10 ADD CALLDATALOAD DUP8 PUSH2 0x140 DUP12 ADD CALLDATALOAD PUSH2 0x90F JUMP JUMPDEST SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH2 0x421 DUP3 PUSH2 0x410 PUSH2 0x180 DUP9 ADD PUSH2 0x160 DUP10 ADD PUSH2 0x149D JUMP JUMPDEST DUP8 PUSH2 0x180 ADD CALLDATALOAD DUP9 PUSH2 0x1A0 ADD CALLDATALOAD PUSH2 0x9DB JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x465 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xB PUSH1 0x24 DUP3 ADD MSTORE PUSH11 0x496E76616C696420736967 PUSH1 0xA8 SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST DUP4 PUSH2 0x100 ADD CALLDATALOAD CALLVALUE EQ PUSH2 0x4B9 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1C PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x496E636F7272656374204554482076616C75652070726F766964656400000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP6 DUP5 MSTORE DUP3 MSTORE SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH2 0x520 SWAP1 PUSH2 0x4F6 SWAP1 DUP7 ADD DUP7 PUSH2 0x143A JUMP JUMPDEST DUP5 PUSH1 0x40 DUP8 ADD CALLDATALOAD PUSH1 0x60 DUP9 ADD CALLDATALOAD PUSH2 0x511 PUSH1 0xA0 DUP11 ADD PUSH1 0x80 DUP12 ADD PUSH2 0x149D JUMP JUMPDEST DUP10 PUSH1 0xA0 ADD CALLDATALOAD DUP11 PUSH1 0xC0 ADD CALLDATALOAD PUSH2 0xA07 JUMP JUMPDEST PUSH2 0x566 PUSH32 0x0 PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH2 0x556 PUSH1 0x20 DUP9 ADD DUP9 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 SWAP1 PUSH2 0xB75 JUMP JUMPDEST PUSH0 PUSH2 0x5B2 PUSH2 0x577 PUSH1 0xE0 DUP8 ADD DUP8 PUSH2 0x1453 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP CALLVALUE SWAP3 POP PUSH2 0xBF4 SWAP2 POP POP JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x5EF JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0xB PUSH1 0x24 DUP3 ADD MSTORE PUSH11 0x10D85B1B0819985A5B1959 PUSH1 0xAA SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0x621 PUSH32 0x0 PUSH0 PUSH2 0x556 PUSH1 0x20 DUP10 ADD DUP10 PUSH2 0x143A JUMP JUMPDEST PUSH2 0x62E PUSH1 0x20 DUP7 ADD DUP7 PUSH2 0x143A JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x78129A649632642D8E9F346C85D9EFB70D32D50A36774C4585491A9228BBD350 DUP8 PUSH1 0x40 ADD CALLDATALOAD PUSH1 0x40 MLOAD PUSH2 0x676 SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP PUSH2 0x6AB PUSH1 0x1 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x6B6 PUSH2 0xC79 JUMP JUMPDEST PUSH2 0x6BF PUSH0 PUSH2 0xCA5 JUMP JUMPDEST JUMP JUMPDEST PUSH0 PUSH1 0x60 DUP1 PUSH0 PUSH0 PUSH0 PUSH1 0x60 PUSH2 0x6D2 PUSH2 0xCF4 JUMP JUMPDEST PUSH2 0x6DA PUSH2 0xD26 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 SWAP3 MSTORE PUSH1 0xF PUSH1 0xF8 SHL SWAP12 SWAP4 SWAP11 POP SWAP2 SWAP9 POP CHAINID SWAP8 POP ADDRESS SWAP7 POP SWAP5 POP SWAP3 POP SWAP1 POP JUMP JUMPDEST PUSH2 0x70B PUSH2 0xC79 JUMP JUMPDEST PUSH2 0x730 PUSH2 0x71F PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 DUP4 PUSH2 0xD53 JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0xA0524EE0FD8662D6C046D199DA2A6D3DC49445182CEC055873A5BB9C2843C8E0 DUP4 PUSH1 0x40 MLOAD PUSH2 0x77F SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x7C0 PUSH2 0xC79 JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 DUP4 SWAP1 DUP4 DUP2 DUP2 DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH0 DUP2 EQ PUSH2 0x80A JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x80F JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH2 0x856 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH19 0x115512081D1C985B9CD9995C8819985A5B1959 PUSH1 0x6A SHL PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x6148672A948A12B8E0BF92A9338349B9AC890FAD62A234ABAF0A4DA99F62CFCC DUP4 PUSH1 0x40 MLOAD PUSH2 0x89B SWAP2 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH2 0x8AF PUSH2 0xC79 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x8D8 JUMPI PUSH1 0x40 MLOAD PUSH4 0x1E4FBDF7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH0 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0x6AB DUP2 PUSH2 0xCA5 JUMP JUMPDEST PUSH2 0x8E9 PUSH2 0xD60 JUMP JUMPDEST PUSH1 0x2 PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SSTORE JUMP JUMPDEST DUP4 MLOAD PUSH1 0x20 DUP1 DUP7 ADD SWAP2 SWAP1 SWAP2 KECCAK256 PUSH1 0x40 DUP1 MLOAD PUSH32 0xF0543E2024FD0AE16CCB842686C2733758EC65ACFD69FB599C05B286F8DB8844 SWAP4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 DUP2 AND SWAP2 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 DUP11 AND PUSH1 0x60 DUP5 ADD MSTORE DUP9 AND PUSH1 0x80 DUP4 ADD MSTORE PUSH1 0xA0 DUP3 ADD DUP8 SWAP1 MSTORE PUSH1 0xC0 DUP3 ADD MSTORE PUSH1 0xE0 DUP2 ADD DUP5 SWAP1 MSTORE PUSH2 0x100 DUP2 ADD DUP4 SWAP1 MSTORE PUSH2 0x120 DUP2 ADD DUP3 SWAP1 MSTORE PUSH0 SWAP1 PUSH2 0x9CF SWAP1 PUSH2 0x140 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 PUSH2 0xDA2 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH0 PUSH0 PUSH2 0x9EB DUP9 DUP9 DUP9 DUP9 PUSH2 0xDCE JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x9FB DUP3 DUP3 PUSH2 0xE96 JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xD505ACCF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE ADDRESS PUSH1 0x24 DUP4 ADD MSTORE PUSH1 0x44 DUP3 ADD DUP8 SWAP1 MSTORE PUSH1 0x64 DUP3 ADD DUP7 SWAP1 MSTORE PUSH1 0xFF DUP6 AND PUSH1 0x84 DUP4 ADD MSTORE PUSH1 0xA4 DUP3 ADD DUP5 SWAP1 MSTORE PUSH1 0xC4 DUP3 ADD DUP4 SWAP1 MSTORE DUP9 AND SWAP1 PUSH4 0xD505ACCF SWAP1 PUSH1 0xE4 ADD PUSH0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA72 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP GAS CALL SWAP3 POP POP POP DUP1 ISZERO PUSH2 0xA83 JUMPI POP PUSH1 0x1 JUMPDEST PUSH2 0xB57 JUMPI PUSH1 0x40 MLOAD PUSH4 0x6EB1769F PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 DUP4 ADD MSTORE ADDRESS PUSH1 0x24 DUP4 ADD MSTORE DUP7 SWAP2 SWAP1 DUP10 AND SWAP1 PUSH4 0xDD62ED3E SWAP1 PUSH1 0x44 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xAD4 JUMPI RETURNDATASIZE PUSH0 PUSH0 RETURNDATACOPY RETURNDATASIZE PUSH0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xAF8 SWAP2 SWAP1 PUSH2 0x14BD JUMP JUMPDEST LT ISZERO PUSH2 0xB57 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x28 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x5065726D6974206661696C656420616E6420696E73756666696369656E742061 PUSH1 0x44 DUP3 ADD MSTORE PUSH8 0x6C6C6F77616E6365 PUSH1 0xC0 SHL PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0xB6C PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP8 ADDRESS DUP9 PUSH2 0xF52 JUMP JUMPDEST POP POP POP POP POP POP POP JUMP JUMPDEST PUSH2 0xB81 DUP4 DUP4 DUP4 PUSH0 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBEF JUMPI PUSH2 0xB92 DUP4 DUP4 PUSH0 PUSH1 0x1 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBBA JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH2 0xBC7 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0xF8E JUMP JUMPDEST PUSH2 0xBEF JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH0 PUSH0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 DUP6 PUSH1 0x40 MLOAD PUSH2 0xC2F SWAP2 SWAP1 PUSH2 0x14D4 JUMP JUMPDEST PUSH0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH0 DUP2 EQ PUSH2 0xC69 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0xC6E JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP1 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH0 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER EQ PUSH2 0x6BF JUMPI PUSH1 0x40 MLOAD PUSH4 0x118CDAA7 PUSH1 0xE0 SHL DUP2 MSTORE CALLER PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH0 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT DUP4 AND DUP2 OR DUP5 SSTORE PUSH1 0x40 MLOAD SWAP2 SWAP1 SWAP3 AND SWAP3 DUP4 SWAP2 PUSH32 0x8BE0079C531659141344CD1FD0A4F28419497F9722A3DAAFE3B4186F6B6457E0 SWAP2 SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x60 PUSH2 0xD21 PUSH32 0x0 PUSH1 0x1 PUSH2 0xFF0 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0xD21 PUSH32 0x0 PUSH1 0x2 PUSH2 0xFF0 JUMP JUMPDEST PUSH2 0xBC7 DUP4 DUP4 DUP4 PUSH1 0x1 PUSH2 0x1099 JUMP JUMPDEST PUSH32 0x9B779B17422D0DF92223018B32B4D1FA46E071723D6817E2486D003BECC55F00 SLOAD PUSH1 0x2 SUB PUSH2 0x6BF JUMPI PUSH1 0x40 MLOAD PUSH4 0x3EE5AEB5 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH2 0x7B2 PUSH2 0xDAE PUSH2 0x10E3 JUMP JUMPDEST DUP4 PUSH1 0x40 MLOAD PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 SWAP1 KECCAK256 SWAP1 JUMP JUMPDEST PUSH0 DUP1 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP5 GT ISZERO PUSH2 0xE07 JUMPI POP PUSH0 SWAP2 POP PUSH1 0x3 SWAP1 POP DUP3 PUSH2 0xE8C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP11 SWAP1 MSTORE PUSH1 0xFF DUP10 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP8 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xE58 JUMPI RETURNDATASIZE PUSH0 PUSH0 RETURNDATACOPY RETURNDATASIZE PUSH0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0xE83 JUMPI POP PUSH0 SWAP3 POP PUSH1 0x1 SWAP2 POP DUP3 SWAP1 POP PUSH2 0xE8C JUMP JUMPDEST SWAP3 POP PUSH0 SWAP2 POP DUP2 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 POP SWAP5 SWAP2 POP POP JUMP JUMPDEST PUSH0 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEA9 JUMPI PUSH2 0xEA9 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xEB2 JUMPI POP POP JUMP JUMPDEST PUSH1 0x1 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEC6 JUMPI PUSH2 0xEC6 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xEE4 JUMPI PUSH1 0x40 MLOAD PUSH4 0xF645EEDF PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xEF8 JUMPI PUSH2 0xEF8 PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xF19 JUMPI PUSH1 0x40 MLOAD PUSH4 0xFCE698F7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST PUSH1 0x3 DUP3 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xF2D JUMPI PUSH2 0xF2D PUSH2 0x14EA JUMP JUMPDEST SUB PUSH2 0xF4E JUMPI PUSH1 0x40 MLOAD PUSH4 0x35E2F383 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xF60 DUP5 DUP5 DUP5 DUP5 PUSH1 0x1 PUSH2 0x120C JUMP JUMPDEST PUSH2 0xF88 JUMPI PUSH1 0x40 MLOAD PUSH4 0x5274AFE7 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 ADD PUSH2 0x281 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x95EA7B3 PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x44 DUP2 DUP1 DUP12 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0xFE4 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0xFD8 JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 DUP8 EXTCODESIZE GT RETURNDATASIZE ISZERO AND DUP4 AND SWAP3 POP JUMPDEST PUSH1 0x40 MSTORE POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0xFF DUP4 EQ PUSH2 0x100A JUMPI PUSH2 0x1003 DUP4 PUSH2 0x1279 JUMP JUMPDEST SWAP1 POP PUSH2 0x7B2 JUMP JUMPDEST DUP2 DUP1 SLOAD PUSH2 0x1016 SWAP1 PUSH2 0x14FE JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x1042 SWAP1 PUSH2 0x14FE JUMP JUMPDEST DUP1 ISZERO PUSH2 0x108D JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1064 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x108D JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH0 MSTORE PUSH1 0x20 PUSH0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1070 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP PUSH2 0x7B2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0xA9059CBB PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND PUSH1 0x4 MSTORE PUSH1 0x24 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x44 DUP2 DUP1 DUP12 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0xFE4 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0xFD8 JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND EQ DUP1 ISZERO PUSH2 0x113B JUMPI POP PUSH32 0x0 CHAINID EQ JUMPDEST ISZERO PUSH2 0x1165 JUMPI POP PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0xD21 PUSH1 0x40 DUP1 MLOAD PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH1 0x20 DUP3 ADD MSTORE PUSH32 0x0 SWAP2 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH32 0x0 PUSH1 0x60 DUP3 ADD MSTORE CHAINID PUSH1 0x80 DUP3 ADD MSTORE ADDRESS PUSH1 0xA0 DUP3 ADD MSTORE PUSH0 SWAP1 PUSH1 0xC0 ADD PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x23B872DD PUSH1 0xE0 SHL PUSH0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x4 MSTORE DUP7 AND PUSH1 0x24 MSTORE PUSH1 0x44 DUP6 SWAP1 MSTORE SWAP2 PUSH1 0x20 DUP4 PUSH1 0x64 DUP2 DUP1 DUP13 GAS CALL SWAP3 POP PUSH1 0x1 PUSH0 MLOAD EQ DUP4 AND PUSH2 0x1268 JUMPI DUP4 DUP4 ISZERO AND ISZERO PUSH2 0x125C JUMPI RETURNDATASIZE PUSH0 DUP3 RETURNDATACOPY RETURNDATASIZE DUP2 REVERT JUMPDEST PUSH0 DUP9 EXTCODESIZE GT RETURNDATASIZE ISZERO AND DUP4 AND SWAP3 POP JUMPDEST PUSH1 0x40 MSTORE POP PUSH0 PUSH1 0x60 MSTORE SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH0 PUSH2 0x1285 DUP4 PUSH2 0x12B6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE SWAP2 SWAP3 POP PUSH0 SWAP2 SWAP1 PUSH1 0x20 DUP3 ADD DUP2 DUP1 CALLDATASIZE DUP4 CALLDATACOPY POP POP POP SWAP2 DUP3 MSTORE POP PUSH1 0x20 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE POP SWAP1 JUMP JUMPDEST PUSH0 PUSH1 0xFF DUP3 AND PUSH1 0x1F DUP2 GT ISZERO PUSH2 0x7B2 JUMPI PUSH1 0x40 MLOAD PUSH4 0x2CD44AC3 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x12ED JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1303 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP3 ADD PUSH2 0x1C0 DUP2 DUP6 SUB SLT ISZERO PUSH2 0x1315 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP7 ADD MCOPY PUSH0 PUSH1 0x20 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x20 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xFF PUSH1 0xF8 SHL DUP9 AND DUP2 MSTORE PUSH1 0xE0 PUSH1 0x20 DUP3 ADD MSTORE PUSH0 PUSH2 0x1368 PUSH1 0xE0 DUP4 ADD DUP10 PUSH2 0x131C JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x137A DUP2 DUP10 PUSH2 0x131C JUMP JUMPDEST PUSH1 0x60 DUP5 ADD DUP9 SWAP1 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0xA0 DUP5 ADD DUP7 SWAP1 MSTORE DUP4 DUP2 SUB PUSH1 0xC0 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE PUSH1 0x20 DUP1 DUP8 ADD SWAP4 POP SWAP1 SWAP2 ADD SWAP1 PUSH0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x13CF JUMPI DUP4 MLOAD DUP4 MSTORE PUSH1 0x20 SWAP4 DUP5 ADD SWAP4 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x13B1 JUMP JUMPDEST POP SWAP1 SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x13F6 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH0 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x140C JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x1415 DUP4 PUSH2 0x13E0 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1433 JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x144A JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH2 0x1315 DUP3 PUSH2 0x13E0 JUMP JUMPDEST PUSH0 PUSH0 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1468 JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1482 JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0x1496 JUMPI PUSH0 PUSH0 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x14AD JUMPI PUSH0 PUSH0 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1315 JUMPI PUSH0 PUSH0 REVERT JUMPDEST PUSH0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x14CD JUMPI PUSH0 PUSH0 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH0 DUP3 MLOAD DUP1 PUSH1 0x20 DUP6 ADD DUP5 MCOPY PUSH0 SWAP3 ADD SWAP2 DUP3 MSTORE POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST PUSH1 0x1 DUP2 DUP2 SHR SWAP1 DUP3 AND DUP1 PUSH2 0x1512 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 SUB PUSH2 0x1530 JUMPI PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP13 CALLVALUE 0xDB 0x2F PUSH16 0x83AF136A5340CCE7FE8EF554EA8EB633 PUSH6 0x6FBF9BFF3BD7 BALANCE 0xAE 0xC4 0xF PUSH5 0x736F6C6343 STOP ADDMOD SHR STOP CALLER ", + "sourceMap": "1158:6897:22:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2995:1996;;;;;;:::i;:::-;;:::i;:::-;;2293:101:0;;;;;;;;;;;;;:::i;1519:44:22:-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;576:32:23;;;558:51;;546:2;531:18;1519:44:22;;;;;;;;5228:557:16;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;1638:85:0:-;;;;;;;;;;-1:-1:-1;1684:7:0;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;7236:186:22;;;;;;;;;;-1:-1:-1;7236:186:22;;;;;:::i;:::-;;:::i;1570:69::-;;;;;;;;;;-1:-1:-1;1570:69:22;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2805:14:23;;2798:22;2780:41;;2768:2;2753:18;1570:69:22;2640:187:23;7907:146:22;;;;;;;;;;-1:-1:-1;7907:146:22;;;;;:::i;:::-;;:::i;7619:216::-;;;;;;;;;;-1:-1:-1;7619:216:22;;;;;:::i;:::-;;:::i;2543:215:0:-;;;;;;;;;;-1:-1:-1;2543:215:0;;;;;:::i;:::-;;:::i;2995:1996:22:-;3023:21:11;:19;:21::i;:::-;3083:13:22::1;3099:12;::::0;;;::::1;::::0;::::1;;:::i;:::-;3083:28:::0;-1:-1:-1;3137:19:22::1;::::0;::::1;;-1:-1:-1::0;;;;;3201:19:22;::::1;3193:45;;;::::0;-1:-1:-1;;;3193:45:22;;3456:2:23;3193:45:22::1;::::0;::::1;3438:21:23::0;3495:2;3475:18;;;3468:30;-1:-1:-1;;;3514:18:23;;;3507:43;3567:18;;3193:45:22::1;;;;;;;;;3280:1;3256:12;;::::0;::::1;:6:::0;:12:::1;:::i;:::-;-1:-1:-1::0;;;;;3256:26:22::1;::::0;3248:52:::1;;;::::0;-1:-1:-1;;;3248:52:22;;3798:2:23;3248:52:22::1;::::0;::::1;3780:21:23::0;3837:2;3817:18;;;3810:30;-1:-1:-1;;;3856:18:23;;;3849:43;3909:18;;3248:52:22::1;3596:337:23::0;3248:52:22::1;-1:-1:-1::0;;;;;3319:24:22;::::1;;::::0;;;:17:::1;:24;::::0;;;;;;;:31;;;;;;;;;::::1;;3318:32;3310:55;;;::::0;-1:-1:-1;;;3310:55:22;;4140:2:23;3310:55:22::1;::::0;::::1;4122:21:23::0;4179:2;4159:18;;;4152:30;-1:-1:-1;;;4198:18:23;;;4191:40;4248:18;;3310:55:22::1;3938:334:23::0;3310:55:22::1;3402:6;:22;;;3383:15;:41;;3375:69;;;::::0;-1:-1:-1;;;3375:69:22;;4479:2:23;3375:69:22::1;::::0;::::1;4461:21:23::0;4518:2;4498:18;;;4491:30;-1:-1:-1;;;4537:18:23;;;4530:45;4592:18;;3375:69:22::1;4277:339:23::0;3375:69:22::1;3523:14;3540:215;3568:5:::0;3587:12:::1;;::::0;::::1;:6:::0;:12:::1;:::i;:::-;3613;::::0;::::1;;3639:18;;::::0;::::1;3613:6:::0;3639:18:::1;:::i;:::-;3540:215;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;;;;3671:19:22::1;::::0;::::1;;3704:5:::0;3723:22:::1;::::0;::::1;;3540:14;:215::i;:::-;3523:232:::0;-1:-1:-1;;;;;;3850:81:22;::::1;:72;3523:232:::0;3872:15:::1;::::0;;;::::1;::::0;::::1;;:::i;:::-;3889:6;:15;;;3906:6;:15;;;3850:13;:72::i;:::-;-1:-1:-1::0;;;;;3850:81:22::1;;3842:105;;;::::0;-1:-1:-1;;;3842:105:22;;5623:2:23;3842:105:22::1;::::0;::::1;5605:21:23::0;5662:2;5642:18;;;5635:30;-1:-1:-1;;;5681:18:23;;;5674:41;5732:18;;3842:105:22::1;5421:335:23::0;3842:105:22::1;3979:6;:19;;;3966:9;:32;3958:73;;;::::0;-1:-1:-1;;;3958:73:22;;5963:2:23;3958:73:22::1;::::0;::::1;5945:21:23::0;6002:2;5982:18;;;5975:30;6041;6021:18;;;6014:58;6089:18;;3958:73:22::1;5761:352:23::0;3958:73:22::1;-1:-1:-1::0;;;;;4158:24:22;::::1;;::::0;;;:17:::1;:24;::::0;;;;;;;:31;;;;;;;;:38;;-1:-1:-1;;4158:38:22::1;4192:4;4158:38;::::0;;4303:219:::1;::::0;4342:12:::1;::::0;;::::1;:6:::0;:12:::1;:::i;:::-;4368:5:::0;4387:12:::1;::::0;::::1;;4413:15;::::0;::::1;;4442:14;::::0;;;::::1;::::0;::::1;;:::i;:::-;4470:6;:14;;;4498:6;:14;;;4303:25;:219::i;:::-;4592:68;4626:19;4647:12;::::0;::::1;;4599;;::::0;::::1;4647:6:::0;4599:12:::1;:::i;:::-;-1:-1:-1::0;;;;;4592:33:22::1;::::0;:68;:33:::1;:68::i;:::-;4671:16;4690:43;4703:18;;::::0;::::1;:6:::0;:18:::1;:::i;:::-;4690:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;4723:9:22::1;::::0;-1:-1:-1;4690:12:22::1;::::0;-1:-1:-1;;4690:43:22:i:1;:::-;4671:62;;4751:11;4743:35;;;::::0;-1:-1:-1;;;4743:35:22;;6320:2:23;4743:35:22::1;::::0;::::1;6302:21:23::0;6359:2;6339:18;;;6332:30;-1:-1:-1;;;6378:18:23;;;6371:41;6429:18;;4743:35:22::1;6118:335:23::0;4743:35:22::1;4861:57;4895:19;4916:1;4868:12;;::::0;::::1;:6:::0;:12:::1;:::i;4861:57::-;4957:12;;::::0;::::1;:6:::0;:12:::1;:::i;:::-;-1:-1:-1::0;;;;;4934:50:22::1;4950:5;-1:-1:-1::0;;;;;4934:50:22::1;;4971:6;:12;;;4934:50;;;;6604:25:23::0;;6592:2;6577:18;;6458:177;4934:50:22::1;;;;;;;;3073:1918;;;;3065:20:11::0;2365:1;1505:66;3972:62;3749:292;3065:20;2995:1996:22;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;5228:557:16:-;5326:13;5353:18;5385:21;5420:15;5449:25;5488:12;5514:27;5617:13;:11;:13::i;:::-;5644:16;:14;:16::i;:::-;5752;;;5736:1;5752:16;;;;;;;;;-1:-1:-1;;;5566:212:16;;;-1:-1:-1;5566:212:16;;-1:-1:-1;5674:13:16;;-1:-1:-1;5709:4:16;;-1:-1:-1;5736:1:16;-1:-1:-1;5752:16:16;-1:-1:-1;5566:212:16;-1:-1:-1;5228:557:16:o;7236:186:22:-;1531:13:0;:11;:13::i;:::-;7319:43:22::1;7346:7;1684::0::0;1710:6;-1:-1:-1;;;;;1710:6:0;;1638:85;7346:7:22::1;-1:-1:-1::0;;;;;7319:26:22;::::1;::::0;7355:6;7319:26:::1;:43::i;:::-;1684:7:0::0;1710:6;-1:-1:-1;;;;;1710:6:0;-1:-1:-1;;;;;7377:38:22::1;7392:5;-1:-1:-1::0;;;;;7377:38:22::1;;7399:6;7377:38;;;;6604:25:23::0;;6592:2;6577:18;;6458:177;7377:38:22::1;;;;;;;;7236:186:::0;;:::o;7907:146::-;-1:-1:-1;;;;;8014:25:22;;7991:4;8014:25;;;:17;:25;;;;;;;;:32;;;;;;;;;;;7907:146;;;;;:::o;7619:216::-;1531:13:0;:11;:13::i;:::-;7686:12:22::1;1710:6:0::0;;7704:31:22::1;::::0;-1:-1:-1;;;;;1710:6:0;;;;7724::22;;7686:12;7704:31;7686:12;7704:31;7724:6;1710::0;7704:31:22::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7685:50;;;7753:7;7745:39;;;::::0;-1:-1:-1;;;7745:39:22;;7184:2:23;7745:39:22::1;::::0;::::1;7166:21:23::0;7223:2;7203:18;;;7196:30;-1:-1:-1;;;7242:18:23;;;7235:49;7301:18;;7745:39:22::1;6982:343:23::0;7745:39:22::1;1684:7:0::0;1710:6;-1:-1:-1;;;;;1710:6:0;-1:-1:-1;;;;;7799:29:22::1;;7812:6;7799:29;;;;6604:25:23::0;;6592:2;6577:18;;6458:177;7799:29:22::1;;;;;;;;7675:160;7619:216:::0;:::o;2543:215:0:-;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;558:51:23::0;531:18;;2672:31:0::1;412:203:23::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;3749:292:11:-:0;3872:25;:23;:25::i;:::-;2407:1;1505:66;3972:62;3749:292::o;5053:632:22:-;5563:15;;;;;;;;;;5342:325;;;1356:156;5342:325;;;7701:25:23;;;;-1:-1:-1;;;;;5406:19:22;7762:32:23;;7742:18;;;7735:60;;;;7831:32;;;7811:18;;;7804:60;7900:32;;7880:18;;;7873:60;7949:19;;;7942:35;;;7993:19;;;7986:35;8037:19;;;8030:35;;;8081:19;;;8074:35;;;8125:19;;;8118:35;;;5276:7:22;;5302:376;;7673:19:23;;5342:325:22;;;;;;;;;;;;5332:336;;;;;;5302:16;:376::i;:::-;5295:383;5053:632;-1:-1:-1;;;;;;;;5053:632:22:o;8813:260:15:-;8898:7;8918:17;8937:18;8957:16;8977:25;8988:4;8994:1;8997;9000;8977:10;:25::i;:::-;8917:85;;;;;;9012:28;9024:5;9031:8;9012:11;:28::i;:::-;-1:-1:-1;9057:9:15;;8813:260;-1:-1:-1;;;;;;8813:260:15:o;5941:777:22:-;6216:74;;-1:-1:-1;;;6216:74:22;;-1:-1:-1;;;;;8493:32:23;;;6216:74:22;;;8475:51:23;6258:4:22;8542:18:23;;;8535:60;8611:18;;;8604:34;;;8654:18;;;8647:34;;;8730:4;8718:17;;8697:19;;;8690:46;8752:19;;;8745:35;;;8796:19;;;8789:35;;;6216:26:22;;;;;8447:19:23;;6216:74:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6212:375;;6448:45;;-1:-1:-1;;;6448:45:22;;-1:-1:-1;;;;;9027:32:23;;;6448:45:22;;;9009:51:23;6487:4:22;9076:18:23;;;9069:60;6497:5:22;;6448:23;;;;;;8982:18:23;;6448:45:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:54;;6423:153;;;;-1:-1:-1;;;6423:153:22;;9531:2:23;6423:153:22;;;9513:21:23;9570:2;9550:18;;;9543:30;9609:34;9589:18;;;9582:62;-1:-1:-1;;;9660:18:23;;;9653:38;9708:19;;6423:153:22;9329:404:23;6423:153:22;6652:59;-1:-1:-1;;;;;6652:30:22;;6683:5;6698:4;6705:5;6652:30;:59::i;:::-;5941:777;;;;;;;:::o;5098:367:7:-;5190:42;5203:5;5210:7;5219:5;5226;5190:12;:42::i;:::-;5185:274;;5253:37;5266:5;5273:7;5282:1;5285:4;5253:12;:37::i;:::-;5248:91;;5299:40;;-1:-1:-1;;;5299:40:7;;-1:-1:-1;;;;;576:32:23;;5299:40:7;;;558:51:23;531:18;;5299:40:7;412:203:23;5248:91:7;5358:41;5371:5;5378:7;5387:5;5394:4;5358:12;:41::i;:::-;5353:95;;5408:40;;-1:-1:-1;;;5408:40:7;;-1:-1:-1;;;;;576:32:23;;5408:40:7;;;558:51:23;531:18;;5408:40:7;412:203:23;5353:95:7;5098:367;;;:::o;6724:184:22:-;6798:4;6815:12;6833:19;-1:-1:-1;;;;;6833:24:22;6865:5;6872:4;6833:44;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6814:63:22;;6724:184;-1:-1:-1;;;;;6724:184:22:o;1796:162:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:9;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:9;1901:40:0;;;558:51:23;531:18;;1901:40:0;412:203:23;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;6105:126:16:-;6151:13;6183:41;:5;6210:13;6183:26;:41::i;:::-;6176:48;;6105:126;:::o;6557:135::-;6606:13;6638:47;:8;6668:16;6638:29;:47::i;1219:204:7:-;1306:37;1320:5;1327:2;1331:5;1338:4;1306:13;:37::i;3586:157:11:-;1505:66;4560:52;2407:1;4560:63;3644:93;;3696:30;;-1:-1:-1;;;3696:30:11;;;;;;;;;;;5017:176:16;5094:7;5120:66;5153:20;:18;:20::i;:::-;5175:10;4093:4:17;4087:11;-1:-1:-1;;;4111:23:17;;4163:4;4154:14;;4147:39;;;;4215:4;4206:14;;4199:34;4271:4;4256:20;;;3918:374;7129:1551:15;7255:17;;;8209:66;8196:79;;8192:164;;;-1:-1:-1;8307:1:15;;-1:-1:-1;8311:30:15;;-1:-1:-1;8343:1:15;8291:54;;8192:164;8467:24;;;8450:14;8467:24;;;;;;;;;10271:25:23;;;10344:4;10332:17;;10312:18;;;10305:45;;;;10366:18;;;10359:34;;;10409:18;;;10402:34;;;8467:24:15;;10243:19:23;;8467:24:15;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8467:24:15;;-1:-1:-1;;8467:24:15;;;-1:-1:-1;;;;;;;8505:20:15;;8501:113;;-1:-1:-1;8557:1:15;;-1:-1:-1;8561:29:15;;-1:-1:-1;8557:1:15;;-1:-1:-1;8541:62:15;;8501:113;8632:6;-1:-1:-1;8640:20:15;;-1:-1:-1;8640:20:15;;-1:-1:-1;7129:1551:15;;;;;;;;;:::o;11617:532::-;11712:20;11703:5;:29;;;;;;;;:::i;:::-;;11699:444;;11617:532;;:::o;11699:444::-;11808:29;11799:5;:38;;;;;;;;:::i;:::-;;11795:348;;11860:23;;-1:-1:-1;;;11860:23:15;;;;;;;;;;;11795:348;11913:35;11904:5;:44;;;;;;;;:::i;:::-;;11900:243;;11971:46;;-1:-1:-1;;;11971:46:15;;;;;6604:25:23;;;6577:18;;11971:46:15;6458:177:23;11900:243:15;12047:30;12038:5;:39;;;;;;;;:::i;:::-;;12034:109;;12100:32;;-1:-1:-1;;;12100:32:15;;;;;6604:25:23;;;6577:18;;12100:32:15;6458:177:23;12034:109:15;11617:532;;:::o;1662:232:7:-;1767:47;1785:5;1792:4;1798:2;1802:5;1809:4;1767:17;:47::i;:::-;1762:126;;1837:40;;-1:-1:-1;;;1837:40:7;;-1:-1:-1;;;;;576:32:23;;1837:40:7;;;558:51:23;531:18;;1837:40:7;412:203:23;1762:126:7;1662:232;;;;:::o;12059:1252::-;12289:4;12283:11;-1:-1:-1;;;12157:12:7;12307:22;;;-1:-1:-1;;;;;12355:29:7;;12349:4;12342:43;12405:4;12398:19;;;12157:12;12481:4;12157:12;12469:4;12157:12;;12453:5;12446;12441:45;12430:56;;12698:1;12691:4;12685:11;12682:18;12673:7;12669:32;12659:606;;12830:6;12820:7;12813:15;12809:28;12806:165;;;12886:16;12880:4;12875:3;12860:43;12936:16;12931:3;12924:29;12806:165;13247:1;13239:5;13227:18;13224:25;13205:16;13198:24;13194:56;13185:7;13181:70;13170:81;;12659:606;13285:4;13278:17;-1:-1:-1;12059:1252:7;;-1:-1:-1;;;;12059:1252:7:o;3376:267:12:-;3470:13;1390:66;3499:46;;3495:142;;3568:15;3577:5;3568:8;:15::i;:::-;3561:22;;;;3495:142;3621:5;3614:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8373:1244:7;8600:4;8594:11;-1:-1:-1;;;8467:12:7;8618:22;;;-1:-1:-1;;;;;8666:24:7;;8660:4;8653:38;8711:4;8704:19;;;8467:12;8787:4;8467:12;8775:4;8467:12;;8759:5;8752;8747:45;8736:56;;9004:1;8997:4;8991:11;8988:18;8979:7;8975:32;8965:606;;9136:6;9126:7;9119:15;9115:28;9112:165;;;9192:16;9186:4;9181:3;9166:43;9242:16;9237:3;9230:29;3945:262:16;3998:7;4029:4;-1:-1:-1;;;;;4038:11:16;4021:28;;:63;;;;;4070:14;4053:13;:31;4021:63;4017:184;;;-1:-1:-1;4107:22:16;;3945:262::o;4017:184::-;4167:23;4304:80;;;2079:95;4304:80;;;11405:25:23;4326:11:16;11446:18:23;;;11439:34;;;;4339:14:16;11489:18:23;;;11482:34;4355:13:16;11532:18:23;;;11525:34;4378:4:16;11575:19:23;;;11568:61;4268:7:16;;11377:19:23;;4304:80:16;;;;;;;;;;;;4294:91;;;;;;4287:98;;4213:179;;10165:1393:7;10460:4;10454:11;-1:-1:-1;;;10323:12:7;10478:22;;;-1:-1:-1;;;;;10526:26:7;;;10520:4;10513:40;10579:24;;10573:4;10566:38;10624:4;10617:19;;;10323:12;10700:4;10323:12;10688:4;10323:12;;10672:5;10665;10660:45;10649:56;;10917:1;10910:4;10904:11;10901:18;10892:7;10888:32;10878:606;;11049:6;11039:7;11032:15;11028:28;11025:165;;;11105:16;11099:4;11094:3;11079:43;11155:16;11150:3;11143:29;11025:165;11466:1;11458:5;11446:18;11443:25;11424:16;11417:24;11413:56;11404:7;11400:70;11389:81;;10878:606;11504:4;11497:17;-1:-1:-1;11540:1:7;11534:4;11527:15;10165:1393;;-1:-1:-1;;;;;10165:1393:7:o;2080:380:12:-;2139:13;2164:11;2178:16;2189:4;2178:10;:16::i;:::-;2302;;;2313:4;2302:16;;;;;;;;;2164:30;;-1:-1:-1;2282:17:12;;2302:16;;;;;;;;;-1:-1:-1;;;2367:16:12;;;-1:-1:-1;2412:4:12;2403:14;;2396:28;;;;-1:-1:-1;2367:16:12;2080:380::o;2532:247::-;2593:7;2665:4;2629:40;;2692:4;2683:13;;2679:71;;;2719:20;;-1:-1:-1;;;2719:20:12;;;;;;;;;;;14:393:23;106:6;159:2;147:9;138:7;134:23;130:32;127:52;;;175:1;172;165:12;127:52;215:9;202:23;248:18;240:6;237:30;234:50;;;280:1;277;270:12;234:50;303:22;;359:3;341:16;;;337:26;334:46;;;376:1;373;366:12;334:46;399:2;14:393;-1:-1:-1;;;14:393:23:o;620:289::-;662:3;700:5;694:12;727:6;722:3;715:19;783:6;776:4;769:5;765:16;758:4;753:3;749:14;743:47;835:1;828:4;819:6;814:3;810:16;806:27;799:38;898:4;891:2;887:7;882:2;874:6;870:15;866:29;861:3;857:39;853:50;846:57;;;620:289;;;;:::o;914:1238::-;1320:3;1315;1311:13;1303:6;1299:26;1288:9;1281:45;1362:3;1357:2;1346:9;1342:18;1335:31;1262:4;1389:46;1430:3;1419:9;1415:19;1407:6;1389:46;:::i;:::-;1483:9;1475:6;1471:22;1466:2;1455:9;1451:18;1444:50;1517:33;1543:6;1535;1517:33;:::i;:::-;1581:2;1566:18;;1559:34;;;-1:-1:-1;;;;;1630:32:23;;1624:3;1609:19;;1602:61;1650:3;1679:19;;1672:35;;;1744:22;;;1738:3;1723:19;;1716:51;1816:13;;1838:22;;;1888:2;1914:15;;;;-1:-1:-1;1876:15:23;;;;-1:-1:-1;1957:169:23;1971:6;1968:1;1965:13;1957:169;;;2032:13;;2020:26;;2075:2;2101:15;;;;2066:12;;;;1993:1;1986:9;1957:169;;;-1:-1:-1;2143:3:23;;914:1238;-1:-1:-1;;;;;;;;;;;914:1238:23:o;2157:173::-;2225:20;;-1:-1:-1;;;;;2274:31:23;;2264:42;;2254:70;;2320:1;2317;2310:12;2254:70;2157:173;;;:::o;2335:300::-;2403:6;2411;2464:2;2452:9;2443:7;2439:23;2435:32;2432:52;;;2480:1;2477;2470:12;2432:52;2503:29;2522:9;2503:29;:::i;:::-;2493:39;2601:2;2586:18;;;;2573:32;;-1:-1:-1;;;2335:300:23:o;2832:226::-;2891:6;2944:2;2932:9;2923:7;2919:23;2915:32;2912:52;;;2960:1;2957;2950:12;2912:52;-1:-1:-1;3005:23:23;;2832:226;-1:-1:-1;2832:226:23:o;3063:186::-;3122:6;3175:2;3163:9;3154:7;3150:23;3146:32;3143:52;;;3191:1;3188;3181:12;3143:52;3214:29;3233:9;3214:29;:::i;4621:521::-;4698:4;4704:6;4764:11;4751:25;4858:2;4854:7;4843:8;4827:14;4823:29;4819:43;4799:18;4795:68;4785:96;;4877:1;4874;4867:12;4785:96;4904:33;;4956:20;;;-1:-1:-1;4999:18:23;4988:30;;4985:50;;;5031:1;5028;5021:12;4985:50;5064:4;5052:17;;-1:-1:-1;5095:14:23;5091:27;;;5081:38;;5078:58;;;5132:1;5129;5122:12;5078:58;4621:521;;;;;:::o;5147:269::-;5204:6;5257:2;5245:9;5236:7;5232:23;5228:32;5225:52;;;5273:1;5270;5263:12;5225:52;5312:9;5299:23;5362:4;5355:5;5351:16;5344:5;5341:27;5331:55;;5382:1;5379;5372:12;9140:184;9210:6;9263:2;9251:9;9242:7;9238:23;9234:32;9231:52;;;9279:1;9276;9269:12;9231:52;-1:-1:-1;9302:16:23;;9140:184;-1:-1:-1;9140:184:23:o;9738:301::-;9867:3;9905:6;9899:13;9951:6;9944:4;9936:6;9932:17;9927:3;9921:37;10013:1;9977:16;;10002:13;;;-1:-1:-1;9977:16:23;9738:301;-1:-1:-1;9738:301:23:o;10447:127::-;10508:10;10503:3;10499:20;10496:1;10489:31;10539:4;10536:1;10529:15;10563:4;10560:1;10553:15;10761:380;10840:1;10836:12;;;;10883;;;10904:61;;10958:4;10950:6;10946:17;10936:27;;10904:61;11011:2;11003:6;11000:14;10980:18;10977:38;10974:161;;11057:10;11052:3;11048:20;11045:1;11038:31;11092:4;11089:1;11082:15;11120:4;11117:1;11110:15;10974:161;;10761:380;;;:::o" + }, + "methodIdentifiers": { + "destinationContract()": "75bd6863", + "eip712Domain()": "84b0196e", + "execute((address,address,uint256,uint256,uint8,bytes32,bytes32,bytes,uint256,uint256,uint256,uint8,bytes32,bytes32))": "2af83bfe", + "isExecutionCompleted(address,uint256)": "dcb79457", + "owner()": "8da5cb5b", + "renounceOwnership()": "715018a6", + "transferOwnership(address)": "f2fde38b", + "usedPayloadNonces(address,uint256)": "d850124e", + "withdrawETH(uint256)": "f14210a6", + "withdrawToken(address,uint256)": "9e281a98" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_destinationContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidShortString\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\"}],\"name\":\"StringTooLong\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"ETHWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RelayerExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"TokenWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"destinationContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"permitV\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"permitR\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"permitS\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"payloadData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"payloadValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"payloadNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"payloadDeadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"payloadV\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"payloadR\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"payloadS\",\"type\":\"bytes32\"}],\"internalType\":\"struct TokenRelayer.ExecuteParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"isExecutionCompleted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"usedPayloadNonces\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"errors\":{\"ECDSAInvalidSignature()\":[{\"details\":\"The signature is invalid.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}],\"ReentrancyGuardReentrantCall()\":[{\"details\":\"Unauthorized reentrant call.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}]},\"events\":{\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"}},\"kind\":\"dev\",\"methods\":{\"eip712Domain()\":{\"details\":\"returns the fields and values that describe the domain separator used by this contract for EIP-712 signature.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"withdrawETH(uint256)\":{\"params\":{\"amount\":\"The amount of ETH to transfer to the owner.\"}},\"withdrawToken(address,uint256)\":{\"params\":{\"amount\":\"The amount of tokens to transfer to the owner.\",\"token\":\"The ERC20 token contract address.\"}}},\"title\":\"TokenRelayer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"withdrawETH(uint256)\":{\"notice\":\"Allows the owner to recover any native ETH held by this contract.\"},\"withdrawToken(address,uint256)\":{\"notice\":\"Allows the owner to recover any ERC20 tokens held by this contract.\"}},\"notice\":\"A relayer contract that accepts ERC20 permit signatures and executes arbitrary calls to a destination contract, both authorized via signature. Flow: 1. User signs a permit allowing the relayer to spend their tokens 2. User signs a payload (e.g., transfer from relayer to another user) 3. Relayer: a. Executes permit to approve the tokens b. Transfers tokens from user to relayer (via transferFrom) c. Forwards the payload call (transfer from relayer to another user)\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TokenRelayer.sol\":\"TokenRelayer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"@openzeppelin/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"@openzeppelin/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"@openzeppelin/contracts/interfaces/IERC5267.sol\":{\"keccak256\":\"0xfb223a85dd0b2175cfbbaa325a744e2cd74ecd17c3df2b77b0722f991d2725ee\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84bf1dea0589ec49c8d15d559cc6d86ee493048a89b2d4adb60fbe705a3d89ae\",\"dweb:/ipfs/Qmd56n556d529wk2pRMhYhm5nhMDhviwereodDikjs68w1\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x53befc41288eaa87edcd3a7be7e8475a32e44c6a29f9bf52fae789781301d9ff\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a1d7fab53c4ceaf42391b83d9b36d7e9cc524a8da125cffdcd32c56560f9d1c9\",\"dweb:/ipfs/QmaRZdVhQdqNXofeimibkBG65q9GVcXVZEGpycwwX3znC6\"]},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x304d732678032a9781ae85c8f204c8fba3d3a5e31c02616964e75cfdc5049098\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://299ced486011781dc98f638059678323c03079fefae1482abaa2135b22fa92d0\",\"dweb:/ipfs/QmbZNbcPTBxNvwChavN2kkZZs7xHhYL7mv51KrxMhsMs3j\"]},\"@openzeppelin/contracts/utils/Bytes.sol\":{\"keccak256\":\"0xf80e4b96b6849936ea0fabd76cf81b13d7276295fddb1e1c07afb3ddf650b0ac\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6430007255ac11c6e9c4331a418f3af52ff66fbbae959f645301d025b20aeb08\",\"dweb:/ipfs/QmQE5fjmBBRw9ndnzJuC2uskYss1gbaR7JdazoCf1FGoBj\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xa516cbf1c7d15d3517c2d668601ce016c54395bf5171918a14e2686977465f53\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1e1d079e8edfb58efd23a311e315a4807b01b5d1cf153f8fa2d0608b9dec3e99\",\"dweb:/ipfs/QmTBExeX2SDTkn5xbk5ssbYSx7VqRp9H4Ux1CY4uQM4b9N\"]},\"@openzeppelin/contracts/utils/ShortStrings.sol\":{\"keccak256\":\"0x0768b3bdb701fe4994b3be932ca8635551dfebe04c645f77500322741bebf57c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a2059f9ca8d3c11c49ca49fc9c5fb070f18cc85d12a7688e45322ed0e2a1cb99\",\"dweb:/ipfs/QmS2gwX51RAvSw4tYbjHccY2CKbh2uvDzqHLAFXdsddgia\"]},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x1fdc2de9585ab0f1c417f02a873a2b6343cd64bb7ffec6b00ffa11a4a158d9e8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1ab223a3d969c6cd7610049431dd42740960c477e45878f5d8b54411f7a32bdc\",\"dweb:/ipfs/QmWumhjvhpKcwx3vDPQninsNVTc3BGvqaihkQakFkQYpaS\"]},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"keccak256\":\"0xbeb5cad8aaabe0d35d2ec1a8414d91e81e5a8ca679add4cf57e2f33476861f40\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebb272a5ee2da4e8bd5551334e0ce8dce4e9c56a04570d6bf046d260fab3116a\",\"dweb:/ipfs/QmNw6RyM769qcqFocDq6HJMG2WiEnQbvizpRaUXsACHho2\"]},\"@openzeppelin/contracts/utils/cryptography/EIP712.sol\":{\"keccak256\":\"0x8440117ea216b97a7bad690a67449fd372c840d073c8375822667e14702782b4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ebb6645995b8290d0b9121825e2533e4e28977b2c6befee76e15e58f0feb61d4\",\"dweb:/ipfs/QmVR72j6kL5R2txuihieDev1FeTi4KWJS1Z6ABbwL3Qtph\"]},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0x6d8579873b9650426bfbd2a754092d1725049ca05e4e3c8c2c82dd9f3453129d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fa3127a8968d55096d37124a9e212013af112affa5e30b84a1d22263c31576c\",\"dweb:/ipfs/QmetxaVcn5Q6nkpF9yXzaxPQ7d3rgrhV13sTH9BgiuzGJL\"]},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x59973a93b1f983f94e10529f46ca46544a9fec2b5f56fb1390bbe9e0dc79f857\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c55ef8f0b9719790c2ae6f81d80a59ffb89f2f0abe6bc065585bd79edce058c5\",\"dweb:/ipfs/QmNNmCbX9NjPXKqHJN8R1WC2rNeZSQrPZLd6FF6AKLyH5Y\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0xc8cae21c9ae4a46e5162ff9bf5b351d6fa6a6eba72d515f3bc1bdfeda7fdf083\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce830ebcf28e31643caba318996db3763c36d52cd0f23798ba83c135355d45e9\",\"dweb:/ipfs/QmdGPcvptHN7UBCbUYBbRX3hiRVRFLRwno8b4uga6uFNif\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]},\"contracts/TokenRelayer.sol\":{\"keccak256\":\"0xa26c2b15e35622e16d260cc4de183ff686e24494dd64b25ef444068239a8eee4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f7e63a4f9e7b5f70ee521378c3009982c70603b25526a6dcc516a4761dfb3d2d\",\"dweb:/ipfs/QmSNc84AJ2RXBPx9rHrJkyPwAbgcqBdQUQ76cJV9qYWMTF\"]}},\"version\":1}" + } + } + } + } +} \ No newline at end of file diff --git a/contracts/relayer/ignition/deployments/chain-42161/deployed_addresses.json b/contracts/relayer/ignition/deployments/chain-42161/deployed_addresses.json new file mode 100644 index 000000000..84e85450f --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-42161/deployed_addresses.json @@ -0,0 +1,3 @@ +{ + "TokenRelayer#TokenRelayer": "0xC9ECD03c89349B3EAe4613c7091c6c3029413785" +} diff --git a/contracts/relayer/ignition/deployments/chain-42161/journal.jsonl b/contracts/relayer/ignition/deployments/chain-42161/journal.jsonl new file mode 100644 index 000000000..1bd8ede69 --- /dev/null +++ b/contracts/relayer/ignition/deployments/chain-42161/journal.jsonl @@ -0,0 +1,8 @@ + +{"chainId":42161,"type":"DEPLOYMENT_INITIALIZE"} +{"artifactId":"TokenRelayer#TokenRelayer","constructorArgs":["0xce16F69375520ab01377ce7B88f5BA8C48F8D666"],"contractName":"TokenRelayer","dependencies":[],"from":"0x4f1876c3f7ee80be70a057511833b93d2ab2dfc4","futureId":"TokenRelayer#TokenRelayer","futureType":"NAMED_ARTIFACT_CONTRACT_DEPLOYMENT","libraries":{},"strategy":"basic","strategyConfig":{},"type":"DEPLOYMENT_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"TokenRelayer#TokenRelayer","networkInteraction":{"data":"0x610180604052348015610010575f5ffd5b50604051611a4d380380611a4d83398101604081905261002f91610294565b604080518082018252600c81526b2a37b5b2b72932b630bcb2b960a11b602080830191909152825180840190935260018352603160f81b9083015290338061009157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61009a816101d6565b5060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00556100ca826001610225565b610120526100d9816002610225565b61014052815160208084019190912060e052815190820120610100524660a05261016560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166101c45760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642064657374696e6174696f6e000000000000000000000000006044820152606401610088565b6001600160a01b03166101605261046b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6020835110156102405761023983610257565b9050610251565b8161024b8482610359565b5060ff90505b92915050565b5f5f829050601f81511115610281578260405163305a27a960e01b81526004016100889190610413565b805161028c82610448565b179392505050565b5f602082840312156102a4575f5ffd5b81516001600160a01b03811681146102ba575f5ffd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102e957607f821691505b60208210810361030757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561035457805f5260205f20601f840160051c810160208510156103325750805b601f840160051c820191505b81811015610351575f815560010161033e565b50505b505050565b81516001600160401b03811115610372576103726102c1565b6103868161038084546102d5565b8461030d565b6020601f8211600181146103b8575f83156103a15750848201515b5f19600385901b1c1916600184901b178455610351565b5f84815260208120601f198516915b828110156103e757878501518255602094850194600190920191016103c7565b508482101561040457868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610307575f1960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161156c6104e15f395f818160d701528181610525015281816105f4015281816109500152610bf801525f610d2d01525f610cfb01525f6111bc01525f61119401525f6110ef01525f61111901525f611143015261156c5ff3fe608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033000000000000000000000000ce16f69375520ab01377ce7b88f5ba8c48f8d666","id":1,"type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"TokenRelayer#TokenRelayer","networkInteractionId":1,"nonce":5,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"TokenRelayer#TokenRelayer","networkInteractionId":1,"nonce":5,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"40624000"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"0"}},"hash":"0xe96425e9d53a1b76fd3f012b3134827428028e3725a89eca076cf3073be8ad16"},"type":"TRANSACTION_SEND"} +{"futureId":"TokenRelayer#TokenRelayer","hash":"0xe96425e9d53a1b76fd3f012b3134827428028e3725a89eca076cf3073be8ad16","networkInteractionId":1,"receipt":{"blockHash":"0x4c06649e051b7dc8e33862cccde8f362e1cd582ada0ad49461132b655067adcf","blockNumber":438274587,"contractAddress":"0xC9ECD03c89349B3EAe4613c7091c6c3029413785","logs":[{"address":"0xC9ECD03c89349B3EAe4613c7091c6c3029413785","data":"0x","logIndex":1,"topics":["0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000004f1876c3f7ee80be70a057511833b93d2ab2dfc4"]}],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"TokenRelayer#TokenRelayer","result":{"address":"0xC9ECD03c89349B3EAe4613c7091c6c3029413785","type":"SUCCESS"},"type":"DEPLOYMENT_EXECUTION_STATE_COMPLETE"} \ No newline at end of file diff --git a/contracts/relayer/ignition/modules/Relayer.ts b/contracts/relayer/ignition/modules/Relayer.ts new file mode 100644 index 000000000..2a0298232 --- /dev/null +++ b/contracts/relayer/ignition/modules/Relayer.ts @@ -0,0 +1,11 @@ +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +const RELAYER_NAME = "TokenRelayer"; + +export default buildModule(RELAYER_NAME, m => { + const destinationContract = "0xce16F69375520ab01377ce7B88f5BA8C48F8D666"; + + const relayer = m.contract("TokenRelayer", [destinationContract]); + + return { relayer }; +}); diff --git a/contracts/relayer/package.json b/contracts/relayer/package.json new file mode 100644 index 000000000..52aa6d08f --- /dev/null +++ b/contracts/relayer/package.json @@ -0,0 +1,27 @@ +{ + "dependencies": { + "dotenv": "^16.4.7", + "viem": "catalog:" + }, + "description": "Relayer contract with ERC20 permit and custom payload execution", + "devDependencies": { + "@nomicfoundation/hardhat-ignition": "^0.15.9", + "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "@openzeppelin/contracts": "^5.2.0", + "@types/node": "catalog:", + "hardhat": "^2.22.17", + "ts-node": "^10.9.2", + "typescript": "catalog:" + }, + "main": "index.js", + "name": "@vortexfi/contracts-relayer", + "private": true, + "scripts": { + "compile": "hardhat compile", + "deploy:amoy": "hardhat ignition deploy ignition/modules/Relayer.ts --network amoy", + "node": "hardhat node", + "test": "hardhat test", + "test:local": "hardhat run test/local-flow.ts --network hardhat" + }, + "version": "1.0.0" +} diff --git a/contracts/relayer/test/relayer-execution-squid.ts b/contracts/relayer/test/relayer-execution-squid.ts new file mode 100644 index 000000000..4afc4ab74 --- /dev/null +++ b/contracts/relayer/test/relayer-execution-squid.ts @@ -0,0 +1,302 @@ +/** + * Relayer Execution Script + * + * Similar to relayer-execution.ts but focused on testing the SquidRouter permit execution flow, + * which includes both a permit signature and a payload signature. + * This script simulates the entire process of creating the necessary signatures and executing the transaction through the relayer contract. + * + * Environment variables required: + * - SECRET1: Private key for user1 + * - SECRET2: Private key for user2 (address derived for recipient) + * - RELAYER_SECRET: Private key for relayer + * + * Run with: node test/relayer-execution-squid.ts + */ + +import { type Address, createPublicClient, createWalletClient, formatUnits, http } from "viem"; +import { privateKeyToAccount } from "viem/accounts"; +import { polygon } from "viem/chains"; + +// ABIs +const erc20Abi = [ + { + inputs: [{ name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", type: "uint256" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [{ name: "owner", type: "address" }], + name: "nonces", + outputs: [{ name: "", type: "uint256" }], + stateMutability: "view", + type: "function" + }, + { inputs: [], name: "name", outputs: [{ name: "", type: "string" }], stateMutability: "view", type: "function" } +]; + +const transferAbi = [ + { + inputs: [ + { name: "to", type: "address" }, + { name: "amount", type: "uint256" } + ], + name: "transfer", + outputs: [{ name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function" + } +]; + +const tokenRelayerAbi = [ + { + inputs: [ + { + components: [ + { name: "token", type: "address" }, + { name: "owner", type: "address" }, + { name: "value", type: "uint256" }, + { name: "deadline", type: "uint256" }, + { name: "permitV", type: "uint8" }, + { name: "permitR", type: "bytes32" }, + { name: "permitS", type: "bytes32" }, + { name: "payloadData", type: "bytes" }, + { name: "payloadValue", type: "uint256" }, + { name: "payloadNonce", type: "uint256" }, + { name: "payloadDeadline", type: "uint256" }, + { name: "payloadV", type: "uint8" }, + { name: "payloadR", type: "bytes32" }, + { name: "payloadS", type: "bytes32" } + ], + name: "params", + type: "tuple" + } + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function" + } +]; + +async function main() { + console.log("=== TokenRelayer Execution Script ===\n"); + + // Constants + const ERC20_ADDRESS: Address = "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"; + const RELAYER_ADDRESS: Address = "0x93C399bB9D6736010Fa296a4eB3FEA148353F99D"; + const DESTINATION_ADDRESS: Address = "0xce16F69375520ab01377ce7B88f5BA8C48F8D666"; // User2 address (derived from secret2) + // Get secrets from environment + const secret1 = process.env.SECRET1; + const relayerSecret = process.env.RELAYER_SECRET; + + if (!secret1 || !relayerSecret) { + throw new Error("Missing required environment variables: SECRET1, RELAYER_SECRET"); + } + + // Create clients + const publicClient = createPublicClient({ chain: polygon, transport: http() }); + const relayerWalletClient = createWalletClient({ + account: privateKeyToAccount(`0x${relayerSecret}` as `0x${string}`), + chain: polygon, + transport: http() + }); + + // Create accounts + const user1Account = privateKeyToAccount(`0x${secret1}` as `0x${string}`); + + console.log("User1:", user1Account.address); + console.log("Relayer:", relayerWalletClient.account.address); + console.log("ERC20 Contract:", ERC20_ADDRESS); + console.log("Relayer Contract:", RELAYER_ADDRESS); + + // Check initial balances + const user1BalanceBefore = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [user1Account.address], + functionName: "balanceOf" + })) as bigint; + + const relayerBalanceBefore = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [RELAYER_ADDRESS], + functionName: "balanceOf" + })) as bigint; + + console.log("\n--- Initial Balances ---"); + console.log("User1 balance:", formatUnits(user1BalanceBefore, 6)); + console.log("Relayer balance:", formatUnits(relayerBalanceBefore, 6)); + + if (user1BalanceBefore === 0n) { + console.log("Warning: User1 has 0 tokens. Please ensure User1 has tokens in the ERC20 contract."); + return; + } + + // Prepare permit parameters + const transferAmount = 1n * 10n ** 5n; // Transfer 0.1 token (assuming 6 decimals) + const permitDeadline = BigInt(Math.floor(Date.now() / 1000) + 3600); // 1 hour + const user1Nonce = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [user1Account.address], + functionName: "nonces" + })) as bigint; + + console.log("\n--- Permit Parameters ---"); + console.log("Owner:", user1Account.address); + console.log("Spender:", RELAYER_ADDRESS); + console.log("Value:", transferAmount.toString()); + console.log("Deadline:", permitDeadline.toString()); + console.log("Nonce:", user1Nonce.toString()); + + // Get token name + const tokenName = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + functionName: "name" + })) as string; + + console.log("Token name:", tokenName); + + // Sign permit + const domain = { + chainId: polygon.id, + name: tokenName, // USDC uses version 2 + verifyingContract: ERC20_ADDRESS, + version: "2" + }; + + const permitTypes = { + Permit: [ + { name: "owner", type: "address" }, + { name: "spender", type: "address" }, + { name: "value", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "deadline", type: "uint256" } + ] + }; + + const permitMessage = { + deadline: permitDeadline, + nonce: user1Nonce, + owner: user1Account.address, + spender: RELAYER_ADDRESS, + value: transferAmount + }; + + const permitSignature = await user1Account.signTypedData({ + domain, + message: permitMessage, + primaryType: "Permit", + types: permitTypes + }); + const permitR = `0x${permitSignature.slice(2, 66)}` as `0x${string}`; + const permitS = `0x${permitSignature.slice(66, 130)}` as `0x${string}`; + const permitV = parseInt(permitSignature.slice(130, 132), 16); + console.log("Permit signature created"); + + // Prepare payload - transfer from relayer to User2 + const payloadNonce = 0; // Use timestamp as nonce to avoid reuse + const payloadDeadline = BigInt(Math.floor(Date.now() / 1000) + 3600); + + const payloadData = + "0x58181a800000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c335900000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000004800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000009a00000000000000000000000000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c3359000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c33590000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000e404e45aaf0000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c3359000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000ad6cea45f98444a922a2b4fe96b8c90f0862d2f400000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000185ba00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000003c499c542cef5e3811e1192ce70d8cc03d5c335900000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000782cf7c3f427a4551a68f436e34615db2cf24426000000000000000000000000000000000000000000000000000000000000007d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf127000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000ad6cea45f98444a922a2b4fe96b8c90f0862d2f400000000000000000000000000000000000000000000000000000000000186230000000000000000000000000000000000000000000000000bfe8992757e7a440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000242e1a7d4d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000004f1876c3f7ee80be70a057511833b93d2ab2dfc4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000bcedae7e2342166a4b8fa3a8b3180bb7"; + + console.log("\n--- Payload Parameters ---"); + console.log("Destination:", ERC20_ADDRESS); + console.log("Data (transfer from relayer to User2):", payloadData); + console.log("Amount:", transferAmount.toString()); + console.log("Nonce:", payloadNonce.toString()); + console.log("Deadline:", payloadDeadline.toString()); + + // Sign payload + const relayerDomain = { + chainId: polygon.id, + name: "TokenRelayer", + verifyingContract: RELAYER_ADDRESS, + version: "1" + }; + + const payloadTypes = { + Payload: [ + { name: "destination", type: "address" }, + { name: "owner", type: "address" }, + { name: "token", type: "address" }, + { name: "value", type: "uint256" }, + { name: "data", type: "bytes" }, + { name: "ethValue", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "deadline", type: "uint256" } + ] + }; + + const payloadMessage = { + data: payloadData, + deadline: payloadDeadline, + destination: DESTINATION_ADDRESS, + ethValue: 0n, + nonce: payloadNonce, + owner: user1Account.address, + token: ERC20_ADDRESS, + value: transferAmount + }; + + const payloadSignature = await user1Account.signTypedData({ + domain: relayerDomain, + message: payloadMessage, + primaryType: "Payload", + types: payloadTypes + }); + const payloadR = `0x${payloadSignature.slice(2, 66)}` as `0x${string}`; + const payloadS = `0x${payloadSignature.slice(66, 130)}` as `0x${string}`; + const payloadV = parseInt(payloadSignature.slice(130, 132), 16); + console.log("Payload signature created"); + + // Execute via relayer + console.log("\n--- Executing Relayer ---"); + console.log("This will:"); + console.log("1. Execute permit to approve tokens"); + console.log("2. Transfer tokens from user1 to relayer"); + console.log("3. Execute payload: transfer from relayer to User2"); + + try { + const hash = await relayerWalletClient.writeContract({ + abi: tokenRelayerAbi, + address: RELAYER_ADDRESS, + args: [ + { + deadline: permitDeadline, + owner: user1Account.address, + payloadData: payloadData, + payloadDeadline: payloadDeadline, + payloadNonce: payloadNonce, + payloadR: payloadR, + payloadS: payloadS, + payloadV: payloadV, + payloadValue: 0n, + permitR: permitR, + permitS: permitS, + permitV: permitV, + token: ERC20_ADDRESS, + value: transferAmount + } + ], + functionName: "execute" + }); + + const receipt = await publicClient.waitForTransactionReceipt({ hash }); + console.log("Transaction hash:", hash); + console.log("Gas used:", receipt.gasUsed.toString()); + } catch (error: any) { + console.error("Execution failed:", error.message); + return; + } +} + +main().catch(error => { + console.error(error); + process.exitCode = 1; +}); diff --git a/contracts/relayer/test/relayer-execution.ts b/contracts/relayer/test/relayer-execution.ts new file mode 100644 index 000000000..375313b33 --- /dev/null +++ b/contracts/relayer/test/relayer-execution.ts @@ -0,0 +1,373 @@ +/** + * Relayer Execution Script + * + * This script demonstrates the full relayer flow with real contracts and secrets on Amoy testnet: + * 1. Use existing ERC20 contract at specified address + * 2. Use existing TokenRelayer at specified address + * 3. User1 (from secret1) signs permit and payload for transfer to User2 + * 4. Relayer (from relayerSecret) executes the transaction + * 5. Verify balances + * + * Environment variables required: + * - SECRET1: Private key for user1 + * - SECRET2: Private key for user2 (address derived for recipient) + * - RELAYER_SECRET: Private key for relayer + * + * Run with: node test/relayer-execution.ts + */ + +import { type Address, createPublicClient, createWalletClient, encodeFunctionData, formatUnits, http } from "viem"; +import { privateKeyToAccount } from "viem/accounts"; + +// Define Amoy chain +const amoy = { + blockExplorers: { default: { name: "PolygonScan", url: "https://amoy.polygonscan.com" } }, + id: 80002, + name: "Polygon Amoy", + nativeCurrency: { decimals: 18, name: "MATIC", symbol: "MATIC" }, + network: "amoy", + rpcUrls: { default: { http: ["https://rpc-amoy.polygon.technology"] } } +}; + +// ABIs +const erc20Abi = [ + { + inputs: [{ name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", type: "uint256" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [{ name: "owner", type: "address" }], + name: "nonces", + outputs: [{ name: "", type: "uint256" }], + stateMutability: "view", + type: "function" + }, + { inputs: [], name: "name", outputs: [{ name: "", type: "string" }], stateMutability: "view", type: "function" } +]; + +const transferAbi = [ + { + inputs: [ + { name: "to", type: "address" }, + { name: "amount", type: "uint256" } + ], + name: "transfer", + outputs: [{ name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function" + } +]; + +const tokenRelayerAbi = [ + { + inputs: [ + { + components: [ + { name: "token", type: "address" }, + { name: "owner", type: "address" }, + { name: "value", type: "uint256" }, + { name: "deadline", type: "uint256" }, + { name: "permitV", type: "uint8" }, + { name: "permitR", type: "bytes32" }, + { name: "permitS", type: "bytes32" }, + { name: "payloadData", type: "bytes" }, + { name: "payloadValue", type: "uint256" }, + { name: "payloadNonce", type: "uint256" }, + { name: "payloadDeadline", type: "uint256" }, + { name: "payloadV", type: "uint8" }, + { name: "payloadR", type: "bytes32" }, + { name: "payloadS", type: "bytes32" } + ], + name: "params", + type: "tuple" + } + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function" + } +]; + +async function main() { + console.log("=== TokenRelayer Execution Script ===\n"); + + // Constants + const ERC20_ADDRESS: Address = "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582"; + const RELAYER_ADDRESS: Address = "0x55cDfA4C105C5A30d40a3a712bc31B4456359897"; + + // Get secrets from environment + const secret1 = process.env.SECRET1; + const secret2 = process.env.SECRET2; + const relayerSecret = process.env.RELAYER_SECRET; + + if (!secret1 || !secret2 || !relayerSecret) { + throw new Error("Missing required environment variables: SECRET1, SECRET2, RELAYER_SECRET"); + } + + // Create clients + const publicClient = createPublicClient({ chain: amoy, transport: http() }); + const relayerWalletClient = createWalletClient({ + account: privateKeyToAccount(`0x${relayerSecret}` as `0x${string}`), + chain: amoy, + transport: http() + }); + + // Create accounts + const user1Account = privateKeyToAccount(`0x${secret1}` as `0x${string}`); + const user2Account = privateKeyToAccount(`0x${secret2}` as `0x${string}`); + + console.log("User1:", user1Account.address); + console.log("User2:", user2Account.address); + console.log("Relayer:", relayerWalletClient.account.address); + console.log("ERC20 Contract:", ERC20_ADDRESS); + console.log("Relayer Contract:", RELAYER_ADDRESS); + + // Check initial balances + const user1BalanceBefore = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [user1Account.address], + functionName: "balanceOf" + })) as bigint; + + const user2BalanceBefore = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [user2Account.address], + functionName: "balanceOf" + })) as bigint; + + const relayerBalanceBefore = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [RELAYER_ADDRESS], + functionName: "balanceOf" + })) as bigint; + + console.log("\n--- Initial Balances ---"); + console.log("User1 balance:", formatUnits(user1BalanceBefore, 6)); + console.log("User2 balance:", formatUnits(user2BalanceBefore, 6)); + console.log("Relayer balance:", formatUnits(relayerBalanceBefore, 6)); + + // Assume user1 has some tokens (as per requirements) + if (user1BalanceBefore === 0n) { + console.log("Warning: User1 has 0 tokens. Please ensure User1 has tokens in the ERC20 contract."); + return; + } + + // Prepare permit parameters + const transferAmount = 1n * 10n ** 6n; // Transfer 1 token (assuming 6 decimals) + const permitDeadline = BigInt(Math.floor(Date.now() / 1000) + 3600); // 1 hour + const user1Nonce = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [user1Account.address], + functionName: "nonces" + })) as bigint; + + console.log("\n--- Permit Parameters ---"); + console.log("Owner:", user1Account.address); + console.log("Spender:", RELAYER_ADDRESS); + console.log("Value:", transferAmount.toString()); + console.log("Deadline:", permitDeadline.toString()); + console.log("Nonce:", user1Nonce.toString()); + + // Get token name + const tokenName = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + functionName: "name" + })) as string; + + console.log("Token name:", tokenName); + + // Sign permit + const domain = { + chainId: amoy.id, + name: tokenName, // USDC uses version 2 + verifyingContract: ERC20_ADDRESS, + version: "2" + }; + + const permitTypes = { + Permit: [ + { name: "owner", type: "address" }, + { name: "spender", type: "address" }, + { name: "value", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "deadline", type: "uint256" } + ] + }; + + const permitMessage = { + deadline: permitDeadline, + nonce: user1Nonce, + owner: user1Account.address, + spender: RELAYER_ADDRESS, + value: transferAmount + }; + + const permitSignature = await user1Account.signTypedData({ + domain, + message: permitMessage, + primaryType: "Permit", + types: permitTypes + }); + const permitR = `0x${permitSignature.slice(2, 66)}` as `0x${string}`; + const permitS = `0x${permitSignature.slice(66, 130)}` as `0x${string}`; + const permitV = parseInt(permitSignature.slice(130, 132), 16); + console.log("Permit signature created"); + + // Prepare payload - transfer from relayer to User2 + const payloadNonce = 0; // Use timestamp as nonce to avoid reuse + const payloadDeadline = BigInt(Math.floor(Date.now() / 1000) + 3600); + + const payloadData = encodeFunctionData({ + abi: transferAbi, + args: [user2Account.address, transferAmount], + functionName: "transfer" + }); + + console.log("\n--- Payload Parameters ---"); + console.log("Destination:", ERC20_ADDRESS); + console.log("Data (transfer from relayer to User2):", payloadData); + console.log("Recipient:", user2Account.address); + console.log("Amount:", transferAmount.toString()); + console.log("Nonce:", payloadNonce.toString()); + console.log("Deadline:", payloadDeadline.toString()); + + // Sign payload + const relayerDomain = { + chainId: amoy.id, + name: "TokenRelayer", + verifyingContract: RELAYER_ADDRESS, + version: "1" + }; + + const payloadTypes = { + Payload: [ + { name: "destination", type: "address" }, + { name: "owner", type: "address" }, + { name: "token", type: "address" }, + { name: "value", type: "uint256" }, + { name: "data", type: "bytes" }, + { name: "ethValue", type: "uint256" }, + { name: "nonce", type: "uint256" }, + { name: "deadline", type: "uint256" } + ] + }; + + const payloadMessage = { + data: payloadData, + deadline: payloadDeadline, + destination: ERC20_ADDRESS, + ethValue: 0n, + nonce: payloadNonce, + owner: user1Account.address, + token: ERC20_ADDRESS, + value: transferAmount + }; + + const payloadSignature = await user1Account.signTypedData({ + domain: relayerDomain, + message: payloadMessage, + primaryType: "Payload", + types: payloadTypes + }); + const payloadR = `0x${payloadSignature.slice(2, 66)}` as `0x${string}`; + const payloadS = `0x${payloadSignature.slice(66, 130)}` as `0x${string}`; + const payloadV = parseInt(payloadSignature.slice(130, 132), 16); + console.log("Payload signature created"); + + // Execute via relayer + console.log("\n--- Executing Relayer ---"); + console.log("This will:"); + console.log("1. Execute permit to approve tokens"); + console.log("2. Transfer tokens from user1 to relayer"); + console.log("3. Execute payload: transfer from relayer to User2"); + + try { + const hash = await relayerWalletClient.writeContract({ + abi: tokenRelayerAbi, + address: RELAYER_ADDRESS, + args: [ + { + deadline: permitDeadline, + owner: user1Account.address, + payloadData: payloadData, + payloadDeadline: payloadDeadline, + payloadNonce: payloadNonce, + payloadR: payloadR, + payloadS: payloadS, + payloadV: payloadV, + payloadValue: 0, + permitR: permitR, + permitS: permitS, + permitV: permitV, + token: ERC20_ADDRESS, + value: transferAmount + } + ], + functionName: "execute" + }); + + const receipt = await publicClient.waitForTransactionReceipt({ hash }); + console.log("Transaction hash:", hash); + console.log("Gas used:", receipt.gasUsed.toString()); + } catch (error: any) { + console.error("Execution failed:", error.message); + return; + } + + // Check final balances + const user1BalanceAfter = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [user1Account.address], + functionName: "balanceOf" + })) as bigint; + + const user2BalanceAfter = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [user2Account.address], + functionName: "balanceOf" + })) as bigint; + + const relayerBalanceAfter = (await publicClient.readContract({ + abi: erc20Abi, + address: ERC20_ADDRESS, + args: [RELAYER_ADDRESS], + functionName: "balanceOf" + })) as bigint; + + console.log("\n--- Final Balances ---"); + console.log("User1 balance before:", formatUnits(user1BalanceBefore, 6)); + console.log("User1 balance after:", formatUnits(user1BalanceAfter, 6)); + console.log("User2 balance before:", formatUnits(user2BalanceBefore, 6)); + console.log("User2 balance after:", formatUnits(user2BalanceAfter, 6)); + console.log("Relayer balance before:", formatUnits(relayerBalanceBefore, 6)); + console.log("Relayer balance after:", formatUnits(relayerBalanceAfter, 6)); + + console.log("\n--- Verification ---"); + const user1Diff = user1BalanceBefore - user1BalanceAfter; + const user2Diff = user2BalanceAfter - user2BalanceBefore; + console.log("User1 tokens spent:", formatUnits(user1Diff, 6)); + console.log("User2 tokens received:", formatUnits(user2Diff, 6)); + console.log("Expected transfer amount:", formatUnits(transferAmount, 6)); + + if (user1Diff === transferAmount && user2Diff === transferAmount) { + console.log("✅ Transfer successful!"); + } else { + console.log("❌ Transfer verification failed!"); + } +} + +main().catch(error => { + console.error(error); + process.exitCode = 1; +}); diff --git a/contracts/relayer/tsconfig.json b/contracts/relayer/tsconfig.json new file mode 100644 index 000000000..7a7b93de2 --- /dev/null +++ b/contracts/relayer/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "ES2020", + "types": ["node", "hardhat"] + }, + "exclude": ["./artifacts", "./cache", "./node_modules", "./typechain-types"], + "files": ["./hardhat.config.ts"], + "include": ["./hardhat.config.ts", "./test", "./ignition"] +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/access/Ownable.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/access/Ownable.ts new file mode 100644 index 000000000..19fbecbf7 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/access/Ownable.ts @@ -0,0 +1,117 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../../../common"; + +export interface OwnableInterface extends Interface { + getFunction(nameOrSignature: "owner" | "renounceOwnership" | "transferOwnership"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; + encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string; + + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; +} + +export namespace OwnershipTransferredEvent { + export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [previousOwner: string, newOwner: string]; + export interface OutputObject { + previousOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface Ownable extends BaseContract { + connect(runner?: ContractRunner | null): Ownable; + waitForDeployment(): Promise; + + interface: OwnableInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + owner: TypedContractMethod<[], [string], "view">; + + renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + transferOwnership: TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">; + getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + + getEvent( + key: "OwnershipTransferred" + ): TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + + filters: { + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + }; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/access/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/access/index.ts new file mode 100644 index 000000000..999bcc77b --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Ownable } from "./Ownable"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/index.ts new file mode 100644 index 000000000..642dfbe56 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/index.ts @@ -0,0 +1,14 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as access from "./access"; +export type { access }; + +import type * as interfaces from "./interfaces"; +export type { interfaces }; + +import type * as token from "./token"; +export type { token }; + +import type * as utils from "./utils"; +export type { utils }; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/IERC1363.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/IERC1363.ts new file mode 100644 index 000000000..0f86fcb39 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/IERC1363.ts @@ -0,0 +1,246 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BigNumberish, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../../../common"; + +export interface IERC1363Interface extends Interface { + getFunction( + nameOrSignature: + | "allowance" + | "approve" + | "approveAndCall(address,uint256)" + | "approveAndCall(address,uint256,bytes)" + | "balanceOf" + | "supportsInterface" + | "totalSupply" + | "transfer" + | "transferAndCall(address,uint256)" + | "transferAndCall(address,uint256,bytes)" + | "transferFrom" + | "transferFromAndCall(address,address,uint256,bytes)" + | "transferFromAndCall(address,address,uint256)" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; + encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "approveAndCall(address,uint256)", values: [AddressLike, BigNumberish]): string; + encodeFunctionData( + functionFragment: "approveAndCall(address,uint256,bytes)", + values: [AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; + encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferAndCall(address,uint256)", values: [AddressLike, BigNumberish]): string; + encodeFunctionData( + functionFragment: "transferAndCall(address,uint256,bytes)", + values: [AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; + encodeFunctionData( + functionFragment: "transferFromAndCall(address,address,uint256,bytes)", + values: [AddressLike, AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferFromAndCall(address,address,uint256)", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approveAndCall(address,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approveAndCall(address,uint256,bytes)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferAndCall(address,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferAndCall(address,uint256,bytes)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFromAndCall(address,address,uint256,bytes)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFromAndCall(address,address,uint256)", data: BytesLike): Result; +} + +export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IERC1363 extends BaseContract { + connect(runner?: ContractRunner | null): IERC1363; + waitForDeployment(): Promise; + + interface: IERC1363Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + + approve: TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + "approveAndCall(address,uint256)": TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + "approveAndCall(address,uint256,bytes)": TypedContractMethod< + [spender: AddressLike, value: BigNumberish, data: BytesLike], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + supportsInterface: TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + "transferAndCall(address,uint256)": TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + "transferAndCall(address,uint256,bytes)": TypedContractMethod< + [to: AddressLike, value: BigNumberish, data: BytesLike], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + "transferFromAndCall(address,address,uint256,bytes)": TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish, data: BytesLike], + [boolean], + "nonpayable" + >; + + "transferFromAndCall(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "allowance"): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "approveAndCall(address,uint256)" + ): TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "approveAndCall(address,uint256,bytes)" + ): TypedContractMethod<[spender: AddressLike, value: BigNumberish, data: BytesLike], [boolean], "nonpayable">; + getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction(nameOrSignature: "supportsInterface"): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferAndCall(address,uint256)" + ): TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferAndCall(address,uint256,bytes)" + ): TypedContractMethod<[to: AddressLike, value: BigNumberish, data: BytesLike], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferFromAndCall(address,address,uint256,bytes)" + ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish, data: BytesLike], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferFromAndCall(address,address,uint256)" + ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getEvent( + key: "Approval" + ): TypedContractEvent; + getEvent( + key: "Transfer" + ): TypedContractEvent; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent; + }; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/IERC5267.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/IERC5267.ts new file mode 100644 index 000000000..4c8c1de04 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/IERC5267.ts @@ -0,0 +1,131 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../../../common"; + +export interface IERC5267Interface extends Interface { + getFunction(nameOrSignature: "eip712Domain"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; + + encodeFunctionData(functionFragment: "eip712Domain", values?: undefined): string; + + decodeFunctionResult(functionFragment: "eip712Domain", data: BytesLike): Result; +} + +export namespace EIP712DomainChangedEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IERC5267 extends BaseContract { + connect(runner?: ContractRunner | null): IERC5267; + waitForDeployment(): Promise; + + interface: IERC5267Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + eip712Domain: TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "eip712Domain"): TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + + getEvent( + key: "EIP712DomainChanged" + ): TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + + filters: { + "EIP712DomainChanged()": TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + EIP712DomainChanged: TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + }; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.ts new file mode 100644 index 000000000..63f64d232 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../../common"; + +export interface IERC1155ErrorsInterface extends Interface {} + +export interface IERC1155Errors extends BaseContract { + connect(runner?: ContractRunner | null): IERC1155Errors; + waitForDeployment(): Promise; + + interface: IERC1155ErrorsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.ts new file mode 100644 index 000000000..8363ff134 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../../common"; + +export interface IERC20ErrorsInterface extends Interface {} + +export interface IERC20Errors extends BaseContract { + connect(runner?: ContractRunner | null): IERC20Errors; + waitForDeployment(): Promise; + + interface: IERC20ErrorsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.ts new file mode 100644 index 000000000..b5320fa4f --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../../common"; + +export interface IERC721ErrorsInterface extends Interface {} + +export interface IERC721Errors extends BaseContract { + connect(runner?: ContractRunner | null): IERC721Errors; + waitForDeployment(): Promise; + + interface: IERC721ErrorsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts new file mode 100644 index 000000000..2b5699344 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +export type { IERC20Errors } from "./IERC20Errors"; +export type { IERC721Errors } from "./IERC721Errors"; +export type { IERC1155Errors } from "./IERC1155Errors"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/index.ts new file mode 100644 index 000000000..3a553d663 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/interfaces/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC1363 } from "./IERC1363"; +export type { IERC5267 } from "./IERC5267"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts new file mode 100644 index 000000000..efdb1bac6 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.ts @@ -0,0 +1,182 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BigNumberish, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../../../../common"; + +export interface ERC20Interface extends Interface { + getFunction( + nameOrSignature: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; + encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; +} + +export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface ERC20 extends BaseContract { + connect(runner?: ContractRunner | null): ERC20; + waitForDeployment(): Promise; + + interface: ERC20Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + + approve: TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + transferFrom: TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "allowance"): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; + getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getEvent( + key: "Approval" + ): TypedContractEvent; + getEvent( + key: "Transfer" + ): TypedContractEvent; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent; + }; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts new file mode 100644 index 000000000..6f53c32fe --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.ts @@ -0,0 +1,158 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BigNumberish, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../../../../common"; + +export interface IERC20Interface extends Interface { + getFunction( + nameOrSignature: "allowance" | "approve" | "balanceOf" | "totalSupply" | "transfer" | "transferFrom" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; + encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; +} + +export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IERC20 extends BaseContract { + connect(runner?: ContractRunner | null): IERC20; + waitForDeployment(): Promise; + + interface: IERC20Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + + approve: TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + transferFrom: TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "allowance"): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getEvent( + key: "Approval" + ): TypedContractEvent; + getEvent( + key: "Transfer" + ): TypedContractEvent; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent; + }; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.ts new file mode 100644 index 000000000..5fe274bab --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.ts @@ -0,0 +1,291 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BigNumberish, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../../../../../common"; + +export interface ERC20PermitInterface extends Interface { + getFunction( + nameOrSignature: + | "DOMAIN_SEPARATOR" + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "eip712Domain" + | "name" + | "nonces" + | "permit" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "EIP712DomainChanged" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; + encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "eip712Domain", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; + encodeFunctionData( + functionFragment: "permit", + values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "eip712Domain", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; +} + +export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace EIP712DomainChangedEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface ERC20Permit extends BaseContract { + connect(runner?: ContractRunner | null): ERC20Permit; + waitForDeployment(): Promise; + + interface: ERC20PermitInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + + approve: TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + eip712Domain: TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + transferFrom: TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "DOMAIN_SEPARATOR"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "allowance"): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; + getFunction(nameOrSignature: "eip712Domain"): TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "nonces"): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getEvent( + key: "Approval" + ): TypedContractEvent; + getEvent( + key: "EIP712DomainChanged" + ): TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent; + + "EIP712DomainChanged()": TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + EIP712DomainChanged: TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent; + }; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts new file mode 100644 index 000000000..ed2386180 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts @@ -0,0 +1,182 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BigNumberish, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../../../../../common"; + +export interface IERC20MetadataInterface extends Interface { + getFunction( + nameOrSignature: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; + encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; +} + +export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IERC20Metadata extends BaseContract { + connect(runner?: ContractRunner | null): IERC20Metadata; + waitForDeployment(): Promise; + + interface: IERC20MetadataInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + + approve: TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + transferFrom: TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "allowance"): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; + getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getEvent( + key: "Approval" + ): TypedContractEvent; + getEvent( + key: "Transfer" + ): TypedContractEvent; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent; + }; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.ts new file mode 100644 index 000000000..c8700e2cd --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.ts @@ -0,0 +1,111 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BigNumberish, + BytesLike, + ContractMethod, + ContractRunner, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener +} from "../../../../../common"; + +export interface IERC20PermitInterface extends Interface { + getFunction(nameOrSignature: "DOMAIN_SEPARATOR" | "nonces" | "permit"): FunctionFragment; + + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; + encodeFunctionData( + functionFragment: "permit", + values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; +} + +export interface IERC20Permit extends BaseContract { + connect(runner?: ContractRunner | null): IERC20Permit; + waitForDeployment(): Promise; + + interface: IERC20PermitInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "DOMAIN_SEPARATOR"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "nonces"): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts new file mode 100644 index 000000000..6673dc7da --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC20Permit } from "./IERC20Permit"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts new file mode 100644 index 000000000..c2bfd6781 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/index.ts @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as extensions from "./extensions"; +export type { extensions }; + +import type * as utils from "./utils"; +export type { utils }; +export type { IERC20 } from "./IERC20"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.ts new file mode 100644 index 000000000..02baa780d --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../../../common"; + +export interface SafeERC20Interface extends Interface {} + +export interface SafeERC20 extends BaseContract { + connect(runner?: ContractRunner | null): SafeERC20; + waitForDeployment(): Promise; + + interface: SafeERC20Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/utils/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/utils/index.ts new file mode 100644 index 000000000..915f5b878 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/ERC20/utils/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { SafeERC20 } from "./SafeERC20"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/token/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/index.ts new file mode 100644 index 000000000..5c4062a9c --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/token/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as erc20 from "./ERC20"; +export type { erc20 }; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/Nonces.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/Nonces.ts new file mode 100644 index 000000000..42e8d0339 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/Nonces.ts @@ -0,0 +1,71 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BytesLike, + ContractMethod, + ContractRunner, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener +} from "../../../common"; + +export interface NoncesInterface extends Interface { + getFunction(nameOrSignature: "nonces"): FunctionFragment; + + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; + + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; +} + +export interface Nonces extends BaseContract { + connect(runner?: ContractRunner | null): Nonces; + waitForDeployment(): Promise; + + interface: NoncesInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "nonces"): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/ReentrancyGuard.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/ReentrancyGuard.ts new file mode 100644 index 000000000..ad8b3d58a --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/ReentrancyGuard.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../common"; + +export interface ReentrancyGuardInterface extends Interface {} + +export interface ReentrancyGuard extends BaseContract { + connect(runner?: ContractRunner | null): ReentrancyGuard; + waitForDeployment(): Promise; + + interface: ReentrancyGuardInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/ShortStrings.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/ShortStrings.ts new file mode 100644 index 000000000..43a3b06b5 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/ShortStrings.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../common"; + +export interface ShortStringsInterface extends Interface {} + +export interface ShortStrings extends BaseContract { + connect(runner?: ContractRunner | null): ShortStrings; + waitForDeployment(): Promise; + + interface: ShortStringsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/Strings.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/Strings.ts new file mode 100644 index 000000000..e0ee6a564 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/Strings.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../common"; + +export interface StringsInterface extends Interface {} + +export interface Strings extends BaseContract { + connect(runner?: ContractRunner | null): Strings; + waitForDeployment(): Promise; + + interface: StringsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/ECDSA.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/ECDSA.ts new file mode 100644 index 000000000..0b45a677e --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/ECDSA.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../../common"; + +export interface ECDSAInterface extends Interface {} + +export interface ECDSA extends BaseContract { + connect(runner?: ContractRunner | null): ECDSA; + waitForDeployment(): Promise; + + interface: ECDSAInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/EIP712.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/EIP712.ts new file mode 100644 index 000000000..892c84bea --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/EIP712.ts @@ -0,0 +1,131 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../../../../common"; + +export interface EIP712Interface extends Interface { + getFunction(nameOrSignature: "eip712Domain"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; + + encodeFunctionData(functionFragment: "eip712Domain", values?: undefined): string; + + decodeFunctionResult(functionFragment: "eip712Domain", data: BytesLike): Result; +} + +export namespace EIP712DomainChangedEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface EIP712 extends BaseContract { + connect(runner?: ContractRunner | null): EIP712; + waitForDeployment(): Promise; + + interface: EIP712Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + eip712Domain: TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "eip712Domain"): TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + + getEvent( + key: "EIP712DomainChanged" + ): TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + + filters: { + "EIP712DomainChanged()": TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + EIP712DomainChanged: TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + }; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.ts new file mode 100644 index 000000000..f6da58531 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../../common"; + +export interface MessageHashUtilsInterface extends Interface {} + +export interface MessageHashUtils extends BaseContract { + connect(runner?: ContractRunner | null): MessageHashUtils; + waitForDeployment(): Promise; + + interface: MessageHashUtilsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/index.ts new file mode 100644 index 000000000..5a3587c09 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/cryptography/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ECDSA } from "./ECDSA"; +export type { EIP712 } from "./EIP712"; +export type { MessageHashUtils } from "./MessageHashUtils"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/index.ts new file mode 100644 index 000000000..eee749856 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/index.ts @@ -0,0 +1,14 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as cryptography from "./cryptography"; +export type { cryptography }; + +import type * as introspection from "./introspection"; +export type { introspection }; + +import type * as math from "./math"; +export type { math }; +export type { ReentrancyGuard } from "./ReentrancyGuard"; +export type { ShortStrings } from "./ShortStrings"; +export type { Strings } from "./Strings"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.ts new file mode 100644 index 000000000..33c6a6c25 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.ts @@ -0,0 +1,70 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BytesLike, + ContractMethod, + ContractRunner, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener +} from "../../../../common"; + +export interface IERC165Interface extends Interface { + getFunction(nameOrSignature: "supportsInterface"): FunctionFragment; + + encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; + + decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; +} + +export interface IERC165 extends BaseContract { + connect(runner?: ContractRunner | null): IERC165; + waitForDeployment(): Promise; + + interface: IERC165Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + supportsInterface: TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "supportsInterface"): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/introspection/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/introspection/index.ts new file mode 100644 index 000000000..3fcca5c2a --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/introspection/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC165 } from "./IERC165"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/math/SafeCast.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/math/SafeCast.ts new file mode 100644 index 000000000..598df769e --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/math/SafeCast.ts @@ -0,0 +1,45 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, ContractMethod, ContractRunner, FunctionFragment, Interface, Listener } from "ethers"; +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener } from "../../../../common"; + +export interface SafeCastInterface extends Interface {} + +export interface SafeCast extends BaseContract { + connect(runner?: ContractRunner | null): SafeCast; + waitForDeployment(): Promise; + + interface: SafeCastInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + getFunction(key: string | FunctionFragment): T; + + filters: {}; +} diff --git a/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/math/index.ts b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/math/index.ts new file mode 100644 index 000000000..1952fed46 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/contracts/utils/math/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { SafeCast } from "./SafeCast"; diff --git a/contracts/relayer/typechain-types/@openzeppelin/index.ts b/contracts/relayer/typechain-types/@openzeppelin/index.ts new file mode 100644 index 000000000..a11e4ca29 --- /dev/null +++ b/contracts/relayer/typechain-types/@openzeppelin/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts }; diff --git a/contracts/relayer/typechain-types/common.ts b/contracts/relayer/typechain-types/common.ts new file mode 100644 index 000000000..696576a19 --- /dev/null +++ b/contracts/relayer/typechain-types/common.ts @@ -0,0 +1,86 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventFragment, + EventLog, + FunctionFragment, + LogDescription, + TransactionRequest, + Typed +} from "ethers"; + +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {} + +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any +> { + (...args: Partial): TypedDeferredTopicFilter>; + name: string; + fragment: EventFragment; + getFragment(...args: Partial): EventFragment; +} + +type __TypechainAOutputTuple = T extends TypedContractEvent ? W : never; +type __TypechainOutputObject = T extends TypedContractEvent ? V : never; + +export interface TypedEventLog extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export interface TypedLogDescription extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export type TypedListener = ( + ...listenerArg: [...__TypechainAOutputTuple, TypedEventLog, ...undefined[]] +) => void; + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; +export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; + +export type StateMutability = "nonpayable" | "payable" | "view"; + +export type BaseOverrides = Omit; +export type NonPayableOverrides = Omit; +export type PayableOverrides = Omit; +export type ViewOverrides = Omit; +export type Overrides = S extends "nonpayable" + ? NonPayableOverrides + : S extends "payable" + ? PayableOverrides + : ViewOverrides; + +export type PostfixOverrides, S extends StateMutability> = A | [...A, Overrides]; +export type ContractMethodArgs, S extends StateMutability> = PostfixOverrides< + { [I in keyof A]-?: A[I] | Typed }, + S +>; + +export type DefaultReturnType = R extends Array ? R[0] : R; + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod = Array, R = any, S extends StateMutability = "payable"> { + (...args: ContractMethodArgs): S extends "view" ? Promise> : Promise; + + name: string; + + fragment: FunctionFragment; + + getFragment(...args: ContractMethodArgs): FunctionFragment; + + populateTransaction(...args: ContractMethodArgs): Promise; + staticCall(...args: ContractMethodArgs): Promise>; + send(...args: ContractMethodArgs): Promise; + estimateGas(...args: ContractMethodArgs): Promise; + staticCallResult(...args: ContractMethodArgs): Promise; +} diff --git a/contracts/relayer/typechain-types/contracts/MockERC20Permit.ts b/contracts/relayer/typechain-types/contracts/MockERC20Permit.ts new file mode 100644 index 000000000..454094882 --- /dev/null +++ b/contracts/relayer/typechain-types/contracts/MockERC20Permit.ts @@ -0,0 +1,297 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BigNumberish, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../common"; + +export interface MockERC20PermitInterface extends Interface { + getFunction( + nameOrSignature: + | "DOMAIN_SEPARATOR" + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "eip712Domain" + | "mint" + | "name" + | "nonces" + | "permit" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "EIP712DomainChanged" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [AddressLike, AddressLike]): string; + encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "eip712Domain", values?: undefined): string; + encodeFunctionData(functionFragment: "mint", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [AddressLike]): string; + encodeFunctionData( + functionFragment: "permit", + values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "eip712Domain", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; +} + +export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace EIP712DomainChangedEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface MockERC20Permit extends BaseContract { + connect(runner?: ContractRunner | null): MockERC20Permit; + waitForDeployment(): Promise; + + interface: MockERC20PermitInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + DOMAIN_SEPARATOR: TypedContractMethod<[], [string], "view">; + + allowance: TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + + approve: TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + eip712Domain: TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + + mint: TypedContractMethod<[to: AddressLike, amount: BigNumberish], [void], "nonpayable">; + + name: TypedContractMethod<[], [string], "view">; + + nonces: TypedContractMethod<[owner: AddressLike], [bigint], "view">; + + permit: TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + transferFrom: TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "DOMAIN_SEPARATOR"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "allowance"): TypedContractMethod<[owner: AddressLike, spender: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod<[spender: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction(nameOrSignature: "decimals"): TypedContractMethod<[], [bigint], "view">; + getFunction(nameOrSignature: "eip712Domain"): TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + getFunction(nameOrSignature: "mint"): TypedContractMethod<[to: AddressLike, amount: BigNumberish], [void], "nonpayable">; + getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "nonces"): TypedContractMethod<[owner: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "permit" + ): TypedContractMethod< + [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike + ], + [void], + "nonpayable" + >; + getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "totalSupply"): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod<[to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod<[from: AddressLike, to: AddressLike, value: BigNumberish], [boolean], "nonpayable">; + + getEvent( + key: "Approval" + ): TypedContractEvent; + getEvent( + key: "EIP712DomainChanged" + ): TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent; + + "EIP712DomainChanged()": TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + EIP712DomainChanged: TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent; + }; +} diff --git a/contracts/relayer/typechain-types/contracts/TokenRelayer.ts b/contracts/relayer/typechain-types/contracts/TokenRelayer.ts new file mode 100644 index 000000000..9d405d34a --- /dev/null +++ b/contracts/relayer/typechain-types/contracts/TokenRelayer.ts @@ -0,0 +1,368 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + AddressLike, + BaseContract, + BigNumberish, + BytesLike, + ContractMethod, + ContractRunner, + EventFragment, + FunctionFragment, + Interface, + Listener, + Result +} from "ethers"; +import type { + TypedContractEvent, + TypedContractMethod, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedLogDescription +} from "../common"; + +export declare namespace TokenRelayer { + export type ExecuteParamsStruct = { + token: AddressLike; + owner: AddressLike; + value: BigNumberish; + deadline: BigNumberish; + permitV: BigNumberish; + permitR: BytesLike; + permitS: BytesLike; + payloadData: BytesLike; + payloadValue: BigNumberish; + payloadNonce: BigNumberish; + payloadDeadline: BigNumberish; + payloadV: BigNumberish; + payloadR: BytesLike; + payloadS: BytesLike; + }; + + export type ExecuteParamsStructOutput = [ + token: string, + owner: string, + value: bigint, + deadline: bigint, + permitV: bigint, + permitR: string, + permitS: string, + payloadData: string, + payloadValue: bigint, + payloadNonce: bigint, + payloadDeadline: bigint, + payloadV: bigint, + payloadR: string, + payloadS: string + ] & { + token: string; + owner: string; + value: bigint; + deadline: bigint; + permitV: bigint; + permitR: string; + permitS: string; + payloadData: string; + payloadValue: bigint; + payloadNonce: bigint; + payloadDeadline: bigint; + payloadV: bigint; + payloadR: string; + payloadS: string; + }; +} + +export interface TokenRelayerInterface extends Interface { + getFunction( + nameOrSignature: + | "destinationContract" + | "eip712Domain" + | "execute" + | "isExecutionCompleted" + | "owner" + | "renounceOwnership" + | "transferOwnership" + | "usedPayloadNonces" + | "withdrawETH" + | "withdrawToken" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "EIP712DomainChanged" + | "ETHWithdrawn" + | "OwnershipTransferred" + | "RelayerExecuted" + | "TokenWithdrawn" + ): EventFragment; + + encodeFunctionData(functionFragment: "destinationContract", values?: undefined): string; + encodeFunctionData(functionFragment: "eip712Domain", values?: undefined): string; + encodeFunctionData(functionFragment: "execute", values: [TokenRelayer.ExecuteParamsStruct]): string; + encodeFunctionData(functionFragment: "isExecutionCompleted", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; + encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string; + encodeFunctionData(functionFragment: "usedPayloadNonces", values: [AddressLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "withdrawETH", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "withdrawToken", values: [AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: "destinationContract", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "eip712Domain", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isExecutionCompleted", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "usedPayloadNonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdrawETH", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdrawToken", data: BytesLike): Result; +} + +export namespace EIP712DomainChangedEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ETHWithdrawnEvent { + export type InputTuple = [amount: BigNumberish, to: AddressLike]; + export type OutputTuple = [amount: bigint, to: string]; + export interface OutputObject { + amount: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OwnershipTransferredEvent { + export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [previousOwner: string, newOwner: string]; + export interface OutputObject { + previousOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace RelayerExecutedEvent { + export type InputTuple = [signer: AddressLike, token: AddressLike, amount: BigNumberish]; + export type OutputTuple = [signer: string, token: string, amount: bigint]; + export interface OutputObject { + signer: string; + token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TokenWithdrawnEvent { + export type InputTuple = [token: AddressLike, amount: BigNumberish, to: AddressLike]; + export type OutputTuple = [token: string, amount: bigint, to: string]; + export interface OutputObject { + token: string; + amount: bigint; + to: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface TokenRelayer extends BaseContract { + connect(runner?: ContractRunner | null): TokenRelayer; + waitForDeployment(): Promise; + + interface: TokenRelayerInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once(event: TCEvent, listener: TypedListener): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners(event: TCEvent): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners(event?: TCEvent): Promise; + + destinationContract: TypedContractMethod<[], [string], "view">; + + eip712Domain: TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + + execute: TypedContractMethod<[params: TokenRelayer.ExecuteParamsStruct], [void], "payable">; + + isExecutionCompleted: TypedContractMethod<[signer: AddressLike, nonce: BigNumberish], [boolean], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + transferOwnership: TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + + usedPayloadNonces: TypedContractMethod<[arg0: AddressLike, arg1: BigNumberish], [boolean], "view">; + + withdrawETH: TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; + + withdrawToken: TypedContractMethod<[token: AddressLike, amount: BigNumberish], [void], "nonpayable">; + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: "destinationContract"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "eip712Domain"): TypedContractMethod< + [], + [ + [string, string, string, bigint, string, string, bigint[]] & { + fields: string; + name: string; + version: string; + chainId: bigint; + verifyingContract: string; + salt: string; + extensions: bigint[]; + } + ], + "view" + >; + getFunction(nameOrSignature: "execute"): TypedContractMethod<[params: TokenRelayer.ExecuteParamsStruct], [void], "payable">; + getFunction( + nameOrSignature: "isExecutionCompleted" + ): TypedContractMethod<[signer: AddressLike, nonce: BigNumberish], [boolean], "view">; + getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">; + getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">; + getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "usedPayloadNonces" + ): TypedContractMethod<[arg0: AddressLike, arg1: BigNumberish], [boolean], "view">; + getFunction(nameOrSignature: "withdrawETH"): TypedContractMethod<[amount: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "withdrawToken" + ): TypedContractMethod<[token: AddressLike, amount: BigNumberish], [void], "nonpayable">; + + getEvent( + key: "EIP712DomainChanged" + ): TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + getEvent( + key: "ETHWithdrawn" + ): TypedContractEvent; + getEvent( + key: "OwnershipTransferred" + ): TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + getEvent( + key: "RelayerExecuted" + ): TypedContractEvent; + getEvent( + key: "TokenWithdrawn" + ): TypedContractEvent; + + filters: { + "EIP712DomainChanged()": TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + EIP712DomainChanged: TypedContractEvent< + EIP712DomainChangedEvent.InputTuple, + EIP712DomainChangedEvent.OutputTuple, + EIP712DomainChangedEvent.OutputObject + >; + + "ETHWithdrawn(uint256,address)": TypedContractEvent< + ETHWithdrawnEvent.InputTuple, + ETHWithdrawnEvent.OutputTuple, + ETHWithdrawnEvent.OutputObject + >; + ETHWithdrawn: TypedContractEvent< + ETHWithdrawnEvent.InputTuple, + ETHWithdrawnEvent.OutputTuple, + ETHWithdrawnEvent.OutputObject + >; + + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + + "RelayerExecuted(address,address,uint256)": TypedContractEvent< + RelayerExecutedEvent.InputTuple, + RelayerExecutedEvent.OutputTuple, + RelayerExecutedEvent.OutputObject + >; + RelayerExecuted: TypedContractEvent< + RelayerExecutedEvent.InputTuple, + RelayerExecutedEvent.OutputTuple, + RelayerExecutedEvent.OutputObject + >; + + "TokenWithdrawn(address,uint256,address)": TypedContractEvent< + TokenWithdrawnEvent.InputTuple, + TokenWithdrawnEvent.OutputTuple, + TokenWithdrawnEvent.OutputObject + >; + TokenWithdrawn: TypedContractEvent< + TokenWithdrawnEvent.InputTuple, + TokenWithdrawnEvent.OutputTuple, + TokenWithdrawnEvent.OutputObject + >; + }; +} diff --git a/contracts/relayer/typechain-types/contracts/index.ts b/contracts/relayer/typechain-types/contracts/index.ts new file mode 100644 index 000000000..b54fc377c --- /dev/null +++ b/contracts/relayer/typechain-types/contracts/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { TokenRelayer } from "./TokenRelayer"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts new file mode 100644 index 000000000..6bfa80b69 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.ts @@ -0,0 +1,93 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { Ownable, OwnableInterface } from "../../../../@openzeppelin/contracts/access/Ownable"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "OwnableInvalidOwner", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "OwnableUnauthorizedAccount", + type: "error" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address" + } + ], + name: "OwnershipTransferred", + type: "event" + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address" + } + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function" + } +] as const; + +export class Ownable__factory { + static readonly abi = _abi; + static createInterface(): OwnableInterface { + return new Interface(_abi) as OwnableInterface; + } + static connect(address: string, runner?: ContractRunner | null): Ownable { + return new Contract(address, _abi, runner) as unknown as Ownable; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/access/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/access/index.ts new file mode 100644 index 000000000..e332ae322 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Ownable__factory } from "./Ownable__factory"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/index.ts new file mode 100644 index 000000000..d81ac1af4 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as access from "./access"; +export * as interfaces from "./interfaces"; +export * as token from "./token"; +export * as utils from "./utils"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC1363__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC1363__factory.ts new file mode 100644 index 000000000..7fbda55e3 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC1363__factory.ts @@ -0,0 +1,390 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { IERC1363, IERC1363Interface } from "../../../../@openzeppelin/contracts/interfaces/IERC1363"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "approveAndCall", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + }, + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + name: "approveAndCall", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4" + } + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transferAndCall", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + }, + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + name: "transferAndCall", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address" + }, + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address" + }, + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + }, + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + name: "transferFromAndCall", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address" + }, + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transferFromAndCall", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + } +] as const; + +export class IERC1363__factory { + static readonly abi = _abi; + static createInterface(): IERC1363Interface { + return new Interface(_abi) as IERC1363Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC1363 { + return new Contract(address, _abi, runner) as unknown as IERC1363; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC5267__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC5267__factory.ts new file mode 100644 index 000000000..f52c9e6b9 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC5267__factory.ts @@ -0,0 +1,68 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { IERC5267, IERC5267Interface } from "../../../../@openzeppelin/contracts/interfaces/IERC5267"; + +const _abi = [ + { + anonymous: false, + inputs: [], + name: "EIP712DomainChanged", + type: "event" + }, + { + inputs: [], + name: "eip712Domain", + outputs: [ + { + internalType: "bytes1", + name: "fields", + type: "bytes1" + }, + { + internalType: "string", + name: "name", + type: "string" + }, + { + internalType: "string", + name: "version", + type: "string" + }, + { + internalType: "uint256", + name: "chainId", + type: "uint256" + }, + { + internalType: "address", + name: "verifyingContract", + type: "address" + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32" + }, + { + internalType: "uint256[]", + name: "extensions", + type: "uint256[]" + } + ], + stateMutability: "view", + type: "function" + } +] as const; + +export class IERC5267__factory { + static readonly abi = _abi; + static createInterface(): IERC5267Interface { + return new Interface(_abi) as IERC5267Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC5267 { + return new Contract(address, _abi, runner) as unknown as IERC5267; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.ts new file mode 100644 index 000000000..79689bee4 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.ts @@ -0,0 +1,124 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { + IERC1155Errors, + IERC1155ErrorsInterface +} from "../../../../../@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "uint256", + name: "balance", + type: "uint256" + }, + { + internalType: "uint256", + name: "needed", + type: "uint256" + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256" + } + ], + name: "ERC1155InsufficientBalance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "approver", + type: "address" + } + ], + name: "ERC1155InvalidApprover", + type: "error" + }, + { + inputs: [ + { + internalType: "uint256", + name: "idsLength", + type: "uint256" + }, + { + internalType: "uint256", + name: "valuesLength", + type: "uint256" + } + ], + name: "ERC1155InvalidArrayLength", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address" + } + ], + name: "ERC1155InvalidOperator", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address" + } + ], + name: "ERC1155InvalidReceiver", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + } + ], + name: "ERC1155InvalidSender", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address" + }, + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "ERC1155MissingApprovalForAll", + type: "error" + } +] as const; + +export class IERC1155Errors__factory { + static readonly abi = _abi; + static createInterface(): IERC1155ErrorsInterface { + return new Interface(_abi) as IERC1155ErrorsInterface; + } + static connect(address: string, runner?: ContractRunner | null): IERC1155Errors { + return new Contract(address, _abi, runner) as unknown as IERC1155Errors; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.ts new file mode 100644 index 000000000..33a3ffc99 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.ts @@ -0,0 +1,108 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { + IERC20Errors, + IERC20ErrorsInterface +} from "../../../../../@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "allowance", + type: "uint256" + }, + { + internalType: "uint256", + name: "needed", + type: "uint256" + } + ], + name: "ERC20InsufficientAllowance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "uint256", + name: "balance", + type: "uint256" + }, + { + internalType: "uint256", + name: "needed", + type: "uint256" + } + ], + name: "ERC20InsufficientBalance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "approver", + type: "address" + } + ], + name: "ERC20InvalidApprover", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address" + } + ], + name: "ERC20InvalidReceiver", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + } + ], + name: "ERC20InvalidSender", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "ERC20InvalidSpender", + type: "error" + } +] as const; + +export class IERC20Errors__factory { + static readonly abi = _abi; + static createInterface(): IERC20ErrorsInterface { + return new Interface(_abi) as IERC20ErrorsInterface; + } + static connect(address: string, runner?: ContractRunner | null): IERC20Errors { + return new Contract(address, _abi, runner) as unknown as IERC20Errors; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.ts new file mode 100644 index 000000000..e3267306c --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.ts @@ -0,0 +1,125 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { + IERC721Errors, + IERC721ErrorsInterface +} from "../../../../../@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256" + }, + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "ERC721IncorrectOwner", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address" + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256" + } + ], + name: "ERC721InsufficientApproval", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "approver", + type: "address" + } + ], + name: "ERC721InvalidApprover", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address" + } + ], + name: "ERC721InvalidOperator", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "ERC721InvalidOwner", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address" + } + ], + name: "ERC721InvalidReceiver", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + } + ], + name: "ERC721InvalidSender", + type: "error" + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256" + } + ], + name: "ERC721NonexistentToken", + type: "error" + } +] as const; + +export class IERC721Errors__factory { + static readonly abi = _abi; + static createInterface(): IERC721ErrorsInterface { + return new Interface(_abi) as IERC721ErrorsInterface; + } + static connect(address: string, runner?: ContractRunner | null): IERC721Errors { + return new Contract(address, _abi, runner) as unknown as IERC721Errors; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts new file mode 100644 index 000000000..d630107c7 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +export { IERC20Errors__factory } from "./IERC20Errors__factory"; +export { IERC721Errors__factory } from "./IERC721Errors__factory"; +export { IERC1155Errors__factory } from "./IERC1155Errors__factory"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts new file mode 100644 index 000000000..361bab7f9 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC1363__factory } from "./IERC1363__factory"; +export { IERC5267__factory } from "./IERC5267__factory"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts new file mode 100644 index 000000000..f93b6d3e8 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts @@ -0,0 +1,327 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { ERC20, ERC20Interface } from "../../../../../@openzeppelin/contracts/token/ERC20/ERC20"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "allowance", + type: "uint256" + }, + { + internalType: "uint256", + name: "needed", + type: "uint256" + } + ], + name: "ERC20InsufficientAllowance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "uint256", + name: "balance", + type: "uint256" + }, + { + internalType: "uint256", + name: "needed", + type: "uint256" + } + ], + name: "ERC20InsufficientBalance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "approver", + type: "address" + } + ], + name: "ERC20InvalidApprover", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address" + } + ], + name: "ERC20InvalidReceiver", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + } + ], + name: "ERC20InvalidSender", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "ERC20InvalidSpender", + type: "error" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address" + }, + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + } +] as const; + +export class ERC20__factory { + static readonly abi = _abi; + static createInterface(): ERC20Interface { + return new Interface(_abi) as ERC20Interface; + } + static connect(address: string, runner?: ContractRunner | null): ERC20 { + return new Contract(address, _abi, runner) as unknown as ERC20; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts new file mode 100644 index 000000000..659e4dadf --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts @@ -0,0 +1,202 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { IERC20, IERC20Interface } from "../../../../../@openzeppelin/contracts/token/ERC20/IERC20"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address" + }, + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + } +] as const; + +export class IERC20__factory { + static readonly abi = _abi; + static createInterface(): IERC20Interface { + return new Interface(_abi) as IERC20Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC20 { + return new Contract(address, _abi, runner) as unknown as IERC20; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit__factory.ts new file mode 100644 index 000000000..b7d5bb5fc --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit__factory.ts @@ -0,0 +1,540 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { + ERC20Permit, + ERC20PermitInterface +} from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit"; + +const _abi = [ + { + inputs: [], + name: "ECDSAInvalidSignature", + type: "error" + }, + { + inputs: [ + { + internalType: "uint256", + name: "length", + type: "uint256" + } + ], + name: "ECDSAInvalidSignatureLength", + type: "error" + }, + { + inputs: [ + { + internalType: "bytes32", + name: "s", + type: "bytes32" + } + ], + name: "ECDSAInvalidSignatureS", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "allowance", + type: "uint256" + }, + { + internalType: "uint256", + name: "needed", + type: "uint256" + } + ], + name: "ERC20InsufficientAllowance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "uint256", + name: "balance", + type: "uint256" + }, + { + internalType: "uint256", + name: "needed", + type: "uint256" + } + ], + name: "ERC20InsufficientBalance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "approver", + type: "address" + } + ], + name: "ERC20InvalidApprover", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address" + } + ], + name: "ERC20InvalidReceiver", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + } + ], + name: "ERC20InvalidSender", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "ERC20InvalidSpender", + type: "error" + }, + { + inputs: [ + { + internalType: "uint256", + name: "deadline", + type: "uint256" + } + ], + name: "ERC2612ExpiredSignature", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "signer", + type: "address" + }, + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "ERC2612InvalidSigner", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + }, + { + internalType: "uint256", + name: "currentNonce", + type: "uint256" + } + ], + name: "InvalidAccountNonce", + type: "error" + }, + { + inputs: [], + name: "InvalidShortString", + type: "error" + }, + { + inputs: [ + { + internalType: "string", + name: "str", + type: "string" + } + ], + name: "StringTooLong", + type: "error" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [], + name: "EIP712DomainChanged", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "eip712Domain", + outputs: [ + { + internalType: "bytes1", + name: "fields", + type: "bytes1" + }, + { + internalType: "string", + name: "name", + type: "string" + }, + { + internalType: "string", + name: "version", + type: "string" + }, + { + internalType: "uint256", + name: "chainId", + type: "uint256" + }, + { + internalType: "address", + name: "verifyingContract", + type: "address" + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32" + }, + { + internalType: "uint256[]", + name: "extensions", + type: "uint256[]" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256" + }, + { + internalType: "uint8", + name: "v", + type: "uint8" + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32" + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32" + } + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address" + }, + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + } +] as const; + +export class ERC20Permit__factory { + static readonly abi = _abi; + static createInterface(): ERC20PermitInterface { + return new Interface(_abi) as ERC20PermitInterface; + } + static connect(address: string, runner?: ContractRunner | null): ERC20Permit { + return new Contract(address, _abi, runner) as unknown as ERC20Permit; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts new file mode 100644 index 000000000..1679c8574 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts @@ -0,0 +1,244 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { + IERC20Metadata, + IERC20MetadataInterface +} from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address" + }, + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + } +] as const; + +export class IERC20Metadata__factory { + static readonly abi = _abi; + static createInterface(): IERC20MetadataInterface { + return new Interface(_abi) as IERC20MetadataInterface; + } + static connect(address: string, runner?: ContractRunner | null): IERC20Metadata { + return new Contract(address, _abi, runner) as unknown as IERC20Metadata; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit__factory.ts new file mode 100644 index 000000000..b4a22db5a --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit__factory.ts @@ -0,0 +1,97 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { + IERC20Permit, + IERC20PermitInterface +} from "../../../../../../@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit"; + +const _abi = [ + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256" + }, + { + internalType: "uint8", + name: "v", + type: "uint8" + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32" + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32" + } + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function" + } +] as const; + +export class IERC20Permit__factory { + static readonly abi = _abi; + static createInterface(): IERC20PermitInterface { + return new Interface(_abi) as IERC20PermitInterface; + } + static connect(address: string, runner?: ContractRunner | null): IERC20Permit { + return new Contract(address, _abi, runner) as unknown as IERC20Permit; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts new file mode 100644 index 000000000..5f347d4a7 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC20Permit__factory } from "./IERC20Permit__factory"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts new file mode 100644 index 000000000..d2963177e --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as extensions from "./extensions"; +export { IERC20__factory } from "./IERC20__factory"; +export * as utils from "./utils"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/SafeERC20__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/SafeERC20__factory.ts new file mode 100644 index 000000000..2c14f6c58 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/SafeERC20__factory.ts @@ -0,0 +1,83 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ContractDeployTransaction, ContractRunner, Signer } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers"; +import type { SafeERC20, SafeERC20Interface } from "../../../../../../@openzeppelin/contracts/token/ERC20/utils/SafeERC20"; +import type { NonPayableOverrides } from "../../../../../../common"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "currentAllowance", + type: "uint256" + }, + { + internalType: "uint256", + name: "requestedDecrease", + type: "uint256" + } + ], + name: "SafeERC20FailedDecreaseAllowance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + } + ], + name: "SafeERC20FailedOperation", + type: "error" + } +] as const; + +const _bytecode = + "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205c28a953d80cbde5965c90d7d69e4200c2946ffa7d85a8c75c36f5291a6d6e6464736f6c634300081c0033"; + +type SafeERC20ConstructorParams = [signer?: Signer] | ConstructorParameters; + +const isSuperArgs = (xs: SafeERC20ConstructorParams): xs is ConstructorParameters => xs.length > 1; + +export class SafeERC20__factory extends ContractFactory { + constructor(...args: SafeERC20ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + SafeERC20 & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): SafeERC20__factory { + return super.connect(runner) as SafeERC20__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): SafeERC20Interface { + return new Interface(_abi) as SafeERC20Interface; + } + static connect(address: string, runner?: ContractRunner | null): SafeERC20 { + return new Contract(address, _abi, runner) as unknown as SafeERC20; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/index.ts new file mode 100644 index 000000000..56fb056e0 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { SafeERC20__factory } from "./SafeERC20__factory"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/index.ts new file mode 100644 index 000000000..da1e061eb --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/token/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as erc20 from "./ERC20"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/Nonces__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/Nonces__factory.ts new file mode 100644 index 000000000..3e54bacc4 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/Nonces__factory.ts @@ -0,0 +1,54 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { Nonces, NoncesInterface } from "../../../../@openzeppelin/contracts/utils/Nonces"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + }, + { + internalType: "uint256", + name: "currentNonce", + type: "uint256" + } + ], + name: "InvalidAccountNonce", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + } +] as const; + +export class Nonces__factory { + static readonly abi = _abi; + static createInterface(): NoncesInterface { + return new Interface(_abi) as NoncesInterface; + } + static connect(address: string, runner?: ContractRunner | null): Nonces { + return new Contract(address, _abi, runner) as unknown as Nonces; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/ReentrancyGuard__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/ReentrancyGuard__factory.ts new file mode 100644 index 000000000..b57fa9bc8 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/ReentrancyGuard__factory.ts @@ -0,0 +1,24 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { ReentrancyGuard, ReentrancyGuardInterface } from "../../../../@openzeppelin/contracts/utils/ReentrancyGuard"; + +const _abi = [ + { + inputs: [], + name: "ReentrancyGuardReentrantCall", + type: "error" + } +] as const; + +export class ReentrancyGuard__factory { + static readonly abi = _abi; + static createInterface(): ReentrancyGuardInterface { + return new Interface(_abi) as ReentrancyGuardInterface; + } + static connect(address: string, runner?: ContractRunner | null): ReentrancyGuard { + return new Contract(address, _abi, runner) as unknown as ReentrancyGuard; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/ShortStrings__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/ShortStrings__factory.ts new file mode 100644 index 000000000..e6ae322ac --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/ShortStrings__factory.ts @@ -0,0 +1,67 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ContractDeployTransaction, ContractRunner, Signer } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers"; +import type { ShortStrings, ShortStringsInterface } from "../../../../@openzeppelin/contracts/utils/ShortStrings"; +import type { NonPayableOverrides } from "../../../../common"; + +const _abi = [ + { + inputs: [], + name: "InvalidShortString", + type: "error" + }, + { + inputs: [ + { + internalType: "string", + name: "str", + type: "string" + } + ], + name: "StringTooLong", + type: "error" + } +] as const; + +const _bytecode = + "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205331629f8f9bf0cbfbabc3d9173056cd00dba4e3cc0330036bc4382e2359a42464736f6c634300081c0033"; + +type ShortStringsConstructorParams = [signer?: Signer] | ConstructorParameters; + +const isSuperArgs = (xs: ShortStringsConstructorParams): xs is ConstructorParameters => xs.length > 1; + +export class ShortStrings__factory extends ContractFactory { + constructor(...args: ShortStringsConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + ShortStrings & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): ShortStrings__factory { + return super.connect(runner) as ShortStrings__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ShortStringsInterface { + return new Interface(_abi) as ShortStringsInterface; + } + static connect(address: string, runner?: ContractRunner | null): ShortStrings { + return new Contract(address, _abi, runner) as unknown as ShortStrings; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/Strings__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/Strings__factory.ts new file mode 100644 index 000000000..01c8d8407 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/Strings__factory.ts @@ -0,0 +1,77 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ContractDeployTransaction, ContractRunner, Signer } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers"; +import type { Strings, StringsInterface } from "../../../../@openzeppelin/contracts/utils/Strings"; +import type { NonPayableOverrides } from "../../../../common"; + +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "value", + type: "uint256" + }, + { + internalType: "uint256", + name: "length", + type: "uint256" + } + ], + name: "StringsInsufficientHexLength", + type: "error" + }, + { + inputs: [], + name: "StringsInvalidAddressFormat", + type: "error" + }, + { + inputs: [], + name: "StringsInvalidChar", + type: "error" + } +] as const; + +const _bytecode = + "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220172eadb738f4060c9567e763c4ffa1f0bf958b6bde49f20427622bab52603b4264736f6c634300081c0033"; + +type StringsConstructorParams = [signer?: Signer] | ConstructorParameters; + +const isSuperArgs = (xs: StringsConstructorParams): xs is ConstructorParameters => xs.length > 1; + +export class Strings__factory extends ContractFactory { + constructor(...args: StringsConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + Strings & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): Strings__factory { + return super.connect(runner) as Strings__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): StringsInterface { + return new Interface(_abi) as StringsInterface; + } + static connect(address: string, runner?: ContractRunner | null): Strings { + return new Contract(address, _abi, runner) as unknown as Strings; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/ECDSA__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/ECDSA__factory.ts new file mode 100644 index 000000000..3b1c484cb --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/ECDSA__factory.ts @@ -0,0 +1,78 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ContractDeployTransaction, ContractRunner, Signer } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers"; +import type { ECDSA, ECDSAInterface } from "../../../../../@openzeppelin/contracts/utils/cryptography/ECDSA"; +import type { NonPayableOverrides } from "../../../../../common"; + +const _abi = [ + { + inputs: [], + name: "ECDSAInvalidSignature", + type: "error" + }, + { + inputs: [ + { + internalType: "uint256", + name: "length", + type: "uint256" + } + ], + name: "ECDSAInvalidSignatureLength", + type: "error" + }, + { + inputs: [ + { + internalType: "bytes32", + name: "s", + type: "bytes32" + } + ], + name: "ECDSAInvalidSignatureS", + type: "error" + } +] as const; + +const _bytecode = + "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220861fc53c54256420d26202ed953c1a6a70251bfd2cbefbfb0e98c93d2669cfb464736f6c634300081c0033"; + +type ECDSAConstructorParams = [signer?: Signer] | ConstructorParameters; + +const isSuperArgs = (xs: ECDSAConstructorParams): xs is ConstructorParameters => xs.length > 1; + +export class ECDSA__factory extends ContractFactory { + constructor(...args: ECDSAConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + ECDSA & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): ECDSA__factory { + return super.connect(runner) as ECDSA__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ECDSAInterface { + return new Interface(_abi) as ECDSAInterface; + } + static connect(address: string, runner?: ContractRunner | null): ECDSA { + return new Contract(address, _abi, runner) as unknown as ECDSA; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/EIP712__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/EIP712__factory.ts new file mode 100644 index 000000000..0f939e795 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/EIP712__factory.ts @@ -0,0 +1,84 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { EIP712, EIP712Interface } from "../../../../../@openzeppelin/contracts/utils/cryptography/EIP712"; + +const _abi = [ + { + inputs: [], + name: "InvalidShortString", + type: "error" + }, + { + inputs: [ + { + internalType: "string", + name: "str", + type: "string" + } + ], + name: "StringTooLong", + type: "error" + }, + { + anonymous: false, + inputs: [], + name: "EIP712DomainChanged", + type: "event" + }, + { + inputs: [], + name: "eip712Domain", + outputs: [ + { + internalType: "bytes1", + name: "fields", + type: "bytes1" + }, + { + internalType: "string", + name: "name", + type: "string" + }, + { + internalType: "string", + name: "version", + type: "string" + }, + { + internalType: "uint256", + name: "chainId", + type: "uint256" + }, + { + internalType: "address", + name: "verifyingContract", + type: "address" + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32" + }, + { + internalType: "uint256[]", + name: "extensions", + type: "uint256[]" + } + ], + stateMutability: "view", + type: "function" + } +] as const; + +export class EIP712__factory { + static readonly abi = _abi; + static createInterface(): EIP712Interface { + return new Interface(_abi) as EIP712Interface; + } + static connect(address: string, runner?: ContractRunner | null): EIP712 { + return new Contract(address, _abi, runner) as unknown as EIP712; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/MessageHashUtils__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/MessageHashUtils__factory.ts new file mode 100644 index 000000000..e4298465f --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/MessageHashUtils__factory.ts @@ -0,0 +1,60 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ContractDeployTransaction, ContractRunner, Signer } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers"; +import type { + MessageHashUtils, + MessageHashUtilsInterface +} from "../../../../../@openzeppelin/contracts/utils/cryptography/MessageHashUtils"; +import type { NonPayableOverrides } from "../../../../../common"; + +const _abi = [ + { + inputs: [], + name: "ERC5267ExtensionsNotSupported", + type: "error" + } +] as const; + +const _bytecode = + "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206131ed8ee4dbbce47bcc4c6f88c9616eec0a3b2c76e6ecedd23ff36dd351a5da64736f6c634300081c0033"; + +type MessageHashUtilsConstructorParams = [signer?: Signer] | ConstructorParameters; + +const isSuperArgs = (xs: MessageHashUtilsConstructorParams): xs is ConstructorParameters => + xs.length > 1; + +export class MessageHashUtils__factory extends ContractFactory { + constructor(...args: MessageHashUtilsConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + MessageHashUtils & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): MessageHashUtils__factory { + return super.connect(runner) as MessageHashUtils__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): MessageHashUtilsInterface { + return new Interface(_abi) as MessageHashUtilsInterface; + } + static connect(address: string, runner?: ContractRunner | null): MessageHashUtils { + return new Contract(address, _abi, runner) as unknown as MessageHashUtils; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/index.ts new file mode 100644 index 000000000..8f785e0fc --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ECDSA__factory } from "./ECDSA__factory"; +export { EIP712__factory } from "./EIP712__factory"; +export { MessageHashUtils__factory } from "./MessageHashUtils__factory"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/index.ts new file mode 100644 index 000000000..a931c0f29 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/index.ts @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as cryptography from "./cryptography"; +export * as introspection from "./introspection"; +export * as math from "./math"; +export { ReentrancyGuard__factory } from "./ReentrancyGuard__factory"; +export { ShortStrings__factory } from "./ShortStrings__factory"; +export { Strings__factory } from "./Strings__factory"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.ts new file mode 100644 index 000000000..1669f20a6 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.ts @@ -0,0 +1,38 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, type ContractRunner, Interface } from "ethers"; +import type { IERC165, IERC165Interface } from "../../../../../@openzeppelin/contracts/utils/introspection/IERC165"; + +const _abi = [ + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4" + } + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "view", + type: "function" + } +] as const; + +export class IERC165__factory { + static readonly abi = _abi; + static createInterface(): IERC165Interface { + return new Interface(_abi) as IERC165Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC165 { + return new Contract(address, _abi, runner) as unknown as IERC165; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.ts new file mode 100644 index 000000000..85d373333 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC165__factory } from "./IERC165__factory"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/math/SafeCast__factory.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/math/SafeCast__factory.ts new file mode 100644 index 000000000..ffa7614c4 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/math/SafeCast__factory.ts @@ -0,0 +1,105 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import type { ContractDeployTransaction, ContractRunner, Signer } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers"; +import type { SafeCast, SafeCastInterface } from "../../../../../@openzeppelin/contracts/utils/math/SafeCast"; +import type { NonPayableOverrides } from "../../../../../common"; + +const _abi = [ + { + inputs: [ + { + internalType: "uint8", + name: "bits", + type: "uint8" + }, + { + internalType: "int256", + name: "value", + type: "int256" + } + ], + name: "SafeCastOverflowedIntDowncast", + type: "error" + }, + { + inputs: [ + { + internalType: "int256", + name: "value", + type: "int256" + } + ], + name: "SafeCastOverflowedIntToUint", + type: "error" + }, + { + inputs: [ + { + internalType: "uint8", + name: "bits", + type: "uint8" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "SafeCastOverflowedUintDowncast", + type: "error" + }, + { + inputs: [ + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "SafeCastOverflowedUintToInt", + type: "error" + } +] as const; + +const _bytecode = + "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206e23643c396df695b2797f650857ef0eb0576e47d97a4599ed83883f99aad72664736f6c634300081c0033"; + +type SafeCastConstructorParams = [signer?: Signer] | ConstructorParameters; + +const isSuperArgs = (xs: SafeCastConstructorParams): xs is ConstructorParameters => xs.length > 1; + +export class SafeCast__factory extends ContractFactory { + constructor(...args: SafeCastConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + SafeCast & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): SafeCast__factory { + return super.connect(runner) as SafeCast__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): SafeCastInterface { + return new Interface(_abi) as SafeCastInterface; + } + static connect(address: string, runner?: ContractRunner | null): SafeCast { + return new Contract(address, _abi, runner) as unknown as SafeCast; + } +} diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/math/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/math/index.ts new file mode 100644 index 000000000..d0f3e018e --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/contracts/utils/math/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { SafeCast__factory } from "./SafeCast__factory"; diff --git a/contracts/relayer/typechain-types/factories/@openzeppelin/index.ts b/contracts/relayer/typechain-types/factories/@openzeppelin/index.ts new file mode 100644 index 000000000..6397da096 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/@openzeppelin/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/contracts/relayer/typechain-types/factories/contracts/MockERC20Permit__factory.ts b/contracts/relayer/typechain-types/factories/contracts/MockERC20Permit__factory.ts new file mode 100644 index 000000000..4d08d149d --- /dev/null +++ b/contracts/relayer/typechain-types/factories/contracts/MockERC20Permit__factory.ts @@ -0,0 +1,614 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import type { BigNumberish, ContractDeployTransaction, ContractRunner, Signer } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers"; +import type { NonPayableOverrides } from "../../common"; +import type { MockERC20Permit, MockERC20PermitInterface } from "../../contracts/MockERC20Permit"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name", + type: "string" + }, + { + internalType: "string", + name: "symbol", + type: "string" + }, + { + internalType: "uint8", + name: "decimals_", + type: "uint8" + } + ], + stateMutability: "nonpayable", + type: "constructor" + }, + { + inputs: [], + name: "ECDSAInvalidSignature", + type: "error" + }, + { + inputs: [ + { + internalType: "uint256", + name: "length", + type: "uint256" + } + ], + name: "ECDSAInvalidSignatureLength", + type: "error" + }, + { + inputs: [ + { + internalType: "bytes32", + name: "s", + type: "bytes32" + } + ], + name: "ECDSAInvalidSignatureS", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "allowance", + type: "uint256" + }, + { + internalType: "uint256", + name: "needed", + type: "uint256" + } + ], + name: "ERC20InsufficientAllowance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "uint256", + name: "balance", + type: "uint256" + }, + { + internalType: "uint256", + name: "needed", + type: "uint256" + } + ], + name: "ERC20InsufficientBalance", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "approver", + type: "address" + } + ], + name: "ERC20InvalidApprover", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address" + } + ], + name: "ERC20InvalidReceiver", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + } + ], + name: "ERC20InvalidSender", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "ERC20InvalidSpender", + type: "error" + }, + { + inputs: [ + { + internalType: "uint256", + name: "deadline", + type: "uint256" + } + ], + name: "ERC2612ExpiredSignature", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "signer", + type: "address" + }, + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "ERC2612InvalidSigner", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + }, + { + internalType: "uint256", + name: "currentNonce", + type: "uint256" + } + ], + name: "InvalidAccountNonce", + type: "error" + }, + { + inputs: [], + name: "InvalidShortString", + type: "error" + }, + { + inputs: [ + { + internalType: "string", + name: "str", + type: "string" + } + ], + name: "StringTooLong", + type: "error" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [], + name: "EIP712DomainChanged", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "eip712Domain", + outputs: [ + { + internalType: "bytes1", + name: "fields", + type: "bytes1" + }, + { + internalType: "string", + name: "name", + type: "string" + }, + { + internalType: "string", + name: "version", + type: "string" + }, + { + internalType: "uint256", + name: "chainId", + type: "uint256" + }, + { + internalType: "address", + name: "verifyingContract", + type: "address" + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32" + }, + { + internalType: "uint256[]", + name: "extensions", + type: "uint256[]" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256" + }, + { + internalType: "uint8", + name: "v", + type: "uint8" + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32" + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32" + } + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address" + }, + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + } +] as const; + +const _bytecode = + "0x6101606040523480156200001257600080fd5b50604051620014a0380380620014a083398101604081905262000035916200029a565b6040805180820190915260018152603160f81b60208201528390819081856003620000618382620003ae565b506004620000708282620003ae565b50620000829150839050600562000148565b610120526200009381600662000148565b61014052815160208084019190912060e052815190820120610100524660a0526200012160e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506008805460ff191660ff9290921691909117905550620004d49050565b60006020835110156200016857620001608362000181565b90506200017b565b81620001758482620003ae565b5060ff90505b92915050565b600080829050601f81511115620001b8578260405163305a27a960e01b8152600401620001af91906200047a565b60405180910390fd5b8051620001c582620004af565b179392505050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000200578181015183820152602001620001e6565b50506000910152565b600082601f8301126200021b57600080fd5b81516001600160401b0380821115620002385762000238620001cd565b604051601f8301601f19908116603f01168101908282118183101715620002635762000263620001cd565b816040528381528660208588010111156200027d57600080fd5b62000290846020830160208901620001e3565b9695505050505050565b600080600060608486031215620002b057600080fd5b83516001600160401b0380821115620002c857600080fd5b620002d68783880162000209565b94506020860151915080821115620002ed57600080fd5b50620002fc8682870162000209565b925050604084015160ff811681146200031457600080fd5b809150509250925092565b600181811c908216806200033457607f821691505b6020821081036200035557634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003a957600081815260208120601f850160051c81016020861015620003845750805b601f850160051c820191505b81811015620003a55782815560010162000390565b5050505b505050565b81516001600160401b03811115620003ca57620003ca620001cd565b620003e281620003db84546200031f565b846200035b565b602080601f8311600181146200041a5760008415620004015750858301515b600019600386901b1c1916600185901b178555620003a5565b600085815260208120601f198616915b828110156200044b578886015182559484019460019091019084016200042a565b50858210156200046a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208152600082518060208401526200049b816040850160208701620001e3565b601f01601f19169190910160400192915050565b80516020808301519190811015620003555760001960209190910360031b1b16919050565b60805160a05160c05160e051610100516101205161014051610f716200052f60003960006107770152600061074a015260006106bc01526000610694015260006105ef01526000610619015260006106430152610f716000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c57806395d89b411161006657806395d89b41146101de578063a9059cbb146101e6578063d505accf146101f9578063dd62ed3e1461020c57600080fd5b806370a08231146101875780637ecebe00146101b057806384b0196e146101c357600080fd5b806323b872dd116100c857806323b872dd14610142578063313ce567146101555780633644e5151461016a57806340c10f191461017257600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f7610245565b6040516101049190610cd7565b60405180910390f35b61012061011b366004610d0d565b6102d7565b6040519015158152602001610104565b6002545b604051908152602001610104565b610120610150366004610d37565b6102f1565b60085460405160ff9091168152602001610104565b610134610315565b610185610180366004610d0d565b610324565b005b610134610195366004610d73565b6001600160a01b031660009081526020819052604090205490565b6101346101be366004610d73565b610332565b6101cb610350565b6040516101049796959493929190610d8e565b6100f7610396565b6101206101f4366004610d0d565b6103a5565b610185610207366004610e24565b6103b3565b61013461021a366004610e97565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606003805461025490610eca565b80601f016020809104026020016040519081016040528092919081815260200182805461028090610eca565b80156102cd5780601f106102a2576101008083540402835291602001916102cd565b820191906000526020600020905b8154815290600101906020018083116102b057829003601f168201915b5050505050905090565b6000336102e58185856104f2565b60019150505b92915050565b6000336102ff858285610504565b61030a858585610583565b506001949350505050565b600061031f6105e2565b905090565b61032e828261070d565b5050565b6001600160a01b0381166000908152600760205260408120546102eb565b600060608060008060006060610364610743565b61036c610770565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60606004805461025490610eca565b6000336102e5818585610583565b834211156103dc5760405163313c898160e11b8152600481018590526024015b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886104298c6001600160a01b0316600090815260076020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006104848261079d565b90506000610494828787876107ca565b9050896001600160a01b0316816001600160a01b0316146104db576040516325c0072360e11b81526001600160a01b0380831660048301528b1660248201526044016103d3565b6104e68a8a8a6104f2565b50505050505050505050565b6104ff83838360016107f8565b505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981101561057d578181101561056e57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016103d3565b61057d848484840360006107f8565b50505050565b6001600160a01b0383166105ad57604051634b637e8f60e11b8152600060048201526024016103d3565b6001600160a01b0382166105d75760405163ec442f0560e01b8152600060048201526024016103d3565b6104ff8383836108cd565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561063b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561066557507f000000000000000000000000000000000000000000000000000000000000000090565b61031f604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6001600160a01b0382166107375760405163ec442f0560e01b8152600060048201526024016103d3565b61032e600083836108cd565b606061031f7f000000000000000000000000000000000000000000000000000000000000000060056109f7565b606061031f7f000000000000000000000000000000000000000000000000000000000000000060066109f7565b60006102eb6107aa6105e2565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000806107dc88888888610aa2565b9250925092506107ec8282610b71565b50909695505050505050565b6001600160a01b0384166108225760405163e602df0560e01b8152600060048201526024016103d3565b6001600160a01b03831661084c57604051634a1406b160e11b8152600060048201526024016103d3565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561057d57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516108bf91815260200190565b60405180910390a350505050565b6001600160a01b0383166108f85780600260008282546108ed9190610f04565b9091555061096a9050565b6001600160a01b0383166000908152602081905260409020548181101561094b5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016103d3565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610986576002805482900390556109a5565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516109ea91815260200190565b60405180910390a3505050565b606060ff8314610a1157610a0a83610c2a565b90506102eb565b818054610a1d90610eca565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4990610eca565b8015610a965780601f10610a6b57610100808354040283529160200191610a96565b820191906000526020600020905b815481529060010190602001808311610a7957829003601f168201915b505050505090506102eb565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610add5750600091506003905082610b67565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610b31573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b5d57506000925060019150829050610b67565b9250600091508190505b9450945094915050565b6000826003811115610b8557610b85610f25565b03610b8e575050565b6001826003811115610ba257610ba2610f25565b03610bc05760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610bd457610bd4610f25565b03610bf55760405163fce698f760e01b8152600481018290526024016103d3565b6003826003811115610c0957610c09610f25565b0361032e576040516335e2f38360e21b8152600481018290526024016103d3565b60606000610c3783610c69565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600060ff8216601f8111156102eb57604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b81811015610cb757602081850181015186830182015201610c9b565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610cea6020830184610c91565b9392505050565b80356001600160a01b0381168114610d0857600080fd5b919050565b60008060408385031215610d2057600080fd5b610d2983610cf1565b946020939093013593505050565b600080600060608486031215610d4c57600080fd5b610d5584610cf1565b9250610d6360208501610cf1565b9150604084013590509250925092565b600060208284031215610d8557600080fd5b610cea82610cf1565b60ff60f81b881681526000602060e081840152610dae60e084018a610c91565b8381036040850152610dc0818a610c91565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015610e1257835183529284019291840191600101610df6565b50909c9b505050505050505050505050565b600080600080600080600060e0888a031215610e3f57600080fd5b610e4888610cf1565b9650610e5660208901610cf1565b95506040880135945060608801359350608088013560ff81168114610e7a57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215610eaa57600080fd5b610eb383610cf1565b9150610ec160208401610cf1565b90509250929050565b600181811c90821680610ede57607f821691505b602082108103610efe57634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156102eb57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220ffa2e2add5edfc2d639f1d808ce5dcb80808fb12076cedd3f5d633cef409be4e64736f6c63430008140033"; + +type MockERC20PermitConstructorParams = [signer?: Signer] | ConstructorParameters; + +const isSuperArgs = (xs: MockERC20PermitConstructorParams): xs is ConstructorParameters => + xs.length > 1; + +export class MockERC20Permit__factory extends ContractFactory { + constructor(...args: MockERC20PermitConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + name: string, + symbol: string, + decimals_: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(name, symbol, decimals_, overrides || {}); + } + override deploy(name: string, symbol: string, decimals_: BigNumberish, overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(name, symbol, decimals_, overrides || {}) as Promise< + MockERC20Permit & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): MockERC20Permit__factory { + return super.connect(runner) as MockERC20Permit__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): MockERC20PermitInterface { + return new Interface(_abi) as MockERC20PermitInterface; + } + static connect(address: string, runner?: ContractRunner | null): MockERC20Permit { + return new Contract(address, _abi, runner) as unknown as MockERC20Permit; + } +} diff --git a/contracts/relayer/typechain-types/factories/contracts/TokenRelayer__factory.ts b/contracts/relayer/typechain-types/factories/contracts/TokenRelayer__factory.ts new file mode 100644 index 000000000..adc5e4341 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/contracts/TokenRelayer__factory.ts @@ -0,0 +1,497 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import type { AddressLike, ContractDeployTransaction, ContractRunner, Signer } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers"; +import type { NonPayableOverrides } from "../../common"; +import type { TokenRelayer, TokenRelayerInterface } from "../../contracts/TokenRelayer"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_destinationContract", + type: "address" + } + ], + stateMutability: "nonpayable", + type: "constructor" + }, + { + inputs: [], + name: "ECDSAInvalidSignature", + type: "error" + }, + { + inputs: [ + { + internalType: "uint256", + name: "length", + type: "uint256" + } + ], + name: "ECDSAInvalidSignatureLength", + type: "error" + }, + { + inputs: [ + { + internalType: "bytes32", + name: "s", + type: "bytes32" + } + ], + name: "ECDSAInvalidSignatureS", + type: "error" + }, + { + inputs: [], + name: "InvalidShortString", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + } + ], + name: "OwnableInvalidOwner", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "OwnableUnauthorizedAccount", + type: "error" + }, + { + inputs: [], + name: "ReentrancyGuardReentrantCall", + type: "error" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + } + ], + name: "SafeERC20FailedOperation", + type: "error" + }, + { + inputs: [ + { + internalType: "string", + name: "str", + type: "string" + } + ], + name: "StringTooLong", + type: "error" + }, + { + anonymous: false, + inputs: [], + name: "EIP712DomainChanged", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + } + ], + name: "ETHWithdrawn", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address" + } + ], + name: "OwnershipTransferred", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "signer", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "RelayerExecuted", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + } + ], + name: "TokenWithdrawn", + type: "event" + }, + { + inputs: [], + name: "destinationContract", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "eip712Domain", + outputs: [ + { + internalType: "bytes1", + name: "fields", + type: "bytes1" + }, + { + internalType: "string", + name: "name", + type: "string" + }, + { + internalType: "string", + name: "version", + type: "string" + }, + { + internalType: "uint256", + name: "chainId", + type: "uint256" + }, + { + internalType: "address", + name: "verifyingContract", + type: "address" + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32" + }, + { + internalType: "uint256[]", + name: "extensions", + type: "uint256[]" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "token", + type: "address" + }, + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256" + }, + { + internalType: "uint8", + name: "permitV", + type: "uint8" + }, + { + internalType: "bytes32", + name: "permitR", + type: "bytes32" + }, + { + internalType: "bytes32", + name: "permitS", + type: "bytes32" + }, + { + internalType: "bytes", + name: "payloadData", + type: "bytes" + }, + { + internalType: "uint256", + name: "payloadValue", + type: "uint256" + }, + { + internalType: "uint256", + name: "payloadNonce", + type: "uint256" + }, + { + internalType: "uint256", + name: "payloadDeadline", + type: "uint256" + }, + { + internalType: "uint8", + name: "payloadV", + type: "uint8" + }, + { + internalType: "bytes32", + name: "payloadR", + type: "bytes32" + }, + { + internalType: "bytes32", + name: "payloadS", + type: "bytes32" + } + ], + internalType: "struct TokenRelayer.ExecuteParams", + name: "params", + type: "tuple" + } + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "signer", + type: "address" + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256" + } + ], + name: "isExecutionCompleted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address" + } + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address" + }, + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + name: "usedPayloadNonces", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "withdrawETH", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "withdrawToken", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + stateMutability: "payable", + type: "receive" + } +] as const; + +const _bytecode = + "0x610180604052348015610010575f5ffd5b50604051611a4d380380611a4d83398101604081905261002f91610294565b604080518082018252600c81526b2a37b5b2b72932b630bcb2b960a11b602080830191909152825180840190935260018352603160f81b9083015290338061009157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61009a816101d6565b5060017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00556100ca826001610225565b610120526100d9816002610225565b61014052815160208084019190912060e052815190820120610100524660a05261016560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166101c45760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642064657374696e6174696f6e000000000000000000000000006044820152606401610088565b6001600160a01b03166101605261046b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6020835110156102405761023983610257565b9050610251565b8161024b8482610359565b5060ff90505b92915050565b5f5f829050601f81511115610281578260405163305a27a960e01b81526004016100889190610413565b805161028c82610448565b179392505050565b5f602082840312156102a4575f5ffd5b81516001600160a01b03811681146102ba575f5ffd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806102e957607f821691505b60208210810361030757634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561035457805f5260205f20601f840160051c810160208510156103325750805b601f840160051c820191505b81811015610351575f815560010161033e565b50505b505050565b81516001600160401b03811115610372576103726102c1565b6103868161038084546102d5565b8461030d565b6020601f8211600181146103b8575f83156103a15750848201515b5f19600385901b1c1916600184901b178455610351565b5f84815260208120601f198516915b828110156103e757878501518255602094850194600190920191016103c7565b508482101561040457868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610307575f1960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161156c6104e15f395f818160d701528181610525015281816105f4015281816109500152610bf801525f610d2d01525f610cfb01525f6111bc01525f61119401525f6110ef01525f61111901525f611143015261156c5ff3fe608060405260043610610092575f3560e01c80639e281a98116100575780639e281a9814610159578063d850124e14610178578063dcb79457146101c1578063f14210a6146101e0578063f2fde38b146101ff575f5ffd5b80632af83bfe1461009d578063715018a6146100b257806375bd6863146100c657806384b0196e146101165780638da5cb5b1461013d575f5ffd5b3661009957005b5f5ffd5b6100b06100ab3660046112dd565b61021e565b005b3480156100bd575f5ffd5b506100b06106ae565b3480156100d1575f5ffd5b506100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610121575f5ffd5b5061012a6106c1565b60405161010d979695949392919061134a565b348015610148575f5ffd5b505f546001600160a01b03166100f9565b348015610164575f5ffd5b506100b06101733660046113fb565b610703565b348015610183575f5ffd5b506101b16101923660046113fb565b600360209081525f928352604080842090915290825290205460ff1681565b604051901515815260200161010d565b3480156101cc575f5ffd5b506101b16101db3660046113fb565b61078b565b3480156101eb575f5ffd5b506100b06101fa366004611423565b6107b8565b34801561020a575f5ffd5b506100b061021936600461143a565b6108a7565b6102266108e1565b5f610237604083016020840161143a565b90506101208201356001600160a01b03821661028a5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b60448201526064015b60405180910390fd5b5f610298602085018561143a565b6001600160a01b0316036102de5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610281565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff161561033e5760405162461bcd60e51b815260206004820152600a602482015269139bdb98d9481d5cd95960b21b6044820152606401610281565b8261014001354211156103855760405162461bcd60e51b815260206004820152600f60248201526e14185e5b1bd85908195e1c1a5c9959608a1b6044820152606401610281565b5f6103ee83610397602087018761143a565b60408701356103a960e0890189611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250505050610100890135876101408b013561090f565b90506001600160a01b038316610421826104106101808801610160890161149d565b876101800135886101a001356109db565b6001600160a01b0316146104655760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b6044820152606401610281565b83610100013534146104b95760405162461bcd60e51b815260206004820152601c60248201527f496e636f7272656374204554482076616c75652070726f7669646564000000006044820152606401610281565b6001600160a01b0383165f9081526003602090815260408083208584528252909120805460ff19166001179055610520906104f69086018661143a565b846040870135606088013561051160a08a0160808b0161149d565b8960a001358a60c00135610a07565b6105667f00000000000000000000000000000000000000000000000000000000000000006040860135610556602088018861143a565b6001600160a01b03169190610b75565b5f6105b261057760e0870187611453565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250349250610bf4915050565b9050806105ef5760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b6044820152606401610281565b6106217f00000000000000000000000000000000000000000000000000000000000000005f610556602089018961143a565b61062e602086018661143a565b6001600160a01b0316846001600160a01b03167f78129a649632642d8e9f346c85d9efb70d32d50a36774c4585491a9228bbd350876040013560405161067691815260200190565b60405180910390a3505050506106ab60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b50565b6106b6610c79565b6106bf5f610ca5565b565b5f6060805f5f5f60606106d2610cf4565b6106da610d26565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61070b610c79565b61073061071f5f546001600160a01b031690565b6001600160a01b0384169083610d53565b5f546001600160a01b03166001600160a01b0316826001600160a01b03167fa0524ee0fd8662d6c046d199da2a6d3dc49445182cec055873a5bb9c2843c8e08360405161077f91815260200190565b60405180910390a35050565b6001600160a01b0382165f90815260036020908152604080832084845290915290205460ff165b92915050565b6107c0610c79565b5f80546040516001600160a01b039091169083908381818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108565760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610281565b5f546001600160a01b03166001600160a01b03167f6148672a948a12b8e0bf92a9338349b9ac890fad62a234abaf0a4da99f62cfcc8360405161089b91815260200190565b60405180910390a25050565b6108af610c79565b6001600160a01b0381166108d857604051631e4fbdf760e01b81525f6004820152602401610281565b6106ab81610ca5565b6108e9610d60565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b8351602080860191909120604080517ff0543e2024fd0ae16ccb842686c2733758ec65acfd69fb599c05b286f8db8844938101939093526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691840191909152808a1660608401528816608083015260a0820187905260c082015260e08101849052610100810183905261012081018290525f906109cf906101400160405160208183030381529060405280519060200120610da2565b98975050505050505050565b5f5f5f5f6109eb88888888610dce565b9250925092506109fb8282610e96565b50909695505050505050565b60405163d505accf60e01b81526001600160a01b038781166004830152306024830152604482018790526064820186905260ff8516608483015260a4820184905260c4820183905288169063d505accf9060e4015f604051808303815f87803b158015610a72575f5ffd5b505af1925050508015610a83575060015b610b5757604051636eb1769f60e11b81526001600160a01b03878116600483015230602483015286919089169063dd62ed3e90604401602060405180830381865afa158015610ad4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af891906114bd565b1015610b575760405162461bcd60e51b815260206004820152602860248201527f5065726d6974206661696c656420616e6420696e73756666696369656e7420616044820152676c6c6f77616e636560c01b6064820152608401610281565b610b6c6001600160a01b038816873088610f52565b50505050505050565b610b818383835f610f8e565b610bef57610b9283835f6001610f8e565b610bba57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b610bc78383836001610f8e565b610bef57604051635274afe760e01b81526001600160a01b0384166004820152602401610281565b505050565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168385604051610c2f91906114d4565b5f6040518083038185875af1925050503d805f8114610c69576040519150601f19603f3d011682016040523d82523d5f602084013e610c6e565b606091505b509095945050505050565b5f546001600160a01b031633146106bf5760405163118cdaa760e01b8152336004820152602401610281565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006001610ff0565b905090565b6060610d217f00000000000000000000000000000000000000000000000000000000000000006002610ff0565b610bc78383836001611099565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00546002036106bf57604051633ee5aeb560e01b815260040160405180910390fd5b5f6107b2610dae6110e3565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610e0757505f91506003905082610e8c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610e58573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610e8357505f925060019150829050610e8c565b92505f91508190505b9450945094915050565b5f826003811115610ea957610ea96114ea565b03610eb2575050565b6001826003811115610ec657610ec66114ea565b03610ee45760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610ef857610ef86114ea565b03610f195760405163fce698f760e01b815260048101829052602401610281565b6003826003811115610f2d57610f2d6114ea565b03610f4e576040516335e2f38360e21b815260048101829052602401610281565b5050565b610f6084848484600161120c565b610f8857604051635274afe760e01b81526001600160a01b0385166004820152602401610281565b50505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b606060ff831461100a5761100383611279565b90506107b2565b818054611016906114fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611042906114fe565b801561108d5780601f106110645761010080835404028352916020019161108d565b820191905f5260205f20905b81548152906001019060200180831161107057829003601f168201915b505050505090506107b2565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610fe4578383151615610fd8573d5f823e3d81fd5b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561113b57507f000000000000000000000000000000000000000000000000000000000000000046145b1561116557507f000000000000000000000000000000000000000000000000000000000000000090565b610d21604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b6040516323b872dd60e01b5f8181526001600160a01b038781166004528616602452604485905291602083606481808c5af1925060015f5114831661126857838315161561125c573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b60605f611285836112b6565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156107b257604051632cd44ac360e21b815260040160405180910390fd5b5f602082840312156112ed575f5ffd5b813567ffffffffffffffff811115611303575f5ffd5b82016101c08185031215611315575f5ffd5b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f61136860e083018961131c565b828103604084015261137a818961131c565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156113cf5783518352602093840193909201916001016113b1565b50909b9a5050505050505050505050565b80356001600160a01b03811681146113f6575f5ffd5b919050565b5f5f6040838503121561140c575f5ffd5b611415836113e0565b946020939093013593505050565b5f60208284031215611433575f5ffd5b5035919050565b5f6020828403121561144a575f5ffd5b611315826113e0565b5f5f8335601e19843603018112611468575f5ffd5b83018035915067ffffffffffffffff821115611482575f5ffd5b602001915036819003821315611496575f5ffd5b9250929050565b5f602082840312156114ad575f5ffd5b813560ff81168114611315575f5ffd5b5f602082840312156114cd575f5ffd5b5051919050565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c9082168061151257607f821691505b60208210810361153057634e487b7160e01b5f52602260045260245ffd5b5091905056fea26469706673582212209c34db2f6f83af136a5340cce7fe8ef554ea8eb633656fbf9bff3bd731aec40f64736f6c634300081c0033"; + +type TokenRelayerConstructorParams = [signer?: Signer] | ConstructorParameters; + +const isSuperArgs = (xs: TokenRelayerConstructorParams): xs is ConstructorParameters => xs.length > 1; + +export class TokenRelayer__factory extends ContractFactory { + constructor(...args: TokenRelayerConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + _destinationContract: AddressLike, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(_destinationContract, overrides || {}); + } + override deploy(_destinationContract: AddressLike, overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(_destinationContract, overrides || {}) as Promise< + TokenRelayer & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): TokenRelayer__factory { + return super.connect(runner) as TokenRelayer__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): TokenRelayerInterface { + return new Interface(_abi) as TokenRelayerInterface; + } + static connect(address: string, runner?: ContractRunner | null): TokenRelayer { + return new Contract(address, _abi, runner) as unknown as TokenRelayer; + } +} diff --git a/contracts/relayer/typechain-types/factories/contracts/index.ts b/contracts/relayer/typechain-types/factories/contracts/index.ts new file mode 100644 index 000000000..f067abc51 --- /dev/null +++ b/contracts/relayer/typechain-types/factories/contracts/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { TokenRelayer__factory } from "./TokenRelayer__factory"; diff --git a/contracts/relayer/typechain-types/factories/index.ts b/contracts/relayer/typechain-types/factories/index.ts new file mode 100644 index 000000000..6ff9ace7a --- /dev/null +++ b/contracts/relayer/typechain-types/factories/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as openzeppelin from "./@openzeppelin"; +export * as contracts from "./contracts"; diff --git a/contracts/relayer/typechain-types/hardhat.d.ts b/contracts/relayer/typechain-types/hardhat.d.ts new file mode 100644 index 000000000..35ba7108b --- /dev/null +++ b/contracts/relayer/typechain-types/hardhat.d.ts @@ -0,0 +1,221 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { ethers } from "ethers"; +import { + DeployContractOptions, + FactoryOptions, + HardhatEthersHelpers as HardhatEthersHelpersBase +} from "@nomicfoundation/hardhat-ethers/types"; + +import * as Contracts from "."; + +declare module "hardhat/types/runtime" { + interface HardhatEthersHelpers extends HardhatEthersHelpersBase { + getContractFactory(name: "Ownable", signerOrOptions?: ethers.Signer | FactoryOptions): Promise; + getContractFactory( + name: "IERC1363", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC5267", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IERC20Permit", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory(name: "IERC20", signerOrOptions?: ethers.Signer | FactoryOptions): Promise; + getContractFactory( + name: "SafeERC20", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory(name: "ECDSA", signerOrOptions?: ethers.Signer | FactoryOptions): Promise; + getContractFactory(name: "EIP712", signerOrOptions?: ethers.Signer | FactoryOptions): Promise; + getContractFactory( + name: "MessageHashUtils", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory(name: "IERC165", signerOrOptions?: ethers.Signer | FactoryOptions): Promise; + getContractFactory( + name: "SafeCast", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ReentrancyGuard", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ShortStrings", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory(name: "Strings", signerOrOptions?: ethers.Signer | FactoryOptions): Promise; + getContractFactory( + name: "TokenRelayer", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + + getContractAt(name: "Ownable", address: string | ethers.Addressable, signer?: ethers.Signer): Promise; + getContractAt(name: "IERC1363", address: string | ethers.Addressable, signer?: ethers.Signer): Promise; + getContractAt(name: "IERC5267", address: string | ethers.Addressable, signer?: ethers.Signer): Promise; + getContractAt( + name: "IERC20Permit", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt(name: "IERC20", address: string | ethers.Addressable, signer?: ethers.Signer): Promise; + getContractAt( + name: "SafeERC20", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt(name: "ECDSA", address: string | ethers.Addressable, signer?: ethers.Signer): Promise; + getContractAt(name: "EIP712", address: string | ethers.Addressable, signer?: ethers.Signer): Promise; + getContractAt( + name: "MessageHashUtils", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt(name: "IERC165", address: string | ethers.Addressable, signer?: ethers.Signer): Promise; + getContractAt(name: "SafeCast", address: string | ethers.Addressable, signer?: ethers.Signer): Promise; + getContractAt( + name: "ReentrancyGuard", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ShortStrings", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + getContractAt(name: "Strings", address: string | ethers.Addressable, signer?: ethers.Signer): Promise; + getContractAt( + name: "TokenRelayer", + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + + deployContract(name: "Ownable", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract(name: "IERC1363", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract(name: "IERC5267", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract( + name: "IERC20Permit", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract(name: "IERC20", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract(name: "SafeERC20", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract(name: "ECDSA", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract(name: "EIP712", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract( + name: "MessageHashUtils", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract(name: "IERC165", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract(name: "SafeCast", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract( + name: "ReentrancyGuard", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ShortStrings", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract(name: "Strings", signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract( + name: "TokenRelayer", + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + + deployContract( + name: "Ownable", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC1363", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC5267", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20Permit", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SafeERC20", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ECDSA", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "EIP712", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "MessageHashUtils", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "IERC165", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "SafeCast", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ReentrancyGuard", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "ShortStrings", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "Strings", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: "TokenRelayer", + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + + // default types + getContractFactory(name: string, signerOrOptions?: ethers.Signer | FactoryOptions): Promise; + getContractFactory(abi: any[], bytecode: ethers.BytesLike, signer?: ethers.Signer): Promise; + getContractAt( + nameOrAbi: string | any[], + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + deployContract(name: string, signerOrOptions?: ethers.Signer | DeployContractOptions): Promise; + deployContract( + name: string, + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + } +} diff --git a/contracts/relayer/typechain-types/index.ts b/contracts/relayer/typechain-types/index.ts new file mode 100644 index 000000000..888ef9768 --- /dev/null +++ b/contracts/relayer/typechain-types/index.ts @@ -0,0 +1,39 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as openzeppelin from "./@openzeppelin"; +export type { openzeppelin }; + +import type * as contracts from "./contracts"; +export type { contracts }; +export type { Ownable } from "./@openzeppelin/contracts/access/Ownable"; +export type { IERC1363 } from "./@openzeppelin/contracts/interfaces/IERC1363"; +export type { IERC5267 } from "./@openzeppelin/contracts/interfaces/IERC5267"; +export type { IERC20Permit } from "./@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit"; +export type { IERC20 } from "./@openzeppelin/contracts/token/ERC20/IERC20"; +export type { SafeERC20 } from "./@openzeppelin/contracts/token/ERC20/utils/SafeERC20"; +export type { ECDSA } from "./@openzeppelin/contracts/utils/cryptography/ECDSA"; +export type { EIP712 } from "./@openzeppelin/contracts/utils/cryptography/EIP712"; +export type { MessageHashUtils } from "./@openzeppelin/contracts/utils/cryptography/MessageHashUtils"; +export type { IERC165 } from "./@openzeppelin/contracts/utils/introspection/IERC165"; +export type { SafeCast } from "./@openzeppelin/contracts/utils/math/SafeCast"; +export type { ReentrancyGuard } from "./@openzeppelin/contracts/utils/ReentrancyGuard"; +export type { ShortStrings } from "./@openzeppelin/contracts/utils/ShortStrings"; +export type { Strings } from "./@openzeppelin/contracts/utils/Strings"; +export type { TokenRelayer } from "./contracts/TokenRelayer"; +export * as factories from "./factories"; +export { Ownable__factory } from "./factories/@openzeppelin/contracts/access/Ownable__factory"; +export { IERC1363__factory } from "./factories/@openzeppelin/contracts/interfaces/IERC1363__factory"; +export { IERC5267__factory } from "./factories/@openzeppelin/contracts/interfaces/IERC5267__factory"; +export { IERC20Permit__factory } from "./factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit__factory"; +export { IERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/IERC20__factory"; +export { SafeERC20__factory } from "./factories/@openzeppelin/contracts/token/ERC20/utils/SafeERC20__factory"; +export { ECDSA__factory } from "./factories/@openzeppelin/contracts/utils/cryptography/ECDSA__factory"; +export { EIP712__factory } from "./factories/@openzeppelin/contracts/utils/cryptography/EIP712__factory"; +export { MessageHashUtils__factory } from "./factories/@openzeppelin/contracts/utils/cryptography/MessageHashUtils__factory"; +export { IERC165__factory } from "./factories/@openzeppelin/contracts/utils/introspection/IERC165__factory"; +export { SafeCast__factory } from "./factories/@openzeppelin/contracts/utils/math/SafeCast__factory"; +export { ReentrancyGuard__factory } from "./factories/@openzeppelin/contracts/utils/ReentrancyGuard__factory"; +export { ShortStrings__factory } from "./factories/@openzeppelin/contracts/utils/ShortStrings__factory"; +export { Strings__factory } from "./factories/@openzeppelin/contracts/utils/Strings__factory"; +export { TokenRelayer__factory } from "./factories/contracts/TokenRelayer__factory"; diff --git a/docs/architecture/ramp-journey-and-fees.md b/docs/architecture/ramp-journey-and-fees.md index af7bdaae2..1c9987903 100644 --- a/docs/architecture/ramp-journey-and-fees.md +++ b/docs/architecture/ramp-journey-and-fees.md @@ -54,9 +54,15 @@ This journey handles on-ramping from EUR using Monerium. It follows one of two m * If the destination is **AssetHub**, the swap is performed for an intermediate asset on Moonbeam. * Transitions to `squidRouterPay`. 10. **Phase: `squidRouterPay` (`squid-router-pay-phase-handler.ts`):** Pays the gas for the Squid Router transaction and waits for its completion. - * If the destination is **EVM**, transitions to `complete`. + * If the destination is **EVM**, transitions to `finalSettlementSubsidy`. * If the destination is **AssetHub**, transitions to `moonbeamToPendulum`. +**EVM-Specific Sub-flow:** + +11. **Phase: `finalSettlementSubsidy` (`final-settlement-subsidy-handler.ts`):** Tops up the final asset balance if needed to ensure the user receives the quoted net amount after all fees. Transitions to `destinationTransfer`. +12. **Phase: `destinationTransfer` (`destination-transfer-handler.ts`):** Transfers the final asset to the user's destination address. Transitions to `complete`. +13. **Phase: `complete` (`complete-phase-handler.ts`):** Terminal state. + **AssetHub-Specific Sub-flow:** 11. **Phase: `moonbeamToPendulum` (`moonbeam-to-pendulum-handler.ts`):** Transfers the intermediate asset from Moonbeam to Pendulum via XCM. Transitions to `distributeFees`. @@ -95,7 +101,9 @@ This journey handles on-ramping from BRL using the BRLA token. It involves a ser 13. **Phase: `pendulumToMoonbeamXcm` (`pendulum-to-moonbeam-xcm-handler.ts`):** Transfers the swapped asset from Pendulum back to Moonbeam. Transitions to `squidRouterSwap`. 14. **Phase: `squidRouterSwap` (`squid-router-swap-handler.ts`):** Performs a final swap on Moonbeam to get the target asset. Transitions to `squidRouterPay`. -15. **Phase: `squidRouterPay` (`squid-router-pay-phase-handler.ts`):** Pays the gas for the Squid Router transaction. Transitions to `complete`. +15. **Phase: `squidRouterPay` (`squid-router-pay-phase-handler.ts`):** Pays the gas for the Squid Router transaction. Transitions to `finalSettlementSubsidy`. +16. **Phase: `finalSettlementSubsidy` (`final-settlement-subsidy-handler.ts`):** Tops up the final asset balance if needed to ensure the user receives the quoted net amount after all fees. Transitions to `destinationTransfer`. +17. **Phase: `destinationTransfer` (`destination-transfer-handler.ts`):** Transfers the final asset to the user's destination address. Transitions to `complete`. **AssetHub-Specific Sub-flow:** @@ -105,6 +113,21 @@ This journey handles on-ramping from BRL using the BRLA token. It involves a ser 16. **Phase: `hydrationToAssethub` (`hydration-to-assethub-handler.ts`):** Transfers the final asset from Hydration to AssetHub. Transitions to `complete`. 17. **Phase: `complete` (`complete-phase-handler.ts`):** Terminal state. +### On-Ramp Journey: Alfredpay + +This journey handles on-ramping using Alfredpay. It leverages Squid Router for cross-chain swaps and includes a final settlement subsidy step. + +* **Starts After:** `initial` +* **Next Phase:** `alfredpayOnrampMint` + +6. **Phase: `alfredpayOnrampMint` (`alfredpay-onramp-mint-handler.ts`):** Initiates the Alfredpay on-ramp process, minting the initial tokens. Transitions to `fundEphemeral`. +7. **Phase: `fundEphemeral` (`fund-ephemeral-handler.ts`):** Funds the ephemeral account with native tokens (POL) to cover transaction fees for subsequent steps. Transitions to `squidRouterSwap`. +8. **Phase: `squidRouterSwap` (`squid-router-swap-handler.ts`):** Uses Squid Router to perform the cross-chain swap from the source asset to the destination asset. Transitions to `squidRouterPay`. +9. **Phase: `squidRouterPay` (`squid-router-pay-phase-handler.ts`):** Pays the gas fees for the Squid Router transaction. Waits for transaction completion. Transitions to `finalSettlementSubsidy`. +10. **Phase: `finalSettlementSubsidy` (`final-settlement-subsidy-handler.ts`):** Tops up the final asset balance if needed to ensure the user receives the quoted net amount after all fees. Transitions to `destinationTransfer`. +11. **Phase: `destinationTransfer` (`destination-transfer-handler.ts`):** Transfers the final asset to the user's destination address. Transitions to `complete`. +12. **Phase: `complete` (`complete-phase-handler.ts`):** Terminal state. + --- ### Off-Ramp Journey (Crypto -> Fiat BRL) @@ -177,6 +200,19 @@ This journey handles on-ramping from BRL using the BRLA token. It involves a ser * Transitions to `complete`. 14. **Phase: `complete` (`complete-phase-handler.ts`):** Terminal state. +### Off-Ramp Journey: Alfredpay + +This journey handles off-ramping using Alfredpay. It uses Squid Router with permit execution and includes a final settlement subsidy step before the Alfredpay offramp transfer. + +* **Starts After:** `initial` +* **Next Phase:** `squidRouterPermitExecute` + +6. **Phase: `squidRouterPermitExecute` (`squidRouter-permit-execution-handler.ts`):** Executes the Squid Router permit for the off-ramp transaction, executing the authorized swap and transfer. Transitions to `fundEphemeral`. +7. **Phase: `fundEphemeral` (`fund-ephemeral-handler.ts`):** Funds the ephemeral account with native tokens (only POL) to cover transaction fees for subsequent steps. Transitions to `finalSettlementSubsidy`. +8. **Phase: `finalSettlementSubsidy` (`final-settlement-subsidy-handler.ts`):** Tops up the asset balance if needed to ensure the correct amount is available for the offramp transfer. Transitions to `alfredpayOfframpTransfer`. +9. **Phase: `alfredpayOfframpTransfer` (`alfredpay-offramp-transfer-handler.ts`):** Initiates the Alfredpay off-ramp transfer, sending the final fiat amount to the user's destination. Transitions to `complete`. +10. **Phase: `complete` (`complete-phase-handler.ts`):** Terminal state. + ### Complete Ramp Flow Diagram ```mermaid graph TD @@ -184,35 +220,51 @@ graph TD direction LR A[Start On-Ramp] --> B{Input Currency?}; - %% --- Reusable Subgraphs for Common Flows --- + %% --- Reusable Subgraphs --- subgraph AssetHub_Finalization [AssetHub Finalization] direction LR AHF_Start{Output Token?} -->|USDC| AHF_to_AH[pendulumToAssethubXcm] --> Z[Complete]; AHF_Start -->|DOT/USDT| AHF_to_H[pendulumToHydrationXcm] --> AHF_H_Swap[hydrationSwap] --> AHF_H_to_AH[hydrationToAssethubXcm] --> Z; end - subgraph Pendulum_Swap [Pendulum Swap & Subsidize] + subgraph Pendulum_Swap [Pendulum Swap and Subsidize] direction LR PS_Start[subsidizePreSwap] --> PS_app[nablaApprove] --> PS_swap[nablaSwap] --> PS_dist[distributeFees] --> PS_post[subsidizePostSwap]; end + %% All non-AssetHub on-ramp paths converge here + subgraph Squid_EVM_Settlement [EVM Settlement via Squid] + direction LR + SES_Swap[squidRouterSwap] --> SES_Pay[squidRouterPay] --> SES_Subsidy[finalSettlementSubsidy] --> SES_Dest[destinationTransfer] --> Z; + end + %% --- Main Entry Flows --- B -->|EUR| Monerium_Flow; B -->|BRL| BRLA_Flow; + B -->|Alfredpay| Alfredpay_Flow; + + subgraph Alfredpay_Flow [Alfredpay On-Ramp] + direction LR + AF_Start[alfredpayOnrampMint] --> AF_Fund[fundEphemeral]; + end - subgraph Monerium_Flow [Monerium EUR Initial Steps] + subgraph Monerium_Flow [Monerium EUR] direction LR M_Start[moneriumOnrampMint] --> M_Fund[fundEphemeral] --> M_Transfer[moneriumOnrampSelfTransfer] --> M_Dest{Destination?}; end - subgraph BRLA_Flow [BRLA BRL Initial Steps] + subgraph BRLA_Flow [BRLA BRL] direction LR B_Start[brlaOnrampMint] --> B_FUND[fundEphemeral] --> B_to_P[moonbeamToPendulumXcm]; end - %% --- Monerium Flow Branches --- - M_Dest -->|EVM| M_EVM_Swap[squidRouterSwap to EVM] --> M_EVM_Pay[squidRouterPay] --> Z; - M_Dest -->|AssetHub| M_AH_Swap[squidRouterSwap to Moonbeam] --> M_AH_Pay[squidRouterPay] --> M_to_P[moonbeamToPendulum]; + %% --- All non-AssetHub paths enter the shared EVM settlement subgraph --- + AF_Fund --> SES_Swap; + M_Dest -->|EVM| SES_Swap; + B_to_M[pendulumToMoonbeamXcm] --> SES_Swap; + + %% --- Monerium AssetHub path (dedicated squid nodes, different destination) --- + M_Dest -->|AssetHub| M_AH_Swap[squidRouterSwap - Moonbeam] --> M_AH_Pay[squidRouterPay] --> M_to_P[moonbeamToPendulum]; %% --- Connections to/from Common Pendulum Swap Flow --- M_to_P --> PS_Start; @@ -224,18 +276,21 @@ graph TD Post_Swap_Router -->|From BRLA| BRLA_Post_Swap_Dest{Destination?}; BRLA_Post_Swap_Dest -->|AssetHub| AHF_Start; - BRLA_Post_Swap_Dest -->|EVM| BRLA_EVM_Path; - - subgraph BRLA_EVM_Path [BRLA to EVM Post-Swap] - direction LR - B_to_M[pendulumToMoonbeamXcm] --> B_Swap[squidRouterSwap] --> B_Pay[squidRouterPay] --> Z; - end + BRLA_Post_Swap_Dest -->|EVM| B_to_M; end subgraph "Off-Ramp" direction LR - M_off[Start Off-Ramp] --> MN_off[fundEphemeral] - MN_off[fundEphemeral] --> N_off{Input Asset Source?}; + M_off[Start Off-Ramp] --> N_off{Input Source?}; + + %% --- Alfredpay Off-Ramp Flow --- + N_off -->|Alfredpay| AF_Off_Permit[squidRouterPermitExecute]; + AF_Off_Permit --> AF_Off_Fund[fundEphemeral]; + AF_Off_Fund --> AF_Off_Subsidy[finalSettlementSubsidy]; + AF_Off_Subsidy --> AF_Off_Transfer[alfredpayOfframpTransfer]; + AF_Off_Transfer --> Y_off[Complete]; + + %% --- Standard Off-Ramp Flows --- N_off -->|EVM| O_off[moonbeamToPendulum]; N_off -->|AssetHub| P_off[distributeFees_assethub]; O_off --> Q_off[distributeFees_evm]; @@ -247,7 +302,7 @@ graph TD U_off --> V_off{Output Fiat?}; V_off -->|BRL| W_off[pendulumToMoonbeam]; W_off --> X_off[brlaPayoutOnMoonbeam]; - X_off --> Y_off[Complete]; + X_off --> Y_off; V_off -->|EUR/ARS| Z_off[spacewalkRedeem]; Z_off --> AA_off[stellarPayment]; AA_off --> Y_off; diff --git a/package.json b/package.json index 616f2492d..e8fa11f86 100644 --- a/package.json +++ b/package.json @@ -93,8 +93,10 @@ "build:frontend": "bun run --cwd apps/frontend build", "build:sdk": "bun run --cwd packages/sdk build", "build:shared": "bun run --cwd packages/shared build", + "compile:contracts:relayer": "bun run --cwd contracts/relayer compile", "dev": "concurrently -n 'shared,backend,frontend' -c '#ffa500,#007755,#2f6da3' 'cd packages/shared && bun run dev' 'cd apps/api && bun dev' 'cd apps/frontend && bun dev'", "dev:backend": "bun run --cwd apps/api dev", + "dev:contracts:relayer": "bun run --cwd contracts/relayer node", "dev:frontend": "bun run --cwd apps/frontend dev", "dev:rebalancer": "bun run --cwd apps/rebalancer dev", "format": "biome check --write --unsafe --no-errors-on-unmatched", @@ -103,11 +105,13 @@ "prepare": "husky", "serve:backend": "bun run --cwd apps/api serve", "serve:frontend": "bun run --cwd apps/frontend preview", + "test:contracts:relayer": "bun run --cwd contracts/relayer test", "typecheck": "bunx tsc", "verify": "biome check --no-errors-on-unmatched" }, "workspaces": [ "apps/*", - "packages/*" + "packages/*", + "contracts/*" ] } diff --git a/packages/shared/src/constants.ts b/packages/shared/src/constants.ts index 07ed09276..c5fa26d21 100644 --- a/packages/shared/src/constants.ts +++ b/packages/shared/src/constants.ts @@ -11,3 +11,7 @@ export const BRLA_API_KEY = getEnvVar("BRLA_API_KEY"); export const BRLA_PRIVATE_KEY = getEnvVar("BRLA_PRIVATE_KEY"); export const ALCHEMY_API_KEY = getEnvVar("ALCHEMY_API_KEY"); + +export const ALFREDPAY_BASE_URL = getEnvVar("ALFREDPAY_BASE_URL") || "https://penny-api-restricted-dev.alfredpay.io"; +export const ALFREDPAY_API_KEY = getEnvVar("ALFREDPAY_API_KEY"); +export const ALFREDPAY_API_SECRET = getEnvVar("ALFREDPAY_API_SECRET"); diff --git a/packages/shared/src/endpoints/alfredpay.endpoints.ts b/packages/shared/src/endpoints/alfredpay.endpoints.ts new file mode 100644 index 000000000..ed11f0500 --- /dev/null +++ b/packages/shared/src/endpoints/alfredpay.endpoints.ts @@ -0,0 +1,80 @@ +import { + AlfredPayStatus, + AlfredpayCustomerType, + CreateAlfredpayCustomerResponse, + GetKybRedirectLinkResponse, + GetKycRedirectLinkResponse, + GetKycStatusResponse +} from "../services/alfredpay/types"; + +// GET /alfredpay/alfredpayStatus?country=:country +export interface AlfredpayStatusRequest { + country: string; +} + +export interface AlfredpayStatusResponse { + status: AlfredPayStatus; + country: string; + creationTime: string; +} + +// POST /alfredpay/createIndividualCustomer +export interface AlfredpayCreateCustomerRequest { + country: string; +} + +export interface AlfredpayCreateCustomerResponse { + createdAt: string; +} + +// GET /alfredpay/getKycRedirectLink?country=:country +export interface AlfredpayGetKycRedirectLinkRequest { + country: string; + type?: AlfredpayCustomerType; +} + +export type AlfredpayGetKycRedirectLinkResponse = GetKycRedirectLinkResponse; + +export type AlfredpayGetKybRedirectLinkResponse = GetKybRedirectLinkResponse; + +// POST /alfredpay/kycRedirectOpened +export interface AlfredpayKycRedirectOpenedRequest { + country: string; + type?: AlfredpayCustomerType; +} + +export interface AlfredpayKycRedirectOpenedResponse { + success: boolean; +} + +// POST /alfredpay/kycRedirectFinished +export interface AlfredpayKycRedirectFinishedRequest { + country: string; + type?: AlfredpayCustomerType; +} + +export interface AlfredpayKycRedirectFinishedResponse { + success: boolean; +} + +// GET /alfredpay/getKycStatus?country=:country&type=:type +export interface AlfredpayGetKycStatusRequest { + country: string; + type?: AlfredpayCustomerType; +} + +export interface AlfredpayGetKycStatusResponse { + status: AlfredPayStatus; + lastFailure?: string; + updated_at: string; + alfred_pay_id: string; + country: string; +} + +export type AlfredpayGetKybStatusRequest = AlfredpayGetKycStatusRequest; +export type AlfredpayGetKybStatusResponse = AlfredpayGetKycStatusResponse; + +export interface AlfredpayRetryKycRequest { + country: string; + type?: AlfredpayCustomerType; +} diff --git a/packages/shared/src/endpoints/index.ts b/packages/shared/src/endpoints/index.ts index ab3da06cc..e5c3b52ca 100644 --- a/packages/shared/src/endpoints/index.ts +++ b/packages/shared/src/endpoints/index.ts @@ -1,4 +1,5 @@ // Export all endpoint types +export * from "./alfredpay.endpoints"; export * from "./brla.endpoints"; export * from "./contact.endpoints"; export * from "./email.endpoints"; diff --git a/packages/shared/src/endpoints/monerium.ts b/packages/shared/src/endpoints/monerium.ts index f98e42711..f5cebab54 100644 --- a/packages/shared/src/endpoints/monerium.ts +++ b/packages/shared/src/endpoints/monerium.ts @@ -76,4 +76,7 @@ export enum MoneriumErrors { USER_MINT_ADDRESS_IS_NOT_READY = "User mint address is not ready yet" } -export type PermitSignature = { v: number; r: `0x${string}`; s: `0x${string}`; deadline: number }; +// TODO: Move these types to a more generic file if they are used outside of Monerium endpoints +export type Signature = { v: number; r: `0x${string}`; s: `0x${string}`; deadline: number }; + +export type PermitSignature = Signature; diff --git a/packages/shared/src/endpoints/payment-methods.endpoints.ts b/packages/shared/src/endpoints/payment-methods.endpoints.ts index 7a0074f47..eedb63699 100644 --- a/packages/shared/src/endpoints/payment-methods.endpoints.ts +++ b/packages/shared/src/endpoints/payment-methods.endpoints.ts @@ -10,13 +10,15 @@ export enum PaymentMethodTypes { export enum PaymentMethodName { SEPA = "SEPA", PIX = "PIX", - CBU = "CBU" + CBU = "CBU", + ACH = "ACH" } export enum EPaymentMethod { PIX = "pix", SEPA = "sepa", - CBU = "cbu" + CBU = "cbu", + ACH = "ach" } export type PaymentMethod = EPaymentMethod; diff --git a/packages/shared/src/endpoints/ramp.endpoints.ts b/packages/shared/src/endpoints/ramp.endpoints.ts index 7393916b2..1afdeacf0 100644 --- a/packages/shared/src/endpoints/ramp.endpoints.ts +++ b/packages/shared/src/endpoints/ramp.endpoints.ts @@ -1,10 +1,21 @@ -import { DestinationType, EvmAddress, Networks, PaymentMethod, PermitSignature, RampCurrency, RampDirection } from "../index"; +import { + AlfredpayFiatPaymentInstructions, + DestinationType, + EvmAddress, + Networks, + PaymentMethod, + PermitSignature, + RampCurrency, + RampDirection, + Signature +} from "../index"; import { TransactionStatus } from "./webhook.endpoints"; export type RampPhase = | "initial" | "moneriumOnrampSelfTransfer" | "moneriumOnrampMint" + | "squidRouterPermitExecute" | "stellarCreateAccount" | "squidRouterApprove" | "squidRouterSwap" @@ -26,6 +37,8 @@ export type RampPhase = | "subsidizePreSwap" | "subsidizePostSwap" | "distributeFees" + | "alfredpayOnrampMint" + | "alfredpayOfframpTransfer" | "brlaOnrampMint" | "brlaPayoutOnMoonbeam" | "failed" @@ -60,12 +73,55 @@ export interface EvmTransactionData { nonce?: number; } -export function isEvmTransactionData(data: string | EvmTransactionData): data is EvmTransactionData { - return typeof data === "object" && data !== null && "to" in data && "data" in data; +export interface TypedDataDomain { + name: string; + version: string; + salt?: `0x${string}`; + chainId?: number; + verifyingContract: EvmAddress; +} + +export interface TypedDataField { + name: string; + type: string; +} + +export interface SignedTypedData { + domain: TypedDataDomain; + types: Record; + primaryType: string; + message: Record; + signature?: Signature | Signature[]; +} + +export function isEvmTransactionData( + data: string | EvmTransactionData | SignedTypedData | SignedTypedData[] +): data is EvmTransactionData { + return typeof data === "object" && data !== null && !Array.isArray(data) && "to" in data && "data" in data; +} + +export function isSignedTypedData( + data: string | EvmTransactionData | SignedTypedData | SignedTypedData[] +): data is SignedTypedData { + return ( + typeof data === "object" && + data !== null && + !Array.isArray(data) && + "domain" in data && + "types" in data && + "primaryType" in data && + "message" in data + ); +} + +export function isSignedTypedDataArray( + data: string | EvmTransactionData | SignedTypedData | SignedTypedData[] +): data is SignedTypedData[] { + return Array.isArray(data) && data.length > 0 && data.every(item => isSignedTypedData(item as any)); } export interface UnsignedTx { - txData: string | EvmTransactionData; + txData: string | EvmTransactionData | SignedTypedData | SignedTypedData[]; phase: RampPhase | CleanupPhase; network: Networks; nonce: number; @@ -149,6 +205,7 @@ export interface RampProcess { expiresAt?: string; from: DestinationType; ibanPaymentData?: IbanPaymentData; + achPaymentData?: AlfredpayFiatPaymentInstructions; id: string; inputAmount: string; inputCurrency: string; diff --git a/packages/shared/src/helpers/parseNumbers.ts b/packages/shared/src/helpers/parseNumbers.ts index 66365b43d..991d1c58e 100644 --- a/packages/shared/src/helpers/parseNumbers.ts +++ b/packages/shared/src/helpers/parseNumbers.ts @@ -123,6 +123,11 @@ export const roundNumber = (value: number | string = 0, round = 6) => { export function roundDownToSignificantDecimals(number: Big.BigSource, decimals: number) { const big = new Big(number); + + if (Number.isNaN(big.e)) { + return big; + } + return big.prec(Math.max(0, big.e + 1) + decimals, 0); } diff --git a/packages/shared/src/helpers/payment-method-mapper.ts b/packages/shared/src/helpers/payment-method-mapper.ts index 0ec18d93b..b16abaa3a 100644 --- a/packages/shared/src/helpers/payment-method-mapper.ts +++ b/packages/shared/src/helpers/payment-method-mapper.ts @@ -50,7 +50,7 @@ export function deriveFromTo( */ export function getPaymentMethodFromDestinations(from: DestinationType, to: DestinationType): PaymentMethod { // Check if 'from' is a payment method - const paymentMethods: PaymentMethod[] = [EPaymentMethod.PIX, EPaymentMethod.SEPA, EPaymentMethod.CBU]; + const paymentMethods: PaymentMethod[] = [EPaymentMethod.PIX, EPaymentMethod.SEPA, EPaymentMethod.CBU, EPaymentMethod.ACH]; if (paymentMethods.includes(from as PaymentMethod)) { return from as PaymentMethod; diff --git a/packages/shared/src/helpers/signUnsigned.ts b/packages/shared/src/helpers/signUnsigned.ts index cf47032d6..045889ebf 100644 --- a/packages/shared/src/helpers/signUnsigned.ts +++ b/packages/shared/src/helpers/signUnsigned.ts @@ -10,6 +10,8 @@ import { decodeSubmittableExtrinsic, EphemeralAccount, isEvmTransactionData, + isSignedTypedData, + isSignedTypedDataArray, Networks, PresignedTx, SANDBOX_ENABLED, @@ -188,14 +190,13 @@ async function signMultipleEvmTransactions( if (!walletClient.account) { throw new Error("Wallet client account is undefined"); } - const txData = { account: walletClient.account, chain: walletClient.chain, data: tx.txData.data, gas: BigInt(tx.txData.gas), - maxFeePerGas: tx.txData.maxFeePerGas ? BigInt(tx.txData.maxFeePerGas) * 5n : BigInt(187500000000), - maxPriorityFeePerGas: tx.txData.maxPriorityFeePerGas ? BigInt(tx.txData.maxPriorityFeePerGas) * 5n : BigInt(187500000000), + maxFeePerGas: tx.txData.maxFeePerGas ? BigInt(tx.txData.maxFeePerGas) * 1n : BigInt(187500000000), + maxPriorityFeePerGas: tx.txData.maxPriorityFeePerGas ? BigInt(tx.txData.maxPriorityFeePerGas) * 3n : BigInt(187500000000), nonce: Number(currentNonce), to: tx.txData.to, value: BigInt(tx.txData.value) @@ -257,7 +258,7 @@ export async function signUnsignedTransactions( const keypair = Keypair.fromSecret(ephemerals.stellarEphemeral.secret); for (const tx of stellarTxs) { - if (isEvmTransactionData(tx.txData)) { + if (isEvmTransactionData(tx.txData) || isSignedTypedData(tx.txData)) { throw new Error("Invalid Stellar transaction data format"); } @@ -276,7 +277,7 @@ export async function signUnsignedTransactions( throw new Error("Hydration API is required for signing transactions"); } - if (isEvmTransactionData(tx.txData)) { + if (isEvmTransactionData(tx.txData) || isSignedTypedData(tx.txData)) { throw new Error("Invalid Hydration transaction data format"); } @@ -300,7 +301,7 @@ export async function signUnsignedTransactions( throw new Error("Pendulum API is required for signing transactions"); } - if (isEvmTransactionData(tx.txData)) { + if (isEvmTransactionData(tx.txData) || isSignedTypedData(tx.txData)) { throw new Error("Invalid Pendulum transaction data format"); } @@ -327,7 +328,7 @@ export async function signUnsignedTransactions( const txWithMeta = addAdditionalTransactionsToMeta(primaryTx, multiSignedTxs); signedTxs.push(txWithMeta); - } else { + } else if (!isSignedTypedData(tx.txData) && !isSignedTypedDataArray(tx.txData)) { // Handle Moonbeam Substrate transactions const keyring = new Keyring({ type: "ethereum" }); const privateKey = ephemerals.evmEphemeral.secret as `0x${string}`; @@ -339,6 +340,7 @@ export async function signUnsignedTransactions( signedTxs.push(txWithMeta); } + // Skip SignedTypedData and SignedTypedData[] transactions as they are signed by the user not by ephemerals } // Process Polygon transactions diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index bb2daab79..400810fc9 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -3,6 +3,7 @@ export * from "./tokens"; export * from "./constants"; export * from "./endpoints"; +export * from "./endpoints/ramp.endpoints"; export * from "./helpers"; export * from "./helpers/environment"; export * from "./logger"; diff --git a/packages/shared/src/services/alfredpay/alfredpayApiService.ts b/packages/shared/src/services/alfredpay/alfredpayApiService.ts new file mode 100644 index 000000000..1130c7002 --- /dev/null +++ b/packages/shared/src/services/alfredpay/alfredpayApiService.ts @@ -0,0 +1,216 @@ +import Big from "big.js"; +import { ALFREDPAY_API_KEY, ALFREDPAY_API_SECRET, ALFREDPAY_BASE_URL } from "../.."; +import logger from "../../logger"; +import { + AlfredpayCustomerType, + AlfredpayFee, + AlfredpayFiatAccountFields, + AlfredpayFiatAccountType, + AlfredpayFiatCurrency, + AlfredpayOfframpQuote, + AlfredpayOnrampQuote, + CreateAlfredpayCustomerResponse, + CreateAlfredpayFiatAccountRequest, + CreateAlfredpayFiatAccountResponse, + CreateAlfredpayOfframpQuoteRequest, + CreateAlfredpayOfframpRequest, + CreateAlfredpayOfframpResponse, + CreateAlfredpayOnrampQuoteRequest, + CreateAlfredpayOnrampRequest, + CreateAlfredpayOnrampResponse, + FindAlfredpayCustomerResponse, + GetAlfredpayOnrampTransactionResponse, + GetKybRedirectLinkResponse, + GetKybStatusResponse, + GetKybSubmissionResponse, + GetKycRedirectLinkResponse, + GetKycStatusResponse, + GetKycSubmissionResponse, + RetryKybSubmissionResponse, + RetryKycSubmissionResponse +} from "./types"; + +export class AlfredpayApiService { + private static instance: AlfredpayApiService; + + private apiKey: string; + + private apiSecret: string; + + private constructor() { + if (!ALFREDPAY_API_KEY || !ALFREDPAY_API_SECRET) { + throw new Error("ALFREDPAY_API_KEY or ALFREDPAY_API_SECRET not defined"); + } + this.apiKey = ALFREDPAY_API_KEY; + this.apiSecret = ALFREDPAY_API_SECRET; + } + + public static getInstance(): AlfredpayApiService { + if (!AlfredpayApiService.instance) { + AlfredpayApiService.instance = new AlfredpayApiService(); + } + return AlfredpayApiService.instance; + } + + public static sumFeesByCurrency(fees: AlfredpayFee[], currency: AlfredpayFiatCurrency): Big { + return fees.filter(fee => fee.currency === currency).reduce((total, fee) => total.plus(new Big(fee.amount)), new Big(0)); + } + + private async executeRequest( + path: string, + method: string, + payload?: unknown, + queryParams?: string + ): Promise { + const headers = { + Accept: "application/json", + "api-key": this.apiKey, + "api-secret": this.apiSecret, + "Content-Type": "application/json" + }; + + let url = path; + + if (queryParams) { + url += `?${queryParams}`; + } + + const options: RequestInit = { + headers, + method + }; + + if (payload !== undefined) { + options.body = JSON.stringify(payload); + } + const fullUrl = `${ALFREDPAY_BASE_URL}${url}`; + logger.current.info(`Sending request to ${fullUrl} with method ${method} and payload:`, payload); + + const response = await fetch(fullUrl, options); + + if (response.status === 401) { + throw new Error("Authorization error."); + } + + if (!response.ok) { + throw new Error(`Request failed with status '${response.status}'. Error: ${await response.text()}`); + } + try { + return await response.json(); + } catch { + return undefined; + } + } + + public async createCustomer( + email: string, + type: AlfredpayCustomerType, + country: string + ): Promise { + const payload = { + country, + email, + type + }; + return (await this.executeRequest( + "/api/v1/third-party-service/penny/customers/create", + "POST", + payload + )) as CreateAlfredpayCustomerResponse; + } + + public async findCustomer(email: string, country: string): Promise { + const encodedEmail = encodeURIComponent(email); + const path = `/api/v1/third-party-service/penny/customers/find/${encodedEmail}/${country}`; + return (await this.executeRequest(path, "GET")) as FindAlfredpayCustomerResponse; + } + + public async getKycRedirectLink(customerId: string, country: string): Promise { + const path = `/api/v1/third-party-service/penny/customers/${customerId}/kyc/${country}/url`; + return (await this.executeRequest(path, "GET")) as GetKycRedirectLinkResponse; + } + + public async getKycStatus(customerId: string, submissionId: string): Promise { + const path = `/api/v1/third-party-service/penny/customers/${customerId}/kyc/${submissionId}/status`; + return (await this.executeRequest(path, "GET")) as GetKycStatusResponse; + } + + public async getLastKycSubmission(customerId: string): Promise { + const path = `/api/v1/third-party-service/penny/customers/kyc/${customerId}`; + return (await this.executeRequest(path, "GET")) as GetKycSubmissionResponse; + } + + public async retryKycSubmission(customerId: string, submissionId: string): Promise { + const path = `/api/v1/third-party-service/penny/customers/${customerId}/kyc/${submissionId}/retry`; + return (await this.executeRequest(path, "POST")) as RetryKycSubmissionResponse; + } + + public async getKybRedirectLink(customerId: string): Promise { + const path = `/api/v1/third-party-service/penny/customers/kyb/${customerId}/verification/url`; + return (await this.executeRequest(path, "GET")) as GetKybRedirectLinkResponse; + } + + public async getKybStatus(customerId: string, submissionId: string): Promise { + const path = `/api/v1/third-party-service/penny/customers/${customerId}/kyb/${submissionId}/status`; + return (await this.executeRequest(path, "GET")) as GetKybStatusResponse; + } + + public async getLastKybSubmission(customerId: string): Promise { + const path = `/api/v1/third-party-service/penny/customers/kyb/${customerId}`; + return (await this.executeRequest(path, "GET")) as GetKybSubmissionResponse; + } + + // TODo is this endpoint correct? + public async retryKybSubmission(customerId: string, submissionId: string): Promise { + const path = `/api/v1/third-party-service/penny/customers/${customerId}/kyb/${submissionId}/retry`; + return (await this.executeRequest(path, "POST")) as RetryKybSubmissionResponse; + } + + public async createOnrampQuote(request: CreateAlfredpayOnrampQuoteRequest): Promise { + const path = "/api/v1/third-party-service/penny/quotes"; + return (await this.executeRequest(path, "POST", request)) as AlfredpayOnrampQuote; + } + + public async createOfframpQuote(request: CreateAlfredpayOfframpQuoteRequest): Promise { + const path = "/api/v1/third-party-service/penny/quotes"; + return (await this.executeRequest(path, "POST", request)) as AlfredpayOfframpQuote; + } + + public async getQuote(quoteId: string): Promise { + const path = `/api/v1/third-party-service/penny/quotes/${quoteId}`; + return (await this.executeRequest(path, "GET")) as AlfredpayOnrampQuote | AlfredpayOfframpQuote; + } + + public async createOnramp(request: CreateAlfredpayOnrampRequest): Promise { + const path = "/api/v1/third-party-service/penny/onramp"; + return (await this.executeRequest(path, "POST", request)) as CreateAlfredpayOnrampResponse; + } + + public async getOnrampTransaction(transactionId: string): Promise { + const path = `/api/v1/third-party-service/penny/onramp/${transactionId}`; + return (await this.executeRequest(path, "GET")) as GetAlfredpayOnrampTransactionResponse; + } + + public async createOfframp(request: CreateAlfredpayOfframpRequest): Promise { + const path = "/api/v1/third-party-service/penny/offramp"; + return (await this.executeRequest(path, "POST", request)) as CreateAlfredpayOfframpResponse; + } + + public async getOfframpTransaction(transactionId: string): Promise { + const path = `/api/v1/third-party-service/penny/offramp/${transactionId}`; + return (await this.executeRequest(path, "GET")) as CreateAlfredpayOfframpResponse; + } + + public async createAchFiatAccount( + customerId: string, + fiatAccountFields: AlfredpayFiatAccountFields + ): Promise { + const payload: CreateAlfredpayFiatAccountRequest = { + customerId, + fiatAccountFields, + type: AlfredpayFiatAccountType.ACH + }; + const path = "/api/v1/third-party-service/penny/fiatAccounts"; + return (await this.executeRequest(path, "POST", payload)) as CreateAlfredpayFiatAccountResponse; + } +} diff --git a/packages/shared/src/services/alfredpay/index.ts b/packages/shared/src/services/alfredpay/index.ts new file mode 100644 index 000000000..b28ebfbd0 --- /dev/null +++ b/packages/shared/src/services/alfredpay/index.ts @@ -0,0 +1,2 @@ +export * from "./alfredpayApiService"; +export * from "./types"; diff --git a/packages/shared/src/services/alfredpay/types.ts b/packages/shared/src/services/alfredpay/types.ts new file mode 100644 index 000000000..4789223bc --- /dev/null +++ b/packages/shared/src/services/alfredpay/types.ts @@ -0,0 +1,324 @@ +export enum AlfredpayCustomerType { + INDIVIDUAL = "INDIVIDUAL", + BUSINESS = "BUSINESS" +} + +export type AlfredPayType = AlfredpayCustomerType; +export const AlfredPayType = AlfredpayCustomerType; + +export enum AlfredPayStatus { + Consulted = "CONSULTED", + LinkOpened = "LINK_OPENED", + UserCompleted = "USER_COMPLETED", + Verifying = "VERIFYING", + Failed = "FAILED", + Success = "SUCCESS" +} + +export enum AlfredPayCountry { + MX = "MX", // Mexico + AR = "AR", // Argentina + BR = "BR", // Brazil + CO = "CO", // Colombia + DO = "DO", // Dominican Republic + US = "US", // United States + CN = "CN", // China + HK = "HK", // Hong Kong + CL = "CL", // Chile + PE = "PE", // Peru + BO = "BO" // Bolivia +} + +export interface CreateAlfredpayCustomerRequest { + type: AlfredpayCustomerType; + country: string; +} + +export interface CreateAlfredpayCustomerResponse { + customerId: string; + createdAt: string; +} + +export interface FindAlfredpayCustomerResponse { + customerId: string; + country: string; + createdAt: string; + type: string; +} + +export interface GetKycRedirectLinkResponse { + verification_url: string; + submissionId: string; +} + +export type GetKybRedirectLinkResponse = GetKycRedirectLinkResponse; + +export enum AlfredpayKycStatus { + COMPLETED = "COMPLETED", + FAILED = "FAILED", + IN_REVIEW = "IN_REVIEW", + UPDATE_REQUIRED = "UPDATE_REQUIRED", + CREATED = "CREATED" +} + +export type AlfredpayKybStatus = AlfredpayKycStatus; +export const AlfredpayKybStatus = AlfredpayKycStatus; + +export interface GetKycStatusResponse { + status: AlfredpayKycStatus; + updatedAt: string; + metadata?: { + failureReason?: string; + requiredFields?: string[]; + } | null; +} + +export interface GetKybStatusResponse { + status: AlfredpayKybStatus; + updatedAt: string; + metadata?: { + failureReason?: string; + requiredFields?: string[]; + } | null; +} + +export interface GetKycSubmissionResponse { + submissionId: string; + createdAt: string; +} + +export type GetKybSubmissionResponse = GetKycSubmissionResponse; + +export interface RetryKycSubmissionResponse { + message: string; +} + +export type RetryKybSubmissionResponse = RetryKycSubmissionResponse; + +export enum AlfredpayOnChainCurrency { + USDC = "USDC", + USDT = "USDT" +} + +export enum AlfredpayFiatCurrency { + HK_USD = "HK_USD", + GTQ = "GTQ", + HKD = "HKD", + MXN = "MXN", + ARS = "ARS", + BRL = "BRL", + COP = "COP", + USD = "USD", + DOP = "DOP", + CNY = "CNY", + CLP = "CLP", + BOB = "BOB" +} + +export type AlfredpayCurrency = AlfredpayOnChainCurrency | AlfredpayFiatCurrency; + +export enum AlfredpayChain { + ETH = "ETH", + MATIC = "MATIC", + XLM = "XLM", + OP = "OP", + ARB = "ARB", + BASE = "BASE", + TRX = "TRX", + SOL = "SOL", + CELO = "CELO", + AVAX = "AVAX", + BNB = "BNB" +} + +export enum AlfredpayPaymentMethodType { + BANK = "BANK" +} + +export interface AlfredpayQuoteMetadata { + businessId: string; + customerId: string; + [key: string]: unknown; +} + +interface AlfredpayBaseQuoteRequest { + fromCurrency: FromCurrency; + toCurrency: ToCurrency; + fromAmount?: string; + toAmount?: string; + chain?: AlfredpayChain; + paymentMethodType: AlfredpayPaymentMethodType; + metadata: AlfredpayQuoteMetadata; +} + +export type CreateAlfredpayOnrampQuoteRequest = AlfredpayBaseQuoteRequest; + +export type CreateAlfredpayOfframpQuoteRequest = AlfredpayBaseQuoteRequest; + +export enum AlfredpayFeeType { + COMMISSION_FEE = "commissionFee", + PROCESSING_FEE = "processingFee", + TAX_FEE = "taxFee", + NETWORK_FEE = "networkFee" +} + +export interface AlfredpayFee { + type: AlfredpayFeeType; + amount: string; + currency: string; +} + +interface AlfredpayBaseQuoteResponse { + quoteId: string; + fromCurrency: FromCurrency; + toCurrency: ToCurrency; + fromAmount: string; + toAmount: string; + chain?: AlfredpayChain; + paymentMethodType: AlfredpayPaymentMethodType; + expiration: string; + fees: AlfredpayFee[]; + rate: string; + metadata: Record; +} + +export type AlfredpayOnrampQuote = AlfredpayBaseQuoteResponse; +export type AlfredpayOfframpQuote = AlfredpayBaseQuoteResponse; + +export interface CreateAlfredpayOnrampRequest { + customerId: string; + quoteId: string; + fromCurrency: AlfredpayFiatCurrency; + toCurrency: AlfredpayOnChainCurrency; + amount: string; + chain: AlfredpayChain; + paymentMethodType: AlfredpayPaymentMethodType; + depositAddress: string; +} + +export interface CreateAlfredpayOfframpRequest { + customerId: string; + quoteId: string; + fromCurrency: AlfredpayOnChainCurrency; + toCurrency: AlfredpayFiatCurrency; + amount: string; + chain: AlfredpayChain; + fiatAccountId: string; + memo?: string; + originAddress: string; +} + +// TODO: Define actual offramp statuses when the offramp flow is implemented +export enum AlfredpayOfframpStatus { + PENDING = "PENDING", + COMPLETED = "COMPLETED", + FAILED = "FAILED" +} + +export enum AlfredpayOnrampStatus { + CREATED = "CREATED", + FIAT_DEPOSIT_RECEIVED = "FIAT_DEPOSIT_RECEIVED", + TRADE_COMPLETED = "TRADE_COMPLETED", + ON_CHAIN_INITIATED = "ON_CHAIN_INITIATED", + ON_CHAIN_COMPLETED = "ON_CHAIN_COMPLETED", + FAILED = "FAILED" +} + +export interface AlfredpayOnrampStatusMetadata { + txHash?: string; + failureReason?: string; +} + +interface AlfredpayBaseTransaction { + transactionId: string; + customerId: string; + createdAt: string; + updatedAt: string; + quoteId: string; + fromCurrency: string; + toCurrency: string; + fromAmount: string; + toAmount: string; + chain: string; + depositAddress: string; +} + +export interface AlfredpayOnrampTransaction extends AlfredpayBaseTransaction { + status: AlfredpayOnrampStatus; + email: string; + paymentMethodType: AlfredpayPaymentMethodType; + txHash: string | null; + externalId: string; + memo: string; + metadata?: AlfredpayOnrampStatusMetadata | null; + quote: AlfredpayOnrampQuote; +} + +export interface AlfredpayOfframpTransaction extends AlfredpayBaseTransaction { + status: AlfredpayOfframpStatus; + fiatAccountId: string; + memo?: string; + expiration: string; + quote: AlfredpayOfframpQuote; +} + +export interface AlfredpayFiatPaymentInstructions { + paymentType: string; + clabe?: string; + reference?: string; + expirationDate?: string; + bankName?: string; + accountHolderName?: string; + //wildcard + [key: string]: unknown; +} + +export interface GetAlfredpayOnrampTransactionResponse extends AlfredpayOnrampTransaction { + fiatPaymentInstructions: AlfredpayFiatPaymentInstructions; +} + +export interface CreateAlfredpayOnrampResponse { + transaction: AlfredpayOnrampTransaction; + fiatPaymentInstructions: AlfredpayFiatPaymentInstructions; +} + +export type CreateAlfredpayOfframpResponse = AlfredpayOfframpTransaction; + +export enum AlfredpayFiatAccountType { + SPEI = "SPEI", + PIX = "PIX", + COELSA = "COELSA", + ACH = "ACH", + ACH_DOM = "ACH_DOM", + BANK_CN = "BANK_CN", + BANK_USA = "BANK_USA", + ACH_CHL = "ACH_CHL", + ACH_BOL = "ACH_BOL", + B89 = "B89" +} + +export interface AlfredpayFiatAccountFields { + accountNumber: string; + accountType: string; + accountName: string; + accountBankCode: string; + accountAlias: string; + networkIdentifier: string; + bankStreet?: string; + bankCity?: string; + bankState?: string; + bankCountry?: string; + bankPostalCode?: string; + routingNumber?: string; + isExternal?: boolean; +} + +export interface CreateAlfredpayFiatAccountRequest { + customerId: string; + type: AlfredpayFiatAccountType; + fiatAccountFields: AlfredpayFiatAccountFields; +} + +export interface CreateAlfredpayFiatAccountResponse { + fiatAccountId: string; +} diff --git a/packages/shared/src/services/index.ts b/packages/shared/src/services/index.ts index e7a3b2711..9caa39bb4 100644 --- a/packages/shared/src/services/index.ts +++ b/packages/shared/src/services/index.ts @@ -1,3 +1,4 @@ +export * from "./alfredpay"; export * from "./brla"; export * from "./evm"; export * from "./nabla"; diff --git a/packages/shared/src/services/squidrouter/onramp.ts b/packages/shared/src/services/squidrouter/onramp.ts index 8ab19d64a..5307e0eb3 100644 --- a/packages/shared/src/services/squidrouter/onramp.ts +++ b/packages/shared/src/services/squidrouter/onramp.ts @@ -107,7 +107,7 @@ export async function createOnrampSquidrouterTransactionsFromPolygonToEvm( const { route } = routeResult.data; const { approveData, swapData, squidRouterQuoteId } = await createTransactionDataFromRoute({ - inputTokenErc20Address: ERC20_EURE_POLYGON_V1, + inputTokenErc20Address: params.fromToken, publicClient: polygonClient, rawAmount: params.rawAmount, route, diff --git a/packages/shared/src/tokens/constants/misc.ts b/packages/shared/src/tokens/constants/misc.ts index 848f5b1d0..9d4f1e81c 100644 --- a/packages/shared/src/tokens/constants/misc.ts +++ b/packages/shared/src/tokens/constants/misc.ts @@ -19,9 +19,15 @@ export const DEFAULT_LOGIN_EXPIRATION_TIME_HOURS = 7 * 24; // Constants relevant for the Monerium ramps export const ERC20_EURE_POLYGON_V1: `0x${string}` = "0x18ec0A6E18E5bc3784fDd3a3634b31245ab704F6"; // EUR.e on Polygon +export const ERC20_USDC_POLYGON: `0x${string}` = "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"; // USDC on Polygon // We are currently using both V1 and V2 addresses for EUR.e on Polygon, as Squidrouter uses V1 (presumably, due to pools). // V2 is used for the permit - transferFrom flow. // The token balances are synced between both contracts. export const ERC20_EURE_POLYGON_V2: `0x${string}` = "0xE0aEa583266584DafBB3f9C3211d5588c73fEa8d"; // EUR.e on Polygon V2 export const ERC20_EURE_POLYGON_TOKEN_NAME = "Monerium EURe"; export const ERC20_EURE_POLYGON_DECIMALS = 18; // EUR.e on Polygon has 18 decimals + +export const ERC20_USDC_POLYGON_DECIMALS = 6; // USDC on Polygon has 6 decimals +export const ERC20_USDT_POLYGON_DECIMALS = 6; // USDT on Polygon has 6 decimals + +export const SQUDROUTER_MAIN_CONTRACT_POLYGON = "0xce16F69375520ab01377ce7B88f5BA8C48F8D666"; diff --git a/packages/shared/src/tokens/freeTokens/config.ts b/packages/shared/src/tokens/freeTokens/config.ts new file mode 100644 index 000000000..22e90b2e0 --- /dev/null +++ b/packages/shared/src/tokens/freeTokens/config.ts @@ -0,0 +1,23 @@ +/** + * Free token configuration (not bound to any network) + */ + +import { PENDULUM_USDC_ASSETHUB } from "../pendulum/config"; +import { FiatCurrencyDetails, FiatToken, TokenType } from "../types/base"; + +export const freeTokenConfig: Partial> = { + [FiatToken.USD]: { + assetSymbol: "USD", + decimals: 1, + fiat: { + assetIcon: "usd", + name: "US Dollar", + symbol: "USD" + }, // TODO find these values with Alfredpay + maxBuyAmountRaw: "10000000000", + maxSellAmountRaw: "100000000000000000000", + minBuyAmountRaw: "1", + minSellAmountRaw: "0.01", + type: TokenType.Fiat + } +}; diff --git a/packages/shared/src/tokens/index.ts b/packages/shared/src/tokens/index.ts index e072299a8..addec39cb 100644 --- a/packages/shared/src/tokens/index.ts +++ b/packages/shared/src/tokens/index.ts @@ -10,6 +10,7 @@ export * from "./constants/misc"; export * from "./evm/config"; // Dynamic tokens - must be exported AFTER all dependencies (config, pendulum/config, etc.) export * from "./evm/dynamicEvmTokens"; +export * from "./freeTokens/config"; export * from "./moonbeam/config"; export * from "./pendulum/config"; export * from "./stellar/config"; diff --git a/packages/shared/src/tokens/types/base.ts b/packages/shared/src/tokens/types/base.ts index 19250c380..58535f7e0 100644 --- a/packages/shared/src/tokens/types/base.ts +++ b/packages/shared/src/tokens/types/base.ts @@ -1,16 +1,19 @@ import { EvmToken } from "./evm"; +import { PendulumTokenDetails } from "./pendulum"; export enum TokenType { Evm = "evm", AssetHub = "assethub", Stellar = "stellar", - Moonbeam = "moonbeam" + Moonbeam = "moonbeam", + Fiat = "fiat" } export enum FiatToken { EURC = "EUR", ARS = "ARS", - BRL = "BRL" + BRL = "BRL", + USD = "USD" } export enum AssetHubToken { @@ -50,3 +53,7 @@ export interface BaseFiatTokenDetails { buyFeesBasisPoints?: number; buyFeesFixedComponent?: number; } + +export interface FiatCurrencyDetails extends BaseTokenDetails, BaseFiatTokenDetails { + type: TokenType.Fiat; +} diff --git a/packages/shared/src/tokens/utils/helpers.ts b/packages/shared/src/tokens/utils/helpers.ts index 82f3b2de8..48447d8ae 100644 --- a/packages/shared/src/tokens/utils/helpers.ts +++ b/packages/shared/src/tokens/utils/helpers.ts @@ -7,9 +7,10 @@ import logger from "../../logger"; import { assetHubTokenConfig } from "../assethub/config"; import { evmTokenConfig } from "../evm/config"; import { getEvmTokenConfig } from "../evm/dynamicEvmTokens"; +import { freeTokenConfig } from "../freeTokens/config"; import { moonbeamTokenConfig } from "../moonbeam/config"; import { stellarTokenConfig } from "../stellar/config"; -import { AssetHubToken, FiatToken, OnChainToken, OnChainTokenSymbol, RampCurrency } from "../types/base"; +import { AssetHubToken, FiatToken, OnChainToken, OnChainTokenSymbol, RampCurrency, TokenType } from "../types/base"; import { EvmToken, EvmTokenDetails } from "../types/evm"; import { MoonbeamTokenDetails } from "../types/moonbeam"; import { PendulumTokenDetails } from "../types/pendulum"; @@ -112,7 +113,7 @@ export function getAnyFiatTokenDetailsMoonbeam(fiatToken: FiatToken): MoonbeamTo * Get any fiat token details (Stellar or Moonbeam) */ export function getAnyFiatTokenDetails(fiatToken: FiatToken): FiatTokenDetails { - const tokenDetails = stellarTokenConfig[fiatToken] || moonbeamTokenConfig[fiatToken]; + const tokenDetails = stellarTokenConfig[fiatToken] || moonbeamTokenConfig[fiatToken] || freeTokenConfig[fiatToken]; if (!tokenDetails) { throw new Error(`Invalid fiat token type: ${fiatToken}. Token type is not Stellar or Moonbeam.`); } @@ -142,6 +143,9 @@ export function isFiatTokenEnum(token: string): token is FiatToken { */ export function getPendulumCurrencyId(fiatToken: FiatToken) { const tokenDetails = getAnyFiatTokenDetails(fiatToken); + if (tokenDetails.type === TokenType.Fiat) { + throw new Error(`Invalid token type: ${tokenDetails.type}. Fiat currency does not have pendulum representative.`); + } return tokenDetails.pendulumRepresentative.currencyId; } @@ -155,7 +159,7 @@ export function getPendulumDetails(tokenType: RampCurrency, network?: Networks): ? getOnChainTokenDetailsOrDefault(network, tokenType as OnChainToken) : undefined; - if (!tokenDetails) { + if (!tokenDetails || tokenDetails.type === TokenType.Fiat) { throw new Error("Invalid token provided for pendulum details."); } diff --git a/packages/shared/src/tokens/utils/typeGuards.ts b/packages/shared/src/tokens/utils/typeGuards.ts index 497056cad..3f316fdc6 100644 --- a/packages/shared/src/tokens/utils/typeGuards.ts +++ b/packages/shared/src/tokens/utils/typeGuards.ts @@ -3,15 +3,19 @@ */ import { AssetHubTokenDetails } from "../types/assethub"; -import { AssetHubToken, FiatToken, OnChainToken, TokenType } from "../types/base"; +import { AssetHubToken, FiatCurrencyDetails, FiatToken, OnChainToken, TokenType } from "../types/base"; import { EvmToken, EvmTokenDetails } from "../types/evm"; import { MoonbeamTokenDetails } from "../types/moonbeam"; import { StellarTokenDetails } from "../types/stellar"; import { normalizeTokenSymbol } from "./normalization"; - -export type TokenDetails = EvmTokenDetails | AssetHubTokenDetails | StellarTokenDetails | MoonbeamTokenDetails; +export type TokenDetails = + | EvmTokenDetails + | AssetHubTokenDetails + | StellarTokenDetails + | MoonbeamTokenDetails + | FiatCurrencyDetails; export type OnChainTokenDetails = EvmTokenDetails | AssetHubTokenDetails; -export type FiatTokenDetails = StellarTokenDetails | MoonbeamTokenDetails; +export type FiatTokenDetails = StellarTokenDetails | MoonbeamTokenDetails | FiatCurrencyDetails; export type OnChainTokenDetailsWithBalance = OnChainTokenDetails & { balance: string; @@ -46,6 +50,10 @@ export function isMoonbeamTokenDetails(token: TokenDetails): token is MoonbeamTo return token.type === TokenType.Moonbeam; } +export function isFiatCurrencyDetails(token: TokenDetails): token is FiatCurrencyDetails { + return token.type === TokenType.Fiat; +} + /** * Type guard for on-chain tokens */ @@ -57,15 +65,13 @@ export function isOnChainTokenDetails(token: TokenDetails): token is OnChainToke * Type guard for fiat tokens */ export function isFiatTokenDetails(token: TokenDetails): token is FiatTokenDetails { - return isStellarTokenDetails(token) || isMoonbeamTokenDetails(token); + return isStellarTokenDetails(token) || isMoonbeamTokenDetails(token) || isFiatCurrencyDetails(token); } /** * Type guard for Stellar output token details */ -export function isStellarOutputTokenDetails( - tokenDetails: StellarTokenDetails | MoonbeamTokenDetails -): tokenDetails is StellarTokenDetails { +export function isStellarOutputTokenDetails(tokenDetails: Partial): tokenDetails is StellarTokenDetails { return tokenDetails.type === TokenType.Stellar; } diff --git a/tsconfig.json b/tsconfig.json index 071c97d1f..0aaf07136 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,5 +24,12 @@ "strict": true, "target": "ESNext", "verbatimModuleSyntax": false - } + }, + "exclude": [ + "node_modules", + "**/dist/**", + "contracts/*/artifacts/**", + "contracts/*/cache/**", + "contracts/*/typechain-types/**" + ] }