From f05706b37a714bad2cd4ee0a14613a6226f5a4b9 Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Fri, 1 Nov 2024 01:41:35 -0400 Subject: [PATCH 01/11] allow ignition modules as a dependency for futures --- .../core/src/ignition-module-serializer.ts | 59 ++++++++++++++----- packages/core/src/internal/batcher.ts | 23 +++++++- packages/core/src/internal/module-builder.ts | 40 +++++++++++++ packages/core/src/internal/module.ts | 2 +- .../utils/adjacency-list-converter.ts | 13 ++-- packages/core/src/types/module-builder.ts | 28 ++++----- packages/core/src/types/module.ts | 22 +++---- packages/core/src/types/serialization.ts | 2 +- packages/core/test/batcher.ts | 10 +++- packages/core/test/call.ts | 10 +++- packages/core/test/contract.ts | 12 +++- packages/core/test/contractAt.ts | 10 +++- packages/core/test/contractAtFromArtifact.ts | 10 +++- packages/core/test/contractFromArtifact.ts | 10 +++- packages/core/test/encodeFunctionCall.ts | 12 +++- packages/core/test/library.ts | 10 +++- packages/core/test/libraryFromArtifact.ts | 10 +++- packages/core/test/send.ts | 12 +++- packages/core/test/staticCall.ts | 10 +++- packages/core/test/types/module.ts | 2 +- packages/ui/examples/ComplexModule.js | 12 +++- packages/ui/src/main.css | 6 ++ .../components/deployment-flow.tsx | 13 +++- packages/ui/src/utils/to-mermaid.ts | 7 ++- 24 files changed, 269 insertions(+), 76 deletions(-) diff --git a/packages/core/src/ignition-module-serializer.ts b/packages/core/src/ignition-module-serializer.ts index 11808b00b..a04b0fe62 100644 --- a/packages/core/src/ignition-module-serializer.ts +++ b/packages/core/src/ignition-module-serializer.ts @@ -136,7 +136,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), contractName: future.contractName, constructorArgs: future.constructorArgs.map((arg) => @@ -161,7 +163,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), contractName: future.contractName, artifact: future.artifact, @@ -187,7 +191,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), contractName: future.contractName, from: isRuntimeValue(future.from) @@ -204,7 +210,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), contractName: future.contractName, artifact: future.artifact, @@ -222,7 +230,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), contract: this._convertFutureToFutureToken(future.contract), functionName: future.functionName, @@ -245,7 +255,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), contract: this._convertFutureToFutureToken(future.contract), functionName: future.functionName, @@ -264,7 +276,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), contract: this._convertFutureToFutureToken(future.contract), functionName: future.functionName, @@ -279,7 +293,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), contractName: future.contractName, address: isFuture(future.address) @@ -298,7 +314,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), contractName: future.contractName, artifact: future.artifact, @@ -318,7 +336,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), futureToReadFrom: this._convertFutureToFutureToken( future.futureToReadFrom @@ -336,7 +356,9 @@ export class IgnitionModuleSerializer { moduleId: future.module.id, type: future.type, dependencies: Array.from(future.dependencies).map((d) => - this._convertFutureToFutureToken(d) + isFuture(d) + ? this._convertFutureToFutureToken(d) + : this._convertModuleToModuleToken(d) ), to: isFuture(future.to) ? this._convertFutureToFutureToken(future.to) @@ -475,7 +497,14 @@ export class IgnitionModuleDeserializer { ); for (const dependencyId of serializedFuture.dependencies) { - const dependency = this._lookup(futuresLookup, dependencyId.futureId); + let dependency: Future | IgnitionModule; + + if (dependencyId._kind === "FutureToken") { + dependency = this._lookup(futuresLookup, dependencyId.futureId); + } else { + dependency = this._lookup(modulesLookup, dependencyId.moduleId); + } + future.dependencies.add(dependency); } @@ -548,8 +577,10 @@ export class IgnitionModuleDeserializer { for (const serializedFuture of serializedFutures) { for (const dependencyToken of serializedFuture.dependencies) { - const dependency = serializedFuturesMap[dependencyToken.futureId]; - graph.get(dependency)!.add(serializedFuture); + if (dependencyToken._kind === "FutureToken") { + const dependency = serializedFuturesMap[dependencyToken.futureId]; + graph.get(dependency)!.add(serializedFuture); + } } } diff --git a/packages/core/src/internal/batcher.ts b/packages/core/src/internal/batcher.ts index 3c4ef0b90..ef5264ae7 100644 --- a/packages/core/src/internal/batcher.ts +++ b/packages/core/src/internal/batcher.ts @@ -130,7 +130,28 @@ export class Batcher { ): boolean { const dependencies = batchState.adjacencyList.getDependenciesFor(futureId); - return [...dependencies].every( + return [...dependencies].every((depId) => { + if (/#/.test(depId)) { + return batchState.visitState[depId] === VisitStatus.VISITED; + } + + return this._checkModuleDependencyIsComplete(depId, batchState); + }); + } + + /** + * This is needed because moduleIds are not present in the visit state + * causing an infinite loop when checking whether a depenedency is visited if that dependency is a module. + */ + private static _checkModuleDependencyIsComplete( + moduleId: string, + batchState: BatchState + ) { + const dependencies = Object.keys(batchState.visitState).filter((futureId) => + futureId.startsWith(moduleId) + ); + + return dependencies.every( (depId) => batchState.visitState[depId] === VisitStatus.VISITED ); } diff --git a/packages/core/src/internal/module-builder.ts b/packages/core/src/internal/module-builder.ts index 40d3d7f60..5dd313193 100644 --- a/packages/core/src/internal/module-builder.ts +++ b/packages/core/src/internal/module-builder.ts @@ -299,6 +299,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } for (const libraryFuture of Object.values(options.libraries)) { @@ -356,6 +360,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } for (const libraryFuture of Object.values(options.libraries)) { @@ -426,6 +434,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } for (const libraryFuture of Object.values(options.libraries)) { @@ -470,6 +482,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } for (const libraryFuture of Object.values(options.libraries)) { @@ -543,6 +559,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } this._module.futures.add(future); @@ -607,6 +627,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } this._module.futures.add(future); @@ -669,6 +693,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } this._module.futures.add(future); @@ -774,6 +802,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } if (isFuture(address)) { @@ -819,6 +851,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } if (isFuture(address)) { @@ -953,6 +989,10 @@ class IgnitionModuleBuilderImplementation< for (const afterFuture of options.after ?? []) { future.dependencies.add(afterFuture); + + if (!isFuture(afterFuture)) { + this._module.submodules.add(afterFuture); + } } this._module.futures.add(future); diff --git a/packages/core/src/internal/module.ts b/packages/core/src/internal/module.ts index afa58b40c..7ce4820f0 100644 --- a/packages/core/src/internal/module.ts +++ b/packages/core/src/internal/module.ts @@ -27,7 +27,7 @@ import { const customInspectSymbol = Symbol.for("util.inspect.custom"); abstract class BaseFutureImplementation { - public readonly dependencies: Set = new Set(); + public readonly dependencies: Set = new Set(); constructor( public readonly id: string, diff --git a/packages/core/src/internal/utils/adjacency-list-converter.ts b/packages/core/src/internal/utils/adjacency-list-converter.ts index e2993f441..7a10ebfcd 100644 --- a/packages/core/src/internal/utils/adjacency-list-converter.ts +++ b/packages/core/src/internal/utils/adjacency-list-converter.ts @@ -1,3 +1,4 @@ +import { isFuture } from "../../type-guards"; import { Future } from "../../types/module"; import { AdjacencyList } from "./adjacency-list"; @@ -12,11 +13,13 @@ export class AdjacencyListConverter { for (const dependency of future.dependencies) { dependencyGraph.addDependency({ from: future.id, to: dependency.id }); - this._optionallyAddDependenciesSubmoduleSiblings( - dependencyGraph, - future, - dependency - ); + if (isFuture(dependency)) { + this._optionallyAddDependenciesSubmoduleSiblings( + dependencyGraph, + future, + dependency + ); + } } } diff --git a/packages/core/src/types/module-builder.ts b/packages/core/src/types/module-builder.ts index 4a8221af2..4daad3661 100644 --- a/packages/core/src/types/module-builder.ts +++ b/packages/core/src/types/module-builder.ts @@ -35,9 +35,9 @@ export interface ContractOptions { id?: string; /** - * The futures to execute before this one. + * The futures or Ignition modules to execute before this one. */ - after?: Future[]; + after?: Array; /** * The libraries to link to the contract. @@ -71,9 +71,9 @@ export interface LibraryOptions { id?: string; /** - * The futures to execute before this one. + * The futures or Ignition modules to execute before this one. */ - after?: Future[]; + after?: Array; /** * The libraries to link to the contract. @@ -98,9 +98,9 @@ export interface CallOptions { id?: string; /** - * The futures to execute before this one. + * The futures or Ignition modules to execute before this one. */ - after?: Future[]; + after?: Array; /** * The value in wei to send with the transaction. @@ -129,9 +129,9 @@ export interface StaticCallOptions { id?: string; /** - * The futures to execute before this one. + * The futures or Ignition modules to execute before this one. */ - after?: Future[]; + after?: Array; /** * The account to send the transaction from. @@ -151,9 +151,9 @@ export interface EncodeFunctionCallOptions { id?: string; /** - * The futures to execute before this one. + * The futures or Ignition modules to execute before this one. */ - after?: Future[]; + after?: Array; } /** @@ -168,9 +168,9 @@ export interface ContractAtOptions { id?: string; /** - * The futures to execute before this one. + * The futures or Ignition modules to execute before this one. */ - after?: Future[]; + after?: Array; } /** @@ -204,9 +204,9 @@ export interface ReadEventArgumentOptions { */ export interface SendDataOptions { /** - * The futures to execute before this one. + * The futures or Ignition modules to execute before this one. */ - after?: Future[]; + after?: Array; /** * The account to send the transaction from. diff --git a/packages/core/src/types/module.ts b/packages/core/src/types/module.ts index 55732b36b..45160b154 100644 --- a/packages/core/src/types/module.ts +++ b/packages/core/src/types/module.ts @@ -134,7 +134,7 @@ export interface NamedArtifactContractDeploymentFuture< type: FutureType.NAMED_ARTIFACT_CONTRACT_DEPLOYMENT; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; contractName: ContractNameT; constructorArgs: ArgumentType[]; libraries: Record>; @@ -156,7 +156,7 @@ export interface ContractDeploymentFuture { type: FutureType.CONTRACT_DEPLOYMENT; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; contractName: string; artifact: Artifact; constructorArgs: ArgumentType[]; @@ -180,7 +180,7 @@ export interface NamedArtifactLibraryDeploymentFuture< type: FutureType.NAMED_ARTIFACT_LIBRARY_DEPLOYMENT; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; contractName: LibraryNameT; libraries: Record>; from: string | AccountRuntimeValue | undefined; @@ -196,7 +196,7 @@ export interface LibraryDeploymentFuture { type: FutureType.LIBRARY_DEPLOYMENT; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; contractName: string; artifact: Artifact; libraries: Record>; @@ -215,7 +215,7 @@ export interface ContractCallFuture< type: FutureType.CONTRACT_CALL; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; contract: ContractFuture; functionName: FunctionNameT; args: ArgumentType[]; @@ -239,7 +239,7 @@ export interface StaticCallFuture< type: FutureType.STATIC_CALL; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; contract: ContractFuture; functionName: FunctionNameT; nameOrIndex: string | number; @@ -259,7 +259,7 @@ export interface EncodeFunctionCallFuture< type: FutureType.ENCODE_FUNCTION_CALL; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; contract: ContractFuture; functionName: FunctionNameT; args: ArgumentType[]; @@ -274,7 +274,7 @@ export interface NamedArtifactContractAtFuture { type: FutureType.NAMED_ARTIFACT_CONTRACT_AT; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; contractName: ContractNameT; address: | string @@ -292,7 +292,7 @@ export interface ContractAtFuture { type: FutureType.CONTRACT_AT; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; contractName: string; address: | string @@ -311,7 +311,7 @@ export interface ReadEventArgumentFuture { type: FutureType.READ_EVENT_ARGUMENT; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; futureToReadFrom: | NamedArtifactContractDeploymentFuture | ContractDeploymentFuture @@ -332,7 +332,7 @@ export interface SendDataFuture { type: FutureType.SEND_DATA; id: string; module: IgnitionModule; - dependencies: Set; + dependencies: Set; to: | string | AddressResolvableFuture diff --git a/packages/core/src/types/serialization.ts b/packages/core/src/types/serialization.ts index 025c3c9d7..72289b675 100644 --- a/packages/core/src/types/serialization.ts +++ b/packages/core/src/types/serialization.ts @@ -64,7 +64,7 @@ export interface ModuleToken { export interface BaseSerializedFuture { id: string; type: FutureType; - dependencies: FutureToken[]; + dependencies: Array; moduleId: string; } diff --git a/packages/core/test/batcher.ts b/packages/core/test/batcher.ts index 8d2c25d75..e735708e1 100644 --- a/packages/core/test/batcher.ts +++ b/packages/core/test/batcher.ts @@ -40,9 +40,14 @@ describe("batcher", () => { }); it("should batch through dependencies", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const ignitionModule = buildModule("Module1", (m) => { const contract1 = m.contract("Contract1"); - const contract2 = m.contract("Contract2"); + const contract2 = m.contract("Contract2", [], { after: [otherModule] }); const contract3 = m.contract("Contract3", [contract1, contract2]); @@ -58,7 +63,8 @@ describe("batcher", () => { }); assertBatching({ ignitionModule }, [ - ["Module1#Contract1", "Module1#Contract2"], + ["Module1#Contract1", "Module2#Example"], + ["Module1#Contract2"], ["Module1#Contract3"], ["Module1#Contract4", "Module1#Contract5"], ]); diff --git a/packages/core/test/call.ts b/packages/core/test/call.ts index 568e6b644..6dd4debea 100644 --- a/packages/core/test/call.ts +++ b/packages/core/test/call.ts @@ -87,11 +87,16 @@ describe("call", () => { }); it("should be able to pass one contract as an after dependency of a call", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.contract("Example"); const another = m.contract("Another"); - m.call(example, "test", [], { after: [another] }); + m.call(example, "test", [], { after: [another, otherModule] }); return { example, another }; }); @@ -114,9 +119,10 @@ describe("call", () => { assert.fail("Not a named contract deployment"); } - assert.equal(callFuture.dependencies.size, 2); + assert.equal(callFuture.dependencies.size, 3); assert(callFuture.dependencies.has(exampleFuture!)); assert(callFuture.dependencies.has(anotherFuture!)); + assert(callFuture.dependencies.has(otherModule!)); }); it("should be able to pass value as an option", () => { diff --git a/packages/core/test/contract.ts b/packages/core/test/contract.ts index 8de703491..395447ef3 100644 --- a/packages/core/test/contract.ts +++ b/packages/core/test/contract.ts @@ -78,9 +78,16 @@ describe("contract", () => { }); it("should be able to pass one contract as an after dependency of another", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.contract("Example"); - const another = m.contract("Another", [], { after: [example] }); + const another = m.contract("Another", [], { + after: [example, otherModule], + }); return { example, another }; }); @@ -101,8 +108,9 @@ describe("contract", () => { assert.fail("Not a named contract deployment"); } - assert.equal(anotherFuture.dependencies.size, 1); + assert.equal(anotherFuture.dependencies.size, 2); assert(anotherFuture.dependencies.has(exampleFuture!)); + assert(anotherFuture.dependencies.has(otherModule!)); }); it("should be able to pass a library as a dependency of a contract", () => { diff --git a/packages/core/test/contractAt.ts b/packages/core/test/contractAt.ts index 4bc328abe..aacfb2308 100644 --- a/packages/core/test/contractAt.ts +++ b/packages/core/test/contractAt.ts @@ -47,10 +47,15 @@ describe("contractAt", () => { }); it("should be able to pass an after dependency", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.contract("Example"); const another = m.contractAt("Another", exampleAddress, { - after: [example], + after: [example, otherModule], }); return { example, another }; @@ -61,8 +66,9 @@ describe("contractAt", () => { const exampleFuture = moduleWithDependentContracts.results.example; const anotherFuture = moduleWithDependentContracts.results.another; - assert.equal(anotherFuture.dependencies.size, 1); + assert.equal(anotherFuture.dependencies.size, 2); assert(anotherFuture.dependencies.has(exampleFuture!)); + assert(anotherFuture.dependencies.has(otherModule)); }); it("should be able to pass a static call future as the address", () => { diff --git a/packages/core/test/contractAtFromArtifact.ts b/packages/core/test/contractAtFromArtifact.ts index 79ffa04a2..fe2483860 100644 --- a/packages/core/test/contractAtFromArtifact.ts +++ b/packages/core/test/contractAtFromArtifact.ts @@ -48,10 +48,15 @@ describe("contractAtFromArtifact", () => { }); it("should be able to pass an after dependency", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.contract("Example"); const another = m.contractAt("Another", fakeArtifact, exampleAddress, { - after: [example], + after: [example, otherModule], }); return { example, another }; @@ -62,8 +67,9 @@ describe("contractAtFromArtifact", () => { const exampleFuture = moduleWithDependentContracts.results.example; const anotherFuture = moduleWithDependentContracts.results.another; - assert.equal(anotherFuture.dependencies.size, 1); + assert.equal(anotherFuture.dependencies.size, 2); assert(anotherFuture.dependencies.has(exampleFuture!)); + assert(anotherFuture.dependencies.has(otherModule)); }); it("should be able to pass a static call future as the address", () => { diff --git a/packages/core/test/contractFromArtifact.ts b/packages/core/test/contractFromArtifact.ts index bf938c39c..024588200 100644 --- a/packages/core/test/contractFromArtifact.ts +++ b/packages/core/test/contractFromArtifact.ts @@ -70,10 +70,15 @@ describe("contractFromArtifact", () => { }); it("should be able to pass an after dependency", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.contract("Example"); const another = m.contract("Another", fakeArtifact, [], { - after: [example], + after: [example, otherModule], }); return { example, another }; @@ -84,8 +89,9 @@ describe("contractFromArtifact", () => { const exampleFuture = moduleWithDependentContracts.results.example; const anotherFuture = moduleWithDependentContracts.results.another; - assert.equal(anotherFuture.dependencies.size, 1); + assert.equal(anotherFuture.dependencies.size, 2); assert(anotherFuture.dependencies.has(exampleFuture!)); + assert(anotherFuture.dependencies.has(otherModule)); }); it("should be able to pass a library as a dependency of a contract", () => { diff --git a/packages/core/test/encodeFunctionCall.ts b/packages/core/test/encodeFunctionCall.ts index 3d240913f..6dc23cea2 100644 --- a/packages/core/test/encodeFunctionCall.ts +++ b/packages/core/test/encodeFunctionCall.ts @@ -87,11 +87,18 @@ describe("encodeFunctionCall", () => { }); it("should be able to pass one contract as an after dependency of a call", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.contract("Example"); const another = m.contract("Another"); - m.encodeFunctionCall(example, "test", [], { after: [another] }); + m.encodeFunctionCall(example, "test", [], { + after: [another, otherModule], + }); return { example, another }; }); @@ -114,9 +121,10 @@ describe("encodeFunctionCall", () => { assert.fail("Not a named encode function call future"); } - assert.equal(callFuture.dependencies.size, 2); + assert.equal(callFuture.dependencies.size, 3); assert(callFuture.dependencies.has(exampleFuture!)); assert(callFuture.dependencies.has(anotherFuture!)); + assert(callFuture.dependencies.has(otherModule!)); }); describe("Arguments", () => { diff --git a/packages/core/test/library.ts b/packages/core/test/library.ts index 88191fdb1..6ec758db0 100644 --- a/packages/core/test/library.ts +++ b/packages/core/test/library.ts @@ -45,9 +45,14 @@ describe("library", () => { }); it("should be able to pass one library as an after dependency of another", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.library("Example"); - const another = m.library("Another", { after: [example] }); + const another = m.library("Another", { after: [example, otherModule] }); return { example, another }; }); @@ -68,8 +73,9 @@ describe("library", () => { assert.fail("Not a named library deployment"); } - assert.equal(anotherFuture.dependencies.size, 1); + assert.equal(anotherFuture.dependencies.size, 2); assert(anotherFuture.dependencies.has(exampleFuture!)); + assert(anotherFuture.dependencies.has(otherModule!)); }); it("should be able to pass a library as a dependency of a library", () => { diff --git a/packages/core/test/libraryFromArtifact.ts b/packages/core/test/libraryFromArtifact.ts index d63d214c2..c5dfe3375 100644 --- a/packages/core/test/libraryFromArtifact.ts +++ b/packages/core/test/libraryFromArtifact.ts @@ -41,10 +41,15 @@ describe("libraryFromArtifact", () => { }); it("should be able to pass an after dependency", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.library("Example"); const another = m.library("Another", fakeArtifact, { - after: [example], + after: [example, otherModule], }); return { example, another }; @@ -55,8 +60,9 @@ describe("libraryFromArtifact", () => { const exampleFuture = moduleWithDependentContracts.results.example; const anotherFuture = moduleWithDependentContracts.results.another; - assert.equal(anotherFuture.dependencies.size, 1); + assert.equal(anotherFuture.dependencies.size, 2); assert(anotherFuture.dependencies.has(exampleFuture!)); + assert(anotherFuture.dependencies.has(otherModule!)); }); it("should be able to pass a library as a dependency of a library", () => { diff --git a/packages/core/test/send.ts b/packages/core/test/send.ts index b61b6868b..ee2846ca6 100644 --- a/packages/core/test/send.ts +++ b/packages/core/test/send.ts @@ -79,9 +79,16 @@ describe("send", () => { }); it("should be able to pass one contract as an after dependency of a send", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.contract("Example"); - m.send("test_send", exampleAddress, 0n, "", { after: [example] }); + m.send("test_send", exampleAddress, 0n, "", { + after: [example, otherModule], + }); return { example }; }); @@ -100,8 +107,9 @@ describe("send", () => { assert.fail("Not a send data future"); } - assert.equal(sendFuture.dependencies.size, 1); + assert.equal(sendFuture.dependencies.size, 2); assert(sendFuture.dependencies.has(exampleFuture!)); + assert(sendFuture.dependencies.has(otherModule!)); }); it("should be able to pass a value", () => { diff --git a/packages/core/test/staticCall.ts b/packages/core/test/staticCall.ts index 1ce966d63..3da0fb56a 100644 --- a/packages/core/test/staticCall.ts +++ b/packages/core/test/staticCall.ts @@ -88,11 +88,16 @@ describe("static call", () => { }); it("should be able to pass one contract as an after dependency of a static call", () => { + const otherModule = buildModule("Module2", (m) => { + const example = m.contract("Example"); + return { example }; + }); + const moduleWithDependentContracts = buildModule("Module1", (m) => { const example = m.contract("Example"); const another = m.contract("Another"); - m.staticCall(example, "test", [], 0, { after: [another] }); + m.staticCall(example, "test", [], 0, { after: [another, otherModule] }); return { example, another }; }); @@ -115,9 +120,10 @@ describe("static call", () => { assert.fail("Not a named contract deployment"); } - assert.equal(callFuture.dependencies.size, 2); + assert.equal(callFuture.dependencies.size, 3); assert(callFuture.dependencies.has(exampleFuture!)); assert(callFuture.dependencies.has(anotherFuture!)); + assert(callFuture.dependencies.has(otherModule!)); }); it("should be able to pass its result into another call", () => { diff --git a/packages/core/test/types/module.ts b/packages/core/test/types/module.ts index 3adbad465..0eb14c6ae 100644 --- a/packages/core/test/types/module.ts +++ b/packages/core/test/types/module.ts @@ -17,7 +17,7 @@ interface BaseFuture { id: string; type: FutureType; module: IgnitionModule; - dependencies: Set; + dependencies: Set; } interface BaseRuntimeValue { diff --git a/packages/ui/examples/ComplexModule.js b/packages/ui/examples/ComplexModule.js index 519235d30..64db7dd2e 100644 --- a/packages/ui/examples/ComplexModule.js +++ b/packages/ui/examples/ComplexModule.js @@ -2,8 +2,18 @@ import { buildModule } from "@nomicfoundation/ignition-core"; const fakeArtifact = ["fake artifact"]; +const fakeModuleDependency = buildModule("FakeModule", (m) => { + const contract = m.contract("FakeContract", [1, 2, 3]); + + m.call(contract, "initialize", [4, 5, 6]); + + return {}; +}); + const uniswap = buildModule("Uniswap", (m) => { - const router = m.contract("UniswapRouter", [1, 2, 3]); + const router = m.contract("UniswapRouter", [1, 2, 3], { + after: [fakeModuleDependency], + }); m.call(router, "configure", [3, 4, 5]); diff --git a/packages/ui/src/main.css b/packages/ui/src/main.css index 5d0a72307..f46bfd003 100644 --- a/packages/ui/src/main.css +++ b/packages/ui/src/main.css @@ -43,6 +43,12 @@ body { max-width: 391px !important; } +span.future-to-module-arrow { + font-weight: 900 !important; + font-size: medium !important; + letter-spacing: -2px; +} + /* mermaid styles */ .mermaid { diff --git a/packages/ui/src/pages/visualization-overview/components/deployment-flow.tsx b/packages/ui/src/pages/visualization-overview/components/deployment-flow.tsx index 419ab844c..23c13e8b9 100644 --- a/packages/ui/src/pages/visualization-overview/components/deployment-flow.tsx +++ b/packages/ui/src/pages/visualization-overview/components/deployment-flow.tsx @@ -100,12 +100,19 @@ const FlowTooltip: React.FC = () => (
Diagram reference
- Future to future dependency + Future to future dependency         - ---> + + -----------> + +
+ Future to module dependency      + + ----> +
Module to module dependency     - - - -> + - - ->
); diff --git a/packages/ui/src/utils/to-mermaid.ts b/packages/ui/src/utils/to-mermaid.ts index 02d681db7..f37dcfd87 100644 --- a/packages/ui/src/utils/to-mermaid.ts +++ b/packages/ui/src/utils/to-mermaid.ts @@ -22,12 +22,15 @@ export function toMermaid( ...new Set( getAllFuturesForModule(ignitionModule) .flatMap((f) => - Array.from(f.dependencies).map((d) => [ + Array.from(f.dependencies).map<[string, string, boolean]>((d) => [ toEscapedId(f.id), toEscapedId(d.id), + /#/.test(d.id), ]) ) - .map(([from, to]) => `${from} --> ${to}`) + .map( + ([from, to, isFuture]) => `${from} ${isFuture ? "-->" : "==>"} ${to}` + ) ), ].join("\n"); From dd39beebe1acd4284bb852df450de2ab84a6ed8b Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Wed, 20 Nov 2024 01:45:32 -0500 Subject: [PATCH 02/11] fix existing library bug and add comment for known issue --- .../components/deployment-flow.tsx | 7 +++++++ .../visualization-overview/components/future-header.tsx | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/ui/src/pages/visualization-overview/components/deployment-flow.tsx b/packages/ui/src/pages/visualization-overview/components/deployment-flow.tsx index 23c13e8b9..99f6f5871 100644 --- a/packages/ui/src/pages/visualization-overview/components/deployment-flow.tsx +++ b/packages/ui/src/pages/visualization-overview/components/deployment-flow.tsx @@ -93,6 +93,13 @@ const VisualizeDiv = styled.div` width: 100%; `; +// TODO: when we added the future-to-module dependency, we created a non-ideal situation where +// a module-to-module dependency arrow still gets added to the mermaid graph, even if the dependant module +// is only used as a future-to-module dependency. This is because the dependant module has to get added to the +// parent module as a submodule, and we currently don't have a way of distinguishing at this point in the code between +// a submodule that is exclusively used as a future-to-module dependency (i.e. in { after: [...] }) +// and a submodule that is used as a module-to-module dependency (i.e. in m.useModule(...)). +// This is a known issue that we have decided to revisit at a later point in time because the solution is not trivial. const FlowTooltip: React.FC = () => ( diff --git a/packages/ui/src/pages/visualization-overview/components/future-header.tsx b/packages/ui/src/pages/visualization-overview/components/future-header.tsx index 211991dd6..ccbe4753a 100644 --- a/packages/ui/src/pages/visualization-overview/components/future-header.tsx +++ b/packages/ui/src/pages/visualization-overview/components/future-header.tsx @@ -8,15 +8,6 @@ export const FutureHeader: React.FC<{ setCurrentlyHovered: (id: string) => void; future: Future; }> = ({ isLibrary, toggled, displayText, setCurrentlyHovered, future }) => { - if (isLibrary) { - return ( - -
- {displayText} - - ); - } - return ( {isLibrary ?
: } From cf758da522a6adbfc9c0be1a6bdd09121fce9cd2 Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Sun, 15 Dec 2024 04:18:27 -0500 Subject: [PATCH 03/11] add comment regarding testing for module id --- packages/core/src/internal/batcher.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/internal/batcher.ts b/packages/core/src/internal/batcher.ts index ef5264ae7..26bb2348d 100644 --- a/packages/core/src/internal/batcher.ts +++ b/packages/core/src/internal/batcher.ts @@ -131,6 +131,7 @@ export class Batcher { const dependencies = batchState.adjacencyList.getDependenciesFor(futureId); return [...dependencies].every((depId) => { + // We distinguish between module and future ids here, as the future's always have `#` and the modules don't. if (/#/.test(depId)) { return batchState.visitState[depId] === VisitStatus.VISITED; } From 5c4b7e859d51b2643300e86a22815eb67e8cb9b1 Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Wed, 11 Dec 2024 06:52:26 -0500 Subject: [PATCH 04/11] handle errors when verifying external artifacts --- packages/core/src/types/verify.ts | 3 +- packages/core/src/verify.ts | 33 +- .../artifacts/LockModule#Basic.json | 35 + .../artifacts/LockModule#Basic2.json | 35 + .../artifacts/LockModule#Lock.dbg.json | 4 + .../artifacts/LockModule#Lock.json | 74 + .../647c95b5130e7afe0806dc404d889d09.json | 5180 +++++++++++++++++ .../deployed_addresses.json | 5 + .../verify/external-artifacts/journal.jsonl | 13 + packages/core/test/verify.ts | 55 +- packages/hardhat-plugin/src/index.ts | 8 + 11 files changed, 5436 insertions(+), 9 deletions(-) create mode 100644 packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Basic.json create mode 100644 packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Basic2.json create mode 100644 packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Lock.dbg.json create mode 100644 packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Lock.json create mode 100644 packages/core/test/mocks/verify/external-artifacts/build-info/647c95b5130e7afe0806dc404d889d09.json create mode 100644 packages/core/test/mocks/verify/external-artifacts/deployed_addresses.json create mode 100644 packages/core/test/mocks/verify/external-artifacts/journal.jsonl diff --git a/packages/core/src/types/verify.ts b/packages/core/src/types/verify.ts index 49b4f6447..c3d1caa51 100644 --- a/packages/core/src/types/verify.ts +++ b/packages/core/src/types/verify.ts @@ -41,7 +41,8 @@ export interface VerifyInfo { /** * The result of requesting the verification info for a deployment. * It returns the chainConfig followed by an array of VerifyInfo objects, one for each contract to be verified. + * Alternatively, it returns null and the contract name if the contract used external artifacts that could not be resolved for verification. * * @beta */ -export type VerifyResult = [ChainConfig, VerifyInfo]; +export type VerifyResult = [ChainConfig, VerifyInfo] | [null, name: string]; diff --git a/packages/core/src/verify.ts b/packages/core/src/verify.ts index c6793d9be..aaa1db5d9 100644 --- a/packages/core/src/verify.ts +++ b/packages/core/src/verify.ts @@ -20,6 +20,7 @@ import { Artifact, BuildInfo, CompilerInput } from "./types/artifact"; import { ChainConfig, SourceToLibraryToAddress, + VerifyInfo, VerifyResult, } from "./types/verify"; @@ -66,6 +67,11 @@ export async function* getVerificationInformation( includeUnrelatedContracts ); + if (typeof verifyInfo === "string") { + yield [null, verifyInfo]; + continue; + } + const verifyResult: VerifyResult = [chainConfig, verifyInfo]; yield verifyResult; @@ -126,11 +132,28 @@ async function convertExStateToVerifyInfo( exState: DeploymentExecutionState, deploymentLoader: FileDeploymentLoader, includeUnrelatedContracts: boolean = false -) { - const [buildInfo, artifact] = await Promise.all([ - deploymentLoader.readBuildInfo(exState.artifactId), - deploymentLoader.loadArtifact(exState.artifactId), - ]); +): Promise { + let result: [BuildInfo, Artifact]; + + try { + result = await Promise.all([ + deploymentLoader.readBuildInfo(exState.artifactId), + deploymentLoader.loadArtifact(exState.artifactId), + ]); + } catch (e) { + assertIgnitionInvariant( + e instanceof Error && "code" in e && e.code === "ENOENT", + `Unexpected error loading build info or artifact for deployment execution state ${ + exState.id + }: ${e as any}` + ); + + // if the artifact cannot be found, we cannot verify the contract + // we return the contract name so the recipient can know which contract could not be verified + return exState.artifactId; + } + + const [buildInfo, artifact] = result; const { contractName, constructorArgs, libraries } = exState; diff --git a/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Basic.json b/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Basic.json new file mode 100644 index 000000000..e7e8a72da --- /dev/null +++ b/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Basic.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Basic", + "sourceName": "contracts/Basic.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "add", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506101b4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Basic2.json b/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Basic2.json new file mode 100644 index 000000000..e7e8a72da --- /dev/null +++ b/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Basic2.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Basic", + "sourceName": "contracts/Basic.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "add", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506101b4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Lock.dbg.json b/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Lock.dbg.json new file mode 100644 index 000000000..09d8c22f3 --- /dev/null +++ b/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Lock.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/647c95b5130e7afe0806dc404d889d09.json" +} \ No newline at end of file diff --git a/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Lock.json b/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Lock.json new file mode 100644 index 000000000..81cc1e2c3 --- /dev/null +++ b/packages/core/test/mocks/verify/external-artifacts/artifacts/LockModule#Lock.json @@ -0,0 +1,74 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Lock", + "sourceName": "contracts/Lock.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "when", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/packages/core/test/mocks/verify/external-artifacts/build-info/647c95b5130e7afe0806dc404d889d09.json b/packages/core/test/mocks/verify/external-artifacts/build-info/647c95b5130e7afe0806dc404d889d09.json new file mode 100644 index 000000000..7a1977420 --- /dev/null +++ b/packages/core/test/mocks/verify/external-artifacts/build-info/647c95b5130e7afe0806dc404d889d09.json @@ -0,0 +1,5180 @@ +{ + "id": "647c95b5130e7afe0806dc404d889d09", + "_format": "hh-sol-build-info-1", + "solcVersion": "0.8.19", + "solcLongVersion": "0.8.19+commit.7dd6d404", + "input": { + "language": "Solidity", + "sources": { + "contracts/Basic.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.9;\n\ncontract Basic {\n function add(uint a, uint b) public pure returns (uint) {\n return a + b;\n }\n}" + }, + "contracts/Lock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.9;\n\n// Uncomment this line to use console.log\n// import \"hardhat/console.sol\";\n\ncontract Lock {\n uint public unlockTime;\n address payable public owner;\n\n event Withdrawal(uint amount, uint when);\n\n constructor(uint _unlockTime) payable {\n require(\n block.timestamp < _unlockTime,\n \"Unlock time should be in the future\"\n );\n\n unlockTime = _unlockTime;\n owner = payable(msg.sender);\n }\n\n function withdraw() public {\n // Uncomment this line, and the import of \"hardhat/console.sol\", to print a log in your terminal\n // console.log(\"Unlock time is %o and block timestamp is %o\", unlockTime, block.timestamp);\n\n require(block.timestamp >= unlockTime, \"You can't withdraw yet\");\n require(msg.sender == owner, \"You aren't the owner\");\n\n emit Withdrawal(address(this).balance, block.timestamp);\n\n owner.transfer(address(this).balance);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ], + "": [ + "ast" + ] + } + } + } + }, + "output": { + "sources": { + "contracts/Basic.sol": { + "ast": { + "absolutePath": "contracts/Basic.sol", + "exportedSymbols": { + "Basic": [ + 16 + ] + }, + "id": 17, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".9" + ], + "nodeType": "PragmaDirective", + "src": "39:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Basic", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 16, + "linearizedBaseContracts": [ + 16 + ], + "name": "Basic", + "nameLocation": "73:5:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 14, + "nodeType": "Block", + "src": "139:23:0", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 10, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "152:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 11, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "156:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "152:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9, + "id": 13, + "nodeType": "Return", + "src": "145:12:0" + } + ] + }, + "functionSelector": "771602f7", + "id": 15, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "92:3:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "a", + "nameLocation": "101:1:0", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "96:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "96:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5, + "mutability": "mutable", + "name": "b", + "nameLocation": "109:1:0", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "104:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "104:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "95:16:0" + }, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "133:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "133:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "132:6:0" + }, + "scope": 16, + "src": "83:79:0", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 17, + "src": "64:100:0", + "usedErrors": [] + } + ], + "src": "39:125:0" + }, + "id": 0 + }, + "contracts/Lock.sol": { + "ast": { + "absolutePath": "contracts/Lock.sol", + "exportedSymbols": { + "Lock": [ + 95 + ] + }, + "id": 96, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18, + "literals": [ + "solidity", + "^", + "0.8", + ".9" + ], + "nodeType": "PragmaDirective", + "src": "39:23:1" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Lock", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 95, + "linearizedBaseContracts": [ + 95 + ], + "name": "Lock", + "nameLocation": "149:4:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "251c1aa3", + "id": 20, + "mutability": "mutable", + "name": "unlockTime", + "nameLocation": "170:10:1", + "nodeType": "VariableDeclaration", + "scope": 95, + "src": "158:22:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "158:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8da5cb5b", + "id": 22, + "mutability": "mutable", + "name": "owner", + "nameLocation": "207:5:1", + "nodeType": "VariableDeclaration", + "scope": 95, + "src": "184:28:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 21, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "184:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "public" + }, + { + "anonymous": false, + "eventSelector": "bf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b93", + "id": 28, + "name": "Withdrawal", + "nameLocation": "223:10:1", + "nodeType": "EventDefinition", + "parameters": { + "id": 27, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 24, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "239:6:1", + "nodeType": "VariableDeclaration", + "scope": 28, + "src": "234:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 23, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "234:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 26, + "indexed": false, + "mutability": "mutable", + "name": "when", + "nameLocation": "252:4:1", + "nodeType": "VariableDeclaration", + "scope": 28, + "src": "247:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 25, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "247:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "233:24:1" + }, + "src": "217:41:1" + }, + { + "body": { + "id": 53, + "nodeType": "Block", + "src": "300:170:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 34, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "321:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "327:9:1", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "321:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 36, + "name": "_unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "339:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "321:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "556e6c6f636b2074696d652073686f756c6420626520696e2074686520667574757265", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "358:37:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "typeString": "literal_string \"Unlock time should be in the future\"" + }, + "value": "Unlock time should be in the future" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "typeString": "literal_string \"Unlock time should be in the future\"" + } + ], + "id": 33, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "306:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "306:95:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "306:95:1" + }, + { + "expression": { + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 41, + "name": "unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "408:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 42, + "name": "_unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "421:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "408:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 44, + "nodeType": "ExpressionStatement", + "src": "408:24:1" + }, + { + "expression": { + "id": 51, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 45, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "438:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 48, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "454:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 49, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "458:6:1", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "454:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "446:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 46, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "446:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "446:19:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "438:27:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 52, + "nodeType": "ExpressionStatement", + "src": "438:27:1" + } + ] + }, + "id": 54, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "mutability": "mutable", + "name": "_unlockTime", + "nameLocation": "279:11:1", + "nodeType": "VariableDeclaration", + "scope": 54, + "src": "274:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 29, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "274:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "273:18:1" + }, + "returnParameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "300:0:1" + }, + "scope": 95, + "src": "262:208:1", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 93, + "nodeType": "Block", + "src": "501:437:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 58, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "713:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 59, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "719:9:1", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "713:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 60, + "name": "unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "732:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "713:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "596f752063616e277420776974686472617720796574", + "id": 62, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "744:24:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "typeString": "literal_string \"You can't withdraw yet\"" + }, + "value": "You can't withdraw yet" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "typeString": "literal_string \"You can't withdraw yet\"" + } + ], + "id": 57, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "705:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 63, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "705:64:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64, + "nodeType": "ExpressionStatement", + "src": "705:64:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 69, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 66, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "783:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "787:6:1", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "783:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 68, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "797:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "783:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "596f75206172656e277420746865206f776e6572", + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "804:22:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "typeString": "literal_string \"You aren't the owner\"" + }, + "value": "You aren't the owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "typeString": "literal_string \"You aren't the owner\"" + } + ], + "id": 65, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "775:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "775:52:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 72, + "nodeType": "ExpressionStatement", + "src": "775:52:1" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 76, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "858:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Lock_$95", + "typeString": "contract Lock" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Lock_$95", + "typeString": "contract Lock" + } + ], + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "850:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 74, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "850:7:1", + "typeDescriptions": {} + } + }, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "850:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "864:7:1", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "850:21:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 79, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "873:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 80, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "879:9:1", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "873:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 73, + "name": "Withdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "839:10:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 81, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "839:50:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 82, + "nodeType": "EmitStatement", + "src": "834:55:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 88, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "919:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Lock_$95", + "typeString": "contract Lock" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Lock_$95", + "typeString": "contract Lock" + } + ], + "id": 87, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "911:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 86, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "911:7:1", + "typeDescriptions": {} + } + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "911:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "925:7:1", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "911:21:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 83, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "896:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "902:8:1", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "896:14:1", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 91, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "896:37:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 92, + "nodeType": "ExpressionStatement", + "src": "896:37:1" + } + ] + }, + "functionSelector": "3ccfd60b", + "id": 94, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "483:8:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 55, + "nodeType": "ParameterList", + "parameters": [], + "src": "491:2:1" + }, + "returnParameters": { + "id": 56, + "nodeType": "ParameterList", + "parameters": [], + "src": "501:0:1" + }, + "scope": 95, + "src": "474:464:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 96, + "src": "140:800:1", + "usedErrors": [] + } + ], + "src": "39:902:1" + }, + "id": 1 + } + }, + "contracts": { + "contracts/Basic.sol": { + "Basic": { + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "add", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b506101b4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B4 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x771602F7 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0xB1 JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x100 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 DUP4 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x14A JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x8E DUP2 PUSH2 0x7B JUMP JUMPDEST DUP2 EQ PUSH2 0x99 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xAB DUP2 PUSH2 0x85 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC8 JUMPI PUSH2 0xC7 PUSH2 0x76 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xD6 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0xE7 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH2 0xFA DUP2 PUSH2 0x7B JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x115 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xF1 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x155 DUP3 PUSH2 0x7B JUMP JUMPDEST SWAP2 POP PUSH2 0x160 DUP4 PUSH2 0x7B JUMP JUMPDEST SWAP3 POP DUP3 DUP3 ADD SWAP1 POP DUP1 DUP3 GT ISZERO PUSH2 0x178 JUMPI PUSH2 0x177 PUSH2 0x11B JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH2 0x797C 0xF7 CALLER SWAP11 PUSH11 0x42CE6913940BCE208AAE17 CALLER 0xBA 0xE5 LOG1 DUP1 0xFC 0xB7 AND EQ EQ 0x2A 0xCD SWAP1 0xD0 PUSH5 0x736F6C6343 STOP ADDMOD SGT STOP CALLER ", + "sourceMap": "64:100:0:-:0;;;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": { + "@add_15": { + "entryPoint": 96, + "id": 15, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_t_uint256": { + "entryPoint": 156, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint256t_uint256": { + "entryPoint": 177, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "entryPoint": 241, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": { + "entryPoint": 256, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "allocate_unbounded": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 1 + }, + "checked_add_t_uint256": { + "entryPoint": 330, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "cleanup_t_uint256": { + "entryPoint": 123, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "panic_error_0x11": { + "entryPoint": 283, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "entryPoint": 118, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "validator_revert_t_uint256": { + "entryPoint": 133, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:1902:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:2", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:2" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:2" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:2" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:2", + "type": "" + } + ], + "src": "7:75:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:2" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:2" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "379:32:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "389:16:2", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "400:5:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "389:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "361:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "371:7:2", + "type": "" + } + ], + "src": "334:77:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "460:79:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "517:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "526:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "529:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "519:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "519:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "519:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "483:5:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "508:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "490:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "490:24:2" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "480:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "480:35:2" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "473:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "473:43:2" + }, + "nodeType": "YulIf", + "src": "470:63:2" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "453:5:2", + "type": "" + } + ], + "src": "417:122:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "597:87:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "607:29:2", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "629:6:2" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "616:12:2" + }, + "nodeType": "YulFunctionCall", + "src": "616:20:2" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "607:5:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "672:5:2" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "645:26:2" + }, + "nodeType": "YulFunctionCall", + "src": "645:33:2" + }, + "nodeType": "YulExpressionStatement", + "src": "645:33:2" + } + ] + }, + "name": "abi_decode_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "575:6:2", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "583:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "591:5:2", + "type": "" + } + ], + "src": "545:139:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "773:391:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "819:83:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "821:77:2" + }, + "nodeType": "YulFunctionCall", + "src": "821:79:2" + }, + "nodeType": "YulExpressionStatement", + "src": "821:79:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "794:7:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "803:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "790:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "790:23:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "815:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "786:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "786:32:2" + }, + "nodeType": "YulIf", + "src": "783:119:2" + }, + { + "nodeType": "YulBlock", + "src": "912:117:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "927:15:2", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "941:1:2", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "931:6:2", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "956:63:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "991:9:2" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1002:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "987:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "987:22:2" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1011:7:2" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "966:20:2" + }, + "nodeType": "YulFunctionCall", + "src": "966:53:2" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "956:6:2" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "1039:118:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1054:16:2", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1068:2:2", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1058:6:2", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1084:63:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1119:9:2" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1130:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1115:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1115:22:2" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1139:7:2" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "1094:20:2" + }, + "nodeType": "YulFunctionCall", + "src": "1094:53:2" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "1084:6:2" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "735:9:2", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "746:7:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "758:6:2", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "766:6:2", + "type": "" + } + ], + "src": "690:474:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1235:53:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1252:3:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1275:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "1257:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "1257:24:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1245:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1245:37:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1245:37:2" + } + ] + }, + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1223:5:2", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1230:3:2", + "type": "" + } + ], + "src": "1170:118:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1392:124:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1402:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1414:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1425:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1410:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1410:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "1402:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1482:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1495:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1506:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1491:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1491:17:2" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "1438:43:2" + }, + "nodeType": "YulFunctionCall", + "src": "1438:71:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1438:71:2" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1364:9:2", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1376:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1387:4:2", + "type": "" + } + ], + "src": "1294:222:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1550:152:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1567:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1570:77:2", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1560:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1560:88:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1560:88:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1664:1:2", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1667:4:2", + "type": "", + "value": "0x11" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1657:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1657:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1657:15:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1688:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1691:4:2", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1681:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1681:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1681:15:2" + } + ] + }, + "name": "panic_error_0x11", + "nodeType": "YulFunctionDefinition", + "src": "1522:180:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1752:147:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1762:25:2", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1785:1:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "1767:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "1767:20:2" + }, + "variableNames": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1762:1:2" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1796:25:2", + "value": { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1819:1:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "1801:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "1801:20:2" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1796:1:2" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1830:16:2", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1841:1:2" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1844:1:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1837:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1837:9:2" + }, + "variableNames": [ + { + "name": "sum", + "nodeType": "YulIdentifier", + "src": "1830:3:2" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1870:22:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "1872:16:2" + }, + "nodeType": "YulFunctionCall", + "src": "1872:18:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1872:18:2" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1862:1:2" + }, + { + "name": "sum", + "nodeType": "YulIdentifier", + "src": "1865:3:2" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "1859:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "1859:10:2" + }, + "nodeType": "YulIf", + "src": "1856:36:2" + } + ] + }, + "name": "checked_add_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nodeType": "YulTypedName", + "src": "1739:1:2", + "type": "" + }, + { + "name": "y", + "nodeType": "YulTypedName", + "src": "1742:1:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "sum", + "nodeType": "YulTypedName", + "src": "1748:3:2", + "type": "" + } + ], + "src": "1708:191:2" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\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_uint256t_uint256(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n sum := add(x, y)\n\n if gt(x, sum) { panic_error_0x11() }\n\n }\n\n}\n", + "id": 2, + "language": "Yul", + "name": "#utility.yul" + } + ], + "immutableReferences": {}, + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x771602F7 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0xB1 JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x100 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 DUP4 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x14A JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x8E DUP2 PUSH2 0x7B JUMP JUMPDEST DUP2 EQ PUSH2 0x99 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xAB DUP2 PUSH2 0x85 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC8 JUMPI PUSH2 0xC7 PUSH2 0x76 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xD6 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0xE7 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH2 0xFA DUP2 PUSH2 0x7B JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x115 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xF1 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x155 DUP3 PUSH2 0x7B JUMP JUMPDEST SWAP2 POP PUSH2 0x160 DUP4 PUSH2 0x7B JUMP JUMPDEST SWAP3 POP DUP3 DUP3 ADD SWAP1 POP DUP1 DUP3 GT ISZERO PUSH2 0x178 JUMPI PUSH2 0x177 PUSH2 0x11B JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH2 0x797C 0xF7 CALLER SWAP11 PUSH11 0x42CE6913940BCE208AAE17 CALLER 0xBA 0xE5 LOG1 DUP1 0xFC 0xB7 AND EQ EQ 0x2A 0xCD SWAP1 0xD0 PUSH5 0x736F6C6343 STOP ADDMOD SGT STOP CALLER ", + "sourceMap": "64:100:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:79;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;133:4;156:1;152;:5;;;;:::i;:::-;145:12;;83:79;;;;:::o;88:117:2:-;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:474::-;758:6;766;815:2;803:9;794:7;790:23;786:32;783:119;;;821:79;;:::i;:::-;783:119;941:1;966:53;1011:7;1002:6;991:9;987:22;966:53;:::i;:::-;956:63;;912:117;1068:2;1094:53;1139:7;1130:6;1119:9;1115:22;1094:53;:::i;:::-;1084:63;;1039:118;690:474;;;;;:::o;1170:118::-;1257:24;1275:5;1257:24;:::i;:::-;1252:3;1245:37;1170:118;;:::o;1294:222::-;1387:4;1425:2;1414:9;1410:18;1402:26;;1438:71;1506:1;1495:9;1491:17;1482:6;1438:71;:::i;:::-;1294:222;;;;:::o;1522:180::-;1570:77;1567:1;1560:88;1667:4;1664:1;1657:15;1691:4;1688:1;1681:15;1708:191;1748:3;1767:20;1785:1;1767:20;:::i;:::-;1762:25;;1801:20;1819:1;1801:20;:::i;:::-;1796:25;;1844:1;1841;1837:9;1830:16;;1865:3;1862:1;1859:10;1856:36;;;1872:18;;:::i;:::-;1856:36;1708:191;;;;:::o" + }, + "methodIdentifiers": { + "add(uint256,uint256)": "771602f7" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"a\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"b\",\"type\":\"uint256\"}],\"name\":\"add\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Basic.sol\":\"Basic\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Basic.sol\":{\"keccak256\":\"0x8566787d8567b5b7d85a887905bf5d0c5104be4f83488ba9e7e1e5b10e9af8cf\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://46cb6c6cebfef5738350ad9cfc0c3b1c9407f4e9b58a8219c36fb5c17c41ce1a\",\"dweb:/ipfs/Qmf5tnzv7HDJtPeaRsBWh3AYRH12Ezrn7C6UVScevo36Ht\"]}},\"version\":1}" + } + }, + "contracts/Lock.sol": { + "Lock": { + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "when", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": { + "@_54": { + "entryPoint": null, + "id": 54, + "parameterSlots": 1, + "returnSlots": 0 + }, + "abi_decode_t_uint256_fromMemory": { + "entryPoint": 219, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint256_fromMemory": { + "entryPoint": 240, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack": { + "entryPoint": 381, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 416, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "allocate_unbounded": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 1 + }, + "array_storeLengthForEncoding_t_string_memory_ptr_fromStack": { + "entryPoint": 285, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "cleanup_t_uint256": { + "entryPoint": 186, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "entryPoint": 181, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413": { + "entryPoint": 302, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + }, + "validator_revert_t_uint256": { + "entryPoint": 196, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:2248:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:2", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:2" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:2" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:2" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:2", + "type": "" + } + ], + "src": "7:75:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:2" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:2" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "379:32:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "389:16:2", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "400:5:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "389:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "361:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "371:7:2", + "type": "" + } + ], + "src": "334:77:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "460:79:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "517:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "526:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "529:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "519:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "519:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "519:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "483:5:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "508:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "490:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "490:24:2" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "480:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "480:35:2" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "473:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "473:43:2" + }, + "nodeType": "YulIf", + "src": "470:63:2" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "453:5:2", + "type": "" + } + ], + "src": "417:122:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "608:80:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "618:22:2", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "633:6:2" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "627:5:2" + }, + "nodeType": "YulFunctionCall", + "src": "627:13:2" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "618:5:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "676:5:2" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "649:26:2" + }, + "nodeType": "YulFunctionCall", + "src": "649:33:2" + }, + "nodeType": "YulExpressionStatement", + "src": "649:33:2" + } + ] + }, + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "586:6:2", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "594:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "602:5:2", + "type": "" + } + ], + "src": "545:143:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "771:274:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "817:83:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "819:77:2" + }, + "nodeType": "YulFunctionCall", + "src": "819:79:2" + }, + "nodeType": "YulExpressionStatement", + "src": "819:79:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "792:7:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "801:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "788:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "788:23:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "813:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "784:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "784:32:2" + }, + "nodeType": "YulIf", + "src": "781:119:2" + }, + { + "nodeType": "YulBlock", + "src": "910:128:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "925:15:2", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "939:1:2", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "929:6:2", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "954:74:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1000:9:2" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1011:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "996:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "996:22:2" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1020:7:2" + } + ], + "functionName": { + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulIdentifier", + "src": "964:31:2" + }, + "nodeType": "YulFunctionCall", + "src": "964:64:2" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "954:6:2" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "741:9:2", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "752:7:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "764:6:2", + "type": "" + } + ], + "src": "694:351:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1147:73:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1164:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1169:6:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1157:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1157:19:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1157:19:2" + }, + { + "nodeType": "YulAssignment", + "src": "1185:29:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1204:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1209:4:2", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1200:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1200:14:2" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "1185:11:2" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1119:3:2", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1124:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "1135:11:2", + "type": "" + } + ], + "src": "1051:169:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1332:116:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1354:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1362:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1350:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1350:14:2" + }, + { + "hexValue": "556e6c6f636b2074696d652073686f756c6420626520696e2074686520667574", + "kind": "string", + "nodeType": "YulLiteral", + "src": "1366:34:2", + "type": "", + "value": "Unlock time should be in the fut" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1343:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1343:58:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1343:58:2" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1422:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1430:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1418:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1418:15:2" + }, + { + "hexValue": "757265", + "kind": "string", + "nodeType": "YulLiteral", + "src": "1435:5:2", + "type": "", + "value": "ure" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1411:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1411:30:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1411:30:2" + } + ] + }, + "name": "store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "1324:6:2", + "type": "" + } + ], + "src": "1226:222:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1600:220:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1610:74:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1676:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1681:2:2", + "type": "", + "value": "35" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "1617:58:2" + }, + "nodeType": "YulFunctionCall", + "src": "1617:67:2" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1610:3:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1782:3:2" + } + ], + "functionName": { + "name": "store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "nodeType": "YulIdentifier", + "src": "1693:88:2" + }, + "nodeType": "YulFunctionCall", + "src": "1693:93:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1693:93:2" + }, + { + "nodeType": "YulAssignment", + "src": "1795:19:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1806:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1811:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1802:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1802:12:2" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "1795:3:2" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1588:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1596:3:2", + "type": "" + } + ], + "src": "1454:366:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1997:248:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2007:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2019:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2030:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2015:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2015:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2007:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2054:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2065:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2050:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2050:17:2" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2073:4:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2079:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2069:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2069:20:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2043:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "2043:47:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2043:47:2" + }, + { + "nodeType": "YulAssignment", + "src": "2099:139:2", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2233:4:2" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2107:124:2" + }, + "nodeType": "YulFunctionCall", + "src": "2107:131:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2099:4:2" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1977:9:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1992:4:2", + "type": "" + } + ], + "src": "1826:419:2" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\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 store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413(memPtr) {\n\n mstore(add(memPtr, 0), \"Unlock time should be in the fut\")\n\n mstore(add(memPtr, 32), \"ure\")\n\n }\n\n function abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 35)\n store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413__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_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n}\n", + "id": 2, + "language": "Yul", + "name": "#utility.yul" + } + ], + "linkReferences": {}, + "object": "60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x5D8 CODESIZE SUB DUP1 PUSH2 0x5D8 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x25 SWAP2 SWAP1 PUSH2 0xF0 JUMP JUMPDEST DUP1 TIMESTAMP LT PUSH2 0x67 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5E SWAP1 PUSH2 0x1A0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP CALLER PUSH1 0x1 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP PUSH2 0x1C0 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xCD DUP2 PUSH2 0xBA JUMP JUMPDEST DUP2 EQ PUSH2 0xD8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0xEA DUP2 PUSH2 0xC4 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x106 JUMPI PUSH2 0x105 PUSH2 0xB5 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x114 DUP5 DUP3 DUP6 ADD PUSH2 0xDB JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x556E6C6F636B2074696D652073686F756C6420626520696E2074686520667574 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x7572650000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x18A PUSH1 0x23 DUP4 PUSH2 0x11D JUMP JUMPDEST SWAP2 POP PUSH2 0x195 DUP3 PUSH2 0x12E JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x1B9 DUP2 PUSH2 0x17D JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x409 DUP1 PUSH2 0x1CF PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x251C1AA3 EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x64 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x6E JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4E PUSH2 0x8C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x5B SWAP2 SWAP1 PUSH2 0x24A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x6C PUSH2 0x92 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x76 PUSH2 0x20B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x83 SWAP2 SWAP1 PUSH2 0x2A6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD TIMESTAMP LT ISZERO PUSH2 0xD7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xCE SWAP1 PUSH2 0x31E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x167 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x15E SWAP1 PUSH2 0x38A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH32 0xBF2ED60BD5B5965D685680C01195C9514E4382E28E3A5A2D2D5244BF59411B93 SELFBALANCE TIMESTAMP PUSH1 0x40 MLOAD PUSH2 0x198 SWAP3 SWAP2 SWAP1 PUSH2 0x3AA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC SELFBALANCE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x208 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x244 DUP2 PUSH2 0x231 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x25F PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290 DUP3 PUSH2 0x265 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2A0 DUP2 PUSH2 0x285 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2BB PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x297 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x596F752063616E27742077697468647261772079657400000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x308 PUSH1 0x16 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x313 DUP3 PUSH2 0x2D2 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x337 DUP2 PUSH2 0x2FB JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x596F75206172656E277420746865206F776E6572000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x374 PUSH1 0x14 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x37F DUP3 PUSH2 0x33E JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x3A3 DUP2 PUSH2 0x367 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x3BF PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x23B JUMP JUMPDEST PUSH2 0x3CC PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 0x2F PUSH20 0xD2A3284A3C1CCA55A0FE6EC1A91B13BEC884AECD 0xBC 0xF6 PREVRANDAO 0xCE 0xBF 0x27 PUSH21 0xF32F64736F6C634300081300330000000000000000 ", + "sourceMap": "140:800:1:-:0;;;262:208;;;;;;;;;;;;;;;;;;;;;:::i;:::-;339:11;321:15;:29;306:95;;;;;;;;;;;;:::i;:::-;;;;;;;;;421:11;408:10;:24;;;;454:10;438:5;;:27;;;;;;;;;;;;;;;;;;262:208;140:800;;88:117:2;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:143::-;602:5;633:6;627:13;618:22;;649:33;676:5;649:33;:::i;:::-;545:143;;;;:::o;694:351::-;764:6;813:2;801:9;792:7;788:23;784:32;781:119;;;819:79;;:::i;:::-;781:119;939:1;964:64;1020:7;1011:6;1000:9;996:22;964:64;:::i;:::-;954:74;;910:128;694:351;;;;:::o;1051:169::-;1135:11;1169:6;1164:3;1157:19;1209:4;1204:3;1200:14;1185:29;;1051:169;;;;:::o;1226:222::-;1366:34;1362:1;1354:6;1350:14;1343:58;1435:5;1430:2;1422:6;1418:15;1411:30;1226:222;:::o;1454:366::-;1596:3;1617:67;1681:2;1676:3;1617:67;:::i;:::-;1610:74;;1693:93;1782:3;1693:93;:::i;:::-;1811:2;1806:3;1802:12;1795:19;;1454:366;;;:::o;1826:419::-;1992:4;2030:2;2019:9;2015:18;2007:26;;2079:9;2073:4;2069:20;2065:1;2054:9;2050:17;2043:47;2107:131;2233:4;2107:131;:::i;:::-;2099:139;;1826:419;;;:::o;140:800:1:-;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": { + "@owner_22": { + "entryPoint": 523, + "id": 22, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@unlockTime_20": { + "entryPoint": 140, + "id": 20, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@withdraw_94": { + "entryPoint": 146, + "id": 94, + "parameterSlots": 0, + "returnSlots": 0 + }, + "abi_encode_t_address_payable_to_t_address_payable_fromStack": { + "entryPoint": 663, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack": { + "entryPoint": 763, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack": { + "entryPoint": 871, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "entryPoint": 571, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed": { + "entryPoint": 678, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 798, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 906, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": { + "entryPoint": 586, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed": { + "entryPoint": 938, + "id": null, + "parameterSlots": 3, + "returnSlots": 1 + }, + "array_storeLengthForEncoding_t_string_memory_ptr_fromStack": { + "entryPoint": 705, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "cleanup_t_address_payable": { + "entryPoint": 645, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "cleanup_t_uint160": { + "entryPoint": 613, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "cleanup_t_uint256": { + "entryPoint": 561, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8": { + "entryPoint": 722, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + }, + "store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a": { + "entryPoint": 830, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:3550:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "52:32:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "62:16:2", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "73:5:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "62:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "34:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "44:7:2", + "type": "" + } + ], + "src": "7:77:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "155:53:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "172:3:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "195:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "177:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "177:24:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "165:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "165:37:2" + }, + "nodeType": "YulExpressionStatement", + "src": "165:37:2" + } + ] + }, + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "143:5:2", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "150:3:2", + "type": "" + } + ], + "src": "90:118:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "312:124:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "322:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "334:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "345:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "330:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "330:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "322:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "402:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "415:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "426:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "411:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "411:17:2" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "358:43:2" + }, + "nodeType": "YulFunctionCall", + "src": "358:71:2" + }, + "nodeType": "YulExpressionStatement", + "src": "358:71:2" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "284:9:2", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "296:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "307:4:2", + "type": "" + } + ], + "src": "214:222:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "487:81:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "497:65:2", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "512:5:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "519:42:2", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "508:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "508:54:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "497:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_uint160", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "469:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "479:7:2", + "type": "" + } + ], + "src": "442:126:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "627:51:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "637:35:2", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "666:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint160", + "nodeType": "YulIdentifier", + "src": "648:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "648:24:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "637:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_address_payable", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "609:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "619:7:2", + "type": "" + } + ], + "src": "574:104:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "765:61:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "782:3:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "813:5:2" + } + ], + "functionName": { + "name": "cleanup_t_address_payable", + "nodeType": "YulIdentifier", + "src": "787:25:2" + }, + "nodeType": "YulFunctionCall", + "src": "787:32:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "775:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "775:45:2" + }, + "nodeType": "YulExpressionStatement", + "src": "775:45:2" + } + ] + }, + "name": "abi_encode_t_address_payable_to_t_address_payable_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "753:5:2", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "760:3:2", + "type": "" + } + ], + "src": "684:142:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "946:140:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "956:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "968:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "979:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "964:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "964:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "956:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1052:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1065:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1076:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1061:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1061:17:2" + } + ], + "functionName": { + "name": "abi_encode_t_address_payable_to_t_address_payable_fromStack", + "nodeType": "YulIdentifier", + "src": "992:59:2" + }, + "nodeType": "YulFunctionCall", + "src": "992:87:2" + }, + "nodeType": "YulExpressionStatement", + "src": "992:87:2" + } + ] + }, + "name": "abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "918:9:2", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "930:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "941:4:2", + "type": "" + } + ], + "src": "832:254:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1188:73:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1205:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1210:6:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1198:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1198:19:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1198:19:2" + }, + { + "nodeType": "YulAssignment", + "src": "1226:29:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1245:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1250:4:2", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1241:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1241:14:2" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "1226:11:2" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1160:3:2", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1165:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "1176:11:2", + "type": "" + } + ], + "src": "1092:169:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1373:66:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1395:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1403:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1391:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1391:14:2" + }, + { + "hexValue": "596f752063616e277420776974686472617720796574", + "kind": "string", + "nodeType": "YulLiteral", + "src": "1407:24:2", + "type": "", + "value": "You can't withdraw yet" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1384:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1384:48:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1384:48:2" + } + ] + }, + "name": "store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "1365:6:2", + "type": "" + } + ], + "src": "1267:172:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1591:220:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1601:74:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1667:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1672:2:2", + "type": "", + "value": "22" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "1608:58:2" + }, + "nodeType": "YulFunctionCall", + "src": "1608:67:2" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1601:3:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1773:3:2" + } + ], + "functionName": { + "name": "store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "nodeType": "YulIdentifier", + "src": "1684:88:2" + }, + "nodeType": "YulFunctionCall", + "src": "1684:93:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1684:93:2" + }, + { + "nodeType": "YulAssignment", + "src": "1786:19:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1797:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1802:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1793:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1793:12:2" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "1786:3:2" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1579:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1587:3:2", + "type": "" + } + ], + "src": "1445:366:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1988:248:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1998:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2010:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2021:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2006:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2006:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "1998:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2045:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2056:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2041:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2041:17:2" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2064:4:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2070:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2060:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2060:20:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2034:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "2034:47:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2034:47:2" + }, + { + "nodeType": "YulAssignment", + "src": "2090:139:2", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2224:4:2" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2098:124:2" + }, + "nodeType": "YulFunctionCall", + "src": "2098:131:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2090:4:2" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1968:9:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1983:4:2", + "type": "" + } + ], + "src": "1817:419:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2348:64:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2370:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2378:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2366:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2366:14:2" + }, + { + "hexValue": "596f75206172656e277420746865206f776e6572", + "kind": "string", + "nodeType": "YulLiteral", + "src": "2382:22:2", + "type": "", + "value": "You aren't the owner" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2359:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "2359:46:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2359:46:2" + } + ] + }, + "name": "store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "2340:6:2", + "type": "" + } + ], + "src": "2242:170:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2564:220:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2574:74:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2640:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2645:2:2", + "type": "", + "value": "20" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2581:58:2" + }, + "nodeType": "YulFunctionCall", + "src": "2581:67:2" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2574:3:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2746:3:2" + } + ], + "functionName": { + "name": "store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "nodeType": "YulIdentifier", + "src": "2657:88:2" + }, + "nodeType": "YulFunctionCall", + "src": "2657:93:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2657:93:2" + }, + { + "nodeType": "YulAssignment", + "src": "2759:19:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2770:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2775:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2766:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2766:12:2" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "2759:3:2" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2552:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "2560:3:2", + "type": "" + } + ], + "src": "2418:366:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2961:248:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2971:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2983:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2994:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2979:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2979:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2971:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3018:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3029:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3014:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3014:17:2" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3037:4:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3043:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "3033:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3033:20:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3007:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "3007:47:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3007:47:2" + }, + { + "nodeType": "YulAssignment", + "src": "3063:139:2", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3197:4:2" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "3071:124:2" + }, + "nodeType": "YulFunctionCall", + "src": "3071:131:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3063:4:2" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2941:9:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "2956:4:2", + "type": "" + } + ], + "src": "2790:419:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3341:206:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3351:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3363:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3374:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3359:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3359:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3351:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "3431:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3444:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3455:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3440:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3440:17:2" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "3387:43:2" + }, + "nodeType": "YulFunctionCall", + "src": "3387:71:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3387:71:2" + }, + { + "expression": { + "arguments": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "3512:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3525:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3536:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3521:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3521:18:2" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "3468:43:2" + }, + "nodeType": "YulFunctionCall", + "src": "3468:72:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3468:72:2" + } + ] + }, + "name": "abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "3305:9:2", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "3317:6:2", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "3325:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "3336:4:2", + "type": "" + } + ], + "src": "3215:332:2" + } + ] + }, + "contents": "{\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address_payable(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function abi_encode_t_address_payable_to_t_address_payable_fromStack(value, pos) {\n mstore(pos, cleanup_t_address_payable(value))\n }\n\n function abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_payable_to_t_address_payable_fromStack(value0, add(headStart, 0))\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 store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8(memPtr) {\n\n mstore(add(memPtr, 0), \"You can't withdraw yet\")\n\n }\n\n function abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 22)\n store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8__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_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a(memPtr) {\n\n mstore(add(memPtr, 0), \"You aren't the owner\")\n\n }\n\n function abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 20)\n store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a__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_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed(headStart , value1, value0) -> tail {\n tail := add(headStart, 64)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value1, add(headStart, 32))\n\n }\n\n}\n", + "id": 2, + "language": "Yul", + "name": "#utility.yul" + } + ], + "immutableReferences": {}, + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x251C1AA3 EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x64 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x6E JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4E PUSH2 0x8C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x5B SWAP2 SWAP1 PUSH2 0x24A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x6C PUSH2 0x92 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x76 PUSH2 0x20B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x83 SWAP2 SWAP1 PUSH2 0x2A6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD TIMESTAMP LT ISZERO PUSH2 0xD7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xCE SWAP1 PUSH2 0x31E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x167 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x15E SWAP1 PUSH2 0x38A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH32 0xBF2ED60BD5B5965D685680C01195C9514E4382E28E3A5A2D2D5244BF59411B93 SELFBALANCE TIMESTAMP PUSH1 0x40 MLOAD PUSH2 0x198 SWAP3 SWAP2 SWAP1 PUSH2 0x3AA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC SELFBALANCE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x208 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x244 DUP2 PUSH2 0x231 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x25F PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290 DUP3 PUSH2 0x265 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2A0 DUP2 PUSH2 0x285 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2BB PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x297 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x596F752063616E27742077697468647261772079657400000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x308 PUSH1 0x16 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x313 DUP3 PUSH2 0x2D2 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x337 DUP2 PUSH2 0x2FB JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x596F75206172656E277420746865206F776E6572000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x374 PUSH1 0x14 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x37F DUP3 PUSH2 0x33E JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x3A3 DUP2 PUSH2 0x367 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x3BF PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x23B JUMP JUMPDEST PUSH2 0x3CC PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 0x2F PUSH20 0xD2A3284A3C1CCA55A0FE6EC1A91B13BEC884AECD 0xBC 0xF6 PREVRANDAO 0xCE 0xBF 0x27 PUSH21 0xF32F64736F6C634300081300330000000000000000 ", + "sourceMap": "140:800:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;158:22;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;474:464;;;:::i;:::-;;184:28;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;158:22;;;;:::o;474:464::-;732:10;;713:15;:29;;705:64;;;;;;;;;;;;:::i;:::-;;;;;;;;;797:5;;;;;;;;;;;783:19;;:10;:19;;;775:52;;;;;;;;;;;;:::i;:::-;;;;;;;;;839:50;850:21;873:15;839:50;;;;;;;:::i;:::-;;;;;;;;896:5;;;;;;;;;;;:14;;:37;911:21;896:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;474:464::o;184:28::-;;;;;;;;;;;;;:::o;7:77:2:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o;442:126::-;479:7;519:42;512:5;508:54;497:65;;442:126;;;:::o;574:104::-;619:7;648:24;666:5;648:24;:::i;:::-;637:35;;574:104;;;:::o;684:142::-;787:32;813:5;787:32;:::i;:::-;782:3;775:45;684:142;;:::o;832:254::-;941:4;979:2;968:9;964:18;956:26;;992:87;1076:1;1065:9;1061:17;1052:6;992:87;:::i;:::-;832:254;;;;:::o;1092:169::-;1176:11;1210:6;1205:3;1198:19;1250:4;1245:3;1241:14;1226:29;;1092:169;;;;:::o;1267:172::-;1407:24;1403:1;1395:6;1391:14;1384:48;1267:172;:::o;1445:366::-;1587:3;1608:67;1672:2;1667:3;1608:67;:::i;:::-;1601:74;;1684:93;1773:3;1684:93;:::i;:::-;1802:2;1797:3;1793:12;1786:19;;1445:366;;;:::o;1817:419::-;1983:4;2021:2;2010:9;2006:18;1998:26;;2070:9;2064:4;2060:20;2056:1;2045:9;2041:17;2034:47;2098:131;2224:4;2098:131;:::i;:::-;2090:139;;1817:419;;;:::o;2242:170::-;2382:22;2378:1;2370:6;2366:14;2359:46;2242:170;:::o;2418:366::-;2560:3;2581:67;2645:2;2640:3;2581:67;:::i;:::-;2574:74;;2657:93;2746:3;2657:93;:::i;:::-;2775:2;2770:3;2766:12;2759:19;;2418:366;;;:::o;2790:419::-;2956:4;2994:2;2983:9;2979:18;2971:26;;3043:9;3037:4;3033:20;3029:1;3018:9;3014:17;3007:47;3071:131;3197:4;3071:131;:::i;:::-;3063:139;;2790:419;;;:::o;3215:332::-;3336:4;3374:2;3363:9;3359:18;3351:26;;3387:71;3455:1;3444:9;3440:17;3431:6;3387:71;:::i;:::-;3468:72;3536:2;3525:9;3521:18;3512:6;3468:72;:::i;:::-;3215:332;;;;;:::o" + }, + "methodIdentifiers": { + "owner()": "8da5cb5b", + "unlockTime()": "251c1aa3", + "withdraw()": "3ccfd60b" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_unlockTime\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"when\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Lock.sol\":\"Lock\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Lock.sol\":{\"keccak256\":\"0x290d672235b22ec4740c076ad0108b37f5d3073810f5c7d502d90c72591ee9dc\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://3d74a8be6305243875a1e4bb2c8fcbd29672aa20a3781595cfbee6b743358b6b\",\"dweb:/ipfs/QmVWAacJB7wL7fBhAyvyqJLWDCEL9vMfwEeR3ydxtsprLf\"]}},\"version\":1}" + } + } + } + } +} \ No newline at end of file diff --git a/packages/core/test/mocks/verify/external-artifacts/deployed_addresses.json b/packages/core/test/mocks/verify/external-artifacts/deployed_addresses.json new file mode 100644 index 000000000..cf3df4fbf --- /dev/null +++ b/packages/core/test/mocks/verify/external-artifacts/deployed_addresses.json @@ -0,0 +1,5 @@ +{ + "LockModule#Basic2": "0x5FbDB2315678afecb367f032d93F642f64180aa3", + "LockModule#Basic": "0x2B6cBd0e0a2AE9Ed5e084B4366E4f4b59E464094", + "LockModule#Lock": "0x8f19334E79b16112E2D74E9Bc2246cB3cbA3cfaa" +} diff --git a/packages/core/test/mocks/verify/external-artifacts/journal.jsonl b/packages/core/test/mocks/verify/external-artifacts/journal.jsonl new file mode 100644 index 000000000..a0b0a6acb --- /dev/null +++ b/packages/core/test/mocks/verify/external-artifacts/journal.jsonl @@ -0,0 +1,13 @@ + +{"chainId":11155111,"type":"DEPLOYMENT_INITIALIZE"} +{"artifactId":"LockModule#Basic","constructorArgs":[],"contractName":"Basic","dependencies":[],"from":"0xff9cc424f113627738390361033d139271006619","futureId":"LockModule#Basic","futureType":"CONTRACT_DEPLOYMENT","libraries":{},"strategy":"basic","strategyConfig":{},"type":"DEPLOYMENT_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"LockModule#Basic","networkInteraction":{"data":"0x608060405234801561001057600080fd5b506101b4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033","id":1,"type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"LockModule#Basic","networkInteractionId":1,"nonce":2,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"2073789887"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1638611"}},"hash":"0x682b2bfda8e76c7695491d5378edfd7aeba6be24c49a4f9096daaa3f4e9998f2"},"type":"TRANSACTION_SEND"} +{"artifactId":"LockModule#Basic2","contractAddress":"0x5FbDB2315678afecb367f032d93F642f64180aa3","contractName":"Basic2","dependencies":[],"futureId":"LockModule#Basic2","futureType":"CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"LockModule#Lock","constructorArgs":[1987909200],"contractName":"Lock","dependencies":[],"from":"0xff9cc424f113627738390361033d139271006619","futureId":"LockModule#Lock","futureType":"NAMED_ARTIFACT_CONTRACT_DEPLOYMENT","libraries":{},"strategy":"basic","strategyConfig":{},"type":"DEPLOYMENT_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"1000000000"}} +{"futureId":"LockModule#Lock","networkInteraction":{"data":"0x60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c6343000813003300000000000000000000000000000000000000000000000000000000767d1650","id":1,"type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"1000000000"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"LockModule#Lock","networkInteractionId":1,"nonce":3,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"2073789887"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1638611"}},"hash":"0x3e7e2d599c58beb63d59e67288b4a9d3d5233cd71b42eea0c9ec6fc92021b3fd"},"type":"TRANSACTION_SEND"} +{"futureId":"LockModule#Basic","hash":"0x682b2bfda8e76c7695491d5378edfd7aeba6be24c49a4f9096daaa3f4e9998f2","networkInteractionId":1,"receipt":{"blockHash":"0x5c7af0b416f0d7592aec53c91d6f08320fe873b2fb76ad236c06f51eb9fd93d5","blockNumber":7256389,"contractAddress":"0x2B6cBd0e0a2AE9Ed5e084B4366E4f4b59E464094","logs":[],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"LockModule#Basic","result":{"address":"0x2B6cBd0e0a2AE9Ed5e084B4366E4f4b59E464094","type":"SUCCESS"},"type":"DEPLOYMENT_EXECUTION_STATE_COMPLETE"} +{"futureId":"LockModule#Lock","hash":"0x3e7e2d599c58beb63d59e67288b4a9d3d5233cd71b42eea0c9ec6fc92021b3fd","networkInteractionId":1,"receipt":{"blockHash":"0x5c7af0b416f0d7592aec53c91d6f08320fe873b2fb76ad236c06f51eb9fd93d5","blockNumber":7256389,"contractAddress":"0x8f19334E79b16112E2D74E9Bc2246cB3cbA3cfaa","logs":[],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"LockModule#Lock","result":{"address":"0x8f19334E79b16112E2D74E9Bc2246cB3cbA3cfaa","type":"SUCCESS"},"type":"DEPLOYMENT_EXECUTION_STATE_COMPLETE"} \ No newline at end of file diff --git a/packages/core/test/verify.ts b/packages/core/test/verify.ts index a756b8a46..1fa0767b6 100644 --- a/packages/core/test/verify.ts +++ b/packages/core/test/verify.ts @@ -67,6 +67,45 @@ describe("verify", () => { assert.deepEqual(result, expectedResult); }); + it("should yield a null verify result for a contract with external artifacts", async () => { + const expectedResult1: VerifyResult = [null, "LockModule#Basic"]; + + const expectedResult2: VerifyResult = [ + { + network: "sepolia", + chainId: 11155111, + urls: { + apiURL: "https://api-sepolia.etherscan.io/api", + browserURL: "https://sepolia.etherscan.io", + }, + }, + { + address: "0x8f19334E79b16112E2D74E9Bc2246cB3cbA3cfaa", + compilerVersion: "v0.8.19+commit.7dd6d404", + sourceCode: `{"language":"Solidity","sources":{"contracts/Lock.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.9;\\n\\n// Uncomment this line to use console.log\\n// import \\"hardhat/console.sol\\";\\n\\ncontract Lock {\\n uint public unlockTime;\\n address payable public owner;\\n\\n event Withdrawal(uint amount, uint when);\\n\\n constructor(uint _unlockTime) payable {\\n require(\\n block.timestamp < _unlockTime,\\n \\"Unlock time should be in the future\\"\\n );\\n\\n unlockTime = _unlockTime;\\n owner = payable(msg.sender);\\n }\\n\\n function withdraw() public {\\n // Uncomment this line, and the import of \\"hardhat/console.sol\\", to print a log in your terminal\\n // console.log(\\"Unlock time is %o and block timestamp is %o\\", unlockTime, block.timestamp);\\n\\n require(block.timestamp >= unlockTime, \\"You can't withdraw yet\\");\\n require(msg.sender == owner, \\"You aren't the owner\\");\\n\\n emit Withdrawal(address(this).balance, block.timestamp);\\n\\n owner.transfer(address(this).balance);\\n }\\n}\\n"}},"settings":{"optimizer":{"enabled":false,"runs":200},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}}}}`, + name: "contracts/Lock.sol:Lock", + args: "00000000000000000000000000000000000000000000000000000000767d1650", + }, + ]; + + const deploymentDir = path.join( + __dirname, + "mocks", + "verify", + "external-artifacts" + ); + + const generator = getVerificationInformation(deploymentDir); + + const result1 = (await generator.next()).value; + + assert.deepEqual(result1, expectedResult1); + + const result2: VerifyResult = await (await generator.next()).value; + + assert.deepEqual(result2, expectedResult2); + }); + it("should yield a verify result with a custom chain", async () => { const expectedResult: VerifyResult = [ { @@ -114,7 +153,11 @@ describe("verify", () => { const deploymentDir = path.join(__dirname, "mocks", "verify", "libraries"); let success: boolean = false; - for await (const [, info] of getVerificationInformation(deploymentDir)) { + for await (const [chainInfo, info] of getVerificationInformation( + deploymentDir + )) { + assert(chainInfo !== null); + if (info.name === "contracts/Lock.sol:WAAIT") { const librariesOutput = JSON.parse(info.sourceCode).settings.libraries; @@ -153,7 +196,11 @@ describe("verify", () => { const deploymentDir = path.join(__dirname, "mocks", "verify", "min-input"); - for await (const [, info] of getVerificationInformation(deploymentDir)) { + for await (const [contractInfo, info] of getVerificationInformation( + deploymentDir + )) { + assert(contractInfo !== null); + const expectedSources = expectedResultMap[info.name]; const actualSources = Object.keys(JSON.parse(info.sourceCode).sources); @@ -191,11 +238,13 @@ describe("verify", () => { const deploymentDir = path.join(__dirname, "mocks", "verify", "min-input"); - for await (const [, info] of getVerificationInformation( + for await (const [contractInfo, info] of getVerificationInformation( deploymentDir, undefined, true )) { + assert(contractInfo !== null); + const expectedSources = expectedResultMap[info.name]; const actualSources = Object.keys(JSON.parse(info.sourceCode).sources); diff --git a/packages/hardhat-plugin/src/index.ts b/packages/hardhat-plugin/src/index.ts index 478e3e235..133df4e0e 100644 --- a/packages/hardhat-plugin/src/index.ts +++ b/packages/hardhat-plugin/src/index.ts @@ -614,6 +614,14 @@ ignitionScope hre.config.etherscan.customChains, includeUnrelatedContracts )) { + if (chainConfig === null) { + console.log( + `Could not resolve contract artifacts for contract "${contractInfo}". Skipping verification.` + ); + console.log(""); + continue; + } + const apiKeyAndUrls = getApiKeyAndUrls( hre.config.etherscan.apiKey, chainConfig From c951b94308c026763e5cdac5c9b52ca55a5fc05a Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Wed, 4 Dec 2024 04:37:40 -0500 Subject: [PATCH 05/11] fallback artifact resolver for external artifacts --- packages/core/src/status.ts | 18 +- .../artifacts/LockModule#Basic.json | 35 + .../artifacts/LockModule#Basic2.json | 35 + .../artifacts/LockModule#Lock.dbg.json | 4 + .../artifacts/LockModule#Lock.json | 74 + .../647c95b5130e7afe0806dc404d889d09.json | 5180 +++++++++++++++++ .../external-artifact/deployed_addresses.json | 5 + .../status/external-artifact/journal.jsonl | 13 + packages/core/test/status.ts | 55 + 9 files changed, 5415 insertions(+), 4 deletions(-) create mode 100644 packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Basic.json create mode 100644 packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Basic2.json create mode 100644 packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Lock.dbg.json create mode 100644 packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Lock.json create mode 100644 packages/core/test/mocks/status/external-artifact/build-info/647c95b5130e7afe0806dc404d889d09.json create mode 100644 packages/core/test/mocks/status/external-artifact/deployed_addresses.json create mode 100644 packages/core/test/mocks/status/external-artifact/journal.jsonl diff --git a/packages/core/src/status.ts b/packages/core/src/status.ts index be3a6f9d0..a4c18b0cd 100644 --- a/packages/core/src/status.ts +++ b/packages/core/src/status.ts @@ -4,7 +4,7 @@ import { ERRORS } from "./internal/errors-list"; import { loadDeploymentState } from "./internal/execution/deployment-state-helpers"; import { findDeployedContracts } from "./internal/views/find-deployed-contracts"; import { findStatus } from "./internal/views/find-status"; -import { ArtifactResolver } from "./types/artifact"; +import { Abi, Artifact, ArtifactResolver } from "./types/artifact"; import { StatusResult } from "./types/status"; /** @@ -38,9 +38,19 @@ export async function status( for (const [futureId, deployedContract] of Object.entries( deployedContracts )) { - const artifact = await artifactResolver.loadArtifact( - deployedContract.contractName - ); + let artifact: Artifact; + + try { + artifact = await artifactResolver.loadArtifact( + deployedContract.contractName + ); + } catch (e) { + if (e instanceof Error && /HH700/g.test(e.message)) { + artifact = await deploymentLoader.loadArtifact(deployedContract.id); + } else { + throw e; + } + } contracts[futureId] = { ...deployedContract, diff --git a/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Basic.json b/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Basic.json new file mode 100644 index 000000000..e7e8a72da --- /dev/null +++ b/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Basic.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Basic", + "sourceName": "contracts/Basic.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "add", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506101b4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Basic2.json b/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Basic2.json new file mode 100644 index 000000000..e7e8a72da --- /dev/null +++ b/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Basic2.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Basic", + "sourceName": "contracts/Basic.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "add", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506101b4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Lock.dbg.json b/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Lock.dbg.json new file mode 100644 index 000000000..09d8c22f3 --- /dev/null +++ b/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Lock.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../build-info/647c95b5130e7afe0806dc404d889d09.json" +} \ No newline at end of file diff --git a/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Lock.json b/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Lock.json new file mode 100644 index 000000000..81cc1e2c3 --- /dev/null +++ b/packages/core/test/mocks/status/external-artifact/artifacts/LockModule#Lock.json @@ -0,0 +1,74 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Lock", + "sourceName": "contracts/Lock.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "when", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/packages/core/test/mocks/status/external-artifact/build-info/647c95b5130e7afe0806dc404d889d09.json b/packages/core/test/mocks/status/external-artifact/build-info/647c95b5130e7afe0806dc404d889d09.json new file mode 100644 index 000000000..7a1977420 --- /dev/null +++ b/packages/core/test/mocks/status/external-artifact/build-info/647c95b5130e7afe0806dc404d889d09.json @@ -0,0 +1,5180 @@ +{ + "id": "647c95b5130e7afe0806dc404d889d09", + "_format": "hh-sol-build-info-1", + "solcVersion": "0.8.19", + "solcLongVersion": "0.8.19+commit.7dd6d404", + "input": { + "language": "Solidity", + "sources": { + "contracts/Basic.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.9;\n\ncontract Basic {\n function add(uint a, uint b) public pure returns (uint) {\n return a + b;\n }\n}" + }, + "contracts/Lock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.9;\n\n// Uncomment this line to use console.log\n// import \"hardhat/console.sol\";\n\ncontract Lock {\n uint public unlockTime;\n address payable public owner;\n\n event Withdrawal(uint amount, uint when);\n\n constructor(uint _unlockTime) payable {\n require(\n block.timestamp < _unlockTime,\n \"Unlock time should be in the future\"\n );\n\n unlockTime = _unlockTime;\n owner = payable(msg.sender);\n }\n\n function withdraw() public {\n // Uncomment this line, and the import of \"hardhat/console.sol\", to print a log in your terminal\n // console.log(\"Unlock time is %o and block timestamp is %o\", unlockTime, block.timestamp);\n\n require(block.timestamp >= unlockTime, \"You can't withdraw yet\");\n require(msg.sender == owner, \"You aren't the owner\");\n\n emit Withdrawal(address(this).balance, block.timestamp);\n\n owner.transfer(address(this).balance);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ], + "": [ + "ast" + ] + } + } + } + }, + "output": { + "sources": { + "contracts/Basic.sol": { + "ast": { + "absolutePath": "contracts/Basic.sol", + "exportedSymbols": { + "Basic": [ + 16 + ] + }, + "id": 17, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".9" + ], + "nodeType": "PragmaDirective", + "src": "39:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Basic", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 16, + "linearizedBaseContracts": [ + 16 + ], + "name": "Basic", + "nameLocation": "73:5:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 14, + "nodeType": "Block", + "src": "139:23:0", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 10, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "152:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 11, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "156:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "152:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9, + "id": 13, + "nodeType": "Return", + "src": "145:12:0" + } + ] + }, + "functionSelector": "771602f7", + "id": 15, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "92:3:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "a", + "nameLocation": "101:1:0", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "96:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "96:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5, + "mutability": "mutable", + "name": "b", + "nameLocation": "109:1:0", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "104:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "104:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "95:16:0" + }, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "133:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "133:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "132:6:0" + }, + "scope": 16, + "src": "83:79:0", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 17, + "src": "64:100:0", + "usedErrors": [] + } + ], + "src": "39:125:0" + }, + "id": 0 + }, + "contracts/Lock.sol": { + "ast": { + "absolutePath": "contracts/Lock.sol", + "exportedSymbols": { + "Lock": [ + 95 + ] + }, + "id": 96, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18, + "literals": [ + "solidity", + "^", + "0.8", + ".9" + ], + "nodeType": "PragmaDirective", + "src": "39:23:1" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Lock", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 95, + "linearizedBaseContracts": [ + 95 + ], + "name": "Lock", + "nameLocation": "149:4:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "251c1aa3", + "id": 20, + "mutability": "mutable", + "name": "unlockTime", + "nameLocation": "170:10:1", + "nodeType": "VariableDeclaration", + "scope": 95, + "src": "158:22:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "158:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8da5cb5b", + "id": 22, + "mutability": "mutable", + "name": "owner", + "nameLocation": "207:5:1", + "nodeType": "VariableDeclaration", + "scope": 95, + "src": "184:28:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 21, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "184:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "public" + }, + { + "anonymous": false, + "eventSelector": "bf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b93", + "id": 28, + "name": "Withdrawal", + "nameLocation": "223:10:1", + "nodeType": "EventDefinition", + "parameters": { + "id": 27, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 24, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "239:6:1", + "nodeType": "VariableDeclaration", + "scope": 28, + "src": "234:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 23, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "234:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 26, + "indexed": false, + "mutability": "mutable", + "name": "when", + "nameLocation": "252:4:1", + "nodeType": "VariableDeclaration", + "scope": 28, + "src": "247:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 25, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "247:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "233:24:1" + }, + "src": "217:41:1" + }, + { + "body": { + "id": 53, + "nodeType": "Block", + "src": "300:170:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 34, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "321:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "327:9:1", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "321:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 36, + "name": "_unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "339:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "321:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "556e6c6f636b2074696d652073686f756c6420626520696e2074686520667574757265", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "358:37:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "typeString": "literal_string \"Unlock time should be in the future\"" + }, + "value": "Unlock time should be in the future" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "typeString": "literal_string \"Unlock time should be in the future\"" + } + ], + "id": 33, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "306:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "306:95:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "306:95:1" + }, + { + "expression": { + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 41, + "name": "unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "408:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 42, + "name": "_unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "421:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "408:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 44, + "nodeType": "ExpressionStatement", + "src": "408:24:1" + }, + { + "expression": { + "id": 51, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 45, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "438:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 48, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "454:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 49, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "458:6:1", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "454:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "446:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 46, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "446:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 50, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "446:19:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "438:27:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 52, + "nodeType": "ExpressionStatement", + "src": "438:27:1" + } + ] + }, + "id": 54, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "mutability": "mutable", + "name": "_unlockTime", + "nameLocation": "279:11:1", + "nodeType": "VariableDeclaration", + "scope": 54, + "src": "274:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 29, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "274:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "273:18:1" + }, + "returnParameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "300:0:1" + }, + "scope": 95, + "src": "262:208:1", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 93, + "nodeType": "Block", + "src": "501:437:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 58, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "713:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 59, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "719:9:1", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "713:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 60, + "name": "unlockTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "732:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "713:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "596f752063616e277420776974686472617720796574", + "id": 62, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "744:24:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "typeString": "literal_string \"You can't withdraw yet\"" + }, + "value": "You can't withdraw yet" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "typeString": "literal_string \"You can't withdraw yet\"" + } + ], + "id": 57, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "705:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 63, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "705:64:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 64, + "nodeType": "ExpressionStatement", + "src": "705:64:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 69, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 66, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "783:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "787:6:1", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "783:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 68, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "797:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "783:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "596f75206172656e277420746865206f776e6572", + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "804:22:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "typeString": "literal_string \"You aren't the owner\"" + }, + "value": "You aren't the owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "typeString": "literal_string \"You aren't the owner\"" + } + ], + "id": 65, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "775:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 71, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "775:52:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 72, + "nodeType": "ExpressionStatement", + "src": "775:52:1" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 76, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "858:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Lock_$95", + "typeString": "contract Lock" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Lock_$95", + "typeString": "contract Lock" + } + ], + "id": 75, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "850:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 74, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "850:7:1", + "typeDescriptions": {} + } + }, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "850:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "864:7:1", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "850:21:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 79, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "873:5:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 80, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "879:9:1", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "873:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 73, + "name": "Withdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "839:10:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 81, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "839:50:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 82, + "nodeType": "EmitStatement", + "src": "834:55:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [ + { + "id": 88, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "919:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Lock_$95", + "typeString": "contract Lock" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Lock_$95", + "typeString": "contract Lock" + } + ], + "id": 87, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "911:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 86, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "911:7:1", + "typeDescriptions": {} + } + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "911:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 90, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "925:7:1", + "memberName": "balance", + "nodeType": "MemberAccess", + "src": "911:21:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 83, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "896:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "902:8:1", + "memberName": "transfer", + "nodeType": "MemberAccess", + "src": "896:14:1", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 91, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "896:37:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 92, + "nodeType": "ExpressionStatement", + "src": "896:37:1" + } + ] + }, + "functionSelector": "3ccfd60b", + "id": 94, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nameLocation": "483:8:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 55, + "nodeType": "ParameterList", + "parameters": [], + "src": "491:2:1" + }, + "returnParameters": { + "id": 56, + "nodeType": "ParameterList", + "parameters": [], + "src": "501:0:1" + }, + "scope": 95, + "src": "474:464:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 96, + "src": "140:800:1", + "usedErrors": [] + } + ], + "src": "39:902:1" + }, + "id": 1 + } + }, + "contracts": { + "contracts/Basic.sol": { + "Basic": { + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "add", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": {}, + "generatedSources": [], + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b506101b4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B4 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x771602F7 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0xB1 JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x100 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 DUP4 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x14A JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x8E DUP2 PUSH2 0x7B JUMP JUMPDEST DUP2 EQ PUSH2 0x99 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xAB DUP2 PUSH2 0x85 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC8 JUMPI PUSH2 0xC7 PUSH2 0x76 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xD6 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0xE7 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH2 0xFA DUP2 PUSH2 0x7B JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x115 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xF1 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x155 DUP3 PUSH2 0x7B JUMP JUMPDEST SWAP2 POP PUSH2 0x160 DUP4 PUSH2 0x7B JUMP JUMPDEST SWAP3 POP DUP3 DUP3 ADD SWAP1 POP DUP1 DUP3 GT ISZERO PUSH2 0x178 JUMPI PUSH2 0x177 PUSH2 0x11B JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH2 0x797C 0xF7 CALLER SWAP11 PUSH11 0x42CE6913940BCE208AAE17 CALLER 0xBA 0xE5 LOG1 DUP1 0xFC 0xB7 AND EQ EQ 0x2A 0xCD SWAP1 0xD0 PUSH5 0x736F6C6343 STOP ADDMOD SGT STOP CALLER ", + "sourceMap": "64:100:0:-:0;;;;;;;;;;;;;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": { + "@add_15": { + "entryPoint": 96, + "id": 15, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_t_uint256": { + "entryPoint": 156, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint256t_uint256": { + "entryPoint": 177, + "id": null, + "parameterSlots": 2, + "returnSlots": 2 + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "entryPoint": 241, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": { + "entryPoint": 256, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "allocate_unbounded": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 1 + }, + "checked_add_t_uint256": { + "entryPoint": 330, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "cleanup_t_uint256": { + "entryPoint": 123, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "panic_error_0x11": { + "entryPoint": 283, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "entryPoint": 118, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "validator_revert_t_uint256": { + "entryPoint": 133, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:1902:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:2", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:2" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:2" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:2" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:2", + "type": "" + } + ], + "src": "7:75:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:2" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:2" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "379:32:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "389:16:2", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "400:5:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "389:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "361:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "371:7:2", + "type": "" + } + ], + "src": "334:77:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "460:79:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "517:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "526:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "529:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "519:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "519:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "519:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "483:5:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "508:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "490:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "490:24:2" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "480:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "480:35:2" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "473:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "473:43:2" + }, + "nodeType": "YulIf", + "src": "470:63:2" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "453:5:2", + "type": "" + } + ], + "src": "417:122:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "597:87:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "607:29:2", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "629:6:2" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "616:12:2" + }, + "nodeType": "YulFunctionCall", + "src": "616:20:2" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "607:5:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "672:5:2" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "645:26:2" + }, + "nodeType": "YulFunctionCall", + "src": "645:33:2" + }, + "nodeType": "YulExpressionStatement", + "src": "645:33:2" + } + ] + }, + "name": "abi_decode_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "575:6:2", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "583:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "591:5:2", + "type": "" + } + ], + "src": "545:139:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "773:391:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "819:83:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "821:77:2" + }, + "nodeType": "YulFunctionCall", + "src": "821:79:2" + }, + "nodeType": "YulExpressionStatement", + "src": "821:79:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "794:7:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "803:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "790:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "790:23:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "815:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "786:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "786:32:2" + }, + "nodeType": "YulIf", + "src": "783:119:2" + }, + { + "nodeType": "YulBlock", + "src": "912:117:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "927:15:2", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "941:1:2", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "931:6:2", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "956:63:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "991:9:2" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1002:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "987:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "987:22:2" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1011:7:2" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "966:20:2" + }, + "nodeType": "YulFunctionCall", + "src": "966:53:2" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "956:6:2" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "1039:118:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1054:16:2", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1068:2:2", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1058:6:2", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1084:63:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1119:9:2" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1130:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1115:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1115:22:2" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1139:7:2" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "1094:20:2" + }, + "nodeType": "YulFunctionCall", + "src": "1094:53:2" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "1084:6:2" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "735:9:2", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "746:7:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "758:6:2", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "766:6:2", + "type": "" + } + ], + "src": "690:474:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1235:53:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1252:3:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1275:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "1257:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "1257:24:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1245:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1245:37:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1245:37:2" + } + ] + }, + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1223:5:2", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1230:3:2", + "type": "" + } + ], + "src": "1170:118:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1392:124:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1402:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1414:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1425:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1410:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1410:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "1402:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1482:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1495:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1506:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1491:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1491:17:2" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "1438:43:2" + }, + "nodeType": "YulFunctionCall", + "src": "1438:71:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1438:71:2" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1364:9:2", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1376:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1387:4:2", + "type": "" + } + ], + "src": "1294:222:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1550:152:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1567:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1570:77:2", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1560:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1560:88:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1560:88:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1664:1:2", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1667:4:2", + "type": "", + "value": "0x11" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1657:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1657:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1657:15:2" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1688:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1691:4:2", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1681:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1681:15:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1681:15:2" + } + ] + }, + "name": "panic_error_0x11", + "nodeType": "YulFunctionDefinition", + "src": "1522:180:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1752:147:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1762:25:2", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1785:1:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "1767:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "1767:20:2" + }, + "variableNames": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1762:1:2" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1796:25:2", + "value": { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1819:1:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "1801:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "1801:20:2" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1796:1:2" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1830:16:2", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1841:1:2" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1844:1:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1837:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1837:9:2" + }, + "variableNames": [ + { + "name": "sum", + "nodeType": "YulIdentifier", + "src": "1830:3:2" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1870:22:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "1872:16:2" + }, + "nodeType": "YulFunctionCall", + "src": "1872:18:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1872:18:2" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1862:1:2" + }, + { + "name": "sum", + "nodeType": "YulIdentifier", + "src": "1865:3:2" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "1859:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "1859:10:2" + }, + "nodeType": "YulIf", + "src": "1856:36:2" + } + ] + }, + "name": "checked_add_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nodeType": "YulTypedName", + "src": "1739:1:2", + "type": "" + }, + { + "name": "y", + "nodeType": "YulTypedName", + "src": "1742:1:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "sum", + "nodeType": "YulTypedName", + "src": "1748:3:2", + "type": "" + } + ], + "src": "1708:191:2" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\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_uint256t_uint256(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n sum := add(x, y)\n\n if gt(x, sum) { panic_error_0x11() }\n\n }\n\n}\n", + "id": 2, + "language": "Yul", + "name": "#utility.yul" + } + ], + "immutableReferences": {}, + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x771602F7 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0xB1 JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x100 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 DUP4 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x14A JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x8E DUP2 PUSH2 0x7B JUMP JUMPDEST DUP2 EQ PUSH2 0x99 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xAB DUP2 PUSH2 0x85 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC8 JUMPI PUSH2 0xC7 PUSH2 0x76 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xD6 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0xE7 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH2 0xFA DUP2 PUSH2 0x7B JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x115 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xF1 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x155 DUP3 PUSH2 0x7B JUMP JUMPDEST SWAP2 POP PUSH2 0x160 DUP4 PUSH2 0x7B JUMP JUMPDEST SWAP3 POP DUP3 DUP3 ADD SWAP1 POP DUP1 DUP3 GT ISZERO PUSH2 0x178 JUMPI PUSH2 0x177 PUSH2 0x11B JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH2 0x797C 0xF7 CALLER SWAP11 PUSH11 0x42CE6913940BCE208AAE17 CALLER 0xBA 0xE5 LOG1 DUP1 0xFC 0xB7 AND EQ EQ 0x2A 0xCD SWAP1 0xD0 PUSH5 0x736F6C6343 STOP ADDMOD SGT STOP CALLER ", + "sourceMap": "64:100:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:79;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;133:4;156:1;152;:5;;;;:::i;:::-;145:12;;83:79;;;;:::o;88:117:2:-;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:474::-;758:6;766;815:2;803:9;794:7;790:23;786:32;783:119;;;821:79;;:::i;:::-;783:119;941:1;966:53;1011:7;1002:6;991:9;987:22;966:53;:::i;:::-;956:63;;912:117;1068:2;1094:53;1139:7;1130:6;1119:9;1115:22;1094:53;:::i;:::-;1084:63;;1039:118;690:474;;;;;:::o;1170:118::-;1257:24;1275:5;1257:24;:::i;:::-;1252:3;1245:37;1170:118;;:::o;1294:222::-;1387:4;1425:2;1414:9;1410:18;1402:26;;1438:71;1506:1;1495:9;1491:17;1482:6;1438:71;:::i;:::-;1294:222;;;;:::o;1522:180::-;1570:77;1567:1;1560:88;1667:4;1664:1;1657:15;1691:4;1688:1;1681:15;1708:191;1748:3;1767:20;1785:1;1767:20;:::i;:::-;1762:25;;1801:20;1819:1;1801:20;:::i;:::-;1796:25;;1844:1;1841;1837:9;1830:16;;1865:3;1862:1;1859:10;1856:36;;;1872:18;;:::i;:::-;1856:36;1708:191;;;;:::o" + }, + "methodIdentifiers": { + "add(uint256,uint256)": "771602f7" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"a\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"b\",\"type\":\"uint256\"}],\"name\":\"add\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Basic.sol\":\"Basic\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Basic.sol\":{\"keccak256\":\"0x8566787d8567b5b7d85a887905bf5d0c5104be4f83488ba9e7e1e5b10e9af8cf\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://46cb6c6cebfef5738350ad9cfc0c3b1c9407f4e9b58a8219c36fb5c17c41ce1a\",\"dweb:/ipfs/Qmf5tnzv7HDJtPeaRsBWh3AYRH12Ezrn7C6UVScevo36Ht\"]}},\"version\":1}" + } + }, + "contracts/Lock.sol": { + "Lock": { + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_unlockTime", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "when", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "evm": { + "bytecode": { + "functionDebugData": { + "@_54": { + "entryPoint": null, + "id": 54, + "parameterSlots": 1, + "returnSlots": 0 + }, + "abi_decode_t_uint256_fromMemory": { + "entryPoint": 219, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_decode_tuple_t_uint256_fromMemory": { + "entryPoint": 240, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack": { + "entryPoint": 381, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 416, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "allocate_unbounded": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 1 + }, + "array_storeLengthForEncoding_t_string_memory_ptr_fromStack": { + "entryPoint": 285, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "cleanup_t_uint256": { + "entryPoint": 186, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": { + "entryPoint": null, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": { + "entryPoint": 181, + "id": null, + "parameterSlots": 0, + "returnSlots": 0 + }, + "store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413": { + "entryPoint": 302, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + }, + "validator_revert_t_uint256": { + "entryPoint": 196, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:2248:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:2", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:2" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:2" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:2" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:2", + "type": "" + } + ], + "src": "7:75:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:2" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:2" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "379:32:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "389:16:2", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "400:5:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "389:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "361:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "371:7:2", + "type": "" + } + ], + "src": "334:77:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "460:79:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "517:16:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "526:1:2", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "529:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "519:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "519:12:2" + }, + "nodeType": "YulExpressionStatement", + "src": "519:12:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "483:5:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "508:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "490:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "490:24:2" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "480:2:2" + }, + "nodeType": "YulFunctionCall", + "src": "480:35:2" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "473:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "473:43:2" + }, + "nodeType": "YulIf", + "src": "470:63:2" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "453:5:2", + "type": "" + } + ], + "src": "417:122:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "608:80:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "618:22:2", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "633:6:2" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "627:5:2" + }, + "nodeType": "YulFunctionCall", + "src": "627:13:2" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "618:5:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "676:5:2" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "649:26:2" + }, + "nodeType": "YulFunctionCall", + "src": "649:33:2" + }, + "nodeType": "YulExpressionStatement", + "src": "649:33:2" + } + ] + }, + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "586:6:2", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "594:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "602:5:2", + "type": "" + } + ], + "src": "545:143:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "771:274:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "817:83:2", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "819:77:2" + }, + "nodeType": "YulFunctionCall", + "src": "819:79:2" + }, + "nodeType": "YulExpressionStatement", + "src": "819:79:2" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "792:7:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "801:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "788:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "788:23:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "813:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "784:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "784:32:2" + }, + "nodeType": "YulIf", + "src": "781:119:2" + }, + { + "nodeType": "YulBlock", + "src": "910:128:2", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "925:15:2", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "939:1:2", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "929:6:2", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "954:74:2", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1000:9:2" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1011:6:2" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "996:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "996:22:2" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1020:7:2" + } + ], + "functionName": { + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulIdentifier", + "src": "964:31:2" + }, + "nodeType": "YulFunctionCall", + "src": "964:64:2" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "954:6:2" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "741:9:2", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "752:7:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "764:6:2", + "type": "" + } + ], + "src": "694:351:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1147:73:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1164:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1169:6:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1157:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1157:19:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1157:19:2" + }, + { + "nodeType": "YulAssignment", + "src": "1185:29:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1204:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1209:4:2", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1200:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1200:14:2" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "1185:11:2" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1119:3:2", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1124:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "1135:11:2", + "type": "" + } + ], + "src": "1051:169:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1332:116:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1354:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1362:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1350:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1350:14:2" + }, + { + "hexValue": "556e6c6f636b2074696d652073686f756c6420626520696e2074686520667574", + "kind": "string", + "nodeType": "YulLiteral", + "src": "1366:34:2", + "type": "", + "value": "Unlock time should be in the fut" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1343:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1343:58:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1343:58:2" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1422:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1430:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1418:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1418:15:2" + }, + { + "hexValue": "757265", + "kind": "string", + "nodeType": "YulLiteral", + "src": "1435:5:2", + "type": "", + "value": "ure" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1411:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1411:30:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1411:30:2" + } + ] + }, + "name": "store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "1324:6:2", + "type": "" + } + ], + "src": "1226:222:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1600:220:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1610:74:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1676:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1681:2:2", + "type": "", + "value": "35" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "1617:58:2" + }, + "nodeType": "YulFunctionCall", + "src": "1617:67:2" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1610:3:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1782:3:2" + } + ], + "functionName": { + "name": "store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413", + "nodeType": "YulIdentifier", + "src": "1693:88:2" + }, + "nodeType": "YulFunctionCall", + "src": "1693:93:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1693:93:2" + }, + { + "nodeType": "YulAssignment", + "src": "1795:19:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1806:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1811:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1802:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1802:12:2" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "1795:3:2" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1588:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1596:3:2", + "type": "" + } + ], + "src": "1454:366:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1997:248:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2007:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2019:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2030:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2015:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2015:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2007:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2054:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2065:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2050:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2050:17:2" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2073:4:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2079:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2069:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2069:20:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2043:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "2043:47:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2043:47:2" + }, + { + "nodeType": "YulAssignment", + "src": "2099:139:2", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2233:4:2" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2107:124:2" + }, + "nodeType": "YulFunctionCall", + "src": "2107:131:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2099:4:2" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1977:9:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1992:4:2", + "type": "" + } + ], + "src": "1826:419:2" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\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 store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413(memPtr) {\n\n mstore(add(memPtr, 0), \"Unlock time should be in the fut\")\n\n mstore(add(memPtr, 32), \"ure\")\n\n }\n\n function abi_encode_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 35)\n store_literal_in_memory_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413__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_f6fa9918d4578fba07be58c41841a4c6937c19725f7f4601884cd186799a8413_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n}\n", + "id": 2, + "language": "Yul", + "name": "#utility.yul" + } + ], + "linkReferences": {}, + "object": "60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x5D8 CODESIZE SUB DUP1 PUSH2 0x5D8 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x25 SWAP2 SWAP1 PUSH2 0xF0 JUMP JUMPDEST DUP1 TIMESTAMP LT PUSH2 0x67 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5E SWAP1 PUSH2 0x1A0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP CALLER PUSH1 0x1 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP PUSH2 0x1C0 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xCD DUP2 PUSH2 0xBA JUMP JUMPDEST DUP2 EQ PUSH2 0xD8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0xEA DUP2 PUSH2 0xC4 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x106 JUMPI PUSH2 0x105 PUSH2 0xB5 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0x114 DUP5 DUP3 DUP6 ADD PUSH2 0xDB JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x556E6C6F636B2074696D652073686F756C6420626520696E2074686520667574 PUSH1 0x0 DUP3 ADD MSTORE PUSH32 0x7572650000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x18A PUSH1 0x23 DUP4 PUSH2 0x11D JUMP JUMPDEST SWAP2 POP PUSH2 0x195 DUP3 PUSH2 0x12E JUMP JUMPDEST PUSH1 0x40 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x1B9 DUP2 PUSH2 0x17D JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x409 DUP1 PUSH2 0x1CF PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x251C1AA3 EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x64 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x6E JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4E PUSH2 0x8C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x5B SWAP2 SWAP1 PUSH2 0x24A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x6C PUSH2 0x92 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x76 PUSH2 0x20B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x83 SWAP2 SWAP1 PUSH2 0x2A6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD TIMESTAMP LT ISZERO PUSH2 0xD7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xCE SWAP1 PUSH2 0x31E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x167 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x15E SWAP1 PUSH2 0x38A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH32 0xBF2ED60BD5B5965D685680C01195C9514E4382E28E3A5A2D2D5244BF59411B93 SELFBALANCE TIMESTAMP PUSH1 0x40 MLOAD PUSH2 0x198 SWAP3 SWAP2 SWAP1 PUSH2 0x3AA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC SELFBALANCE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x208 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x244 DUP2 PUSH2 0x231 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x25F PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290 DUP3 PUSH2 0x265 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2A0 DUP2 PUSH2 0x285 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2BB PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x297 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x596F752063616E27742077697468647261772079657400000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x308 PUSH1 0x16 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x313 DUP3 PUSH2 0x2D2 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x337 DUP2 PUSH2 0x2FB JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x596F75206172656E277420746865206F776E6572000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x374 PUSH1 0x14 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x37F DUP3 PUSH2 0x33E JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x3A3 DUP2 PUSH2 0x367 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x3BF PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x23B JUMP JUMPDEST PUSH2 0x3CC PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 0x2F PUSH20 0xD2A3284A3C1CCA55A0FE6EC1A91B13BEC884AECD 0xBC 0xF6 PREVRANDAO 0xCE 0xBF 0x27 PUSH21 0xF32F64736F6C634300081300330000000000000000 ", + "sourceMap": "140:800:1:-:0;;;262:208;;;;;;;;;;;;;;;;;;;;;:::i;:::-;339:11;321:15;:29;306:95;;;;;;;;;;;;:::i;:::-;;;;;;;;;421:11;408:10;:24;;;;454:10;438:5;;:27;;;;;;;;;;;;;;;;;;262:208;140:800;;88:117:2;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:143::-;602:5;633:6;627:13;618:22;;649:33;676:5;649:33;:::i;:::-;545:143;;;;:::o;694:351::-;764:6;813:2;801:9;792:7;788:23;784:32;781:119;;;819:79;;:::i;:::-;781:119;939:1;964:64;1020:7;1011:6;1000:9;996:22;964:64;:::i;:::-;954:74;;910:128;694:351;;;;:::o;1051:169::-;1135:11;1169:6;1164:3;1157:19;1209:4;1204:3;1200:14;1185:29;;1051:169;;;;:::o;1226:222::-;1366:34;1362:1;1354:6;1350:14;1343:58;1435:5;1430:2;1422:6;1418:15;1411:30;1226:222;:::o;1454:366::-;1596:3;1617:67;1681:2;1676:3;1617:67;:::i;:::-;1610:74;;1693:93;1782:3;1693:93;:::i;:::-;1811:2;1806:3;1802:12;1795:19;;1454:366;;;:::o;1826:419::-;1992:4;2030:2;2019:9;2015:18;2007:26;;2079:9;2073:4;2069:20;2065:1;2054:9;2050:17;2043:47;2107:131;2233:4;2107:131;:::i;:::-;2099:139;;1826:419;;;:::o;140:800:1:-;;;;;;;" + }, + "deployedBytecode": { + "functionDebugData": { + "@owner_22": { + "entryPoint": 523, + "id": 22, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@unlockTime_20": { + "entryPoint": 140, + "id": 20, + "parameterSlots": 0, + "returnSlots": 0 + }, + "@withdraw_94": { + "entryPoint": 146, + "id": 94, + "parameterSlots": 0, + "returnSlots": 0 + }, + "abi_encode_t_address_payable_to_t_address_payable_fromStack": { + "entryPoint": 663, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack": { + "entryPoint": 763, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack": { + "entryPoint": 871, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_t_uint256_to_t_uint256_fromStack": { + "entryPoint": 571, + "id": null, + "parameterSlots": 2, + "returnSlots": 0 + }, + "abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed": { + "entryPoint": 678, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 798, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a__to_t_string_memory_ptr__fromStack_reversed": { + "entryPoint": 906, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": { + "entryPoint": 586, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed": { + "entryPoint": 938, + "id": null, + "parameterSlots": 3, + "returnSlots": 1 + }, + "array_storeLengthForEncoding_t_string_memory_ptr_fromStack": { + "entryPoint": 705, + "id": null, + "parameterSlots": 2, + "returnSlots": 1 + }, + "cleanup_t_address_payable": { + "entryPoint": 645, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "cleanup_t_uint160": { + "entryPoint": 613, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "cleanup_t_uint256": { + "entryPoint": 561, + "id": null, + "parameterSlots": 1, + "returnSlots": 1 + }, + "store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8": { + "entryPoint": 722, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + }, + "store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a": { + "entryPoint": 830, + "id": null, + "parameterSlots": 1, + "returnSlots": 0 + } + }, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:3550:2", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "52:32:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "62:16:2", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "73:5:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "62:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "34:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "44:7:2", + "type": "" + } + ], + "src": "7:77:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "155:53:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "172:3:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "195:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "177:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "177:24:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "165:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "165:37:2" + }, + "nodeType": "YulExpressionStatement", + "src": "165:37:2" + } + ] + }, + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "143:5:2", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "150:3:2", + "type": "" + } + ], + "src": "90:118:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "312:124:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "322:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "334:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "345:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "330:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "330:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "322:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "402:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "415:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "426:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "411:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "411:17:2" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "358:43:2" + }, + "nodeType": "YulFunctionCall", + "src": "358:71:2" + }, + "nodeType": "YulExpressionStatement", + "src": "358:71:2" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "284:9:2", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "296:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "307:4:2", + "type": "" + } + ], + "src": "214:222:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "487:81:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "497:65:2", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "512:5:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "519:42:2", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "508:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "508:54:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "497:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_uint160", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "469:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "479:7:2", + "type": "" + } + ], + "src": "442:126:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "627:51:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "637:35:2", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "666:5:2" + } + ], + "functionName": { + "name": "cleanup_t_uint160", + "nodeType": "YulIdentifier", + "src": "648:17:2" + }, + "nodeType": "YulFunctionCall", + "src": "648:24:2" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "637:7:2" + } + ] + } + ] + }, + "name": "cleanup_t_address_payable", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "609:5:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "619:7:2", + "type": "" + } + ], + "src": "574:104:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "765:61:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "782:3:2" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "813:5:2" + } + ], + "functionName": { + "name": "cleanup_t_address_payable", + "nodeType": "YulIdentifier", + "src": "787:25:2" + }, + "nodeType": "YulFunctionCall", + "src": "787:32:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "775:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "775:45:2" + }, + "nodeType": "YulExpressionStatement", + "src": "775:45:2" + } + ] + }, + "name": "abi_encode_t_address_payable_to_t_address_payable_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "753:5:2", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "760:3:2", + "type": "" + } + ], + "src": "684:142:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "946:140:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "956:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "968:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "979:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "964:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "964:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "956:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1052:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1065:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1076:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1061:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1061:17:2" + } + ], + "functionName": { + "name": "abi_encode_t_address_payable_to_t_address_payable_fromStack", + "nodeType": "YulIdentifier", + "src": "992:59:2" + }, + "nodeType": "YulFunctionCall", + "src": "992:87:2" + }, + "nodeType": "YulExpressionStatement", + "src": "992:87:2" + } + ] + }, + "name": "abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "918:9:2", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "930:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "941:4:2", + "type": "" + } + ], + "src": "832:254:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1188:73:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1205:3:2" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "1210:6:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1198:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1198:19:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1198:19:2" + }, + { + "nodeType": "YulAssignment", + "src": "1226:29:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1245:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1250:4:2", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1241:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1241:14:2" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "1226:11:2" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1160:3:2", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "1165:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "1176:11:2", + "type": "" + } + ], + "src": "1092:169:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1373:66:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "1395:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1403:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1391:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1391:14:2" + }, + { + "hexValue": "596f752063616e277420776974686472617720796574", + "kind": "string", + "nodeType": "YulLiteral", + "src": "1407:24:2", + "type": "", + "value": "You can't withdraw yet" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1384:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "1384:48:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1384:48:2" + } + ] + }, + "name": "store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "1365:6:2", + "type": "" + } + ], + "src": "1267:172:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1591:220:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1601:74:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1667:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1672:2:2", + "type": "", + "value": "22" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "1608:58:2" + }, + "nodeType": "YulFunctionCall", + "src": "1608:67:2" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1601:3:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1773:3:2" + } + ], + "functionName": { + "name": "store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8", + "nodeType": "YulIdentifier", + "src": "1684:88:2" + }, + "nodeType": "YulFunctionCall", + "src": "1684:93:2" + }, + "nodeType": "YulExpressionStatement", + "src": "1684:93:2" + }, + { + "nodeType": "YulAssignment", + "src": "1786:19:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "1797:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1802:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1793:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "1793:12:2" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "1786:3:2" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "1579:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1587:3:2", + "type": "" + } + ], + "src": "1445:366:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1988:248:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1998:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2010:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2021:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2006:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2006:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "1998:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2045:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2056:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2041:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2041:17:2" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2064:4:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2070:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "2060:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2060:20:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2034:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "2034:47:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2034:47:2" + }, + { + "nodeType": "YulAssignment", + "src": "2090:139:2", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2224:4:2" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2098:124:2" + }, + "nodeType": "YulFunctionCall", + "src": "2098:131:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2090:4:2" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1968:9:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "1983:4:2", + "type": "" + } + ], + "src": "1817:419:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2348:64:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "2370:6:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2378:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2366:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2366:14:2" + }, + { + "hexValue": "596f75206172656e277420746865206f776e6572", + "kind": "string", + "nodeType": "YulLiteral", + "src": "2382:22:2", + "type": "", + "value": "You aren't the owner" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2359:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "2359:46:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2359:46:2" + } + ] + }, + "name": "store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "2340:6:2", + "type": "" + } + ], + "src": "2242:170:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2564:220:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2574:74:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2640:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2645:2:2", + "type": "", + "value": "20" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "2581:58:2" + }, + "nodeType": "YulFunctionCall", + "src": "2581:67:2" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2574:3:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2746:3:2" + } + ], + "functionName": { + "name": "store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a", + "nodeType": "YulIdentifier", + "src": "2657:88:2" + }, + "nodeType": "YulFunctionCall", + "src": "2657:93:2" + }, + "nodeType": "YulExpressionStatement", + "src": "2657:93:2" + }, + { + "nodeType": "YulAssignment", + "src": "2759:19:2", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2770:3:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2775:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2766:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2766:12:2" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "2759:3:2" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2552:3:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "2560:3:2", + "type": "" + } + ], + "src": "2418:366:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2961:248:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2971:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2983:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2994:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2979:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "2979:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2971:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3018:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3029:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3014:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3014:17:2" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3037:4:2" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3043:9:2" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "3033:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3033:20:2" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3007:6:2" + }, + "nodeType": "YulFunctionCall", + "src": "3007:47:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3007:47:2" + }, + { + "nodeType": "YulAssignment", + "src": "3063:139:2", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3197:4:2" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "3071:124:2" + }, + "nodeType": "YulFunctionCall", + "src": "3071:131:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3063:4:2" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2941:9:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "2956:4:2", + "type": "" + } + ], + "src": "2790:419:2" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3341:206:2", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3351:26:2", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3363:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3374:2:2", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3359:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3359:18:2" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3351:4:2" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "3431:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3444:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3455:1:2", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3440:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3440:17:2" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "3387:43:2" + }, + "nodeType": "YulFunctionCall", + "src": "3387:71:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3387:71:2" + }, + { + "expression": { + "arguments": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "3512:6:2" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3525:9:2" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3536:2:2", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3521:3:2" + }, + "nodeType": "YulFunctionCall", + "src": "3521:18:2" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "3468:43:2" + }, + "nodeType": "YulFunctionCall", + "src": "3468:72:2" + }, + "nodeType": "YulExpressionStatement", + "src": "3468:72:2" + } + ] + }, + "name": "abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "3305:9:2", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "3317:6:2", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "3325:6:2", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "3336:4:2", + "type": "" + } + ], + "src": "3215:332:2" + } + ] + }, + "contents": "{\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address_payable(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function abi_encode_t_address_payable_to_t_address_payable_fromStack(value, pos) {\n mstore(pos, cleanup_t_address_payable(value))\n }\n\n function abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_payable_to_t_address_payable_fromStack(value0, add(headStart, 0))\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 store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8(memPtr) {\n\n mstore(add(memPtr, 0), \"You can't withdraw yet\")\n\n }\n\n function abi_encode_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 22)\n store_literal_in_memory_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8__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_09be2a1d7c98765b8c1bd9ab3700b54ab19d501eebe572af39b71382f17d12e8_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a(memPtr) {\n\n mstore(add(memPtr, 0), \"You aren't the owner\")\n\n }\n\n function abi_encode_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 20)\n store_literal_in_memory_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a__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_345d93c1110e55177ee5f687f392a2e775da2aa3d491c8308e925f0505e3530a_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_uint256_t_uint256__to_t_uint256_t_uint256__fromStack_reversed(headStart , value1, value0) -> tail {\n tail := add(headStart, 64)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value1, add(headStart, 32))\n\n }\n\n}\n", + "id": 2, + "language": "Yul", + "name": "#utility.yul" + } + ], + "immutableReferences": {}, + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c63430008130033", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x251C1AA3 EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x64 JUMPI DUP1 PUSH4 0x8DA5CB5B EQ PUSH2 0x6E JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4E PUSH2 0x8C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x5B SWAP2 SWAP1 PUSH2 0x24A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x6C PUSH2 0x92 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x76 PUSH2 0x20B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x83 SWAP2 SWAP1 PUSH2 0x2A6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SLOAD TIMESTAMP LT ISZERO PUSH2 0xD7 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xCE SWAP1 PUSH2 0x31E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x167 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x15E SWAP1 PUSH2 0x38A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH32 0xBF2ED60BD5B5965D685680C01195C9514E4382E28E3A5A2D2D5244BF59411B93 SELFBALANCE TIMESTAMP PUSH1 0x40 MLOAD PUSH2 0x198 SWAP3 SWAP2 SWAP1 PUSH2 0x3AA JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC SELFBALANCE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x208 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x244 DUP2 PUSH2 0x231 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x25F PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290 DUP3 PUSH2 0x265 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2A0 DUP2 PUSH2 0x285 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2BB PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x297 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x596F752063616E27742077697468647261772079657400000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x308 PUSH1 0x16 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x313 DUP3 PUSH2 0x2D2 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x337 DUP2 PUSH2 0x2FB JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x596F75206172656E277420746865206F776E6572000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x374 PUSH1 0x14 DUP4 PUSH2 0x2C1 JUMP JUMPDEST SWAP2 POP PUSH2 0x37F DUP3 PUSH2 0x33E JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x3A3 DUP2 PUSH2 0x367 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x3BF PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x23B JUMP JUMPDEST PUSH2 0x3CC PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x23B JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 0x2F PUSH20 0xD2A3284A3C1CCA55A0FE6EC1A91B13BEC884AECD 0xBC 0xF6 PREVRANDAO 0xCE 0xBF 0x27 PUSH21 0xF32F64736F6C634300081300330000000000000000 ", + "sourceMap": "140:800:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;158:22;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;474:464;;;:::i;:::-;;184:28;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;158:22;;;;:::o;474:464::-;732:10;;713:15;:29;;705:64;;;;;;;;;;;;:::i;:::-;;;;;;;;;797:5;;;;;;;;;;;783:19;;:10;:19;;;775:52;;;;;;;;;;;;:::i;:::-;;;;;;;;;839:50;850:21;873:15;839:50;;;;;;;:::i;:::-;;;;;;;;896:5;;;;;;;;;;;:14;;:37;911:21;896:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;474:464::o;184:28::-;;;;;;;;;;;;;:::o;7:77:2:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o;442:126::-;479:7;519:42;512:5;508:54;497:65;;442:126;;;:::o;574:104::-;619:7;648:24;666:5;648:24;:::i;:::-;637:35;;574:104;;;:::o;684:142::-;787:32;813:5;787:32;:::i;:::-;782:3;775:45;684:142;;:::o;832:254::-;941:4;979:2;968:9;964:18;956:26;;992:87;1076:1;1065:9;1061:17;1052:6;992:87;:::i;:::-;832:254;;;;:::o;1092:169::-;1176:11;1210:6;1205:3;1198:19;1250:4;1245:3;1241:14;1226:29;;1092:169;;;;:::o;1267:172::-;1407:24;1403:1;1395:6;1391:14;1384:48;1267:172;:::o;1445:366::-;1587:3;1608:67;1672:2;1667:3;1608:67;:::i;:::-;1601:74;;1684:93;1773:3;1684:93;:::i;:::-;1802:2;1797:3;1793:12;1786:19;;1445:366;;;:::o;1817:419::-;1983:4;2021:2;2010:9;2006:18;1998:26;;2070:9;2064:4;2060:20;2056:1;2045:9;2041:17;2034:47;2098:131;2224:4;2098:131;:::i;:::-;2090:139;;1817:419;;;:::o;2242:170::-;2382:22;2378:1;2370:6;2366:14;2359:46;2242:170;:::o;2418:366::-;2560:3;2581:67;2645:2;2640:3;2581:67;:::i;:::-;2574:74;;2657:93;2746:3;2657:93;:::i;:::-;2775:2;2770:3;2766:12;2759:19;;2418:366;;;:::o;2790:419::-;2956:4;2994:2;2983:9;2979:18;2971:26;;3043:9;3037:4;3033:20;3029:1;3018:9;3014:17;3007:47;3071:131;3197:4;3071:131;:::i;:::-;3063:139;;2790:419;;;:::o;3215:332::-;3336:4;3374:2;3363:9;3359:18;3351:26;;3387:71;3455:1;3444:9;3440:17;3431:6;3387:71;:::i;:::-;3468:72;3536:2;3525:9;3521:18;3512:6;3468:72;:::i;:::-;3215:332;;;;;:::o" + }, + "methodIdentifiers": { + "owner()": "8da5cb5b", + "unlockTime()": "251c1aa3", + "withdraw()": "3ccfd60b" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_unlockTime\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"when\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlockTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Lock.sol\":\"Lock\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Lock.sol\":{\"keccak256\":\"0x290d672235b22ec4740c076ad0108b37f5d3073810f5c7d502d90c72591ee9dc\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://3d74a8be6305243875a1e4bb2c8fcbd29672aa20a3781595cfbee6b743358b6b\",\"dweb:/ipfs/QmVWAacJB7wL7fBhAyvyqJLWDCEL9vMfwEeR3ydxtsprLf\"]}},\"version\":1}" + } + } + } + } +} \ No newline at end of file diff --git a/packages/core/test/mocks/status/external-artifact/deployed_addresses.json b/packages/core/test/mocks/status/external-artifact/deployed_addresses.json new file mode 100644 index 000000000..1b4134355 --- /dev/null +++ b/packages/core/test/mocks/status/external-artifact/deployed_addresses.json @@ -0,0 +1,5 @@ +{ + "LockModule#Basic": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + "LockModule#Basic2": "0x5FbDB2315678afecb367f032d93F642f64180aa3", + "LockModule#Lock": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9" +} diff --git a/packages/core/test/mocks/status/external-artifact/journal.jsonl b/packages/core/test/mocks/status/external-artifact/journal.jsonl new file mode 100644 index 000000000..9ee433b85 --- /dev/null +++ b/packages/core/test/mocks/status/external-artifact/journal.jsonl @@ -0,0 +1,13 @@ + +{"chainId":31337,"type":"DEPLOYMENT_INITIALIZE"} +{"artifactId":"LockModule#Basic","constructorArgs":[],"contractName":"Basic","dependencies":[],"from":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","futureId":"LockModule#Basic","futureType":"CONTRACT_DEPLOYMENT","libraries":{},"strategy":"basic","strategyConfig":{},"type":"DEPLOYMENT_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"LockModule#Basic","networkInteraction":{"data":"0x608060405234801561001057600080fd5b506101b4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063771602f714610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006101558261007b565b91506101608361007b565b92508282019050808211156101785761017761011b565b5b9291505056fea264697066735822122061797cf7339a6a42ce6913940bce208aae1733bae5a180fcb71614142acd90d064736f6c63430008130033","id":1,"type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"LockModule#Basic","networkInteractionId":1,"nonce":2,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"2533392716"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000000000"}},"hash":"0x89e0a88c7c22630daf55e06fcdac74f74364710b7324b3b9bed0b1478027cc7e"},"type":"TRANSACTION_SEND"} +{"futureId":"LockModule#Basic","hash":"0x89e0a88c7c22630daf55e06fcdac74f74364710b7324b3b9bed0b1478027cc7e","networkInteractionId":1,"receipt":{"blockHash":"0xa93d1b7c28ae878f758ec66abbf2d252b8f56a307c85029602280588e2199705","blockNumber":3,"contractAddress":"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0","logs":[],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"LockModule#Basic","result":{"address":"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0","type":"SUCCESS"},"type":"DEPLOYMENT_EXECUTION_STATE_COMPLETE"} +{"artifactId":"LockModule#Basic2","contractAddress":"0x5FbDB2315678afecb367f032d93F642f64180aa3","contractName":"Basic2","dependencies":[],"futureId":"LockModule#Basic2","futureType":"CONTRACT_AT","strategy":"basic","strategyConfig":{},"type":"CONTRACT_AT_EXECUTION_STATE_INITIALIZE"} +{"artifactId":"LockModule#Lock","constructorArgs":[1987909200],"contractName":"Lock","dependencies":[],"from":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","futureId":"LockModule#Lock","futureType":"NAMED_ARTIFACT_CONTRACT_DEPLOYMENT","libraries":{},"strategy":"basic","strategyConfig":{},"type":"DEPLOYMENT_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"1000000000"}} +{"futureId":"LockModule#Lock","networkInteraction":{"data":"0x60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220f92f73d2a3284a3c1cca55a0fe6ec1a91b13bec884aecdbcf644cebf2774f32f64736f6c6343000813003300000000000000000000000000000000000000000000000000000000767d1650","id":1,"type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"1000000000"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"LockModule#Lock","networkInteractionId":1,"nonce":3,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"2345885776"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000000000"}},"hash":"0x69078d0bcbb25e38654cd5948fd28b9e87a7ad40ba36963c634e833a4390648f"},"type":"TRANSACTION_SEND"} +{"futureId":"LockModule#Lock","hash":"0x69078d0bcbb25e38654cd5948fd28b9e87a7ad40ba36963c634e833a4390648f","networkInteractionId":1,"receipt":{"blockHash":"0x012000c35e3c31a950a51262c63afa0ae81dbf934f0182ea9302322951fc69e3","blockNumber":4,"contractAddress":"0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9","logs":[],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"LockModule#Lock","result":{"address":"0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9","type":"SUCCESS"},"type":"DEPLOYMENT_EXECUTION_STATE_COMPLETE"} \ No newline at end of file diff --git a/packages/core/test/status.ts b/packages/core/test/status.ts index 0f98303f9..0fbc5a275 100644 --- a/packages/core/test/status.ts +++ b/packages/core/test/status.ts @@ -42,6 +42,61 @@ describe("status", () => { assert.deepEqual(result, expectedResult); }); + it("should return a status result for a successful deployment with external artifacts", async () => { + const expectedResult = { + started: [], + successful: ["LockModule#Basic", "LockModule#Basic2", "LockModule#Lock"], + held: [], + timedOut: [], + failed: [], + chainId: 31337, + contracts: { + "LockModule#Basic": { + id: "LockModule#Basic", + contractName: "Basic", + address: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + sourceName: "", + abi: [], + }, + "LockModule#Basic2": { + id: "LockModule#Basic2", + contractName: "Basic2", + address: "0x5FbDB2315678afecb367f032d93F642f64180aa3", + sourceName: "", + abi: [], + }, + "LockModule#Lock": { + id: "LockModule#Lock", + contractName: "ArtifactLock", + address: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + sourceName: "contracts/ArtifactLock.sol", + abi: ["test"], + }, + }, + }; + + const fakeArtifact: Artifact = { + abi: ["test"], + contractName: "ArtifactLock", + sourceName: "contracts/ArtifactLock.sol", + bytecode: "", + linkReferences: {}, + }; + + const deploymentDir = path.join( + __dirname, + "mocks", + "status", + "external-artifact" + ); + + const artifactResolver = setupMockArtifactResolver({ Lock: fakeArtifact }); + + const result = await status(deploymentDir, artifactResolver); + + assert.deepEqual(result, expectedResult); + }); + it("should throw an error if the deployment is not initialized", async () => { const artifactResolver = setupMockArtifactResolver(); From b70deb0f7ce5b84b168d2ed192f0cd7b1ed13157 Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Sun, 15 Dec 2024 05:26:24 -0500 Subject: [PATCH 06/11] use deploymentLoader exclusively and deprecate artifactLoader for status --- packages/core/src/status.ts | 21 +--- packages/core/test/status.ts | 232 +++++++++++++++++++++++++++++------ 2 files changed, 197 insertions(+), 56 deletions(-) diff --git a/packages/core/src/status.ts b/packages/core/src/status.ts index a4c18b0cd..7576dc661 100644 --- a/packages/core/src/status.ts +++ b/packages/core/src/status.ts @@ -4,21 +4,20 @@ import { ERRORS } from "./internal/errors-list"; import { loadDeploymentState } from "./internal/execution/deployment-state-helpers"; import { findDeployedContracts } from "./internal/views/find-deployed-contracts"; import { findStatus } from "./internal/views/find-status"; -import { Abi, Artifact, ArtifactResolver } from "./types/artifact"; +import { ArtifactResolver } from "./types/artifact"; import { StatusResult } from "./types/status"; /** * Show the status of a deployment. * * @param deploymentDir - the directory of the deployment to get the status of - * @param artifactResolver - the artifact resolver to use when loading artifacts - * for a future + * @param _artifactResolver - DEPRECATED: this parameter is not used and will be removed in the future * * @beta */ export async function status( deploymentDir: string, - artifactResolver: Omit + _artifactResolver?: Omit ): Promise { const deploymentLoader = new FileDeploymentLoader(deploymentDir); @@ -38,19 +37,7 @@ export async function status( for (const [futureId, deployedContract] of Object.entries( deployedContracts )) { - let artifact: Artifact; - - try { - artifact = await artifactResolver.loadArtifact( - deployedContract.contractName - ); - } catch (e) { - if (e instanceof Error && /HH700/g.test(e.message)) { - artifact = await deploymentLoader.loadArtifact(deployedContract.id); - } else { - throw e; - } - } + const artifact = await deploymentLoader.loadArtifact(deployedContract.id); contracts[futureId] = { ...deployedContract, diff --git a/packages/core/test/status.ts b/packages/core/test/status.ts index 0fbc5a275..1ec15e614 100644 --- a/packages/core/test/status.ts +++ b/packages/core/test/status.ts @@ -1,9 +1,7 @@ import { assert } from "chai"; import path from "path"; -import { Artifact, status } from "../src"; - -import { setupMockArtifactResolver } from "./helpers"; +import { status } from "../src"; describe("status", () => { it("should return a status result for a successful deployment", async () => { @@ -17,27 +15,81 @@ describe("status", () => { contracts: { "LockModule#Lock": { id: "LockModule#Lock", - contractName: "ArtifactLock", + contractName: "Lock", address: "0x5FbDB2315678afecb367f032d93F642f64180aa3", - sourceName: "contracts/ArtifactLock.sol", - abi: ["test"], + sourceName: "contracts/Lock.sol", + abi: [ + { + inputs: [ + { + internalType: "uint256", + name: "_unlockTime", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "when", + type: "uint256", + }, + ], + name: "Withdrawal", + type: "event", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address payable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unlockTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], }, }, }; - const fakeArtifact: Artifact = { - abi: ["test"], - contractName: "ArtifactLock", - sourceName: "contracts/ArtifactLock.sol", - bytecode: "", - linkReferences: {}, - }; - const deploymentDir = path.join(__dirname, "mocks", "status", "success"); - const artifactResolver = setupMockArtifactResolver({ Lock: fakeArtifact }); - - const result = await status(deploymentDir, artifactResolver); + const result = await status(deploymentDir); assert.deepEqual(result, expectedResult); }); @@ -55,34 +107,140 @@ describe("status", () => { id: "LockModule#Basic", contractName: "Basic", address: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", - sourceName: "", - abi: [], + sourceName: "contracts/Basic.sol", + abi: [ + { + inputs: [ + { + internalType: "uint256", + name: "a", + type: "uint256", + }, + { + internalType: "uint256", + name: "b", + type: "uint256", + }, + ], + name: "add", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + ], }, "LockModule#Basic2": { id: "LockModule#Basic2", - contractName: "Basic2", + contractName: "Basic", address: "0x5FbDB2315678afecb367f032d93F642f64180aa3", - sourceName: "", - abi: [], + sourceName: "contracts/Basic.sol", + abi: [ + { + inputs: [ + { + internalType: "uint256", + name: "a", + type: "uint256", + }, + { + internalType: "uint256", + name: "b", + type: "uint256", + }, + ], + name: "add", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + ], }, "LockModule#Lock": { id: "LockModule#Lock", - contractName: "ArtifactLock", + contractName: "Lock", address: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", - sourceName: "contracts/ArtifactLock.sol", - abi: ["test"], + sourceName: "contracts/Lock.sol", + abi: [ + { + inputs: [ + { + internalType: "uint256", + name: "_unlockTime", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "when", + type: "uint256", + }, + ], + name: "Withdrawal", + type: "event", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address payable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unlockTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], }, }, }; - const fakeArtifact: Artifact = { - abi: ["test"], - contractName: "ArtifactLock", - sourceName: "contracts/ArtifactLock.sol", - bytecode: "", - linkReferences: {}, - }; - const deploymentDir = path.join( __dirname, "mocks", @@ -90,18 +248,14 @@ describe("status", () => { "external-artifact" ); - const artifactResolver = setupMockArtifactResolver({ Lock: fakeArtifact }); - - const result = await status(deploymentDir, artifactResolver); + const result = await status(deploymentDir); assert.deepEqual(result, expectedResult); }); it("should throw an error if the deployment is not initialized", async () => { - const artifactResolver = setupMockArtifactResolver(); - await assert.isRejected( - status("fake", artifactResolver), + status("fake"), /IGN800: Cannot get status for nonexistant deployment at fake/ ); }); From dc2e8bf3f30e35e82bdde190f3f56ad3a8f09cd4 Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Wed, 27 Nov 2024 03:03:54 -0500 Subject: [PATCH 07/11] enable ignition UI for deployments via hardhat scripts --- packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts | 4 ++++ packages/hardhat-plugin-viem/src/viem-ignition-helper.ts | 4 ++++ packages/hardhat-plugin/src/helpers.ts | 1 + 3 files changed, 9 insertions(+) diff --git a/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts b/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts index 944ee05be..d3ed5d4f1 100644 --- a/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts +++ b/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts @@ -1,5 +1,6 @@ import { HardhatArtifactResolver, + PrettyEventHandler, errorDeploymentResultToExceptionMessage, resolveDeploymentId, } from "@nomicfoundation/hardhat-ignition/helpers"; @@ -134,10 +135,13 @@ export class EthersIgnitionHelper { deploymentId ); + const executionEventListener = new PrettyEventHandler(); + const result = await deploy({ config: resolvedConfig, provider: this._provider, deploymentDir, + executionEventListener, artifactResolver, ignitionModule, deploymentParameters: parameters, diff --git a/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts b/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts index 52c492aa1..89950f97f 100644 --- a/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts +++ b/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts @@ -2,6 +2,7 @@ import type { GetContractReturnType } from "@nomicfoundation/hardhat-viem/types" import { HardhatArtifactResolver, + PrettyEventHandler, errorDeploymentResultToExceptionMessage, resolveDeploymentId, } from "@nomicfoundation/hardhat-ignition/helpers"; @@ -124,10 +125,13 @@ export class ViemIgnitionHelper { deploymentId ); + const executionEventListener = new PrettyEventHandler(); + const result = await deploy({ config: resolvedConfig, provider: this._provider, deploymentDir, + executionEventListener, artifactResolver, ignitionModule, deploymentParameters: parameters, diff --git a/packages/hardhat-plugin/src/helpers.ts b/packages/hardhat-plugin/src/helpers.ts index 459acc79e..019c0e688 100644 --- a/packages/hardhat-plugin/src/helpers.ts +++ b/packages/hardhat-plugin/src/helpers.ts @@ -1,3 +1,4 @@ export { HardhatArtifactResolver } from "./hardhat-artifact-resolver"; export { errorDeploymentResultToExceptionMessage } from "./utils/error-deployment-result-to-exception-message"; export { resolveDeploymentId } from "./utils/resolve-deployment-id"; +export { PrettyEventHandler } from "./ui/pretty-event-handler"; From 8423f92718ee3396f8054caa18a2ce3d5f06b47e Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Sun, 15 Dec 2024 05:57:11 -0500 Subject: [PATCH 08/11] add flag to toggle UI on for scripts --- .../hardhat-plugin-ethers/src/ethers-ignition-helper.ts | 7 ++++++- packages/hardhat-plugin-viem/src/viem-ignition-helper.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts b/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts index d3ed5d4f1..fef38dfc2 100644 --- a/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts +++ b/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts @@ -79,6 +79,7 @@ export class EthersIgnitionHelper { strategy, strategyConfig, deploymentId: givenDeploymentId = undefined, + displayUi = false, }: { parameters?: DeploymentParameters; config?: Partial; @@ -86,6 +87,7 @@ export class EthersIgnitionHelper { strategy?: StrategyT; strategyConfig?: StrategyConfig[StrategyT]; deploymentId?: string; + displayUi?: boolean; } = { parameters: {}, config: {}, @@ -93,6 +95,7 @@ export class EthersIgnitionHelper { strategy: undefined, strategyConfig: undefined, deploymentId: undefined, + displayUi: undefined, } ): Promise< IgnitionModuleResultsTToEthersContracts< @@ -135,7 +138,9 @@ export class EthersIgnitionHelper { deploymentId ); - const executionEventListener = new PrettyEventHandler(); + const executionEventListener = displayUi + ? new PrettyEventHandler() + : undefined; const result = await deploy({ config: resolvedConfig, diff --git a/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts b/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts index 89950f97f..239243381 100644 --- a/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts +++ b/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts @@ -72,6 +72,7 @@ export class ViemIgnitionHelper { strategy, strategyConfig, deploymentId: givenDeploymentId = undefined, + displayUi = false, }: { parameters?: DeploymentParameters; config?: Partial; @@ -79,6 +80,7 @@ export class ViemIgnitionHelper { strategy?: StrategyT; strategyConfig?: StrategyConfig[StrategyT]; deploymentId?: string; + displayUi?: boolean; } = { parameters: {}, config: {}, @@ -86,6 +88,7 @@ export class ViemIgnitionHelper { strategy: undefined, strategyConfig: undefined, deploymentId: undefined, + displayUi: undefined, } ): Promise< IgnitionModuleResultsToViemContracts @@ -125,7 +128,9 @@ export class ViemIgnitionHelper { deploymentId ); - const executionEventListener = new PrettyEventHandler(); + const executionEventListener = displayUi + ? new PrettyEventHandler() + : undefined; const result = await deploy({ config: resolvedConfig, From 5223b5b7c14d7b6650f36deb462846a91a823da0 Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Sun, 15 Dec 2024 07:04:59 -0500 Subject: [PATCH 09/11] add link to transactions list output --- packages/core/src/list-transactions.ts | 8 +++++++ packages/core/src/types/list-transactions.ts | 1 + packages/core/test/list-transactions.ts | 6 ++++++ packages/hardhat-plugin/src/index.ts | 7 ++++++- .../hardhat-plugin/src/type-extensions.ts | 4 ++++ .../calculate-list-transactions-display.ts | 21 +++++++++++++++++-- 6 files changed, 44 insertions(+), 3 deletions(-) diff --git a/packages/core/src/list-transactions.ts b/packages/core/src/list-transactions.ts index 74b39154b..1e763868e 100644 --- a/packages/core/src/list-transactions.ts +++ b/packages/core/src/list-transactions.ts @@ -3,6 +3,7 @@ import type { ArtifactResolver } from "./types/artifact"; import findLastIndex from "lodash/findLastIndex"; import { IgnitionError } from "./errors"; +import { builtinChains } from "./internal/chain-config"; import { FileDeploymentLoader } from "./internal/deployment-loader/file-deployment-loader"; import { ERRORS } from "./internal/errors-list"; import { loadDeploymentState } from "./internal/execution/deployment-state-helpers"; @@ -50,6 +51,10 @@ export async function listTransactions( const transactions: ListTransactionsResult = []; + const browserUrl = builtinChains.find( + ({ chainId }) => chainId === deploymentState.chainId + ); + for await (const message of deploymentLoader.readFromJournal()) { if (message.type !== JournalMessageType.TRANSACTION_SEND) { continue; @@ -97,6 +102,7 @@ export async function listTransactions( : undefined, params: exState.constructorArgs, value: networkInteraction.value, + browserUrl: browserUrl?.urls.browserURL, }); break; @@ -118,6 +124,7 @@ export async function listTransactions( to: networkInteraction.to, params: exState.args, value: networkInteraction.value, + browserUrl: browserUrl?.urls.browserURL, }); break; @@ -133,6 +140,7 @@ export async function listTransactions( ), to: networkInteraction.to, value: networkInteraction.value, + browserUrl: browserUrl?.urls.browserURL, }); break; diff --git a/packages/core/src/types/list-transactions.ts b/packages/core/src/types/list-transactions.ts index 81aafa37a..d84ad5fbb 100644 --- a/packages/core/src/types/list-transactions.ts +++ b/packages/core/src/types/list-transactions.ts @@ -27,6 +27,7 @@ export interface TransactionInfo { address?: string; params?: SolidityParameterType[]; value?: bigint; + browserUrl?: string; } /** diff --git a/packages/core/test/list-transactions.ts b/packages/core/test/list-transactions.ts index 796cf0611..4b10f7464 100644 --- a/packages/core/test/list-transactions.ts +++ b/packages/core/test/list-transactions.ts @@ -22,6 +22,7 @@ describe("listTransactions", () => { address: "0x74e720c9B362ae3A65fF356ad62866511486BBBc", params: ["0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"], value: 0n, + browserUrl: undefined, }, { type: "DEPLOYMENT_EXECUTION_STATE", @@ -33,6 +34,7 @@ describe("listTransactions", () => { address: "0x1c947344BA932fC7f3D622600dA0199520A67EFd", params: [], value: 0n, + browserUrl: undefined, }, { type: "DEPLOYMENT_EXECUTION_STATE", @@ -44,6 +46,7 @@ describe("listTransactions", () => { address: "0xBdAce15b3211019E272418B8014971c1cefbC8f0", params: [], value: 0n, + browserUrl: undefined, }, { type: "CALL_EXECUTION_STATE", @@ -55,6 +58,7 @@ describe("listTransactions", () => { to: "0x74e720c9B362ae3A65fF356ad62866511486BBBc", params: [40], value: 0n, + browserUrl: undefined, }, { type: "DEPLOYMENT_EXECUTION_STATE", @@ -66,6 +70,7 @@ describe("listTransactions", () => { address: "0xD369D9aB22D85C2A12bEabc0B581a419789E3755", params: [], value: 0n, + browserUrl: undefined, }, { type: "SEND_DATA_EXECUTION_STATE", @@ -75,6 +80,7 @@ describe("listTransactions", () => { status: TransactionStatus.SUCCESS, to: "0x74e720c9B362ae3A65fF356ad62866511486BBBc", value: 123n, + browserUrl: undefined, }, ]; diff --git a/packages/hardhat-plugin/src/index.ts b/packages/hardhat-plugin/src/index.ts index 133df4e0e..e64ef4cc6 100644 --- a/packages/hardhat-plugin/src/index.ts +++ b/packages/hardhat-plugin/src/index.ts @@ -58,6 +58,7 @@ extendConfig((config, userConfig) => { maxPriorityFeePerGas: userNetworkConfig.ignition?.maxPriorityFeePerGas, gasPrice: userNetworkConfig.ignition?.gasPrice, disableFeeBumping: userNetworkConfig.ignition?.disableFeeBumping, + explorerUrl: userNetworkConfig.ignition?.explorerUrl, }; }); @@ -717,7 +718,11 @@ ignitionScope } console.log( - calculateListTransactionsDisplay(deploymentId, listTransactionsResult) + calculateListTransactionsDisplay( + deploymentId, + listTransactionsResult, + hre.config.networks[hre.network.name]?.ignition?.explorerUrl + ) ); }); diff --git a/packages/hardhat-plugin/src/type-extensions.ts b/packages/hardhat-plugin/src/type-extensions.ts index e79353260..3a0c6cda8 100644 --- a/packages/hardhat-plugin/src/type-extensions.ts +++ b/packages/hardhat-plugin/src/type-extensions.ts @@ -19,6 +19,7 @@ declare module "hardhat/types/config" { maxPriorityFeePerGas?: bigint; gasPrice?: bigint; disableFeeBumping?: boolean; + explorerUrl?: string; }; } @@ -28,6 +29,7 @@ declare module "hardhat/types/config" { maxPriorityFeePerGas?: bigint; gasPrice?: bigint; disableFeeBumping?: boolean; + explorerUrl?: string; }; } @@ -37,6 +39,7 @@ declare module "hardhat/types/config" { maxPriorityFeePerGas?: bigint; gasPrice?: bigint; disableFeeBumping?: boolean; + explorerUrl?: string; }; } @@ -46,6 +49,7 @@ declare module "hardhat/types/config" { maxPriorityFeePerGas?: bigint; gasPrice?: bigint; disableFeeBumping?: boolean; + explorerUrl?: string; }; } diff --git a/packages/hardhat-plugin/src/ui/helpers/calculate-list-transactions-display.ts b/packages/hardhat-plugin/src/ui/helpers/calculate-list-transactions-display.ts index 78b6bb717..4bb9c839d 100644 --- a/packages/hardhat-plugin/src/ui/helpers/calculate-list-transactions-display.ts +++ b/packages/hardhat-plugin/src/ui/helpers/calculate-list-transactions-display.ts @@ -4,12 +4,18 @@ import { stringify } from "json5"; export function calculateListTransactionsDisplay( deploymentId: string, - listTransactionsResult: ListTransactionsResult + listTransactionsResult: ListTransactionsResult, + configUrl?: string ): string { let text = `Logging transactions for deployment ${deploymentId}\n\n`; for (const [index, transaction] of listTransactionsResult.entries()) { - text += `Transaction ${index + 1}:\n`; + const txLink = getTransactionLink( + transaction.txHash, + configUrl ?? transaction.browserUrl + ); + + text += `Transaction ${index + 1}${txLink === undefined ? "" : txLink}:\n`; text += ` - Type: ${transactionTypeToDisplayType(transaction.type)}\n`; text += ` - Status: ${transaction.status}\n`; text += ` - TxHash: ${transaction.txHash}\n`; @@ -70,3 +76,14 @@ export function transactionDisplaySerializeReplacer( return value; } + +function getTransactionLink( + txHash: string, + browserURL?: string +): string | undefined { + if (browserURL === undefined) { + return undefined; + } + + return `\x1b]8;;${browserURL}/tx/${txHash}\x1b\\ (🔗 view on block explorer)\x1b]8;;\x1b\\`; +} From b73be3b263f5d11def767b6de8b3695ee236e209 Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Mon, 16 Dec 2024 22:56:11 -0500 Subject: [PATCH 10/11] allow importing module parameters with filepath in scripts --- .../src/ethers-ignition-helper.ts | 13 ++++++- .../src/viem-ignition-helper.ts | 13 ++++++- packages/hardhat-plugin/src/helpers.ts | 1 + packages/hardhat-plugin/src/index.ts | 38 ++----------------- .../src/utils/read-deployment-parameters.ts | 30 +++++++++++++++ 5 files changed, 57 insertions(+), 38 deletions(-) create mode 100644 packages/hardhat-plugin/src/utils/read-deployment-parameters.ts diff --git a/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts b/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts index fef38dfc2..20a289486 100644 --- a/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts +++ b/packages/hardhat-plugin-ethers/src/ethers-ignition-helper.ts @@ -2,6 +2,7 @@ import { HardhatArtifactResolver, PrettyEventHandler, errorDeploymentResultToExceptionMessage, + readDeploymentParameters, resolveDeploymentId, } from "@nomicfoundation/hardhat-ignition/helpers"; import { @@ -81,7 +82,7 @@ export class EthersIgnitionHelper { deploymentId: givenDeploymentId = undefined, displayUi = false, }: { - parameters?: DeploymentParameters; + parameters?: DeploymentParameters | string; config?: Partial; defaultSender?: string; strategy?: StrategyT; @@ -142,6 +143,14 @@ export class EthersIgnitionHelper { ? new PrettyEventHandler() : undefined; + let deploymentParameters: DeploymentParameters; + + if (typeof parameters === "string") { + deploymentParameters = await readDeploymentParameters(parameters); + } else { + deploymentParameters = parameters; + } + const result = await deploy({ config: resolvedConfig, provider: this._provider, @@ -149,7 +158,7 @@ export class EthersIgnitionHelper { executionEventListener, artifactResolver, ignitionModule, - deploymentParameters: parameters, + deploymentParameters, accounts, defaultSender, strategy, diff --git a/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts b/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts index 239243381..8de14c443 100644 --- a/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts +++ b/packages/hardhat-plugin-viem/src/viem-ignition-helper.ts @@ -4,6 +4,7 @@ import { HardhatArtifactResolver, PrettyEventHandler, errorDeploymentResultToExceptionMessage, + readDeploymentParameters, resolveDeploymentId, } from "@nomicfoundation/hardhat-ignition/helpers"; import { @@ -74,7 +75,7 @@ export class ViemIgnitionHelper { deploymentId: givenDeploymentId = undefined, displayUi = false, }: { - parameters?: DeploymentParameters; + parameters?: DeploymentParameters | string; config?: Partial; defaultSender?: string; strategy?: StrategyT; @@ -132,6 +133,14 @@ export class ViemIgnitionHelper { ? new PrettyEventHandler() : undefined; + let deploymentParameters: DeploymentParameters; + + if (typeof parameters === "string") { + deploymentParameters = await readDeploymentParameters(parameters); + } else { + deploymentParameters = parameters; + } + const result = await deploy({ config: resolvedConfig, provider: this._provider, @@ -139,7 +148,7 @@ export class ViemIgnitionHelper { executionEventListener, artifactResolver, ignitionModule, - deploymentParameters: parameters, + deploymentParameters, accounts, defaultSender, strategy, diff --git a/packages/hardhat-plugin/src/helpers.ts b/packages/hardhat-plugin/src/helpers.ts index 019c0e688..aa85a0adc 100644 --- a/packages/hardhat-plugin/src/helpers.ts +++ b/packages/hardhat-plugin/src/helpers.ts @@ -2,3 +2,4 @@ export { HardhatArtifactResolver } from "./hardhat-artifact-resolver"; export { errorDeploymentResultToExceptionMessage } from "./utils/error-deployment-result-to-exception-message"; export { resolveDeploymentId } from "./utils/resolve-deployment-id"; export { PrettyEventHandler } from "./ui/pretty-event-handler"; +export { readDeploymentParameters } from "./utils/read-deployment-parameters"; diff --git a/packages/hardhat-plugin/src/index.ts b/packages/hardhat-plugin/src/index.ts index e64ef4cc6..b5fe778a7 100644 --- a/packages/hardhat-plugin/src/index.ts +++ b/packages/hardhat-plugin/src/index.ts @@ -7,14 +7,7 @@ import { StatusResult, } from "@nomicfoundation/ignition-core"; import debug from "debug"; -import { - ensureDir, - pathExists, - readFile, - readdirSync, - rm, - writeJSON, -} from "fs-extra"; +import { ensureDir, pathExists, readdirSync, rm, writeJSON } from "fs-extra"; import { extendConfig, extendEnvironment, scope } from "hardhat/config"; import { NomicLabsHardhatPluginError } from "hardhat/plugins"; import { parse as json5Parse } from "json5"; @@ -24,6 +17,7 @@ import "./type-extensions"; import { calculateDeploymentStatusDisplay } from "./ui/helpers/calculate-deployment-status-display"; import { bigintReviver } from "./utils/bigintReviver"; import { getApiKeyAndUrls } from "./utils/getApiKeyAndUrls"; +import { readDeploymentParameters } from "./utils/read-deployment-parameters"; import { resolveDeploymentId } from "./utils/resolve-deployment-id"; import { shouldBeHardhatPluginError } from "./utils/shouldBeHardhatPluginError"; import { verifyEtherscanContract } from "./utils/verifyEtherscanContract"; @@ -734,7 +728,7 @@ async function resolveParametersFromModuleName( const configFilename = `${moduleName}.config.json`; return files.includes(configFilename) - ? resolveConfigPath(path.resolve(ignitionPath, configFilename)) + ? readDeploymentParameters(path.resolve(ignitionPath, configFilename)) : undefined; } @@ -743,31 +737,7 @@ async function resolveParametersFromFileName( ): Promise { const filepath = path.resolve(process.cwd(), fileName); - return resolveConfigPath(filepath); -} - -async function resolveConfigPath( - filepath: string -): Promise { - try { - const rawFile = await readFile(filepath); - - return await json5Parse(rawFile.toString(), bigintReviver); - } catch (e) { - if (e instanceof NomicLabsHardhatPluginError) { - throw e; - } - - if (e instanceof Error) { - throw new NomicLabsHardhatPluginError( - "@nomicfoundation/hardhat-ignition", - `Could not parse parameters from ${filepath}`, - e - ); - } - - throw e; - } + return readDeploymentParameters(filepath); } function resolveParametersString(paramString: string): DeploymentParameters { diff --git a/packages/hardhat-plugin/src/utils/read-deployment-parameters.ts b/packages/hardhat-plugin/src/utils/read-deployment-parameters.ts new file mode 100644 index 000000000..fb6bee8cd --- /dev/null +++ b/packages/hardhat-plugin/src/utils/read-deployment-parameters.ts @@ -0,0 +1,30 @@ +import { DeploymentParameters } from "@nomicfoundation/ignition-core"; +import { readFile } from "fs-extra"; +import { NomicLabsHardhatPluginError } from "hardhat/plugins"; +import { parse as json5Parse } from "json5"; + +import { bigintReviver } from "./bigintReviver"; + +export async function readDeploymentParameters( + filepath: string +): Promise { + try { + const rawFile = await readFile(filepath); + + return await json5Parse(rawFile.toString(), bigintReviver); + } catch (e) { + if (e instanceof NomicLabsHardhatPluginError) { + throw e; + } + + if (e instanceof Error) { + throw new NomicLabsHardhatPluginError( + "@nomicfoundation/hardhat-ignition", + `Could not parse parameters from ${filepath}`, + e + ); + } + + throw e; + } +} From 67f562414b9db3cf854d183ab6bb443cf814f34e Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Wed, 18 Dec 2024 05:47:58 -0500 Subject: [PATCH 11/11] chore: bump version to v0.15.9 Update the packages versions and changelogs for the `0.15.9 - 2024-12-18` release. --- packages/core/CHANGELOG.md | 14 ++++++++++++++ packages/core/package.json | 2 +- packages/hardhat-plugin-ethers/CHANGELOG.md | 14 ++++++++++++++ packages/hardhat-plugin-ethers/package.json | 2 +- packages/hardhat-plugin-viem/CHANGELOG.md | 14 ++++++++++++++ packages/hardhat-plugin-viem/package.json | 2 +- packages/hardhat-plugin/CHANGELOG.md | 14 ++++++++++++++ packages/hardhat-plugin/package.json | 2 +- packages/ui/CHANGELOG.md | 14 ++++++++++++++ packages/ui/package.json | 2 +- 10 files changed, 75 insertions(+), 5 deletions(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 8538d1f3e..b3a9c9f20 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.15.9 - 2024-12-18 + +### Added + +- Standard Ignition UI can now be enabled when deploying via Hardhat scripts by setting `displayUi: true` in the `deploy` function options, @zoeyTM ([#843](https://github.com/NomicFoundation/hardhat-ignition/pull/843)) +- Ignition modules can now be set as a dependency in the `after` option of futures, @zoeyTM ([#828](https://github.com/NomicFoundation/hardhat-ignition/pull/828)) +- The `ignition transactions` command output will now include a link to view each transaction on the configured block explorer, @zoeyTM ([#849](https://github.com/NomicFoundation/hardhat-ignition/pull/849)) +- Module parameters can now be directly imported from a JSON file when deploying via Hardhat scripts by passing an absolute path to the file to the `parameters` option, @zoeyTM ([#850](https://github.com/NomicFoundation/hardhat-ignition/pull/850)) + +### Fixed + +- Properly handle errors when verifying deployments that use external artifacts, @zoeyTM ([#848](https://github.com/NomicFoundation/hardhat-ignition/pull/848)) +- Fix issue with `ignition status` command not working with deployments that use external artifacts, @zoeyTM ([#846](https://github.com/NomicFoundation/hardhat-ignition/pull/846)) + ## 0.15.8 - 2024-11-22 ### Fixed diff --git a/packages/core/package.json b/packages/core/package.json index 84f89d174..ad3129354 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nomicfoundation/ignition-core", - "version": "0.15.8", + "version": "0.15.9", "license": "MIT", "author": "Nomic Foundation", "homepage": "https://hardhat.org", diff --git a/packages/hardhat-plugin-ethers/CHANGELOG.md b/packages/hardhat-plugin-ethers/CHANGELOG.md index f52c0beb8..dd4c2551f 100644 --- a/packages/hardhat-plugin-ethers/CHANGELOG.md +++ b/packages/hardhat-plugin-ethers/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.15.9 - 2024-12-18 + +### Added + +- Standard Ignition UI can now be enabled when deploying via Hardhat scripts by setting `displayUi: true` in the `deploy` function options, @zoeyTM ([#843](https://github.com/NomicFoundation/hardhat-ignition/pull/843)) +- Ignition modules can now be set as a dependency in the `after` option of futures, @zoeyTM ([#828](https://github.com/NomicFoundation/hardhat-ignition/pull/828)) +- The `ignition transactions` command output will now include a link to view each transaction on the configured block explorer, @zoeyTM ([#849](https://github.com/NomicFoundation/hardhat-ignition/pull/849)) +- Module parameters can now be directly imported from a JSON file when deploying via Hardhat scripts by passing an absolute path to the file to the `parameters` option, @zoeyTM ([#850](https://github.com/NomicFoundation/hardhat-ignition/pull/850)) + +### Fixed + +- Properly handle errors when verifying deployments that use external artifacts, @zoeyTM ([#848](https://github.com/NomicFoundation/hardhat-ignition/pull/848)) +- Fix issue with `ignition status` command not working with deployments that use external artifacts, @zoeyTM ([#846](https://github.com/NomicFoundation/hardhat-ignition/pull/846)) + ## 0.15.8 - 2024-11-22 ### Fixed diff --git a/packages/hardhat-plugin-ethers/package.json b/packages/hardhat-plugin-ethers/package.json index 3f6aa0980..d594a7baa 100644 --- a/packages/hardhat-plugin-ethers/package.json +++ b/packages/hardhat-plugin-ethers/package.json @@ -1,6 +1,6 @@ { "name": "@nomicfoundation/hardhat-ignition-ethers", - "version": "0.15.8", + "version": "0.15.9", "license": "MIT", "author": "Nomic Foundation", "homepage": "https://hardhat.org", diff --git a/packages/hardhat-plugin-viem/CHANGELOG.md b/packages/hardhat-plugin-viem/CHANGELOG.md index 877d637f3..43e98e0b4 100644 --- a/packages/hardhat-plugin-viem/CHANGELOG.md +++ b/packages/hardhat-plugin-viem/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.15.9 - 2024-12-18 + +### Added + +- Standard Ignition UI can now be enabled when deploying via Hardhat scripts by setting `displayUi: true` in the `deploy` function options, @zoeyTM ([#843](https://github.com/NomicFoundation/hardhat-ignition/pull/843)) +- Ignition modules can now be set as a dependency in the `after` option of futures, @zoeyTM ([#828](https://github.com/NomicFoundation/hardhat-ignition/pull/828)) +- The `ignition transactions` command output will now include a link to view each transaction on the configured block explorer, @zoeyTM ([#849](https://github.com/NomicFoundation/hardhat-ignition/pull/849)) +- Module parameters can now be directly imported from a JSON file when deploying via Hardhat scripts by passing an absolute path to the file to the `parameters` option, @zoeyTM ([#850](https://github.com/NomicFoundation/hardhat-ignition/pull/850)) + +### Fixed + +- Properly handle errors when verifying deployments that use external artifacts, @zoeyTM ([#848](https://github.com/NomicFoundation/hardhat-ignition/pull/848)) +- Fix issue with `ignition status` command not working with deployments that use external artifacts, @zoeyTM ([#846](https://github.com/NomicFoundation/hardhat-ignition/pull/846)) + ## 0.15.8 - 2024-11-22 ### Fixed diff --git a/packages/hardhat-plugin-viem/package.json b/packages/hardhat-plugin-viem/package.json index ac13da444..2ff43ad32 100644 --- a/packages/hardhat-plugin-viem/package.json +++ b/packages/hardhat-plugin-viem/package.json @@ -1,6 +1,6 @@ { "name": "@nomicfoundation/hardhat-ignition-viem", - "version": "0.15.8", + "version": "0.15.9", "license": "MIT", "author": "Nomic Foundation", "homepage": "https://hardhat.org", diff --git a/packages/hardhat-plugin/CHANGELOG.md b/packages/hardhat-plugin/CHANGELOG.md index 8ef9618be..2158b9f8e 100644 --- a/packages/hardhat-plugin/CHANGELOG.md +++ b/packages/hardhat-plugin/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.15.9 - 2024-12-18 + +### Added + +- Standard Ignition UI can now be enabled when deploying via Hardhat scripts by setting `displayUi: true` in the `deploy` function options, @zoeyTM ([#843](https://github.com/NomicFoundation/hardhat-ignition/pull/843)) +- Ignition modules can now be set as a dependency in the `after` option of futures, @zoeyTM ([#828](https://github.com/NomicFoundation/hardhat-ignition/pull/828)) +- The `ignition transactions` command output will now include a link to view each transaction on the configured block explorer, @zoeyTM ([#849](https://github.com/NomicFoundation/hardhat-ignition/pull/849)) +- Module parameters can now be directly imported from a JSON file when deploying via Hardhat scripts by passing an absolute path to the file to the `parameters` option, @zoeyTM ([#850](https://github.com/NomicFoundation/hardhat-ignition/pull/850)) + +### Fixed + +- Properly handle errors when verifying deployments that use external artifacts, @zoeyTM ([#848](https://github.com/NomicFoundation/hardhat-ignition/pull/848)) +- Fix issue with `ignition status` command not working with deployments that use external artifacts, @zoeyTM ([#846](https://github.com/NomicFoundation/hardhat-ignition/pull/846)) + ## 0.15.8 - 2024-11-22 ### Fixed diff --git a/packages/hardhat-plugin/package.json b/packages/hardhat-plugin/package.json index 345608510..e9cc0760f 100644 --- a/packages/hardhat-plugin/package.json +++ b/packages/hardhat-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@nomicfoundation/hardhat-ignition", - "version": "0.15.8", + "version": "0.15.9", "license": "MIT", "author": "Nomic Foundation", "homepage": "https://hardhat.org", diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index 2a270bec0..dae700c1c 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.15.9 - 2024-12-18 + +### Added + +- Standard Ignition UI can now be enabled when deploying via Hardhat scripts by setting `displayUi: true` in the `deploy` function options, @zoeyTM ([#843](https://github.com/NomicFoundation/hardhat-ignition/pull/843)) +- Ignition modules can now be set as a dependency in the `after` option of futures, @zoeyTM ([#828](https://github.com/NomicFoundation/hardhat-ignition/pull/828)) +- The `ignition transactions` command output will now include a link to view each transaction on the configured block explorer, @zoeyTM ([#849](https://github.com/NomicFoundation/hardhat-ignition/pull/849)) +- Module parameters can now be directly imported from a JSON file when deploying via Hardhat scripts by passing an absolute path to the file to the `parameters` option, @zoeyTM ([#850](https://github.com/NomicFoundation/hardhat-ignition/pull/850)) + +### Fixed + +- Properly handle errors when verifying deployments that use external artifacts, @zoeyTM ([#848](https://github.com/NomicFoundation/hardhat-ignition/pull/848)) +- Fix issue with `ignition status` command not working with deployments that use external artifacts, @zoeyTM ([#846](https://github.com/NomicFoundation/hardhat-ignition/pull/846)) + ## 0.15.8 - 2024-11-22 ### Fixed diff --git a/packages/ui/package.json b/packages/ui/package.json index 0f335ae3d..0677f0515 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@nomicfoundation/ignition-ui", - "version": "0.15.8", + "version": "0.15.9", "type": "module", "scripts": { "predev": "pnpm regenerate-deployment-example",