UNPKG

@maplelabs/core-artifacts

Version:

Consist artifacts of the maple protocol

969 lines (968 loc) 41 kB
{ "id": "abb9b256cc6bb3ec0266772b757ef062", "_format": "hh-sol-build-info-1", "solcVersion": "0.6.11", "solcLongVersion": "0.6.11+commit.5ef660b1", "input": { "language": "Solidity", "sources": { "contracts/core/custodial-ownership-token/v1/interfaces/IERC2258.sol": { "content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/custodial-ownership-token/v1/interfaces/IERC2258.sol\npragma solidity =0.6.11;\n\n////// contracts/core/custodial-ownership-token/v1/interfaces/IERC2258.sol\n/* pragma solidity 0.6.11; */\n\n/// @title ERC2258 implements the basic level functionality for a token capable of custodial ownership.\ninterface IERC2258 {\n\n /**\n @dev Emits an event indicating a transfer was performed by a Custodian.\n @param custodian The Custodian performing the transfer.\n @param from The account from which balance is being decremented.\n @param to The account receiving the token.\n @param amount The amount transferred.\n */\n event CustodyTransfer(address custodian, address from, address to, uint256 amount);\n\n /**\n @dev Emits an event indicating that the amount held by `custodian` on behalf of `account` has changed.\n @param account The account to which the token belongs.\n @param custodian The Custodian being entrusted.\n @param oldAllowance The old amount the account has entrusted with `custodian`.\n @param newAllowance The new amount the account has entrusted with `custodian`.\n */\n event CustodyAllowanceChanged(address account, address custodian, uint256 oldAllowance, uint256 newAllowance);\n\n /**\n @param account The account to which some token belongs.\n @param custodian The Custodian being entrusted.\n @return The individual custody limit `account` has entrusted with `custodian`.\n */\n function custodyAllowance(address account, address custodian) external view returns (uint256);\n \n /**\n @param account The account to which some token belongs.\n @return The total custody limit `account` has entrusted with all custodians.\n */\n function totalCustodyAllowance(address account) external view returns (uint256);\n\n /**\n @dev Increase the custody limit of a custodian on behalf of the caller.\n @param custodian The Custodian being entrusted with `amount` additional token.\n @param amount The amount of additional token being entrusted with `custodian`.\n */\n function increaseCustodyAllowance(address custodian, uint256 amount) external;\n\n /**\n @dev Allows a Custodian to exercise their right to transfer custodied tokens.\n @param from The account from which balance is being decremented.\n @param to The account receiving the token.\n @param amount The amount transferred.\n */\n function transferByCustodian(address from, address to, uint256 amount) external;\n\n}\n" } }, "settings": { "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "abi", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers" ], "": [ "ast" ] } } } }, "output": { "contracts": { "contracts/core/custodial-ownership-token/v1/interfaces/IERC2258.sol": { "IERC2258": { "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "address", "name": "custodian", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "oldAllowance", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "newAllowance", "type": "uint256" } ], "name": "CustodyAllowanceChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "custodian", "type": "address" }, { "indexed": false, "internalType": "address", "name": "from", "type": "address" }, { "indexed": false, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "CustodyTransfer", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "address", "name": "custodian", "type": "address" } ], "name": "custodyAllowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "custodian", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "increaseCustodyAllowance", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "totalCustodyAllowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transferByCustodian", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "evm": { "bytecode": { "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "deployedBytecode": { "immutableReferences": {}, "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "methodIdentifiers": { "custodyAllowance(address,address)": "c965b548", "increaseCustodyAllowance(address,uint256)": "27f91856", "totalCustodyAllowance(address)": "af6d5571", "transferByCustodian(address,address,uint256)": "2ac04ac8" } } } } }, "sources": { "contracts/core/custodial-ownership-token/v1/interfaces/IERC2258.sol": { "ast": { "absolutePath": "contracts/core/custodial-ownership-token/v1/interfaces/IERC2258.sol", "exportedSymbols": { "IERC2258": [ 61 ] }, "id": 62, "license": "AGPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "=", "0.6", ".11" ], "nodeType": "PragmaDirective", "src": "144:24:0" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 2, "nodeType": "StructuredDocumentation", "src": "276:104:0", "text": "@title ERC2258 implements the basic level functionality for a token capable of custodial ownership." }, "fullyImplemented": false, "id": 61, "linearizedBaseContracts": [ 61 ], "name": "IERC2258", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": { "id": 3, "nodeType": "StructuredDocumentation", "src": "406:346:0", "text": "@dev Emits an event indicating a transfer was performed by a Custodian.\n@param custodian The Custodian performing the transfer.\n@param from The account from which balance is being decremented.\n@param to The account receiving the token.\n@param amount The amount transferred." }, "id": 13, "name": "CustodyTransfer", "nodeType": "EventDefinition", "parameters": { "id": 12, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5, "indexed": false, "mutability": "mutable", "name": "custodian", "nodeType": "VariableDeclaration", "overrides": null, "scope": 13, "src": "779:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4, "name": "address", "nodeType": "ElementaryTypeName", "src": "779:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 7, "indexed": false, "mutability": "mutable", "name": "from", "nodeType": "VariableDeclaration", "overrides": null, "scope": 13, "src": "798:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6, "name": "address", "nodeType": "ElementaryTypeName", "src": "798:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 9, "indexed": false, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 13, "src": "812:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8, "name": "address", "nodeType": "ElementaryTypeName", "src": "812:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 11, "indexed": false, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 13, "src": "824:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 10, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "824:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "778:61:0" }, "src": "757:83:0" }, { "anonymous": false, "documentation": { "id": 14, "nodeType": "StructuredDocumentation", "src": "846:425:0", "text": "@dev Emits an event indicating that the amount held by `custodian` on behalf of `account` has changed.\n@param account The account to which the token belongs.\n@param custodian The Custodian being entrusted.\n@param oldAllowance The old amount the account has entrusted with `custodian`.\n@param newAllowance The new amount the account has entrusted with `custodian`." }, "id": 24, "name": "CustodyAllowanceChanged", "nodeType": "EventDefinition", "parameters": { "id": 23, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 16, "indexed": false, "mutability": "mutable", "name": "account", "nodeType": "VariableDeclaration", "overrides": null, "scope": 24, "src": "1306:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 15, "name": "address", "nodeType": "ElementaryTypeName", "src": "1306:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 18, "indexed": false, "mutability": "mutable", "name": "custodian", "nodeType": "VariableDeclaration", "overrides": null, "scope": 24, "src": "1323:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 17, "name": "address", "nodeType": "ElementaryTypeName", "src": "1323:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 20, "indexed": false, "mutability": "mutable", "name": "oldAllowance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 24, "src": "1342:20:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 19, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1342:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 22, "indexed": false, "mutability": "mutable", "name": "newAllowance", "nodeType": "VariableDeclaration", "overrides": null, "scope": 24, "src": "1364:20:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1364:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1305:80:0" }, "src": "1276:110:0" }, { "body": null, "documentation": { "id": 25, "nodeType": "StructuredDocumentation", "src": "1392:222:0", "text": "@param account The account to which some token belongs.\n@param custodian The Custodian being entrusted.\n@return The individual custody limit `account` has entrusted with `custodian`." }, "functionSelector": "c965b548", "id": 34, "implemented": false, "kind": "function", "modifiers": [], "name": "custodyAllowance", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 30, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 27, "mutability": "mutable", "name": "account", "nodeType": "VariableDeclaration", "overrides": null, "scope": 34, "src": "1645:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 26, "name": "address", "nodeType": "ElementaryTypeName", "src": "1645:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 29, "mutability": "mutable", "name": "custodian", "nodeType": "VariableDeclaration", "overrides": null, "scope": 34, "src": "1662:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 28, "name": "address", "nodeType": "ElementaryTypeName", "src": "1662:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1644:36:0" }, "returnParameters": { "id": 33, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 32, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 34, "src": "1704:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 31, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1704:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1703:9:0" }, "scope": 61, "src": "1619:94:0", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": { "id": 35, "nodeType": "StructuredDocumentation", "src": "1723:161:0", "text": "@param account The account to which some token belongs.\n@return The total custody limit `account` has entrusted with all custodians." }, "functionSelector": "af6d5571", "id": 42, "implemented": false, "kind": "function", "modifiers": [], "name": "totalCustodyAllowance", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 38, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 37, "mutability": "mutable", "name": "account", "nodeType": "VariableDeclaration", "overrides": null, "scope": 42, "src": "1920:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 36, "name": "address", "nodeType": "ElementaryTypeName", "src": "1920:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1919:17:0" }, "returnParameters": { "id": 41, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 40, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 42, "src": "1960:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 39, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1960:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1959:9:0" }, "scope": 61, "src": "1889:80:0", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": { "id": 43, "nodeType": "StructuredDocumentation", "src": "1975:270:0", "text": "@dev Increase the custody limit of a custodian on behalf of the caller.\n@param custodian The Custodian being entrusted with `amount` additional token.\n@param amount The amount of additional token being entrusted with `custodian`." }, "functionSelector": "27f91856", "id": 50, "implemented": false, "kind": "function", "modifiers": [], "name": "increaseCustodyAllowance", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 48, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 45, "mutability": "mutable", "name": "custodian", "nodeType": "VariableDeclaration", "overrides": null, "scope": 50, "src": "2284:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 44, "name": "address", "nodeType": "ElementaryTypeName", "src": "2284:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 47, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 50, "src": "2303:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 46, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2303:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2283:35:0" }, "returnParameters": { "id": 49, "nodeType": "ParameterList", "parameters": [], "src": "2327:0:0" }, "scope": 61, "src": "2250:78:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": null, "documentation": { "id": 51, "nodeType": "StructuredDocumentation", "src": "2334:287:0", "text": "@dev Allows a Custodian to exercise their right to transfer custodied tokens.\n@param from The account from which balance is being decremented.\n@param to The account receiving the token.\n@param amount The amount transferred." }, "functionSelector": "2ac04ac8", "id": 60, "implemented": false, "kind": "function", "modifiers": [], "name": "transferByCustodian", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 58, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 53, "mutability": "mutable", "name": "from", "nodeType": "VariableDeclaration", "overrides": null, "scope": 60, "src": "2655:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 52, "name": "address", "nodeType": "ElementaryTypeName", "src": "2655:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 55, "mutability": "mutable", "name": "to", "nodeType": "VariableDeclaration", "overrides": null, "scope": 60, "src": "2669:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 54, "name": "address", "nodeType": "ElementaryTypeName", "src": "2669:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 57, "mutability": "mutable", "name": "amount", "nodeType": "VariableDeclaration", "overrides": null, "scope": 60, "src": "2681:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 56, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2681:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2654:42:0" }, "returnParameters": { "id": 59, "nodeType": "ParameterList", "parameters": [], "src": "2705:0:0" }, "scope": 61, "src": "2626:80:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 62, "src": "380:2329:0" } ], "src": "144:2566:0" }, "id": 0 } } } }