1281 lines
47 KiB
JSON
1281 lines
47 KiB
JSON
{
|
|
"contractName": "ICloneFactory",
|
|
"abi": [
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "prototype",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "clone",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "proxy",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"metadata": "{\"compiler\":{\"version\":\"0.6.9+commit.3e3065ac\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prototype\",\"type\":\"address\"}],\"name\":\"clone\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/CloneFactory.sol\":\"ICloneFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/CloneFactory.sol\":{\"keccak256\":\"0x343dc91fe46604d9dc7583e4b969d7dbd2bcba68166bef4e608a85145e7735cc\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://2751f30bf5bc54890d68fd6e609dea0cc5ddc08aaa928829bffda71065e66715\",\"dweb:/ipfs/QmdtAmwxpdx8VAHFKkrEPazLJmpWj1dSv2Krdd7F3uauH9\"]}},\"version\":1}",
|
|
"bytecode": "0x",
|
|
"deployedBytecode": "0x",
|
|
"immutableReferences": {},
|
|
"sourceMap": "",
|
|
"deployedSourceMap": "",
|
|
"source": "/*\n\n Copyright 2020 DODO ZOO.\n SPDX-License-Identifier: Apache-2.0\n\n*/\n\npragma solidity 0.6.9;\npragma experimental ABIEncoderV2;\n\ninterface ICloneFactory {\n function clone(address prototype) external returns (address proxy);\n}\n\n// introduction of proxy mode design: https://docs.openzeppelin.com/upgrades/2.8/\n// minimum implementation of transparent proxy: https://eips.ethereum.org/EIPS/eip-1167\n\ncontract CloneFactory is ICloneFactory {\n function clone(address prototype) external override returns (address proxy) {\n bytes20 targetBytes = bytes20(prototype);\n assembly {\n let clone := mload(0x40)\n mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(clone, 0x14), targetBytes)\n mstore(\n add(clone, 0x28),\n 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000\n )\n proxy := create(0, clone, 0x37)\n }\n return proxy;\n }\n}\n",
|
|
"sourcePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/CloneFactory.sol",
|
|
"ast": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/CloneFactory.sol",
|
|
"exportedSymbols": {
|
|
"CloneFactory": [
|
|
2008
|
|
],
|
|
"ICloneFactory": [
|
|
1986
|
|
]
|
|
},
|
|
"id": 2009,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1977,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:12"
|
|
},
|
|
{
|
|
"id": 1978,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:12"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 1986,
|
|
"linearizedBaseContracts": [
|
|
1986
|
|
],
|
|
"name": "ICloneFactory",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"functionSelector": "8124b78e",
|
|
"id": 1985,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "clone",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1981,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1980,
|
|
"mutability": "mutable",
|
|
"name": "prototype",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1985,
|
|
"src": "181:17:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1979,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "181:7:12",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "180:19:12"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1984,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1983,
|
|
"mutability": "mutable",
|
|
"name": "proxy",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1985,
|
|
"src": "218:13:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1982,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "218:7:12",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "217:15:12"
|
|
},
|
|
"scope": 1986,
|
|
"src": "166:67:12",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 2009,
|
|
"src": "136:99:12"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 1987,
|
|
"name": "ICloneFactory",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1986,
|
|
"src": "433:13:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ICloneFactory_$1986",
|
|
"typeString": "contract ICloneFactory"
|
|
}
|
|
},
|
|
"id": 1988,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "433:13:12"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
1986
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 2008,
|
|
"linearizedBaseContracts": [
|
|
2008,
|
|
1986
|
|
],
|
|
"name": "CloneFactory",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"baseFunctions": [
|
|
1985
|
|
],
|
|
"body": {
|
|
"id": 2006,
|
|
"nodeType": "Block",
|
|
"src": "529:484:12",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1997
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1997,
|
|
"mutability": "mutable",
|
|
"name": "targetBytes",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 2006,
|
|
"src": "539:19:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes20",
|
|
"typeString": "bytes20"
|
|
},
|
|
"typeName": {
|
|
"id": 1996,
|
|
"name": "bytes20",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "539:7:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes20",
|
|
"typeString": "bytes20"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 2002,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 2000,
|
|
"name": "prototype",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1990,
|
|
"src": "569:9:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1999,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "561:7:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bytes20_$",
|
|
"typeString": "type(bytes20)"
|
|
},
|
|
"typeName": {
|
|
"id": 1998,
|
|
"name": "bytes20",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "561:7:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 2001,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "561:18:12",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes20",
|
|
"typeString": "bytes20"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "539:40:12"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "598:387:12",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulVariableDeclaration",
|
|
"src": "612:24:12",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "631:4:12",
|
|
"type": "",
|
|
"value": "0x40"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mload",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "625:5:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "625:11:12"
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulTypedName",
|
|
"src": "616:5:12",
|
|
"type": ""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "656:5:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "663:66:12",
|
|
"type": "",
|
|
"value": "0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "649:6:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "649:81:12"
|
|
},
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "649:81:12"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "754:5:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "761:4:12",
|
|
"type": "",
|
|
"value": "0x14"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "750:3:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "750:16:12"
|
|
},
|
|
{
|
|
"name": "targetBytes",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "768:11:12"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "743:6:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "743:37:12"
|
|
},
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "743:37:12"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "821:5:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "828:4:12",
|
|
"type": "",
|
|
"value": "0x28"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "817:3:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "817:16:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "851:66:12",
|
|
"type": "",
|
|
"value": "0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "793:6:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "793:138:12"
|
|
},
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "793:138:12"
|
|
},
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "944:31:12",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "960:1:12",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "963:5:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "970:4:12",
|
|
"type": "",
|
|
"value": "0x37"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "create",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "953:6:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "953:22:12"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "proxy",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "944:5:12"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "istanbul",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 1994,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "944:5:12",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 1997,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "768:11:12",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 2003,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "589:396:12"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 2004,
|
|
"name": "proxy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1994,
|
|
"src": "1001:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1995,
|
|
"id": 2005,
|
|
"nodeType": "Return",
|
|
"src": "994:12:12"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "8124b78e",
|
|
"id": 2007,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "clone",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 1992,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "496:8:12"
|
|
},
|
|
"parameters": {
|
|
"id": 1991,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1990,
|
|
"mutability": "mutable",
|
|
"name": "prototype",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 2007,
|
|
"src": "468:17:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1989,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "468:7:12",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "467:19:12"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1995,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1994,
|
|
"mutability": "mutable",
|
|
"name": "proxy",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 2007,
|
|
"src": "514:13:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1993,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "514:7:12",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "513:15:12"
|
|
},
|
|
"scope": 2008,
|
|
"src": "453:560:12",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 2009,
|
|
"src": "408:607:12"
|
|
}
|
|
],
|
|
"src": "78:938:12"
|
|
},
|
|
"legacyAST": {
|
|
"absolutePath": "/Users/owen/Desktop/dodo/dodo-smart-contract/contracts/helper/CloneFactory.sol",
|
|
"exportedSymbols": {
|
|
"CloneFactory": [
|
|
2008
|
|
],
|
|
"ICloneFactory": [
|
|
1986
|
|
]
|
|
},
|
|
"id": 2009,
|
|
"license": "Apache-2.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1977,
|
|
"literals": [
|
|
"solidity",
|
|
"0.6",
|
|
".9"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "78:22:12"
|
|
},
|
|
{
|
|
"id": 1978,
|
|
"literals": [
|
|
"experimental",
|
|
"ABIEncoderV2"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "101:33:12"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": null,
|
|
"fullyImplemented": false,
|
|
"id": 1986,
|
|
"linearizedBaseContracts": [
|
|
1986
|
|
],
|
|
"name": "ICloneFactory",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": null,
|
|
"documentation": null,
|
|
"functionSelector": "8124b78e",
|
|
"id": 1985,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "clone",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": null,
|
|
"parameters": {
|
|
"id": 1981,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1980,
|
|
"mutability": "mutable",
|
|
"name": "prototype",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1985,
|
|
"src": "181:17:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1979,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "181:7:12",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "180:19:12"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1984,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1983,
|
|
"mutability": "mutable",
|
|
"name": "proxy",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 1985,
|
|
"src": "218:13:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1982,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "218:7:12",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "217:15:12"
|
|
},
|
|
"scope": 1986,
|
|
"src": "166:67:12",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 2009,
|
|
"src": "136:99:12"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [
|
|
{
|
|
"arguments": null,
|
|
"baseName": {
|
|
"contractScope": null,
|
|
"id": 1987,
|
|
"name": "ICloneFactory",
|
|
"nodeType": "UserDefinedTypeName",
|
|
"referencedDeclaration": 1986,
|
|
"src": "433:13:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_ICloneFactory_$1986",
|
|
"typeString": "contract ICloneFactory"
|
|
}
|
|
},
|
|
"id": 1988,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "433:13:12"
|
|
}
|
|
],
|
|
"contractDependencies": [
|
|
1986
|
|
],
|
|
"contractKind": "contract",
|
|
"documentation": null,
|
|
"fullyImplemented": true,
|
|
"id": 2008,
|
|
"linearizedBaseContracts": [
|
|
2008,
|
|
1986
|
|
],
|
|
"name": "CloneFactory",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"baseFunctions": [
|
|
1985
|
|
],
|
|
"body": {
|
|
"id": 2006,
|
|
"nodeType": "Block",
|
|
"src": "529:484:12",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
1997
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 1997,
|
|
"mutability": "mutable",
|
|
"name": "targetBytes",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 2006,
|
|
"src": "539:19:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes20",
|
|
"typeString": "bytes20"
|
|
},
|
|
"typeName": {
|
|
"id": 1996,
|
|
"name": "bytes20",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "539:7:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes20",
|
|
"typeString": "bytes20"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 2002,
|
|
"initialValue": {
|
|
"argumentTypes": null,
|
|
"arguments": [
|
|
{
|
|
"argumentTypes": null,
|
|
"id": 2000,
|
|
"name": "prototype",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1990,
|
|
"src": "569:9:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 1999,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "561:7:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bytes20_$",
|
|
"typeString": "type(bytes20)"
|
|
},
|
|
"typeName": {
|
|
"id": 1998,
|
|
"name": "bytes20",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "561:7:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": null,
|
|
"typeString": null
|
|
}
|
|
}
|
|
},
|
|
"id": 2001,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "561:18:12",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes20",
|
|
"typeString": "bytes20"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "539:40:12"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nodeType": "YulBlock",
|
|
"src": "598:387:12",
|
|
"statements": [
|
|
{
|
|
"nodeType": "YulVariableDeclaration",
|
|
"src": "612:24:12",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "631:4:12",
|
|
"type": "",
|
|
"value": "0x40"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mload",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "625:5:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "625:11:12"
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulTypedName",
|
|
"src": "616:5:12",
|
|
"type": ""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "656:5:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "663:66:12",
|
|
"type": "",
|
|
"value": "0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "649:6:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "649:81:12"
|
|
},
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "649:81:12"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "754:5:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "761:4:12",
|
|
"type": "",
|
|
"value": "0x14"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "750:3:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "750:16:12"
|
|
},
|
|
{
|
|
"name": "targetBytes",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "768:11:12"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "743:6:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "743:37:12"
|
|
},
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "743:37:12"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "821:5:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "828:4:12",
|
|
"type": "",
|
|
"value": "0x28"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "817:3:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "817:16:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "851:66:12",
|
|
"type": "",
|
|
"value": "0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "793:6:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "793:138:12"
|
|
},
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "793:138:12"
|
|
},
|
|
{
|
|
"nodeType": "YulAssignment",
|
|
"src": "944:31:12",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "960:1:12",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"name": "clone",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "963:5:12"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nodeType": "YulLiteral",
|
|
"src": "970:4:12",
|
|
"type": "",
|
|
"value": "0x37"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "create",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "953:6:12"
|
|
},
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "953:22:12"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "proxy",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "944:5:12"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "istanbul",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 1994,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "944:5:12",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 1997,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "768:11:12",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 2003,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "589:396:12"
|
|
},
|
|
{
|
|
"expression": {
|
|
"argumentTypes": null,
|
|
"id": 2004,
|
|
"name": "proxy",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 1994,
|
|
"src": "1001:5:12",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 1995,
|
|
"id": 2005,
|
|
"nodeType": "Return",
|
|
"src": "994:12:12"
|
|
}
|
|
]
|
|
},
|
|
"documentation": null,
|
|
"functionSelector": "8124b78e",
|
|
"id": 2007,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "clone",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 1992,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "496:8:12"
|
|
},
|
|
"parameters": {
|
|
"id": 1991,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1990,
|
|
"mutability": "mutable",
|
|
"name": "prototype",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 2007,
|
|
"src": "468:17:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1989,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "468:7:12",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "467:19:12"
|
|
},
|
|
"returnParameters": {
|
|
"id": 1995,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 1994,
|
|
"mutability": "mutable",
|
|
"name": "proxy",
|
|
"nodeType": "VariableDeclaration",
|
|
"overrides": null,
|
|
"scope": 2007,
|
|
"src": "514:13:12",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 1993,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "514:7:12",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": null,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "513:15:12"
|
|
},
|
|
"scope": 2008,
|
|
"src": "453:560:12",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 2009,
|
|
"src": "408:607:12"
|
|
}
|
|
],
|
|
"src": "78:938:12"
|
|
},
|
|
"compiler": {
|
|
"name": "solc",
|
|
"version": "0.6.9+commit.3e3065ac.Emscripten.clang"
|
|
},
|
|
"networks": {},
|
|
"schemaVersion": "3.2.3",
|
|
"updatedAt": "2020-11-06T08:03:35.508Z",
|
|
"devdoc": {
|
|
"methods": {}
|
|
},
|
|
"userdoc": {
|
|
"methods": {}
|
|
}
|
|
} |