From 5f473576428b11b0deeb6e5fe9ccb06de06e0d88 Mon Sep 17 00:00:00 2001 From: Elena Izaguirre Date: Fri, 3 Sep 2021 09:44:15 +0200 Subject: [PATCH] feat(core): add installOpenapiValidationMiddleware This method allows us to re-use the API server's internal mechanisms to configure the OpenAPI spec validation in test cases where we cannot depend on the API server itself due to circular dependencies. So this method is designed to be used both by the API server and the test cases at the same time. Closes: #847 --- .../carbon-accounting-plugin.ts | 6 + .../supply-chain-cactus-plugin.ts | 5 + .../typescript/plugin-object-store-ipfs.ts | 6 + packages/cactus-cmd-api-server/package.json | 2 +- .../src/main/typescript/api-server.ts | 20 +- .../plugin-ledger-connector-stub.ts | 4 + .../web-service/i-plugin-web-service.ts | 4 +- packages/cactus-core/package.json | 1 + .../src/main/typescript/public-api.ts | 3 + .../install-open-api-validator-middleware.ts | 66 + .../typescript/plugin-consortium-manual.ts | 6 + .../typescript/plugin-htlc-eth-besu-erc20.ts | 6 + .../main/typescript/plugin-htlc-eth-besu.ts | 6 + .../main/typescript/plugin-keychain-aws-sm.ts | 6 + .../typescript/plugin-keychain-azure-kv.ts | 6 + .../typescript/plugin-keychain-google-sm.ts | 6 + .../main/typescript/plugin-keychain-memory.ts | 6 + .../plugin-keychain-vault-remote-adapter.ts | 6 + .../main/typescript/plugin-keychain-vault.ts | 6 + .../plugin-ledger-connector-besu.ts | 6 + .../plugin-ledger-connector-corda.ts | 6 + .../plugin-ledger-connector-fabric.ts | 6 + .../plugin-ledger-connector-iroha.ts | 6 + .../plugin-ledger-connector-quorum.ts | 6 + .../plugin-ledger-connector-xdai.ts | 6 + .../hello-world-contract/HelloWorld.json | 5619 +++++++++++++++++ .../hello-world-contract/HelloWorld.sol | 40 + .../tsconfig.json | 3 +- yarn.lock | 492 +- 29 files changed, 6334 insertions(+), 27 deletions(-) create mode 100644 packages/cactus-core/src/main/typescript/web-services/install-open-api-validator-middleware.ts create mode 100644 packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json create mode 100644 packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/carbon-accounting-plugin.ts b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/carbon-accounting-plugin.ts index fb6f9f77d8b..446023817a0 100644 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/carbon-accounting-plugin.ts +++ b/examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/carbon-accounting-plugin.ts @@ -5,6 +5,8 @@ import { Optional } from "typescript-optional"; import { Express } from "express"; import { v4 as uuidv4 } from "uuid"; +import OAS from "../../json/openapi.json"; + import { Logger, Checks, @@ -101,6 +103,10 @@ export class CarbonAccountingPlugin this.instanceId = options.instanceId; } + public getOpenApiSpec(): unknown { + return OAS; + } + async registerWebServices(app: Express): Promise { const webServices = await this.getOrCreateWebServices(); webServices.forEach((ws) => ws.registerExpress(app)); diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/supply-chain-cactus-plugin.ts b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/supply-chain-cactus-plugin.ts index 18821af91f6..928300d76d1 100644 --- a/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/supply-chain-cactus-plugin.ts +++ b/examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/supply-chain-cactus-plugin.ts @@ -2,6 +2,7 @@ import type { Server } from "http"; import type { Server as SecureServer } from "https"; import { Optional } from "typescript-optional"; import { Express } from "express"; +import OAS from "../../json/openapi.json"; import { Logger, Checks, @@ -78,6 +79,10 @@ export class SupplyChainCactusPlugin this.instanceId = options.instanceId; } + public getOpenApiSpec(): unknown { + return OAS; + } + async registerWebServices(app: Express): Promise { const webServices = await this.getOrCreateWebServices(); await Promise.all(webServices.map((ws) => ws.registerExpress(app))); diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts index 3e0b5c4c843..196a1d69b84 100644 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts +++ b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts @@ -20,6 +20,8 @@ import type { SetObjectResponseV1, } from "@hyperledger/cactus-core-api"; +import OAS from "../json/openapi.json"; + import { GetObjectEndpointV1 } from "./web-services/get-object-endpoint-v1"; import { SetObjectEndpointV1 } from "./web-services/set-object-endpoint-v1"; import { HasObjectEndpointV1 } from "./web-services/has-object-endpoint-v1"; @@ -76,6 +78,10 @@ export class PluginObjectStoreIpfs implements IPluginObjectStore { this.log.info(`Created ${this.className}. InstanceID=${opts.instanceId}`); } + public getOpenApiSpec(): unknown { + return OAS; + } + public async onPluginInit(): Promise { return; // no-op } diff --git a/packages/cactus-cmd-api-server/package.json b/packages/cactus-cmd-api-server/package.json index a45d18d7c22..d2db390d934 100644 --- a/packages/cactus-cmd-api-server/package.json +++ b/packages/cactus-cmd-api-server/package.json @@ -90,7 +90,7 @@ "express": "4.17.1", "express-http-proxy": "1.6.2", "express-jwt": "6.0.0", - "express-openapi-validator": "3.10.0", + "express-openapi-validator": "4.12.12", "fs-extra": "10.0.0", "jose": "1.28.1", "lmify": "0.3.0", diff --git a/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts b/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts index 6bcf79f9cfb..0757ada57b7 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts @@ -14,7 +14,7 @@ import { Server as GrpcServer } from "@grpc/grpc-js"; import { ServerCredentials as GrpcServerCredentials } from "@grpc/grpc-js"; import type { Application, Request, Response, RequestHandler } from "express"; import express from "express"; -import { OpenApiValidator } from "express-openapi-validator"; +import { OpenAPIV3 } from "express-openapi-validator/dist/framework/types"; import compression from "compression"; import bodyParser from "body-parser"; import cors from "cors"; @@ -35,12 +35,13 @@ import { } from "@hyperledger/cactus-core-api"; import { PluginRegistry } from "@hyperledger/cactus-core"; +import { installOpenapiValidationMiddleware } from "@hyperledger/cactus-core"; import { Logger, LoggerProvider, Servers } from "@hyperledger/cactus-common"; import { ICactusApiServerOptions } from "./config/config-service"; import OAS from "../json/openapi.json"; -import { OpenAPIV3 } from "express-openapi-validator/dist/framework/types"; +// import { OpenAPIV3 } from "express-openapi-validator/dist/framework/types"; import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; import { AuthorizerFactory } from "./authzn/authorizer-factory"; @@ -606,8 +607,8 @@ export class ApiServer { this.log.info(`Authorization request handler configured OK.`); } - const openApiValidator = this.createOpenApiValidator(); - await openApiValidator.install(app); + // const openApiValidator = this.createOpenApiValidator(); + // await openApiValidator.install(app); this.getOrCreateWebServices(app); // The API server's own endpoints @@ -619,6 +620,9 @@ export class ApiServer { .map(async (plugin: ICactusPlugin) => { const p = plugin as IPluginWebService; await p.getOrCreateWebServices(); + const apiSpec = p.getOpenApiSpec() as OpenAPIV3.Document; + if (apiSpec) + await installOpenapiValidationMiddleware({ app, apiSpec, logLevel }); const webSvcs = await p.registerWebServices(app, wsApi); return webSvcs; }); @@ -683,14 +687,6 @@ export class ApiServer { } } - createOpenApiValidator(): OpenApiValidator { - return new OpenApiValidator({ - apiSpec: OAS as OpenAPIV3.Document, - validateRequests: true, - validateResponses: false, - }); - } - createCorsMiddleware(allowedDomains: string[]): RequestHandler { const allDomainsOk = allowedDomains.includes("*"); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub.ts b/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub.ts index 3030346eadc..da368569164 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/fixtures/plugin-ledger-connector-stub/plugin-ledger-connector-stub.ts @@ -66,6 +66,10 @@ export class PluginLedgerConnectorStub this.log.debug(`Instantiated ${this.className} OK`); } + public getOpenApiSpec(): unknown { + return null; + } + public getInstanceId(): string { return this.instanceId; } diff --git a/packages/cactus-core-api/src/main/typescript/plugin/web-service/i-plugin-web-service.ts b/packages/cactus-core-api/src/main/typescript/plugin/web-service/i-plugin-web-service.ts index b48aa506d94..2eb01301272 100644 --- a/packages/cactus-core-api/src/main/typescript/plugin/web-service/i-plugin-web-service.ts +++ b/packages/cactus-core-api/src/main/typescript/plugin/web-service/i-plugin-web-service.ts @@ -16,6 +16,7 @@ export interface IPluginWebService extends ICactusPlugin { getHttpServer(): Optional; shutdown(): Promise; + getOpenApiSpec(): unknown; } export function isIPluginWebService(x: unknown): x is IPluginWebService { @@ -26,6 +27,7 @@ export function isIPluginWebService(x: unknown): x is IPluginWebService { typeof (x as IPluginWebService).getHttpServer === "function" && typeof (x as IPluginWebService).getPackageName === "function" && typeof (x as IPluginWebService).getInstanceId === "function" && - typeof (x as IPluginWebService).shutdown === "function" + typeof (x as IPluginWebService).shutdown === "function" && + typeof (x as IPluginWebService).getOpenApiSpec === "function" ); } diff --git a/packages/cactus-core/package.json b/packages/cactus-core/package.json index 240b7ade3a3..91bdf53973d 100644 --- a/packages/cactus-core/package.json +++ b/packages/cactus-core/package.json @@ -67,6 +67,7 @@ "@hyperledger/cactus-core-api": "0.8.0", "express": "4.17.1", "express-jwt-authz": "2.4.1", + "express-openapi-validator": "4.12.12", "typescript-optional": "2.0.1" }, "devDependencies": { diff --git a/packages/cactus-core/src/main/typescript/public-api.ts b/packages/cactus-core/src/main/typescript/public-api.ts index 505be2277c2..b922fe3d247 100755 --- a/packages/cactus-core/src/main/typescript/public-api.ts +++ b/packages/cactus-core/src/main/typescript/public-api.ts @@ -11,3 +11,6 @@ export { } from "./web-services/authorization-options-provider"; export { consensusHasTransactionFinality } from "./consensus-has-transaction-finality"; + +export { IInstallOpenapiValidationMiddlewareRequest } from "./web-services/install-open-api-validator-middleware"; +export { installOpenapiValidationMiddleware } from "./web-services/install-open-api-validator-middleware"; diff --git a/packages/cactus-core/src/main/typescript/web-services/install-open-api-validator-middleware.ts b/packages/cactus-core/src/main/typescript/web-services/install-open-api-validator-middleware.ts new file mode 100644 index 00000000000..e30d258956b --- /dev/null +++ b/packages/cactus-core/src/main/typescript/web-services/install-open-api-validator-middleware.ts @@ -0,0 +1,66 @@ +import type { Application, NextFunction, Request, Response } from "express"; +import * as OpenApiValidator from "express-openapi-validator"; +import { OpenAPIV3 } from "express-openapi-validator/dist/framework/types"; + +import { + Checks, + LoggerProvider, + LogLevelDesc, +} from "@hyperledger/cactus-common"; + +export interface IInstallOpenapiValidationMiddlewareRequest { + readonly logLevel: LogLevelDesc; + readonly app: Application; + readonly apiSpec: unknown; +} + +/** + * Installs the middleware that validates openapi specifications + * @param app + * @param pluginOAS + */ +export async function installOpenapiValidationMiddleware( + req: IInstallOpenapiValidationMiddlewareRequest, +): Promise { + const fnTag = "installOpenapiValidationMiddleware"; + Checks.truthy(req, `${fnTag} req`); + Checks.truthy(req.apiSpec, `${fnTag} req.apiSpec`); + Checks.truthy(req.app, `${fnTag} req.app`); + const { app, apiSpec, logLevel } = req; + const log = LoggerProvider.getOrCreate({ + label: fnTag, + level: logLevel || "INFO", + }); + log.debug(`Installing validation for OpenAPI specs: `, apiSpec); + + app.use( + OpenApiValidator.middleware({ + apiSpec: apiSpec as OpenAPIV3.Document, + validateApiSpec: false, + }), + ); + app.use( + ( + err: { + status?: number; + errors: [ + { + path: string; + message: string; + errorCode: string; + }, + ]; + }, + req: Request, + res: Response, + next: NextFunction, + ) => { + if (err) { + res.status(err.status || 500); + res.send(err.errors); + } else { + next(); + } + }, + ); +} diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-consortium-manual.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-consortium-manual.ts index 84a6431bea3..519d43d5de4 100644 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-consortium-manual.ts +++ b/packages/cactus-plugin-consortium-manual/src/main/typescript/plugin-consortium-manual.ts @@ -8,6 +8,8 @@ import { JWS, JWK } from "jose"; import jsonStableStringify from "json-stable-stringify"; import { v4 as uuidv4 } from "uuid"; +import OAS from "../json/openapi.json"; + import { ConsortiumDatabase, IPluginWebService, @@ -98,6 +100,10 @@ export class PluginConsortiumManual this.prometheusExporter.setNodeCount(this.getNodeCount()); } + public getOpenApiSpec(): unknown { + return OAS; + } + public getInstanceId(): string { return this.instanceId; } diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-htlc-eth-besu-erc20.ts b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-htlc-eth-besu-erc20.ts index bfe4b78496b..ca59385663a 100644 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-htlc-eth-besu-erc20.ts +++ b/packages/cactus-plugin-htlc-eth-besu-erc20/src/main/typescript/plugin-htlc-eth-besu-erc20.ts @@ -4,6 +4,8 @@ import { Server as SecureServer } from "https"; import { Express } from "express"; import { Optional } from "typescript-optional"; +import OAS from "../json/openapi.json"; + import { IPluginWebService, ICactusPlugin, @@ -56,6 +58,10 @@ export class PluginHtlcEthBesuErc20 this.pluginRegistry = opts.pluginRegistry; } + public getOpenApiSpec(): unknown { + return OAS; + } + public get className(): string { return PluginHtlcEthBesuErc20.CLASS_NAME; } diff --git a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts index a70acf1da9f..a0a24015273 100644 --- a/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts +++ b/packages/cactus-plugin-htlc-eth-besu/src/main/typescript/plugin-htlc-eth-besu.ts @@ -4,6 +4,8 @@ import { Server as SecureServer } from "https"; import { Express } from "express"; import { Optional } from "typescript-optional"; +import OAS from "../json/openapi.json"; + import { IPluginWebService, ICactusPlugin, @@ -61,6 +63,10 @@ export class PluginHtlcEthBesu implements ICactusPlugin, IPluginWebService { return PluginHtlcEthBesu.CLASS_NAME; } + public getOpenApiSpec(): unknown { + return OAS; + } + /** * Feature is deprecated, we won't need this method in the future. */ diff --git a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-keychain-aws-sm.ts b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-keychain-aws-sm.ts index 67740ae2364..0e52733713a 100644 --- a/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-keychain-aws-sm.ts +++ b/packages/cactus-plugin-keychain-aws-sm/src/main/typescript/plugin-keychain-aws-sm.ts @@ -11,6 +11,8 @@ import { import type { Express } from "express"; import { Optional } from "typescript-optional"; +import OAS from "../json/openapi.json"; + import { Logger, Checks, @@ -141,6 +143,10 @@ export class PluginKeychainAwsSm this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); } + public getOpenApiSpec(): unknown { + return OAS; + } + public getAwsClient(): SecretsManager { return this.awsClient; } diff --git a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-keychain-azure-kv.ts b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-keychain-azure-kv.ts index 638e237d3c2..0b8241b1bfc 100644 --- a/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-keychain-azure-kv.ts +++ b/packages/cactus-plugin-keychain-azure-kv/src/main/typescript/plugin-keychain-azure-kv.ts @@ -4,6 +4,8 @@ import type { Server as SecureServer } from "https"; import type { Express } from "express"; import { Optional } from "typescript-optional"; +import OAS from "../json/openapi.json"; + import { Logger, Checks, @@ -124,6 +126,10 @@ export class PluginKeychainAzureKv this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); } + public getOpenApiSpec(): unknown { + return OAS; + } + async registerWebServices(app: Express): Promise { const webServices = await this.getOrCreateWebServices(); await Promise.all(webServices.map((ws) => ws.registerExpress(app))); diff --git a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-keychain-google-sm.ts b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-keychain-google-sm.ts index 868e28ad230..a0ab0bafbd1 100644 --- a/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-keychain-google-sm.ts +++ b/packages/cactus-plugin-keychain-google-sm/src/main/typescript/plugin-keychain-google-sm.ts @@ -4,6 +4,8 @@ import type { Server as SecureServer } from "https"; import type { Express } from "express"; import { Optional } from "typescript-optional"; +import OAS from "../json/openapi.json"; + import { Logger, Checks, @@ -59,6 +61,10 @@ export class PluginKeychainGoogleSm this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); } + public getOpenApiSpec(): unknown { + return OAS; + } + async registerWebServices(app: Express): Promise { const webServices = await this.getOrCreateWebServices(); await Promise.all(webServices.map((ws) => ws.registerExpress(app))); diff --git a/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-keychain-memory.ts b/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-keychain-memory.ts index 784da899763..3b1555f7b54 100644 --- a/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-keychain-memory.ts +++ b/packages/cactus-plugin-keychain-memory/src/main/typescript/plugin-keychain-memory.ts @@ -9,6 +9,8 @@ import { IWebServiceEndpoint, } from "@hyperledger/cactus-core-api"; +import OAS from "../json/openapi.json"; + import { PrometheusExporter } from "./prometheus-exporter/prometheus-exporter"; import { Express } from "express"; @@ -67,6 +69,10 @@ export class PluginKeychainMemory { ); } + public getOpenApiSpec(): unknown { + return OAS; + } + public getPrometheusExporter(): PrometheusExporter { return this.prometheusExporter; } diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault-remote-adapter.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault-remote-adapter.ts index 16bde58e844..1abe08bf077 100644 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault-remote-adapter.ts +++ b/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault-remote-adapter.ts @@ -4,6 +4,8 @@ import { Server as SecureServer } from "https"; import { Express } from "express"; import { Optional } from "typescript-optional"; +import OAS from "../json/openapi.json"; + import { Logger, Checks, @@ -71,6 +73,10 @@ export class PluginKeychainVaultRemoteAdapter this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); } + public getOpenApiSpec(): unknown { + return OAS; + } + /** * Dummy implementation that wires no web services on the host API server * because there is no need. All the functionality is implemented somewhere diff --git a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault.ts b/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault.ts index 9c7dda5a593..347b145e59b 100644 --- a/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault.ts +++ b/packages/cactus-plugin-keychain-vault/src/main/typescript/plugin-keychain-vault.ts @@ -6,6 +6,8 @@ import { Optional } from "typescript-optional"; import Vault from "node-vault"; import HttpStatus from "http-status-codes"; +import OAS from "../json/openapi.json"; + import { Logger, Checks, @@ -121,6 +123,10 @@ export class PluginKeychainVault implements IPluginWebService, IPluginKeychain { this.log.info(`Created ${this.className}. KeychainID=${opts.keychainId}`); } + public getOpenApiSpec(): unknown { + return OAS; + } + public getPrometheusExporter(): PrometheusExporter { return this.prometheusExporter; } diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts index 3deb9eb159b..ad062c72836 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts @@ -7,6 +7,8 @@ import type { Express } from "express"; import { promisify } from "util"; import { Optional } from "typescript-optional"; +import OAS from "../json/openapi.json"; + import Web3 from "web3"; import type { WebsocketProvider } from "web3-core"; @@ -162,6 +164,10 @@ export class PluginLedgerConnectorBesu this.prometheusExporter.startMetricsCollection(); } + public getOpenApiSpec(): unknown { + return OAS; + } + public getPrometheusExporter(): PrometheusExporter { return this.prometheusExporter; } diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts index c799c7403e4..b7c08652e6e 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts @@ -5,6 +5,8 @@ import { Optional } from "typescript-optional"; import { Config as SshConfig } from "node-ssh"; import { Express } from "express"; +import OAS from "../json/openapi.json"; + import { IPluginLedgerConnector, IWebServiceEndpoint, @@ -80,6 +82,10 @@ export class PluginLedgerConnectorCorda this.prometheusExporter.startMetricsCollection(); } + public getOpenApiSpec(): unknown { + return OAS; + } + public getPrometheusExporter(): PrometheusExporter { return this.prometheusExporter; } diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts index 29b0a69d79a..8b314463c86 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts @@ -26,6 +26,8 @@ import { import { Optional } from "typescript-optional"; +import OAS from "../json/openapi.json"; + import { ConsensusAlgorithmFamily, IPluginLedgerConnector, @@ -202,6 +204,10 @@ export class PluginLedgerConnectorFabric this.certStore = new CertDatastore(opts.pluginRegistry); } + public getOpenApiSpec(): unknown { + return OAS; + } + public async shutdown(): Promise { return; } diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/main/typescript/plugin-ledger-connector-iroha.ts b/packages/cactus-plugin-ledger-connector-iroha/src/main/typescript/plugin-ledger-connector-iroha.ts index 7e1a03dc6c5..8ba14975478 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/main/typescript/plugin-ledger-connector-iroha.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/main/typescript/plugin-ledger-connector-iroha.ts @@ -13,6 +13,8 @@ import { GrantablePermissionMap, } from "iroha-helpers-ts/lib/proto/primitive_pb"; +import OAS from "../json/openapi.json"; + import { ConsensusAlgorithmFamily, IPluginLedgerConnector, @@ -110,6 +112,10 @@ export class PluginLedgerConnectorIroha this.prometheusExporter.startMetricsCollection(); } + public getOpenApiSpec(): unknown { + return OAS; + } + deployContract(): Promise { throw new RuntimeError("Method not implemented."); } diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/main/typescript/plugin-ledger-connector-quorum.ts b/packages/cactus-plugin-ledger-connector-quorum/src/main/typescript/plugin-ledger-connector-quorum.ts index 79153b5e093..204e0e8e2f9 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/main/typescript/plugin-ledger-connector-quorum.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/main/typescript/plugin-ledger-connector-quorum.ts @@ -12,6 +12,8 @@ const Contract = new Web3().eth.Contract; import { ContractSendMethod } from "web3-eth-contract"; import { TransactionReceipt } from "web3-eth"; +import OAS from "../json/openapi.json"; + import { ConsensusAlgorithmFamily, IPluginLedgerConnector, @@ -123,6 +125,10 @@ export class PluginLedgerConnectorQuorum this.prometheusExporter.startMetricsCollection(); } + public getOpenApiSpec(): unknown { + return OAS; + } + public getPrometheusExporter(): PrometheusExporter { return this.prometheusExporter; } diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-ledger-connector-xdai.ts b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-ledger-connector-xdai.ts index 743c9a258a2..6e65e087e53 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-ledger-connector-xdai.ts +++ b/packages/cactus-plugin-ledger-connector-xdai/src/main/typescript/plugin-ledger-connector-xdai.ts @@ -9,6 +9,8 @@ import Web3 from "web3"; import { Contract, ContractSendMethod } from "web3-eth-contract"; import { TransactionReceipt } from "web3-eth"; +import OAS from "../json/openapi.json"; + import { ConsensusAlgorithmFamily, IPluginLedgerConnector, @@ -120,6 +122,10 @@ export class PluginLedgerConnectorXdai this.prometheusExporter.startMetricsCollection(); } + public getOpenApiSpec(): unknown { + return OAS; + } + public async hasTransactionFinality(): Promise { const consensusAlgorithmFamily = await this.getConsensusAlgorithmFamily(); return consensusHasTransactionFinality(consensusAlgorithmFamily); diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json b/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json new file mode 100644 index 00000000000..286294b9964 --- /dev/null +++ b/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.json @@ -0,0 +1,5619 @@ +{ + "contractName": "HelloWorld", + "abi": [ + { + "inputs": [], + "name": "sayHello", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getNameByIndex", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "newName", + "type": "string" + } + ], + "name": "setName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getNameByIndex\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sayHello\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":\"HelloWorld\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol\":{\"keccak256\":\"0x1e97027d32e8c3433b793d7b2b45e30ea2d341c96a3943508ba068dea106efab\",\"urls\":[\"bzz-raw://96e37a0bb119b1fe14a4e71627c077b180f4deb9acc4284aa987a3ca1a6f45b1\",\"dweb:/ipfs/QmTAiGsxb38hMgDgbrtLLdYxc76CposiN9moBuJXAg2Mgk\"]}},\"version\":1}", + "bytecode": "60806040526040518060400160405280600d81526020017f4361707461696e436163747573000000000000000000000000000000000000008152506000908051906020019061004f929190610062565b5034801561005c57600080fd5b50610166565b82805461006e90610105565b90600052602060002090601f01602090048101928261009057600085556100d7565b82601f106100a957805160ff19168380011785556100d7565b828001600101855582156100d7579182015b828111156100d65782518255916020019190600101906100bb565b5b5090506100e491906100e8565b5090565b5b808211156101015760008160009055506001016100e9565b5090565b6000600282049050600182168061011d57607f821691505b6020821081141561013157610130610137565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b61082c806101756000396000f3fe60806040526004361061004a5760003560e01c806317d7de7c1461004f57806359c293f11461007a578063c47f0027146100b7578063d0e30db0146100e0578063ef5fb05b146100ea575b600080fd5b34801561005b57600080fd5b50610064610115565b60405161007191906105ae565b60405180910390f35b34801561008657600080fd5b506100a1600480360381019061009c919061050c565b6101a7565b6040516100ae91906105ae565b60405180910390f35b3480156100c357600080fd5b506100de60048036038101906100d991906104cb565b61027d565b005b6100e86102d3565b005b3480156100f657600080fd5b506100ff61036e565b60405161010c91906105ae565b60405180910390f35b6060600080546101249061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546101509061070f565b801561019d5780601f106101725761010080835404028352916020019161019d565b820191906000526020600020905b81548152906001019060200180831161018057829003601f168201915b5050505050905090565b6060600282815481106101e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101f89061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546102249061070f565b80156102715780601f1061024657610100808354040283529160200191610271565b820191906000526020600020905b81548152906001019060200180831161025457829003601f168201915b50505050509050919050565b80600090805190602001906102939291906103ab565b506002819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102cf9291906103ab565b5050565b60003411610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d906105d0565b60405180910390fd5b34600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610365919061066d565b92505081905550565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546103b79061070f565b90600052602060002090601f0160209004810192826103d95760008555610420565b82601f106103f257805160ff1916838001178555610420565b82800160010185558215610420579182015b8281111561041f578251825591602001919060010190610404565b5b50905061042d9190610431565b5090565b5b8082111561044a576000816000905550600101610432565b5090565b600061046161045c84610621565b6105f0565b90508281526020810184848401111561047957600080fd5b6104848482856106cd565b509392505050565b600082601f83011261049d57600080fd5b81356104ad84826020860161044e565b91505092915050565b6000813590506104c5816107df565b92915050565b6000602082840312156104dd57600080fd5b600082013567ffffffffffffffff8111156104f757600080fd5b6105038482850161048c565b91505092915050565b60006020828403121561051e57600080fd5b600061052c848285016104b6565b91505092915050565b600061054082610651565b61054a818561065c565b935061055a8185602086016106dc565b610563816107ce565b840191505092915050565b600061057b601b8361065c565b91507f56616c7565206d757374206265206469666572656e74206f66203000000000006000830152602082019050919050565b600060208201905081810360008301526105c88184610535565b905092915050565b600060208201905081810360008301526105e98161056e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156106175761061661079f565b5b8060405250919050565b600067ffffffffffffffff82111561063c5761063b61079f565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610678826106c3565b9150610683836106c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106b8576106b7610741565b5b828201905092915050565b6000819050919050565b82818337600083830152505050565b60005b838110156106fa5780820151818401526020810190506106df565b83811115610709576000848401525b50505050565b6000600282049050600182168061072757607f821691505b6020821081141561073b5761073a610770565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6107e8816106c3565b81146107f357600080fd5b5056fea2646970667358221220450aa5d16069485df7d037ffe43b6593e232f4ac514d9169ba271384cc5d841964736f6c63430008000033", + "deployedBytecode": "60806040526004361061004a5760003560e01c806317d7de7c1461004f57806359c293f11461007a578063c47f0027146100b7578063d0e30db0146100e0578063ef5fb05b146100ea575b600080fd5b34801561005b57600080fd5b50610064610115565b60405161007191906105ae565b60405180910390f35b34801561008657600080fd5b506100a1600480360381019061009c919061050c565b6101a7565b6040516100ae91906105ae565b60405180910390f35b3480156100c357600080fd5b506100de60048036038101906100d991906104cb565b61027d565b005b6100e86102d3565b005b3480156100f657600080fd5b506100ff61036e565b60405161010c91906105ae565b60405180910390f35b6060600080546101249061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546101509061070f565b801561019d5780601f106101725761010080835404028352916020019161019d565b820191906000526020600020905b81548152906001019060200180831161018057829003601f168201915b5050505050905090565b6060600282815481106101e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200180546101f89061070f565b80601f01602080910402602001604051908101604052809291908181526020018280546102249061070f565b80156102715780601f1061024657610100808354040283529160200191610271565b820191906000526020600020905b81548152906001019060200180831161025457829003601f168201915b50505050509050919050565b80600090805190602001906102939291906103ab565b506002819080600181540180825580915050600190039060005260206000200160009091909190915090805190602001906102cf9291906103ab565b5050565b60003411610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d906105d0565b60405180910390fd5b34600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610365919061066d565b92505081905550565b60606040518060400160405280600c81526020017f48656c6c6f20576f726c64210000000000000000000000000000000000000000815250905090565b8280546103b79061070f565b90600052602060002090601f0160209004810192826103d95760008555610420565b82601f106103f257805160ff1916838001178555610420565b82800160010185558215610420579182015b8281111561041f578251825591602001919060010190610404565b5b50905061042d9190610431565b5090565b5b8082111561044a576000816000905550600101610432565b5090565b600061046161045c84610621565b6105f0565b90508281526020810184848401111561047957600080fd5b6104848482856106cd565b509392505050565b600082601f83011261049d57600080fd5b81356104ad84826020860161044e565b91505092915050565b6000813590506104c5816107df565b92915050565b6000602082840312156104dd57600080fd5b600082013567ffffffffffffffff8111156104f757600080fd5b6105038482850161048c565b91505092915050565b60006020828403121561051e57600080fd5b600061052c848285016104b6565b91505092915050565b600061054082610651565b61054a818561065c565b935061055a8185602086016106dc565b610563816107ce565b840191505092915050565b600061057b601b8361065c565b91507f56616c7565206d757374206265206469666572656e74206f66203000000000006000830152602082019050919050565b600060208201905081810360008301526105c88184610535565b905092915050565b600060208201905081810360008301526105e98161056e565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156106175761061661079f565b5b8060405250919050565b600067ffffffffffffffff82111561063c5761063b61079f565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000610678826106c3565b9150610683836106c3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106b8576106b7610741565b5b828201905092915050565b6000819050919050565b82818337600083830152505050565b60005b838110156106fa5780820151818401526020810190506106df565b83811115610709576000848401525b50505050565b6000600282049050600182168061072757607f821691505b6020821081141561073b5761073a610770565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6107e8816106c3565b81146107f357600080fd5b5056fea2646970667358221220450aa5d16069485df7d037ffe43b6593e232f4ac514d9169ba271384cc5d841964736f6c63430008000033", + "immutableReferences": {}, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:516:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "58:269:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "68:22:2", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "82:4:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "88:1:2", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "78:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "78:12:2" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "68:6:2" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "99:38:2", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "129:4:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "135:1:2", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "125:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "125:12:2" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulTypedName", + "src": "103:18:2", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "176:51:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "190:27:2", + "value": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "204:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "212:4:2", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "200:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "200:17:2" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "190:6:2" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "156:18:2" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "149:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "149:26:2" + }, + "nodeType": "YulIf", + "src": "146:2:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "279:42:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x22", + "nodeType": "YulIdentifier", + "src": "293:16:2" + }, + "nodeType": "YulFunctionCall", + "src": "293:18:2" + }, + "nodeType": "YulExpressionStatement", + "src": "293:18:2" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "243:18:2" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "266:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "274:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "263:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "263:14:2" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "240:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "240:38:2" + }, + "nodeType": "YulIf", + "src": "237:2:2" + } + ] + }, + "name": "extract_byte_array_length", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nodeType": "YulTypedName", + "src": "42:4:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "51:6:2", + "type": "" + } + ], + "src": "7:320:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "361:152:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "378:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "381:77:2", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "371:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "371:88:2" + }, + "nodeType": "YulExpressionStatement", + "src": "371:88:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "475:1:2", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "478:4:2", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "468:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "468:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "468:15:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "499:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "502:4:2", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "492:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "492:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "492:15:2" + } + ] + }, + "name": "panic_error_0x22", + "nodeType": "YulFunctionDefinition", + "src": "333:180:2" + } + ] + }, + "contents": "{\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n}\n", + "id": 2, + "language": "Yul", + "name": "#utility.yul" + } + ], + "deployedGeneratedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:5780:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "91:260:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "101:74:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "167:6:2" + } + ], + "functionName": { + "name": "array_allocation_size_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "125:41:2" + }, + "nodeType": "YulFunctionCall", + "src": "125:49:2" + } + ], + "functionName": { + "name": "allocateMemory", + "nodeType": "YulIdentifier", + "src": "110:14:2" + }, + "nodeType": "YulFunctionCall", + "src": "110:65:2" + }, + "variableNames": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "101:5:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "191:5:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "198:6:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "184:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "184:21:2" + }, + "nodeType": "YulExpressionStatement", + "src": "184:21:2" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "214:27:2", + "value": { + "arguments": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "229:5:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "236:4:2", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "225:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "225:16:2" + }, + "variables": [ + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "218:3:2", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "279:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "288:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "291:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "281:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "281:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "281:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "260:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "265:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "256:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "256:16:2" + }, + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "274:3:2" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "253:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "253:25:2" + }, + "nodeType": "YulIf", + "src": "250:2:2" + }, + { + "expression": { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "328:3:2" + }, + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "333:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "338:6:2" + } + ], + "functionName": { + "name": "copy_calldata_to_memory", + "nodeType": "YulIdentifier", + "src": "304:23:2" + }, + "nodeType": "YulFunctionCall", + "src": "304:41:2" + }, + "nodeType": "YulExpressionStatement", + "src": "304:41:2" + } + ] + }, + "name": "abi_decode_available_length_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "64:3:2", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "69:6:2", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "77:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "array", + "nodeType": "YulTypedName", + "src": "85:5:2", + "type": "" + } + ], + "src": "7:344:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "433:211:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "482:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "491:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "494:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "484:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "484:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "484:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "461:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "469:4:2", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "457:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "457:17:2" + }, + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "476:3:2" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "453:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "453:27:2" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "446:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "446:35:2" + }, + "nodeType": "YulIf", + "src": "443:2:2" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "507:34:2", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "534:6:2" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "521:12:2" + }, + "nodeType": "YulFunctionCall", + "src": "521:20:2" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "511:6:2", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "550:88:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "611:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "619:4:2", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "607:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "607:17:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "626:6:2" + }, + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "634:3:2" + } + ], + "functionName": { + "name": "abi_decode_available_length_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "559:47:2" + }, + "nodeType": "YulFunctionCall", + "src": "559:79:2" + }, + "variableNames": [ + { + "name": "array", + "nodeType": "YulIdentifier", + "src": "550:5:2" + } + ] + } + ] + }, + "name": "abi_decode_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "411:6:2", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "419:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "array", + "nodeType": "YulTypedName", + "src": "427:5:2", + "type": "" + } + ], + "src": "371:273:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "702:87:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "712:29:2", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "734:6:2" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "721:12:2" + }, + "nodeType": "YulFunctionCall", + "src": "721:20:2" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "712:5:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "777:5:2" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "750:26:2" + }, + "nodeType": "YulFunctionCall", + "src": "750:33:2" + }, + "nodeType": "YulExpressionStatement", + "src": "750:33:2" + } + ] + }, + "name": "abi_decode_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "680:6:2", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "688:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "696:5:2", + "type": "" + } + ], + "src": "650:139:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "871:299:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "917:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "926:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "929:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "919:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "919:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "919:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "892:7:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "901:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "888:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "888:23:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "913:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "884:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "884:32:2" + }, + "nodeType": "YulIf", + "src": "881:2:2" + }, + { + "nodeType": "YulBlock", + "src": "943:220:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "958:45:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "989:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1000:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "985:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "985:17:2" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "972:12:2" + }, + "nodeType": "YulFunctionCall", + "src": "972:31:2" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "962:6:2", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1050:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1059:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1062:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1052:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1052:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1052:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1022:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1030:18:2", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "1019:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "1019:30:2" + }, + "nodeType": "YulIf", + "src": "1016:2:2" + }, + { + "nodeType": "YulAssignment", + "src": "1080:73:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1125:9:2" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1136:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1121:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1121:22:2" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1145:7:2" + } + ], + "functionName": { + "name": "abi_decode_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "1090:30:2" + }, + "nodeType": "YulFunctionCall", + "src": "1090:63:2" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1080:6:2" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "841:9:2", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "852:7:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "864:6:2", + "type": "" + } + ], + "src": "795:375:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1242:196:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1288:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1297:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1300:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1290:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1290:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1290:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1263:7:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1272:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "1259:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1259:23:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1284:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "1255:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1255:32:2" + }, + "nodeType": "YulIf", + "src": "1252:2:2" + }, + { + "nodeType": "YulBlock", + "src": "1314:117:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1329:15:2", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1343:1:2", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1333:6:2", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1358:63:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1393:9:2" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1404:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1389:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1389:22:2" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1413:7:2" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "1368:20:2" + }, + "nodeType": "YulFunctionCall", + "src": "1368:53:2" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1358:6:2" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1212:9:2", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "1223:7:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1235:6:2", + "type": "" + } + ], + "src": "1176:262:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1536:272:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1546:53:2", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1593:5:2" + } + ], + "functionName": { + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "1560:32:2" + }, + "nodeType": "YulFunctionCall", + "src": "1560:39:2" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1550:6:2", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1608:78:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1674:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1679:6:2" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "1615:58:2" + }, + "nodeType": "YulFunctionCall", + "src": "1615:71:2" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1608:3:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1721:5:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1728:4:2", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1717:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1717:16:2" + }, + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1735:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1740:6:2" + } + ], + "functionName": { + "name": "copy_memory_to_memory", + "nodeType": "YulIdentifier", + "src": "1695:21:2" + }, + "nodeType": "YulFunctionCall", + "src": "1695:52:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1695:52:2" + }, + { + "nodeType": "YulAssignment", + "src": "1756:46:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1767:3:2" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1794:6:2" + } + ], + "functionName": { + "name": "round_up_to_mul_of_32", + "nodeType": "YulIdentifier", + "src": "1772:21:2" + }, + "nodeType": "YulFunctionCall", + "src": "1772:29:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1763:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1763:39:2" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "1756:3:2" + } + ] + } + ] + }, + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1517:5:2", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1524:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1532:3:2", + "type": "" + } + ], + "src": "1444:364:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1960:179:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1970:74:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2036:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2041:2:2", + "type": "", + "value": "27" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "1977:58:2" + }, + "nodeType": "YulFunctionCall", + "src": "1977:67:2" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1970:3:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2065:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2070:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2061:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2061:11:2" + }, + { + "kind": "string", + "nodeType": "YulLiteral", + "src": "2074:29:2", + "type": "", + "value": "Value must be diferent of 0" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2054:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "2054:50:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2054:50:2" + }, + { + "nodeType": "YulAssignment", + "src": "2114:19:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2125:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2130:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2121:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2121:12:2" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "2114:3:2" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1948:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1956:3:2", + "type": "" + } + ], + "src": "1814:325:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2263:195:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2273:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2285:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2296:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2281:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2281:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2273:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2320:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2331:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2316:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2316:17:2" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2339:4:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2345:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2335:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2335:20:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2309:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "2309:47:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2309:47:2" + }, + { + "nodeType": "YulAssignment", + "src": "2365:86:2", + "value": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "2437:6:2" + }, + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2446:4:2" + } + ], + "functionName": { + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2373:63:2" + }, + "nodeType": "YulFunctionCall", + "src": "2373:78:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2365:4:2" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2235:9:2", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "2247:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "2258:4:2", + "type": "" + } + ], + "src": "2145:313:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2635:248:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2645:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2657:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2668:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2653:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2653:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2645:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2692:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2703:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2688:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2688:17:2" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2711:4:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2717:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2707:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2707:20:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2681:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "2681:47:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2681:47:2" + }, + { + "nodeType": "YulAssignment", + "src": "2737:139:2", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2871:4:2" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2745:124:2" + }, + "nodeType": "YulFunctionCall", + "src": "2745:131:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2737:4:2" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2615:9:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "2630:4:2", + "type": "" + } + ], + "src": "2464:419:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2929:243:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2939:19:2", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2955:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "2949:5:2" + }, + "nodeType": "YulFunctionCall", + "src": "2949:9:2" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2939:6:2" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "2967:35:2", + "value": { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2989:6:2" + }, + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "2997:4:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2985:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2985:17:2" + }, + "variables": [ + { + "name": "newFreePtr", + "nodeType": "YulTypedName", + "src": "2971:10:2", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3113:22:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nodeType": "YulIdentifier", + "src": "3115:16:2" + }, + "nodeType": "YulFunctionCall", + "src": "3115:18:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3115:18:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "newFreePtr", + "nodeType": "YulIdentifier", + "src": "3056:10:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3068:18:2", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "3053:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "3053:34:2" + }, + { + "arguments": [ + { + "name": "newFreePtr", + "nodeType": "YulIdentifier", + "src": "3092:10:2" + }, + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "3104:6:2" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "3089:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "3089:22:2" + } + ], + "functionName": { + "name": "or", + "nodeType": "YulIdentifier", + "src": "3050:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "3050:62:2" + }, + "nodeType": "YulIf", + "src": "3047:2:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3151:2:2", + "type": "", + "value": "64" + }, + { + "name": "newFreePtr", + "nodeType": "YulIdentifier", + "src": "3155:10:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3144:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "3144:22:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3144:22:2" + } + ] + }, + "name": "allocateMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "size", + "nodeType": "YulTypedName", + "src": "2913:4:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "2922:6:2", + "type": "" + } + ], + "src": "2889:283:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3245:265:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3350:22:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x41", + "nodeType": "YulIdentifier", + "src": "3352:16:2" + }, + "nodeType": "YulFunctionCall", + "src": "3352:18:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3352:18:2" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3322:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3330:18:2", + "type": "", + "value": "0xffffffffffffffff" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "3319:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "3319:30:2" + }, + "nodeType": "YulIf", + "src": "3316:2:2" + }, + { + "nodeType": "YulAssignment", + "src": "3402:41:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3418:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3426:4:2", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3414:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3414:17:2" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3437:4:2", + "type": "", + "value": "0x1f" + } + ], + "functionName": { + "name": "not", + "nodeType": "YulIdentifier", + "src": "3433:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3433:9:2" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "3410:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3410:33:2" + }, + "variableNames": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "3402:4:2" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "3480:23:2", + "value": { + "arguments": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "3492:4:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3498:4:2", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3488:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3488:15:2" + }, + "variableNames": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "3480:4:2" + } + ] + } + ] + }, + "name": "array_allocation_size_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "3229:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "size", + "nodeType": "YulTypedName", + "src": "3240:4:2", + "type": "" + } + ], + "src": "3178:332:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3575:40:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3586:22:2", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "3602:5:2" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "3596:5:2" + }, + "nodeType": "YulFunctionCall", + "src": "3596:12:2" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3586:6:2" + } + ] + } + ] + }, + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "3558:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "3568:6:2", + "type": "" + } + ], + "src": "3516:99:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3717:73:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3734:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3739:6:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3727:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "3727:19:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3727:19:2" + }, + { + "nodeType": "YulAssignment", + "src": "3755:29:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3774:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3779:4:2", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3770:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3770:14:2" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "3755:11:2" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "3689:3:2", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "3694:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "3705:11:2", + "type": "" + } + ], + "src": "3621:169:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3840:261:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3850:25:2", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "3873:1:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "3855:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "3855:20:2" + }, + "variableNames": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "3850:1:2" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "3884:25:2", + "value": { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "3907:1:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "3889:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "3889:20:2" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "3884:1:2" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4047:22:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "4049:16:2" + }, + "nodeType": "YulFunctionCall", + "src": "4049:18:2" + }, + "nodeType": "YulExpressionStatement", + "src": "4049:18:2" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "3968:1:2" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3975:66:2", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "4043:1:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "3971:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3971:74:2" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "3965:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "3965:81:2" + }, + "nodeType": "YulIf", + "src": "3962:2:2" + }, + { + "nodeType": "YulAssignment", + "src": "4079:16:2", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "4090:1:2" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "4093:1:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4086:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "4086:9:2" + }, + "variableNames": [ + { + "name": "sum", + "nodeType": "YulIdentifier", + "src": "4079:3:2" + } + ] + } + ] + }, + "name": "checked_add_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nodeType": "YulTypedName", + "src": "3827:1:2", + "type": "" + }, + { + "name": "y", + "nodeType": "YulTypedName", + "src": "3830:1:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "sum", + "nodeType": "YulTypedName", + "src": "3836:3:2", + "type": "" + } + ], + "src": "3796:305:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4152:32:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4162:16:2", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "4173:5:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "4162:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "4134:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "4144:7:2", + "type": "" + } + ], + "src": "4107:77:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4241:103:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "4264:3:2" + }, + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "4269:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4274:6:2" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "4251:12:2" + }, + "nodeType": "YulFunctionCall", + "src": "4251:30:2" + }, + "nodeType": "YulExpressionStatement", + "src": "4251:30:2" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "4322:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4327:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4318:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "4318:16:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4336:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4311:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "4311:27:2" + }, + "nodeType": "YulExpressionStatement", + "src": "4311:27:2" + } + ] + }, + "name": "copy_calldata_to_memory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "4223:3:2", + "type": "" + }, + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "4228:3:2", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "4233:6:2", + "type": "" + } + ], + "src": "4190:154:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4399:258:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "4409:10:2", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4418:1:2", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nodeType": "YulTypedName", + "src": "4413:1:2", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4478:63:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "4503:3:2" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "4508:1:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4499:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "4499:11:2" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "4522:3:2" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "4527:1:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4518:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "4518:11:2" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "4512:5:2" + }, + "nodeType": "YulFunctionCall", + "src": "4512:18:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4492:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "4492:39:2" + }, + "nodeType": "YulExpressionStatement", + "src": "4492:39:2" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "4439:1:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4442:6:2" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4436:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "4436:13:2" + }, + "nodeType": "YulForLoop", + "post": { + "nodeType": "YulBlock", + "src": "4450:19:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4452:15:2", + "value": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "4461:1:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4464:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4457:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "4457:10:2" + }, + "variableNames": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "4452:1:2" + } + ] + } + ] + }, + "pre": { + "nodeType": "YulBlock", + "src": "4432:3:2", + "statements": [] + }, + "src": "4428:113:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4575:76:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "4625:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4630:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4621:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "4621:16:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4639:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4614:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "4614:27:2" + }, + "nodeType": "YulExpressionStatement", + "src": "4614:27:2" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "4556:1:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4559:6:2" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "4553:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "4553:13:2" + }, + "nodeType": "YulIf", + "src": "4550:2:2" + } + ] + }, + "name": "copy_memory_to_memory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "4381:3:2", + "type": "" + }, + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "4386:3:2", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "4391:6:2", + "type": "" + } + ], + "src": "4350:307:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4714:269:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4724:22:2", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "4738:4:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4744:1:2", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "4734:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "4734:12:2" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4724:6:2" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "4755:38:2", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "4785:4:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4791:1:2", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "4781:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "4781:12:2" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulTypedName", + "src": "4759:18:2", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4832:51:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4846:27:2", + "value": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4860:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4868:4:2", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "4856:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "4856:17:2" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4846:6:2" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "4812:18:2" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "4805:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "4805:26:2" + }, + "nodeType": "YulIf", + "src": "4802:2:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4935:42:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x22", + "nodeType": "YulIdentifier", + "src": "4949:16:2" + }, + "nodeType": "YulFunctionCall", + "src": "4949:18:2" + }, + "nodeType": "YulExpressionStatement", + "src": "4949:18:2" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "4899:18:2" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4922:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4930:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4919:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "4919:14:2" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "4896:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "4896:38:2" + }, + "nodeType": "YulIf", + "src": "4893:2:2" + } + ] + }, + "name": "extract_byte_array_length", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "data", + "nodeType": "YulTypedName", + "src": "4698:4:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "4707:6:2", + "type": "" + } + ], + "src": "4663:320:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5017:152:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5034:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5037:77:2", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5027:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5027:88:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5027:88:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5131:1:2", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5134:4:2", + "type": "", + "value": "0x11" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5124:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5124:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5124:15:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5155:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5158:4:2", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "5148:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5148:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5148:15:2" + } + ] + }, + "name": "panic_error_0x11", + "nodeType": "YulFunctionDefinition", + "src": "4989:180:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5203:152:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5220:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5223:77:2", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5213:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5213:88:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5213:88:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5317:1:2", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5320:4:2", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5310:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5310:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5310:15:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5341:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5344:4:2", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "5334:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5334:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5334:15:2" + } + ] + }, + "name": "panic_error_0x22", + "nodeType": "YulFunctionDefinition", + "src": "5175:180:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5389:152:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5406:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5409:77:2", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5399:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5399:88:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5399:88:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5503:1:2", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5506:4:2", + "type": "", + "value": "0x41" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5496:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5496:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5496:15:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5527:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5530:4:2", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "5520:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5520:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5520:15:2" + } + ] + }, + "name": "panic_error_0x41", + "nodeType": "YulFunctionDefinition", + "src": "5361:180:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5595:54:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5605:38:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "5623:5:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5630:2:2", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5619:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "5619:14:2" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5639:2:2", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nodeType": "YulIdentifier", + "src": "5635:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "5635:7:2" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "5615:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "5615:28:2" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5605:6:2" + } + ] + } + ] + }, + "name": "round_up_to_mul_of_32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "5578:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "5588:6:2", + "type": "" + } + ], + "src": "5547:102:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5698:79:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5755:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5764:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5767:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "5757:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5757:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "5757:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "5721:5:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "5746:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "5728:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "5728:24:2" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "5718:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "5718:35:2" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "5711:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "5711:43:2" + }, + "nodeType": "YulIf", + "src": "5708:2:2" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "5691:5:2", + "type": "" + } + ], + "src": "5655:122:2" + } + ] + }, + "contents": "{\n\n function abi_decode_available_length_t_string_memory_ptr(src, length, end) -> array {\n array := allocateMemory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert(0, 0) }\n copy_calldata_to_memory(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }\n let length := calldataload(offset)\n array := abi_decode_available_length_t_string_memory_ptr(add(offset, 0x20), length, end)\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_string_memory_ptr(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := calldataload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n\n value0 := abi_decode_t_string_memory_ptr(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 27)\n\n mstore(add(pos, 0), \"Value must be diferent of 0\")\n\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function allocateMemory(size) -> memPtr {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, size)\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n // round up\n size := and(add(length, 0x1f), not(0x1f))\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function copy_calldata_to_memory(src, dst, length) {\n calldatacopy(dst, src, length)\n // clear end\n mstore(add(dst, length), 0)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n", + "id": 2, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "439:671:0:-:0;;;463:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;439:671;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:320:2:-;;88:1;82:4;78:12;68:22;;135:1;129:4;125:12;156:18;146:2;;212:4;204:6;200:17;190:27;;146:2;274;266:6;263:14;243:18;240:38;237:2;;;293:18;;:::i;:::-;237:2;58:269;;;;:::o;333:180::-;381:77;378:1;371:88;478:4;475:1;468:15;502:4;499:1;492:15;439:671:0;;;;;;;", + "deployedSourceMap": "439:671:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;666:81;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;751:109;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;864:103;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;971:137;;;:::i;:::-;;573:89;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;666:81;706:13;738:4;731:11;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;666:81;:::o;751:109::-;811:13;843:5;849;843:12;;;;;;;;;;;;;;;;;;;;;;;836:19;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;751:109;;;:::o;864:103::-;928:7;921:4;:14;;;;;;;;;;;;:::i;:::-;;943:5;954:7;943:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;864:103;:::o;971:137::-;1031:1;1019:9;:13;1011:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;1094:9;1070:8;:20;1079:10;1070:20;;;;;;;;;;;;;;;;:33;;;;;;;:::i;:::-;;;;;;;;971:137::o;573:89::-;615:13;636:21;;;;;;;;;;;;;;;;;;;573:89;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:344:2:-;;110:65;125:49;167:6;125:49;:::i;:::-;110:65;:::i;:::-;101:74;;198:6;191:5;184:21;236:4;229:5;225:16;274:3;265:6;260:3;256:16;253:25;250:2;;;291:1;288;281:12;250:2;304:41;338:6;333:3;328;304:41;:::i;:::-;91:260;;;;;;:::o;371:273::-;;476:3;469:4;461:6;457:17;453:27;443:2;;494:1;491;484:12;443:2;534:6;521:20;559:79;634:3;626:6;619:4;611:6;607:17;559:79;:::i;:::-;550:88;;433:211;;;;;:::o;650:139::-;;734:6;721:20;712:29;;750:33;777:5;750:33;:::i;:::-;702:87;;;;:::o;795:375::-;;913:2;901:9;892:7;888:23;884:32;881:2;;;929:1;926;919:12;881:2;1000:1;989:9;985:17;972:31;1030:18;1022:6;1019:30;1016:2;;;1062:1;1059;1052:12;1016:2;1090:63;1145:7;1136:6;1125:9;1121:22;1090:63;:::i;:::-;1080:73;;943:220;871:299;;;;:::o;1176:262::-;;1284:2;1272:9;1263:7;1259:23;1255:32;1252:2;;;1300:1;1297;1290:12;1252:2;1343:1;1368:53;1413:7;1404:6;1393:9;1389:22;1368:53;:::i;:::-;1358:63;;1314:117;1242:196;;;;:::o;1444:364::-;;1560:39;1593:5;1560:39;:::i;:::-;1615:71;1679:6;1674:3;1615:71;:::i;:::-;1608:78;;1695:52;1740:6;1735:3;1728:4;1721:5;1717:16;1695:52;:::i;:::-;1772:29;1794:6;1772:29;:::i;:::-;1767:3;1763:39;1756:46;;1536:272;;;;;:::o;1814:325::-;;1977:67;2041:2;2036:3;1977:67;:::i;:::-;1970:74;;2074:29;2070:1;2065:3;2061:11;2054:50;2130:2;2125:3;2121:12;2114:19;;1960:179;;;:::o;2145:313::-;;2296:2;2285:9;2281:18;2273:26;;2345:9;2339:4;2335:20;2331:1;2320:9;2316:17;2309:47;2373:78;2446:4;2437:6;2373:78;:::i;:::-;2365:86;;2263:195;;;;:::o;2464:419::-;;2668:2;2657:9;2653:18;2645:26;;2717:9;2711:4;2707:20;2703:1;2692:9;2688:17;2681:47;2745:131;2871:4;2745:131;:::i;:::-;2737:139;;2635:248;;;:::o;2889:283::-;;2955:2;2949:9;2939:19;;2997:4;2989:6;2985:17;3104:6;3092:10;3089:22;3068:18;3056:10;3053:34;3050:62;3047:2;;;3115:18;;:::i;:::-;3047:2;3155:10;3151:2;3144:22;2929:243;;;;:::o;3178:332::-;;3330:18;3322:6;3319:30;3316:2;;;3352:18;;:::i;:::-;3316:2;3437:4;3433:9;3426:4;3418:6;3414:17;3410:33;3402:41;;3498:4;3492;3488:15;3480:23;;3245:265;;;:::o;3516:99::-;;3602:5;3596:12;3586:22;;3575:40;;;:::o;3621:169::-;;3739:6;3734:3;3727:19;3779:4;3774:3;3770:14;3755:29;;3717:73;;;;:::o;3796:305::-;;3855:20;3873:1;3855:20;:::i;:::-;3850:25;;3889:20;3907:1;3889:20;:::i;:::-;3884:25;;4043:1;3975:66;3971:74;3968:1;3965:81;3962:2;;;4049:18;;:::i;:::-;3962:2;4093:1;4090;4086:9;4079:16;;3840:261;;;;:::o;4107:77::-;;4173:5;4162:16;;4152:32;;;:::o;4190:154::-;4274:6;4269:3;4264;4251:30;4336:1;4327:6;4322:3;4318:16;4311:27;4241:103;;;:::o;4350:307::-;4418:1;4428:113;4442:6;4439:1;4436:13;4428:113;;;4527:1;4522:3;4518:11;4512:18;4508:1;4503:3;4499:11;4492:39;4464:2;4461:1;4457:10;4452:15;;4428:113;;;4559:6;4556:1;4553:13;4550:2;;;4639:1;4630:6;4625:3;4621:16;4614:27;4550:2;4399:258;;;;:::o;4663:320::-;;4744:1;4738:4;4734:12;4724:22;;4791:1;4785:4;4781:12;4812:18;4802:2;;4868:4;4860:6;4856:17;4846:27;;4802:2;4930;4922:6;4919:14;4899:18;4896:38;4893:2;;;4949:18;;:::i;:::-;4893:2;4714:269;;;;:::o;4989:180::-;5037:77;5034:1;5027:88;5134:4;5131:1;5124:15;5158:4;5155:1;5148:15;5175:180;5223:77;5220:1;5213:88;5320:4;5317:1;5310:15;5344:4;5341:1;5334:15;5361:180;5409:77;5406:1;5399:88;5506:4;5503:1;5496:15;5530:4;5527:1;5520:15;5547:102;;5639:2;5635:7;5630:2;5623:5;5619:14;5615:28;5605:38;;5595:54;;;:::o;5655:122::-;5728:24;5746:5;5728:24;:::i;:::-;5721:5;5718:35;5708:2;;5767:1;5764;5757:12;5708:2;5698:79;:::o", + "source": "// *****************************************************************************\n// IMPORTANT: If you update this code then make sure to recompile\n// it and update the .json file as well so that they\n// remain in sync for consistent test executions.\n// With that said, there shouldn't be any reason to recompile this, like ever...\n// *****************************************************************************\n\npragma solidity >=0.7.0;\n\ncontract HelloWorld {\n string private name = \"CaptainCactus\";\n mapping (address => uint256) deposits;\n string[] private names; \n\n function sayHello () public pure returns (string memory) {\n return 'Hello World!';\n }\n\n function getName() public view returns (string memory)\n {\n return name;\n }\n\n function getNameByIndex(uint256 index) public view returns (string memory)\n {\n return names[index];\n }\n\n function setName(string memory newName) public\n {\n name = newName;\n names.push(newName);\n }\n\n function deposit() public payable {\n require(msg.value > 0, \"Value must be diferent of 0\");\n deposits[msg.sender] += msg.value;\n }\n}\n", + "sourcePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", + "ast": { + "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", + "exportedSymbols": { + "HelloWorld": [ + 76 + ] + }, + "id": 77, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.7", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "413:24:0" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 76, + "linearizedBaseContracts": [ + 76 + ], + "name": "HelloWorld", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "463:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 2, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "463:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "hexValue": "4361707461696e436163747573", + "id": 3, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "485:15:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", + "typeString": "literal_string \"CaptainCactus\"" + }, + "value": "CaptainCactus" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 8, + "mutability": "mutable", + "name": "deposits", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "504:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 7, + "keyType": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "513:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "504:28:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "524:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 11, + "mutability": "mutable", + "name": "names", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "545:22:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string[]" + }, + "typeName": { + "baseType": { + "id": 9, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "545:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "id": 10, + "nodeType": "ArrayTypeName", + "src": "545:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", + "typeString": "string[]" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 18, + "nodeType": "Block", + "src": "630:32:0", + "statements": [ + { + "expression": { + "hexValue": "48656c6c6f20576f726c6421", + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "643:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", + "typeString": "literal_string \"Hello World!\"" + }, + "value": "Hello World!" + }, + "functionReturnParameters": 15, + "id": 17, + "nodeType": "Return", + "src": "636:21:0" + } + ] + }, + "functionSelector": "ef5fb05b", + "id": 19, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sayHello", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 12, + "nodeType": "ParameterList", + "parameters": [], + "src": "591:2:0" + }, + "returnParameters": { + "id": 15, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 19, + "src": "615:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "615:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "614:15:0" + }, + "scope": 76, + "src": "573:89:0", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 26, + "nodeType": "Block", + "src": "723:24:0", + "statements": [ + { + "expression": { + "id": 24, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4, + "src": "738:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 23, + "id": 25, + "nodeType": "Return", + "src": "731:11:0" + } + ] + }, + "functionSelector": "17d7de7c", + "id": 27, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 20, + "nodeType": "ParameterList", + "parameters": [], + "src": "682:2:0" + }, + "returnParameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 27, + "src": "706:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "706:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "705:15:0" + }, + "scope": 76, + "src": "666:81:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 38, + "nodeType": "Block", + "src": "828:32:0", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 34, + "name": "names", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11, + "src": "843:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 36, + "indexExpression": { + "id": 35, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 29, + "src": "849:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "843:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 33, + "id": 37, + "nodeType": "Return", + "src": "836:19:0" + } + ] + }, + "functionSelector": "59c293f1", + "id": 39, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNameByIndex", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 30, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 29, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 39, + "src": "775:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 28, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "775:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "774:15:0" + }, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 32, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 39, + "src": "811:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 31, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "811:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "810:15:0" + }, + "scope": 76, + "src": "751:109:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 54, + "nodeType": "Block", + "src": "913:54:0", + "statements": [ + { + "expression": { + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 44, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4, + "src": "921:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 45, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "921:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 47, + "nodeType": "ExpressionStatement", + "src": "921:14:0" + }, + { + "expression": { + "arguments": [ + { + "id": 51, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "954:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 48, + "name": "names", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11, + "src": "943:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "943:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", + "typeString": "function (string storage ref)" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "943:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 53, + "nodeType": "ExpressionStatement", + "src": "943:19:0" + } + ] + }, + "functionSelector": "c47f0027", + "id": 55, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 42, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 41, + "mutability": "mutable", + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "881:21:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 40, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "881:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "880:23:0" + }, + "returnParameters": { + "id": 43, + "nodeType": "ParameterList", + "parameters": [], + "src": "913:0:0" + }, + "scope": 76, + "src": "864:103:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 74, + "nodeType": "Block", + "src": "1005:103:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 62, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 59, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 60, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "1019:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1031:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1019:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "56616c7565206d757374206265206469666572656e74206f662030", + "id": 63, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1034:29:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", + "typeString": "literal_string \"Value must be diferent of 0\"" + }, + "value": "Value must be diferent of 0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", + "typeString": "literal_string \"Value must be diferent of 0\"" + } + ], + "id": 58, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1011:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65, + "nodeType": "ExpressionStatement", + "src": "1011:53:0" + }, + { + "expression": { + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 66, + "name": "deposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1070:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 69, + "indexExpression": { + "expression": { + "id": 67, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1079:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1079:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1070:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "expression": { + "id": 70, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1094:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "1094:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1070:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 73, + "nodeType": "ExpressionStatement", + "src": "1070:33:0" + } + ] + }, + "functionSelector": "d0e30db0", + "id": 75, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 56, + "nodeType": "ParameterList", + "parameters": [], + "src": "987:2:0" + }, + "returnParameters": { + "id": 57, + "nodeType": "ParameterList", + "parameters": [], + "src": "1005:0:0" + }, + "scope": 76, + "src": "971:137:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 77, + "src": "439:671:0" + } + ], + "src": "413:698:0" + }, + "legacyAST": { + "absolutePath": "/Users/jordigironamezcua/pruebas/contracts/HelloWorld.sol", + "exportedSymbols": { + "HelloWorld": [ + 76 + ] + }, + "id": 77, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.7", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "413:24:0" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 76, + "linearizedBaseContracts": [ + 76 + ], + "name": "HelloWorld", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "463:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 2, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "463:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "hexValue": "4361707461696e436163747573", + "id": 3, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "485:15:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bdd2f21877c99489ddcc32737686677f40d460368c7982ce22ce4f72b41b0312", + "typeString": "literal_string \"CaptainCactus\"" + }, + "value": "CaptainCactus" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 8, + "mutability": "mutable", + "name": "deposits", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "504:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 7, + "keyType": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "513:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "504:28:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "524:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 11, + "mutability": "mutable", + "name": "names", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "545:22:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string[]" + }, + "typeName": { + "baseType": { + "id": 9, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "545:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "id": 10, + "nodeType": "ArrayTypeName", + "src": "545:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", + "typeString": "string[]" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 18, + "nodeType": "Block", + "src": "630:32:0", + "statements": [ + { + "expression": { + "hexValue": "48656c6c6f20576f726c6421", + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "643:14:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3ea2f1d0abf3fc66cf29eebb70cbd4e7fe762ef8a09bcc06c8edf641230afec0", + "typeString": "literal_string \"Hello World!\"" + }, + "value": "Hello World!" + }, + "functionReturnParameters": 15, + "id": 17, + "nodeType": "Return", + "src": "636:21:0" + } + ] + }, + "functionSelector": "ef5fb05b", + "id": 19, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sayHello", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 12, + "nodeType": "ParameterList", + "parameters": [], + "src": "591:2:0" + }, + "returnParameters": { + "id": 15, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 19, + "src": "615:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "615:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "614:15:0" + }, + "scope": 76, + "src": "573:89:0", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 26, + "nodeType": "Block", + "src": "723:24:0", + "statements": [ + { + "expression": { + "id": 24, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4, + "src": "738:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 23, + "id": 25, + "nodeType": "Return", + "src": "731:11:0" + } + ] + }, + "functionSelector": "17d7de7c", + "id": 27, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 20, + "nodeType": "ParameterList", + "parameters": [], + "src": "682:2:0" + }, + "returnParameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 27, + "src": "706:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "706:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "705:15:0" + }, + "scope": 76, + "src": "666:81:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 38, + "nodeType": "Block", + "src": "828:32:0", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 34, + "name": "names", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11, + "src": "843:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 36, + "indexExpression": { + "id": 35, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 29, + "src": "849:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "843:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 33, + "id": 37, + "nodeType": "Return", + "src": "836:19:0" + } + ] + }, + "functionSelector": "59c293f1", + "id": 39, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNameByIndex", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 30, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 29, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 39, + "src": "775:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 28, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "775:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "774:15:0" + }, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 32, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 39, + "src": "811:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 31, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "811:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "810:15:0" + }, + "scope": 76, + "src": "751:109:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 54, + "nodeType": "Block", + "src": "913:54:0", + "statements": [ + { + "expression": { + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 44, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4, + "src": "921:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 45, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "921:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 47, + "nodeType": "ExpressionStatement", + "src": "921:14:0" + }, + { + "expression": { + "arguments": [ + { + "id": 51, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "954:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 48, + "name": "names", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11, + "src": "943:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "943:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", + "typeString": "function (string storage ref)" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "943:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 53, + "nodeType": "ExpressionStatement", + "src": "943:19:0" + } + ] + }, + "functionSelector": "c47f0027", + "id": 55, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 42, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 41, + "mutability": "mutable", + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "881:21:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 40, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "881:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "880:23:0" + }, + "returnParameters": { + "id": 43, + "nodeType": "ParameterList", + "parameters": [], + "src": "913:0:0" + }, + "scope": 76, + "src": "864:103:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 74, + "nodeType": "Block", + "src": "1005:103:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 62, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 59, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 60, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "1019:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1031:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1019:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "56616c7565206d757374206265206469666572656e74206f662030", + "id": 63, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1034:29:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", + "typeString": "literal_string \"Value must be diferent of 0\"" + }, + "value": "Value must be diferent of 0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e2e49ac39a44b46c7e6b37baa540d6e7db7dbdc5b2c6632b03592f4b15517e5e", + "typeString": "literal_string \"Value must be diferent of 0\"" + } + ], + "id": 58, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1011:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 65, + "nodeType": "ExpressionStatement", + "src": "1011:53:0" + }, + { + "expression": { + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 66, + "name": "deposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "1070:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 69, + "indexExpression": { + "expression": { + "id": 67, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1079:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 68, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1079:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1070:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "expression": { + "id": 70, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1094:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "1094:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1070:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 73, + "nodeType": "ExpressionStatement", + "src": "1070:33:0" + } + ] + }, + "functionSelector": "d0e30db0", + "id": 75, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 56, + "nodeType": "ParameterList", + "parameters": [], + "src": "987:2:0" + }, + "returnParameters": { + "id": 57, + "nodeType": "ParameterList", + "parameters": [], + "src": "1005:0:0" + }, + "scope": 76, + "src": "971:137:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 77, + "src": "439:671:0" + } + ], + "src": "413:698:0" + }, + "compiler": { + "name": "solc", + "version": "0.8.0+commit.c7dfd78e.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.3", + "updatedAt": "2021-02-12T11:15:58.676Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol b/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol new file mode 100644 index 00000000000..30bc8f71346 --- /dev/null +++ b/packages/cactus-test-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/HelloWorld.sol @@ -0,0 +1,40 @@ +// ***************************************************************************** +// IMPORTANT: If you update this code then make sure to recompile +// it and update the .json file as well so that they +// remain in sync for consistent test executions. +// With that said, there shouldn't be any reason to recompile this, like ever... +// ***************************************************************************** + +pragma solidity >=0.7.0; + +contract HelloWorld { + string private name = "CaptainCactus"; + mapping (address => uint256) deposits; + string[] private names; + + function sayHello () public pure returns (string memory) { + return 'Hello World!'; + } + + function getName() public view returns (string memory) + { + return name; + } + + function getNameByIndex(uint256 index) public view returns (string memory) + { + return names[index]; + } + + function setName(string memory newName) public + { + name = newName; + names.push(newName); + } + + function deposit() public payable { + require(msg.value > 0, "Value must be diferent of 0"); + deposits[msg.sender] += msg.value; + } + +} diff --git a/packages/cactus-test-plugin-ledger-connector-besu/tsconfig.json b/packages/cactus-test-plugin-ledger-connector-besu/tsconfig.json index 71f2e81a6b9..0f6045bbfe3 100644 --- a/packages/cactus-test-plugin-ledger-connector-besu/tsconfig.json +++ b/packages/cactus-test-plugin-ledger-connector-besu/tsconfig.json @@ -9,7 +9,8 @@ "tsBuildInfoFile": "../../.build-cache/cactus-test-plugin-ledger-connector-besu.tsbuildinfo" }, "include": [ - "./src" + "./src", + "src/**/*.json" ], "references": [ { diff --git a/yarn.lock b/yarn.lock index 859850da1f4..6b08b8cc965 100644 --- a/yarn.lock +++ b/yarn.lock @@ -383,6 +383,16 @@ call-me-maybe "^1.0.1" js-yaml "^3.13.1" +"@apidevtools/json-schema-ref-parser@9.0.9": + version "9.0.9" + resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#d720f9256e3609621280584f2b47ae165359268b" + integrity sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w== + dependencies: + "@jsdevtools/ono" "^7.1.3" + "@types/json-schema" "^7.0.6" + call-me-maybe "^1.0.1" + js-yaml "^4.1.0" + "@assemblyscript/loader@^0.10.1": version "0.10.1" resolved "https://registry.yarnpkg.com/@assemblyscript/loader/-/loader-0.10.1.tgz#70e45678f06c72fa2e350e8553ec4a4d72b92e06" @@ -2246,6 +2256,18 @@ resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== +"@improbable-eng/grpc-web-node-http-transport@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@improbable-eng/grpc-web-node-http-transport/-/grpc-web-node-http-transport-0.13.0.tgz#a8680c7a8bce4c2b44fe48ba4b7c55b320cf5f54" + integrity sha512-Ev8pfMs7FbsBWc4FAY8N4dd8xQRowHFyu2AzEHl++8orrB4KSx6NonMqlsLDPBHLKwlYs7EEI6uxGwpjnYiS2Q== + +"@improbable-eng/grpc-web@^0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@improbable-eng/grpc-web/-/grpc-web-0.12.0.tgz#9b10a7edf2a1d7672f8997e34a60e7b70e49738f" + integrity sha512-uJjgMPngreRTYPBuo6gswMj1gK39Wbqre/RgE0XnSDXJRg6ST7ZhuS53dFE6Vc2CX4jxgl+cO+0B3op8LA4Q0Q== + dependencies: + browser-headers "^0.4.0" + "@ionic-native/core@5.35.0": version "5.35.0" resolved "https://registry.yarnpkg.com/@ionic-native/core/-/core-5.35.0.tgz#b84cfcc2cf8993c09c2b8fe1fe2e3d8646d44f09" @@ -2344,7 +2366,7 @@ merge-source-map "^1.1.0" schema-utils "^2.7.0" -"@jsdevtools/ono@7.1.3", "@jsdevtools/ono@^7.1.0": +"@jsdevtools/ono@7.1.3", "@jsdevtools/ono@^7.1.0", "@jsdevtools/ono@^7.1.3": version "7.1.3" resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== @@ -3020,7 +3042,7 @@ npmlog "^4.1.2" write-file-atomic "^3.0.3" -"@mapbox/node-pre-gyp@^1.0.5": +"@mapbox/node-pre-gyp@^1.0.4", "@mapbox/node-pre-gyp@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.5.tgz#2a0b32fcb416fb3f2250fd24cb2a81421a4f5950" integrity sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA== @@ -3569,6 +3591,14 @@ "@types/connect" "*" "@types/node" "*" +"@types/bytebuffer@^5.0.40": + version "5.0.42" + resolved "https://registry.yarnpkg.com/@types/bytebuffer/-/bytebuffer-5.0.42.tgz#1c602a77942d34c5c0879ad75c58d5d8c07dfb3b" + integrity sha512-lEgKojWUAc/MG2t649oZS5AfYFP2xRNPoDuwDBlBMjHXd8MaGPgFgtCXUK7inZdBOygmVf10qxc1Us8GXC96aw== + dependencies: + "@types/long" "*" + "@types/node" "*" + "@types/cacheable-request@^6.0.1": version "6.0.2" resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.2.tgz#c324da0197de0a98a2312156536ae262429ff6b9" @@ -3691,7 +3721,7 @@ "@types/express" "*" "@types/express-unless" "*" -"@types/express-serve-static-core@^4.17.18": +"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.18": version "4.17.24" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz#ea41f93bf7e0d59cd5a76665068ed6aab6815c07" integrity sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA== @@ -3717,6 +3747,16 @@ "@types/qs" "*" "@types/serve-static" "*" +"@types/express@4.17.8": + version "4.17.8" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.8.tgz#3df4293293317e61c60137d273a2e96cd8d5f27a" + integrity sha512-wLhcKh3PMlyA2cNAB9sjM1BntnhPMiM0JOBwPBqttjHev2428MLEB4AYVN+d8s2iyCVZac+o41Pflm/ZH5vLXQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "*" + "@types/qs" "*" + "@types/serve-static" "*" + "@types/fs-extra@9.0.12": version "9.0.12" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.12.tgz#9b8f27973df8a7a3920e8461517ebf8a7d4fdfaf" @@ -3754,7 +3794,7 @@ dependencies: "@types/jasmine" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": +"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== @@ -3802,7 +3842,7 @@ "@types/level-errors" "*" "@types/node" "*" -"@types/long@^4.0.0", "@types/long@^4.0.1": +"@types/long@*", "@types/long@^4.0.0", "@types/long@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== @@ -3827,7 +3867,7 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== -"@types/multer@1.4.7": +"@types/multer@1.4.7", "@types/multer@^1.4.5": version "1.4.7" resolved "https://registry.yarnpkg.com/@types/multer/-/multer-1.4.7.tgz#89cf03547c28c7bbcc726f029e2a76a7232cc79e" integrity sha512-/SNsDidUFCvqqcWDwxv2feww/yqhNeTRL5CVoL3jU4Goc4kKEL10T7Eye65ZqPNi4HRx8sAEX59pV1aEH7drNA== @@ -4503,7 +4543,7 @@ ajv@8.6.2, ajv@^8.0.0, ajv@^8.0.1: require-from-string "^2.0.2" uri-js "^4.2.2" -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -4684,6 +4724,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + argv@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" @@ -4864,6 +4909,14 @@ asap@^2.0.0: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= +ascli@~1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ascli/-/ascli-1.0.1.tgz#bcfa5974a62f18e81cabaeb49732ab4a88f906bc" + integrity sha1-vPpZdKYvGOgcq660lzKrSoj5Brw= + dependencies: + colour "~0.7.1" + optjs "~3.2.2" + asn1.js@^5.0.1, asn1.js@^5.2.0: version "5.4.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" @@ -5057,6 +5110,41 @@ axobject-query@2.0.2: dependencies: ast-types-flow "0.0.7" +babel-helper-evaluate-path@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.5.0.tgz#a62fa9c4e64ff7ea5cea9353174ef023a900a67c" + integrity sha512-mUh0UhS607bGh5wUMAQfOpt2JX2ThXMtppHRdRU1kL7ZLRWIXxoV2UIV1r2cAeeNeU1M5SB5/RSUgUxrK8yOkA== + +babel-helper-flip-expressions@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.4.3.tgz#3696736a128ac18bc25254b5f40a22ceb3c1d3fd" + integrity sha1-NpZzahKKwYvCUlS19AoizrPB0/0= + +babel-helper-is-nodes-equiv@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz#34e9b300b1479ddd98ec77ea0bbe9342dfe39684" + integrity sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ= + +babel-helper-is-void-0@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-helper-is-void-0/-/babel-helper-is-void-0-0.4.3.tgz#7d9c01b4561e7b95dbda0f6eee48f5b60e67313e" + integrity sha1-fZwBtFYee5Xb2g9u7kj1tg5nMT4= + +babel-helper-mark-eval-scopes@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.4.3.tgz#d244a3bef9844872603ffb46e22ce8acdf551562" + integrity sha1-0kSjvvmESHJgP/tG4izorN9VFWI= + +babel-helper-remove-or-void@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.4.3.tgz#a4f03b40077a0ffe88e45d07010dee241ff5ae60" + integrity sha1-pPA7QAd6D/6I5F0HAQ3uJB/1rmA= + +babel-helper-to-multiple-sequence-expressions@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.5.0.tgz#a3f924e3561882d42fcf48907aa98f7979a4588d" + integrity sha512-m2CvfDW4+1qfDdsrtf4dwOslQC3yhbgyBFptncp4wvtdrDHqueW7slsYv4gArie056phvQFhT2nRcGS4bnm6mA== + babel-loader@8.2.2: version "8.2.2" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81" @@ -5074,6 +5162,82 @@ babel-plugin-dynamic-import-node@^2.3.3: dependencies: object.assign "^4.1.0" +babel-plugin-minify-builtins@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.5.0.tgz#31eb82ed1a0d0efdc31312f93b6e4741ce82c36b" + integrity sha512-wpqbN7Ov5hsNwGdzuzvFcjgRlzbIeVv1gMIlICbPj0xkexnfoIDe7q+AZHMkQmAE/F9R5jkrB6TLfTegImlXag== + +babel-plugin-minify-constant-folding@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.5.0.tgz#f84bc8dbf6a561e5e350ff95ae216b0ad5515b6e" + integrity sha512-Vj97CTn/lE9hR1D+jKUeHfNy+m1baNiJ1wJvoGyOBUx7F7kJqDZxr9nCHjO/Ad+irbR3HzR6jABpSSA29QsrXQ== + dependencies: + babel-helper-evaluate-path "^0.5.0" + +babel-plugin-minify-dead-code-elimination@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.5.1.tgz#1a0c68e44be30de4976ca69ffc535e08be13683f" + integrity sha512-x8OJOZIrRmQBcSqxBcLbMIK8uPmTvNWPXH2bh5MDCW1latEqYiRMuUkPImKcfpo59pTUB2FT7HfcgtG8ZlR5Qg== + dependencies: + babel-helper-evaluate-path "^0.5.0" + babel-helper-mark-eval-scopes "^0.4.3" + babel-helper-remove-or-void "^0.4.3" + lodash "^4.17.11" + +babel-plugin-minify-flip-comparisons@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.4.3.tgz#00ca870cb8f13b45c038b3c1ebc0f227293c965a" + integrity sha1-AMqHDLjxO0XAOLPB68DyJyk8llo= + dependencies: + babel-helper-is-void-0 "^0.4.3" + +babel-plugin-minify-guarded-expressions@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.4.4.tgz#818960f64cc08aee9d6c75bec6da974c4d621135" + integrity sha512-RMv0tM72YuPPfLT9QLr3ix9nwUIq+sHT6z8Iu3sLbqldzC1Dls8DPCywzUIzkTx9Zh1hWX4q/m9BPoPed9GOfA== + dependencies: + babel-helper-evaluate-path "^0.5.0" + babel-helper-flip-expressions "^0.4.3" + +babel-plugin-minify-infinity@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.4.3.tgz#dfb876a1b08a06576384ef3f92e653ba607b39ca" + integrity sha1-37h2obCKBldjhO8/kuZTumB7Oco= + +babel-plugin-minify-mangle-names@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.5.0.tgz#bcddb507c91d2c99e138bd6b17a19c3c271e3fd3" + integrity sha512-3jdNv6hCAw6fsX1p2wBGPfWuK69sfOjfd3zjUXkbq8McbohWy23tpXfy5RnToYWggvqzuMOwlId1PhyHOfgnGw== + dependencies: + babel-helper-mark-eval-scopes "^0.4.3" + +babel-plugin-minify-numeric-literals@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.4.3.tgz#8e4fd561c79f7801286ff60e8c5fd9deee93c0bc" + integrity sha1-jk/VYcefeAEob/YOjF/Z3u6TwLw= + +babel-plugin-minify-replace@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.5.0.tgz#d3e2c9946c9096c070efc96761ce288ec5c3f71c" + integrity sha512-aXZiaqWDNUbyNNNpWs/8NyST+oU7QTpK7J9zFEFSA0eOmtUNMU3fczlTTTlnCxHmq/jYNFEmkkSG3DDBtW3Y4Q== + +babel-plugin-minify-simplify@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.5.1.tgz#f21613c8b95af3450a2ca71502fdbd91793c8d6a" + integrity sha512-OSYDSnoCxP2cYDMk9gxNAed6uJDiDz65zgL6h8d3tm8qXIagWGMLWhqysT6DY3Vs7Fgq7YUDcjOomhVUb+xX6A== + dependencies: + babel-helper-evaluate-path "^0.5.0" + babel-helper-flip-expressions "^0.4.3" + babel-helper-is-nodes-equiv "^0.0.1" + babel-helper-to-multiple-sequence-expressions "^0.5.0" + +babel-plugin-minify-type-constructors@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.4.3.tgz#1bc6f15b87f7ab1085d42b330b717657a2156500" + integrity sha1-G8bxW4f3qxCF1CszC3F2V6IVZQA= + dependencies: + babel-helper-is-void-0 "^0.4.3" + babel-plugin-polyfill-corejs2@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz#e9124785e6fd94f94b618a7954e5693053bf5327" @@ -5098,6 +5262,65 @@ babel-plugin-polyfill-regenerator@^0.2.2: dependencies: "@babel/helper-define-polyfill-provider" "^0.2.2" +babel-plugin-transform-inline-consecutive-adds@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz#323d47a3ea63a83a7ac3c811ae8e6941faf2b0d1" + integrity sha1-Mj1Ho+pjqDp6w8gRro5pQfrysNE= + +babel-plugin-transform-member-expression-literals@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz#37039c9a0c3313a39495faac2ff3a6b5b9d038bf" + integrity sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8= + +babel-plugin-transform-merge-sibling-variables@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz#85b422fc3377b449c9d1cde44087203532401dae" + integrity sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4= + +babel-plugin-transform-minify-booleans@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz#acbb3e56a3555dd23928e4b582d285162dd2b198" + integrity sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg= + +babel-plugin-transform-property-literals@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz#98c1d21e255736573f93ece54459f6ce24985d39" + integrity sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk= + dependencies: + esutils "^2.0.2" + +babel-plugin-transform-regexp-constructors@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.4.3.tgz#58b7775b63afcf33328fae9a5f88fbd4fb0b4965" + integrity sha1-WLd3W2OvzzMyj66aX4j71PsLSWU= + +babel-plugin-transform-remove-console@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz#b980360c067384e24b357a588d807d3c83527780" + integrity sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A= + +babel-plugin-transform-remove-debugger@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz#42b727631c97978e1eb2d199a7aec84a18339ef2" + integrity sha1-QrcnYxyXl44estGZp67IShgznvI= + +babel-plugin-transform-remove-undefined@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.5.0.tgz#80208b31225766c630c97fa2d288952056ea22dd" + integrity sha512-+M7fJYFaEE/M9CXa0/IRkDbiV3wRELzA1kKQFCJ4ifhrzLKn/9VCCgj9OFmYWwBd8IB48YdgPkHYtbYq+4vtHQ== + dependencies: + babel-helper-evaluate-path "^0.5.0" + +babel-plugin-transform-simplify-comparison-operators@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz#f62afe096cab0e1f68a2d753fdf283888471ceb9" + integrity sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk= + +babel-plugin-transform-undefined-to-void@^6.9.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz#be241ca81404030678b748717322b89d0c8fe280" + integrity sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA= + babel-polyfill@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" @@ -5107,6 +5330,35 @@ babel-polyfill@^6.26.0: core-js "^2.5.0" regenerator-runtime "^0.10.5" +babel-preset-minify@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/babel-preset-minify/-/babel-preset-minify-0.5.1.tgz#25f5d0bce36ec818be80338d0e594106e21eaa9f" + integrity sha512-1IajDumYOAPYImkHbrKeiN5AKKP9iOmRoO2IPbIuVp0j2iuCcj0n7P260z38siKMZZ+85d3mJZdtW8IgOv+Tzg== + dependencies: + babel-plugin-minify-builtins "^0.5.0" + babel-plugin-minify-constant-folding "^0.5.0" + babel-plugin-minify-dead-code-elimination "^0.5.1" + babel-plugin-minify-flip-comparisons "^0.4.3" + babel-plugin-minify-guarded-expressions "^0.4.4" + babel-plugin-minify-infinity "^0.4.3" + babel-plugin-minify-mangle-names "^0.5.0" + babel-plugin-minify-numeric-literals "^0.4.3" + babel-plugin-minify-replace "^0.5.0" + babel-plugin-minify-simplify "^0.5.1" + babel-plugin-minify-type-constructors "^0.4.3" + babel-plugin-transform-inline-consecutive-adds "^0.4.3" + babel-plugin-transform-member-expression-literals "^6.9.4" + babel-plugin-transform-merge-sibling-variables "^6.9.4" + babel-plugin-transform-minify-booleans "^6.9.4" + babel-plugin-transform-property-literals "^6.9.4" + babel-plugin-transform-regexp-constructors "^0.4.3" + babel-plugin-transform-remove-console "^6.9.4" + babel-plugin-transform-remove-debugger "^6.9.4" + babel-plugin-transform-remove-undefined "^0.5.0" + babel-plugin-transform-simplify-comparison-operators "^6.9.4" + babel-plugin-transform-undefined-to-void "^6.9.4" + lodash "^4.17.11" + babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -5397,6 +5649,11 @@ brorand@^1.0.1, brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= +browser-headers@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/browser-headers/-/browser-headers-0.4.1.tgz#4308a7ad3b240f4203dbb45acedb38dc2d65dd02" + integrity sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg== + browser-readablestream-to-it@^1.0.1, browser-readablestream-to-it@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.2.tgz#f6b8d18e7a35b0321359261a32aa2c70f46921c4" @@ -5566,6 +5823,14 @@ buffer@4.9.2: ieee754 "^1.1.4" isarray "^1.0.0" +buffer@5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.0.2.tgz#41d0407ff76782e9ec19f52f88e237ce6bb0de6d" + integrity sha1-QdBAf/dngunsGfUviOI3zmuw3m0= + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -5574,7 +5839,7 @@ buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: +buffer@^5.0.5, buffer@^5.2.1, buffer@^5.4.0, buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -5622,6 +5887,13 @@ byte-size@^7.0.0: resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-7.0.1.tgz#b1daf3386de7ab9d706b941a748dbfc71130dee3" integrity sha512-crQdqyCwhokxwV1UyDzLZanhkugAgft7vt0qbbdt60C6Zf3CAiGmtUCylbtYwrU6loOUw3euGrNtW1J651ot1A== +bytebuffer@~5: + version "5.0.1" + resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd" + integrity sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0= + dependencies: + long "~3" + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -5796,6 +6068,11 @@ camelcase-keys@^7.0.0: quick-lru "^5.1.1" type-fest "^1.2.1" +camelcase@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= + camelcase@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" @@ -6114,6 +6391,15 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +cliui@^3.0.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + cliui@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" @@ -6276,6 +6562,11 @@ colors@1.4.0, colors@^1.4.0: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== +colour@~0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778" + integrity sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g= + columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -7316,7 +7607,7 @@ decamelize-keys@^1.1.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.1.0, decamelize@^1.2.0: +decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -7945,6 +8236,13 @@ ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: dependencies: safe-buffer "^5.0.1" +ed25519.js@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ed25519.js/-/ed25519.js-1.3.0.tgz#11ff48508c4964302179aee33d2f870371df4ad8" + integrity sha512-KeS+1N/aTaHQdOIaVxKqfscrb7HRgVfRyOP3QkEGlpcMnuDN/3dVvm5t1/DpsH4NeFrv1g6wtut5vdVMRw4DqQ== + dependencies: + buffer "5.0.2" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -8884,6 +9182,24 @@ express-openapi-validator@3.10.0: optionalDependencies: deasync "^0.1.19" +express-openapi-validator@4.12.12: + version "4.12.12" + resolved "https://registry.yarnpkg.com/express-openapi-validator/-/express-openapi-validator-4.12.12.tgz#3d2a788722a435d08aa93778a31db294c35d2a7e" + integrity sha512-VXvsypcmagC3W3H/1/ixeP+6wyElg2i9TM8xLdQ0NoSFtzAqO7kpej43AGpoApp6nNcw25cdXHRIot/nEyx9Xg== + dependencies: + "@types/multer" "^1.4.5" + ajv "^6.12.6" + content-type "^1.0.4" + json-schema-ref-parser "^9.0.7" + lodash.clonedeep "^4.5.0" + lodash.get "^4.4.2" + lodash.uniq "^4.5.0" + lodash.zipobject "^4.1.3" + media-typer "^1.1.0" + multer "^1.4.2" + ono "^7.1.3" + path-to-regexp "^6.2.0" + express-unless@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/express-unless/-/express-unless-0.3.1.tgz#2557c146e75beb903e2d247f9b5ba01452696e20" @@ -10016,6 +10332,11 @@ google-protobuf@3.15.8: resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.15.8.tgz#5f3948905e4951c867d6bc143f385a80e2a39efe" integrity sha512-2jtfdqTaSxk0cuBJBtTTWsot4WtR9RVr2rXg7x7OoqiuOKopPrwXpM1G4dXIkLcUNRh3RKzz76C8IOkksZSeOw== +google-protobuf@^3.6.1, google-protobuf@^3.9.1: + version "3.17.3" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.17.3.tgz#f87595073545a77946c8f0b67c302c5f7646d700" + integrity sha512-OVPzcSWIAJ+d5yiHyeaLrdufQtrvaBrF4JQg+z8ynTkbO3uFcujqXszTumqg1cGsAsjkWnI+M5B1xZ19yR4Wyg== + got@9.6.0, got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -10109,6 +10430,18 @@ grpc-tools@1.11.2: dependencies: "@mapbox/node-pre-gyp" "^1.0.5" +grpc@1.24.11: + version "1.24.11" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.24.11.tgz#7039da9f6f22ce35168535a6d5dda618398a5966" + integrity sha512-8/AQdFCzCeCDWW3SoaMNp6ccbRvTQEH1O1u1uFtt29eWsg5gSZCJ3m6fbkduEIh3smY7WAPP+LgVJ5n3nZRxcA== + dependencies: + "@mapbox/node-pre-gyp" "^1.0.4" + "@types/bytebuffer" "^5.0.40" + lodash.camelcase "^4.3.0" + lodash.clone "^4.5.0" + nan "^2.13.2" + protobufjs "^5.0.3" + grpc_tools_node_protoc_ts@5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.3.1.tgz#6f81ab7c8289c801cba3373aa334c13ca8f29618" @@ -10922,6 +11255,11 @@ interpret@^2.2.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + io-ts@1.10.4: version "1.10.4" resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" @@ -11046,6 +11384,26 @@ ipfs-utils@^8.1.2, ipfs-utils@^8.1.4: react-native-fetch-api "^2.0.0" stream-to-it "^0.2.2" +iroha-helpers-ts@0.9.25-ss: + version "0.9.25-ss" + resolved "https://registry.yarnpkg.com/iroha-helpers-ts/-/iroha-helpers-ts-0.9.25-ss.tgz#3091e4ee3009ef3ddd13ae9134e55f1b9edd308c" + integrity sha512-bbmhgrlf1B/TlWyBNd9EQVJLYfL/mXWohxsVu9jDVV1L21B4uM0CtSdllGsEncKbNBheLjYQ4Z7zgxKDxn6+zA== + dependencies: + "@improbable-eng/grpc-web" "^0.12.0" + "@improbable-eng/grpc-web-node-http-transport" "^0.13.0" + babel-preset-minify "^0.5.1" + buffer "^5.4.0" + ed25519.js "^1.3.0" + google-protobuf "^3.9.1" + js-sha3 "^0.8.0" + lodash.clonedeep "^4.5.0" + lodash.flow "^3.5.0" + lodash.isequal "^4.5.0" + lodash.isplainobject "^4.0.6" + ts-protoc-gen "^0.12.0" + tslib "^1.10.0" + tweetnacl "^1.0.3" + is-absolute-url@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" @@ -11925,6 +12283,13 @@ js-yaml@3.14.1, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -11979,6 +12344,13 @@ json-schema-ref-parser@^8.0.0: dependencies: "@apidevtools/json-schema-ref-parser" "8.0.0" +json-schema-ref-parser@^9.0.7: + version "9.0.9" + resolved "https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#66ea538e7450b12af342fa3d5b8458bc1e1e013f" + integrity sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q== + dependencies: + "@apidevtools/json-schema-ref-parser" "9.0.9" + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -12384,6 +12756,13 @@ latest-version@^5.0.0: dependencies: package-json "^6.3.0" +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + lcov-parse@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0" @@ -12715,6 +13094,11 @@ lodash.camelcase@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= +lodash.clone@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" + integrity sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y= + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -12730,6 +13114,16 @@ lodash.flattendeep@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= +lodash.flow@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a" + integrity sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o= + +lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= + lodash.includes@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" @@ -12740,6 +13134,11 @@ lodash.isboolean@^3.0.3: resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + lodash.isinteger@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" @@ -12907,6 +13306,11 @@ long@^4.0.0: resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== +long@~3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" + integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= + loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -13705,7 +14109,7 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.12.1, nan@^2.14.0, nan@^2.14.1, nan@^2.14.2, nan@^2.15.0, nan@^2.2.1: +nan@^2.12.1, nan@^2.13.2, nan@^2.14.0, nan@^2.14.1, nan@^2.14.2, nan@^2.15.0, nan@^2.2.1: version "2.15.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== @@ -14425,7 +14829,7 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -ono@^7.1.1: +ono@^7.1.1, ono@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/ono/-/ono-7.1.3.tgz#a054e96a388f566a6c4c95e1e92b9b253722d286" integrity sha512-9jnfVriq7uJM4o5ganUY54ntUm+5EK21EGaQ5NWnkWg3zz5ywbbonlBguRcnmF1/HDiIe3zxNxXcO1YPBmPcQQ== @@ -14449,6 +14853,11 @@ open@^7.0.0: is-docker "^2.0.0" is-wsl "^2.1.1" +openapi-types@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/openapi-types/-/openapi-types-7.0.1.tgz#966bcacfd14119fa12000dbc9d588bfd8df2e4d1" + integrity sha512-6pi4/Fw+JIW1HHda2Ij7LRJ5QJ8f6YzaXnsRA6m44BJz8nLq/j5gVFzPBKJo+uOFhAeHqZC/3uzhTpYPga3Q/A== + openapi-types@9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/openapi-types/-/openapi-types-9.1.0.tgz#a2ab0acc5198c1725f83d7cbe063efd1bcd0479e" @@ -14490,6 +14899,11 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +optjs@~3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee" + integrity sha1-aabOicRCpEQDFBrS+bNwvVu29O4= + ora@5.4.1, ora@^5.3.0: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -14532,6 +14946,13 @@ os-homedir@^1.0.0: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + dependencies: + lcid "^1.0.0" + os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -14986,7 +15407,7 @@ path-to-regexp@3.2.0: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.2.0.tgz#fa7877ecbc495c601907562222453c43cc204a5f" integrity sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA== -path-to-regexp@^6.1.0: +path-to-regexp@^6.1.0, path-to-regexp@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.0.tgz#f7b3803336104c346889adece614669230645f38" integrity sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg== @@ -15795,6 +16216,13 @@ progress@^2.0.0, progress@^2.0.3: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +prom-client@13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-13.1.0.tgz#1185caffd8691e28d32e373972e662964e3dba45" + integrity sha512-jT9VccZCWrJWXdyEtQddCDszYsiuWj5T0ekrPszi/WEegj3IZy6Mm09iOOVM86A4IKMWq8hZkT2dD9MaSe+sng== + dependencies: + tdigest "^0.1.1" + prom-client@13.2.0: version "13.2.0" resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-13.2.0.tgz#99d13357912dd400f8911b77df19f7b328a93e92" @@ -15865,6 +16293,16 @@ protobufjs@6.11.2, protobufjs@^6.10.0, protobufjs@^6.10.2, protobufjs@^6.11.2: "@types/node" ">=13.7.0" long "^4.0.0" +protobufjs@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17" + integrity sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA== + dependencies: + ascli "~1" + bytebuffer "~5" + glob "^7.0.5" + yargs "^3.10.0" + protoc-gen-ts@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/protoc-gen-ts/-/protoc-gen-ts-0.4.0.tgz#4be7e2086dc32db15f01733a7a200793f1e1081a" @@ -18781,6 +19219,13 @@ ts-node@^10.0.0: make-error "^1.1.1" yn "3.1.1" +ts-protoc-gen@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/ts-protoc-gen/-/ts-protoc-gen-0.12.0.tgz#932e5738f14b67e7202825b06f8c548cb7d8ef34" + integrity sha512-V7jnICJxKqalBrnJSMTW5tB9sGi48gOC325bfcM7TDNUItVOlaMM//rQmuo49ybipk/SyJTnWXgtJnhHCevNJw== + dependencies: + google-protobuf "^3.6.1" + tsconfig-paths@^3.9.0: version "3.11.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" @@ -20071,6 +20516,11 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== +window-size@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + integrity sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY= + winston@^2.4.5: version "2.4.5" resolved "https://registry.yarnpkg.com/winston/-/winston-2.4.5.tgz#f2e431d56154c4ea765545fc1003bd340c95b59a" @@ -20301,6 +20751,11 @@ xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +y18n@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + y18n@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" @@ -20435,6 +20890,19 @@ yargs@^17.0.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^3.10.0: + version "3.32.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" + integrity sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU= + dependencies: + camelcase "^2.0.1" + cliui "^3.0.3" + decamelize "^1.1.1" + os-locale "^1.4.0" + string-width "^1.0.1" + window-size "^0.1.4" + y18n "^3.2.0" + yauzl@^2.10.0, yauzl@^2.4.2: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"