@dolomite-exchange/dolomite-margin
Version:
Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol
638 lines • 27.1 kB
JSON
{
"contractName": "ICREATE3Factory",
"abi": [
{
"constant": false,
"inputs": [
{
"internalType": "bytes32",
"name": "salt",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "creationCode",
"type": "bytes"
}
],
"name": "deploy",
"outputs": [
{
"internalType": "address",
"name": "deployed",
"type": "address"
}
],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "deployer",
"type": "address"
},
{
"internalType": "bytes32",
"name": "salt",
"type": "bytes32"
}
],
"name": "getDeployed",
"outputs": [
{
"internalType": "address",
"name": "deployed",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"creationCode\",\"type\":\"bytes\"}],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"deployed\",\"type\":\"address\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"}],\"name\":\"getDeployed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"deployed\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"zefram.eth\",\"methods\":{\"deploy(bytes32,bytes)\":{\"details\":\"The provided salt is hashed together with msg.sender to generate the final salt\",\"params\":{\"creationCode\":\"The creation code of the contract to deploy\",\"salt\":\"The deployer-specific salt for determining the deployed contract's address\"},\"return\":\"deployed The address of the deployed contract\"},\"getDeployed(address,bytes32)\":{\"details\":\"The provided salt is hashed together with the deployer address to generate the final salt\",\"params\":{\"deployer\":\"The deployer account that will call deploy()\",\"salt\":\"The deployer-specific salt for determining the deployed contract's address\"},\"return\":\"deployed The address of the contract that will be deployed\"}},\"title\":\"Factory for deploying contracts to deterministic addresses via CREATE3\"},\"userdoc\":{\"methods\":{\"deploy(bytes32,bytes)\":{\"notice\":\"Deploys a contract using CREATE3\"},\"getDeployed(address,bytes32)\":{\"notice\":\"Predicts the address of a deployed contract\"}},\"notice\":\"Enables deploying contracts using CREATE3. Each deployer (msg.sender) has its own namespace for deployed addresses.\"}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ICREATE3Factory.sol\":\"ICREATE3Factory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ICREATE3Factory.sol\":{\"keccak256\":\"0x2cb77c0c99e0ab3fbc073576c60b8a0440430c7415915b9ab801f156b4067f6a\",\"urls\":[\"bzz-raw://bed304e8cbbfc7abd1077e4cb443067d2c06b7e8e5066dffb0592609afa70ca6\",\"dweb:/ipfs/Qmc16GoReEDsE6aEeDES3ft8CmbZELQDDf5w1byznyUcbo\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "/*\n\n Copyright 2024 Dolomite.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.7;\npragma experimental ABIEncoderV2;\n\n\n/// @title Factory for deploying contracts to deterministic addresses via CREATE3\n/// @author zefram.eth\n/// @notice Enables deploying contracts using CREATE3. Each deployer (msg.sender) has\n/// its own namespace for deployed addresses.\ninterface ICREATE3Factory {\n /// @notice Deploys a contract using CREATE3\n /// @dev The provided salt is hashed together with msg.sender to generate the final salt\n /// @param salt The deployer-specific salt for determining the deployed contract's address\n /// @param creationCode The creation code of the contract to deploy\n /// @return deployed The address of the deployed contract\n function deploy(bytes32 salt, bytes calldata creationCode)\n external\n payable\n returns (address deployed);\n\n /// @notice Predicts the address of a deployed contract\n /// @dev The provided salt is hashed together with the deployer address to generate the final salt\n /// @param deployer The deployer account that will call deploy()\n /// @param salt The deployer-specific salt for determining the deployed contract's address\n /// @return deployed The address of the contract that will be deployed\n function getDeployed(address deployer, bytes32 salt)\n external\n view\n returns (address deployed);\n}\n",
"sourcePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ICREATE3Factory.sol",
"ast": {
"absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ICREATE3Factory.sol",
"exportedSymbols": {
"ICREATE3Factory": [
4147
]
},
"id": 4148,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4127,
"literals": [
"solidity",
"^",
"0.5",
".7"
],
"nodeType": "PragmaDirective",
"src": "595:23:17"
},
{
"id": 4128,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "619:33:17"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": "@title Factory for deploying contracts to deterministic addresses via CREATE3\n @author zefram.eth\n @notice Enables deploying contracts using CREATE3. Each deployer (msg.sender) has\n its own namespace for deployed addresses.",
"fullyImplemented": false,
"id": 4147,
"linearizedBaseContracts": [
4147
],
"name": "ICREATE3Factory",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": "@notice Deploys a contract using CREATE3\n @dev The provided salt is hashed together with msg.sender to generate the final salt\n @param salt The deployer-specific salt for determining the deployed contract's address\n @param creationCode The creation code of the contract to deploy\n @return deployed The address of the deployed contract",
"id": 4137,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "deploy",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4133,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4130,
"name": "salt",
"nodeType": "VariableDeclaration",
"scope": 4137,
"src": "1311:12:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4129,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1311:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4132,
"name": "creationCode",
"nodeType": "VariableDeclaration",
"scope": 4137,
"src": "1325:27:17",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 4131,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1325:5:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1310:43:17"
},
"returnParameters": {
"id": 4136,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4135,
"name": "deployed",
"nodeType": "VariableDeclaration",
"scope": 4137,
"src": "1392:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4134,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1392:7:17",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1391:18:17"
},
"scope": 4147,
"src": "1295:115:17",
"stateMutability": "payable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@notice Predicts the address of a deployed contract\n @dev The provided salt is hashed together with the deployer address to generate the final salt\n @param deployer The deployer account that will call deploy()\n @param salt The deployer-specific salt for determining the deployed contract's address\n @return deployed The address of the contract that will be deployed",
"id": 4146,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getDeployed",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4142,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4139,
"name": "deployer",
"nodeType": "VariableDeclaration",
"scope": 4146,
"src": "1839:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4138,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1839:7:17",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4141,
"name": "salt",
"nodeType": "VariableDeclaration",
"scope": 4146,
"src": "1857:12:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4140,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1857:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1838:32:17"
},
"returnParameters": {
"id": 4145,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4144,
"name": "deployed",
"nodeType": "VariableDeclaration",
"scope": 4146,
"src": "1906:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4143,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1906:7:17",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1905:18:17"
},
"scope": 4147,
"src": "1818:106:17",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
}
],
"scope": 4148,
"src": "892:1034:17"
}
],
"src": "595:1332:17"
},
"legacyAST": {
"absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ICREATE3Factory.sol",
"exportedSymbols": {
"ICREATE3Factory": [
4147
]
},
"id": 4148,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4127,
"literals": [
"solidity",
"^",
"0.5",
".7"
],
"nodeType": "PragmaDirective",
"src": "595:23:17"
},
{
"id": 4128,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "619:33:17"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": "@title Factory for deploying contracts to deterministic addresses via CREATE3\n @author zefram.eth\n @notice Enables deploying contracts using CREATE3. Each deployer (msg.sender) has\n its own namespace for deployed addresses.",
"fullyImplemented": false,
"id": 4147,
"linearizedBaseContracts": [
4147
],
"name": "ICREATE3Factory",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": "@notice Deploys a contract using CREATE3\n @dev The provided salt is hashed together with msg.sender to generate the final salt\n @param salt The deployer-specific salt for determining the deployed contract's address\n @param creationCode The creation code of the contract to deploy\n @return deployed The address of the deployed contract",
"id": 4137,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "deploy",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4133,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4130,
"name": "salt",
"nodeType": "VariableDeclaration",
"scope": 4137,
"src": "1311:12:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4129,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1311:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4132,
"name": "creationCode",
"nodeType": "VariableDeclaration",
"scope": 4137,
"src": "1325:27:17",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 4131,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1325:5:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1310:43:17"
},
"returnParameters": {
"id": 4136,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4135,
"name": "deployed",
"nodeType": "VariableDeclaration",
"scope": 4137,
"src": "1392:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4134,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1392:7:17",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1391:18:17"
},
"scope": 4147,
"src": "1295:115:17",
"stateMutability": "payable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@notice Predicts the address of a deployed contract\n @dev The provided salt is hashed together with the deployer address to generate the final salt\n @param deployer The deployer account that will call deploy()\n @param salt The deployer-specific salt for determining the deployed contract's address\n @return deployed The address of the contract that will be deployed",
"id": 4146,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getDeployed",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4142,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4139,
"name": "deployer",
"nodeType": "VariableDeclaration",
"scope": 4146,
"src": "1839:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4138,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1839:7:17",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4141,
"name": "salt",
"nodeType": "VariableDeclaration",
"scope": 4146,
"src": "1857:12:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4140,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1857:7:17",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1838:32:17"
},
"returnParameters": {
"id": 4145,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4144,
"name": "deployed",
"nodeType": "VariableDeclaration",
"scope": 4146,
"src": "1906:16:17",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4143,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1906:7:17",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1905:18:17"
},
"scope": 4147,
"src": "1818:106:17",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
}
],
"scope": 4148,
"src": "892:1034:17"
}
],
"src": "595:1332:17"
},
"compiler": {
"name": "solc",
"version": "0.5.16+commit.9c3226ce.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.23",
"updatedAt": "2025-06-22T04:01:53.516Z",
"devdoc": {
"author": "zefram.eth",
"methods": {
"deploy(bytes32,bytes)": {
"details": "The provided salt is hashed together with msg.sender to generate the final salt",
"params": {
"creationCode": "The creation code of the contract to deploy",
"salt": "The deployer-specific salt for determining the deployed contract's address"
},
"return": "deployed The address of the deployed contract"
},
"getDeployed(address,bytes32)": {
"details": "The provided salt is hashed together with the deployer address to generate the final salt",
"params": {
"deployer": "The deployer account that will call deploy()",
"salt": "The deployer-specific salt for determining the deployed contract's address"
},
"return": "deployed The address of the contract that will be deployed"
}
},
"title": "Factory for deploying contracts to deterministic addresses via CREATE3"
},
"userdoc": {
"methods": {
"deploy(bytes32,bytes)": {
"notice": "Deploys a contract using CREATE3"
},
"getDeployed(address,bytes32)": {
"notice": "Predicts the address of a deployed contract"
}
},
"notice": "Enables deploying contracts using CREATE3. Each deployer (msg.sender) has its own namespace for deployed addresses."
}
}