@ethsub/sol
Version:
ethsub contracts
689 lines • 25.3 kB
JSON
{
"contractName": "IERCHandler",
"abi": [
{
"inputs": [
{
"internalType": "bytes32",
"name": "resourceID",
"type": "bytes32"
},
{
"internalType": "address",
"name": "contractAddress",
"type": "address"
}
],
"name": "setResource",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "contractAddress",
"type": "address"
}
],
"name": "setBurnable",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"}],\"name\":\"setBurnable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"}],\"name\":\"setResource\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"ChainSafe Systems.\",\"kind\":\"dev\",\"methods\":{\"setBurnable(address)\":{\"params\":{\"contractAddress\":\"Address of contract to be used when making or executing deposits.\"}},\"setResource(bytes32,address)\":{\"params\":{\"contractAddress\":\"Address of contract to be called when a deposit is made and a deposited is executed.\",\"resourceID\":\"ResourceID to be used when making deposits.\"}},\"withdraw(bytes)\":{\"params\":{\"data\":\"ABI-encoded withdrawal params relevant to the handler.\"}}},\"title\":\"Interface to be used with handlers that support ERC20s and ERC721s.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"setBurnable(address)\":{\"notice\":\"Marks {contractAddress} as mintable/burnable.\"},\"setResource(bytes32,address)\":{\"notice\":\"Correlates {resourceID} with {contractAddress}.\"},\"withdraw(bytes)\":{\"notice\":\"Withdraw funds from ERC safes.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/IERCHandler.sol\":\"IERCHandler\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/IERCHandler.sol\":{\"keccak256\":\"0x4384276611a789db6481e1158d92c280fe5990ec0c375df30dd5e8f8a97cbb4c\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://3af488536c6d8f6b3090ca9b5fa54718941604a30f58bd66db641a6599a9f296\",\"dweb:/ipfs/QmSm988tQV4XtkCQpTbf2SbdCHp8AcjYZhQLhftPFXrUf2\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity 0.6.12;\n\n/**\n @title Interface to be used with handlers that support ERC20s and ERC721s.\n @author ChainSafe Systems.\n */\ninterface IERCHandler {\n /**\n @notice Correlates {resourceID} with {contractAddress}.\n @param resourceID ResourceID to be used when making deposits.\n @param contractAddress Address of contract to be called when a deposit is made and a deposited is executed.\n */\n function setResource(bytes32 resourceID, address contractAddress) external;\n /**\n @notice Marks {contractAddress} as mintable/burnable.\n @param contractAddress Address of contract to be used when making or executing deposits.\n */\n function setBurnable(address contractAddress) external;\n\n /**\n @notice Withdraw funds from ERC safes.\n @param data ABI-encoded withdrawal params relevant to the handler.\n */\n function withdraw(bytes memory data) external;\n}\n",
"sourcePath": "/home/sigo/w/deer/ethsub/packages/sol/contracts/interfaces/IERCHandler.sol",
"ast": {
"absolutePath": "project:/contracts/interfaces/IERCHandler.sol",
"exportedSymbols": {
"IERCHandler": [
9840
]
},
"id": 9841,
"license": "LGPL-3.0-only",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 9818,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "42:23:51"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 9819,
"nodeType": "StructuredDocumentation",
"src": "67:117:51",
"text": "@title Interface to be used with handlers that support ERC20s and ERC721s.\n@author ChainSafe Systems."
},
"fullyImplemented": false,
"id": 9840,
"linearizedBaseContracts": [
9840
],
"name": "IERCHandler",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": {
"id": 9820,
"nodeType": "StructuredDocumentation",
"src": "213:261:51",
"text": "@notice Correlates {resourceID} with {contractAddress}.\n@param resourceID ResourceID to be used when making deposits.\n@param contractAddress Address of contract to be called when a deposit is made and a deposited is executed."
},
"functionSelector": "b8fa3736",
"id": 9827,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "setResource",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 9825,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 9822,
"mutability": "mutable",
"name": "resourceID",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 9827,
"src": "500:18:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 9821,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "500:7:51",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 9824,
"mutability": "mutable",
"name": "contractAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 9827,
"src": "520:23:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 9823,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "520:7:51",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "499:45:51"
},
"returnParameters": {
"id": 9826,
"nodeType": "ParameterList",
"parameters": [],
"src": "553:0:51"
},
"scope": 9840,
"src": "479:75:51",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 9828,
"nodeType": "StructuredDocumentation",
"src": "559:170:51",
"text": "@notice Marks {contractAddress} as mintable/burnable.\n@param contractAddress Address of contract to be used when making or executing deposits."
},
"functionSelector": "07b7ed99",
"id": 9833,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "setBurnable",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 9831,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 9830,
"mutability": "mutable",
"name": "contractAddress",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 9833,
"src": "755:23:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 9829,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "755:7:51",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "754:25:51"
},
"returnParameters": {
"id": 9832,
"nodeType": "ParameterList",
"parameters": [],
"src": "788:0:51"
},
"scope": 9840,
"src": "734:55:51",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 9834,
"nodeType": "StructuredDocumentation",
"src": "795:133:51",
"text": "@notice Withdraw funds from ERC safes.\n@param data ABI-encoded withdrawal params relevant to the handler."
},
"functionSelector": "0968f264",
"id": 9839,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "withdraw",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 9837,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 9836,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 9839,
"src": "951:17:51",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 9835,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "951:5:51",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "950:19:51"
},
"returnParameters": {
"id": 9838,
"nodeType": "ParameterList",
"parameters": [],
"src": "978:0:51"
},
"scope": 9840,
"src": "933:46:51",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 9841,
"src": "185:796:51"
}
],
"src": "42:940:51"
},
"legacyAST": {
"attributes": {
"absolutePath": "project:/contracts/interfaces/IERCHandler.sol",
"exportedSymbols": {
"IERCHandler": [
9840
]
},
"license": "LGPL-3.0-only"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"0.6",
".12"
]
},
"id": 9818,
"name": "PragmaDirective",
"src": "42:23:51"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "interface",
"fullyImplemented": false,
"linearizedBaseContracts": [
9840
],
"name": "IERCHandler",
"scope": 9841
},
"children": [
{
"attributes": {
"text": "@title Interface to be used with handlers that support ERC20s and ERC721s.\n@author ChainSafe Systems."
},
"id": 9819,
"name": "StructuredDocumentation",
"src": "67:117:51"
},
{
"attributes": {
"body": null,
"functionSelector": "b8fa3736",
"implemented": false,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "setResource",
"overrides": null,
"scope": 9840,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"attributes": {
"text": "@notice Correlates {resourceID} with {contractAddress}.\n@param resourceID ResourceID to be used when making deposits.\n@param contractAddress Address of contract to be called when a deposit is made and a deposited is executed."
},
"id": 9820,
"name": "StructuredDocumentation",
"src": "213:261:51"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "resourceID",
"overrides": null,
"scope": 9827,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 9821,
"name": "ElementaryTypeName",
"src": "500:7:51"
}
],
"id": 9822,
"name": "VariableDeclaration",
"src": "500:18:51"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "contractAddress",
"overrides": null,
"scope": 9827,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 9823,
"name": "ElementaryTypeName",
"src": "520:7:51"
}
],
"id": 9824,
"name": "VariableDeclaration",
"src": "520:23:51"
}
],
"id": 9825,
"name": "ParameterList",
"src": "499:45:51"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 9826,
"name": "ParameterList",
"src": "553:0:51"
}
],
"id": 9827,
"name": "FunctionDefinition",
"src": "479:75:51"
},
{
"attributes": {
"body": null,
"functionSelector": "07b7ed99",
"implemented": false,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "setBurnable",
"overrides": null,
"scope": 9840,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"attributes": {
"text": "@notice Marks {contractAddress} as mintable/burnable.\n@param contractAddress Address of contract to be used when making or executing deposits."
},
"id": 9828,
"name": "StructuredDocumentation",
"src": "559:170:51"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "contractAddress",
"overrides": null,
"scope": 9833,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 9829,
"name": "ElementaryTypeName",
"src": "755:7:51"
}
],
"id": 9830,
"name": "VariableDeclaration",
"src": "755:23:51"
}
],
"id": 9831,
"name": "ParameterList",
"src": "754:25:51"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 9832,
"name": "ParameterList",
"src": "788:0:51"
}
],
"id": 9833,
"name": "FunctionDefinition",
"src": "734:55:51"
},
{
"attributes": {
"body": null,
"functionSelector": "0968f264",
"implemented": false,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "withdraw",
"overrides": null,
"scope": 9840,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"attributes": {
"text": "@notice Withdraw funds from ERC safes.\n@param data ABI-encoded withdrawal params relevant to the handler."
},
"id": 9834,
"name": "StructuredDocumentation",
"src": "795:133:51"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "data",
"overrides": null,
"scope": 9839,
"stateVariable": false,
"storageLocation": "memory",
"type": "bytes",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 9835,
"name": "ElementaryTypeName",
"src": "951:5:51"
}
],
"id": 9836,
"name": "VariableDeclaration",
"src": "951:17:51"
}
],
"id": 9837,
"name": "ParameterList",
"src": "950:19:51"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 9838,
"name": "ParameterList",
"src": "978:0:51"
}
],
"id": 9839,
"name": "FunctionDefinition",
"src": "933:46:51"
}
],
"id": 9840,
"name": "ContractDefinition",
"src": "185:796:51"
}
],
"id": 9841,
"name": "SourceUnit",
"src": "42:940:51"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.3",
"updatedAt": "2021-11-29T02:07:34.277Z",
"devdoc": {
"author": "ChainSafe Systems.",
"kind": "dev",
"methods": {
"setBurnable(address)": {
"params": {
"contractAddress": "Address of contract to be used when making or executing deposits."
}
},
"setResource(bytes32,address)": {
"params": {
"contractAddress": "Address of contract to be called when a deposit is made and a deposited is executed.",
"resourceID": "ResourceID to be used when making deposits."
}
},
"withdraw(bytes)": {
"params": {
"data": "ABI-encoded withdrawal params relevant to the handler."
}
}
},
"title": "Interface to be used with handlers that support ERC20s and ERC721s.",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"setBurnable(address)": {
"notice": "Marks {contractAddress} as mintable/burnable."
},
"setResource(bytes32,address)": {
"notice": "Correlates {resourceID} with {contractAddress}."
},
"withdraw(bytes)": {
"notice": "Withdraw funds from ERC safes."
}
},
"version": 1
}
}