Created
May 13, 2022 15:26
-
-
Save MagRelo/2a38846c928ee4ee5129354393af66b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"contractName": "IRoyaltyEngineV1", | |
"abi": [ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "bytes4", | |
"name": "interfaceId", | |
"type": "bytes4" | |
} | |
], | |
"name": "supportsInterface", | |
"outputs": [ | |
{ | |
"internalType": "bool", | |
"name": "", | |
"type": "bool" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "tokenAddress", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "tokenId", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "value", | |
"type": "uint256" | |
} | |
], | |
"name": "getRoyalty", | |
"outputs": [ | |
{ | |
"internalType": "address payable[]", | |
"name": "recipients", | |
"type": "address[]" | |
}, | |
{ | |
"internalType": "uint256[]", | |
"name": "amounts", | |
"type": "uint256[]" | |
} | |
], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "tokenAddress", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "tokenId", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "value", | |
"type": "uint256" | |
} | |
], | |
"name": "getRoyaltyView", | |
"outputs": [ | |
{ | |
"internalType": "address payable[]", | |
"name": "recipients", | |
"type": "address[]" | |
}, | |
{ | |
"internalType": "uint256[]", | |
"name": "amounts", | |
"type": "uint256[]" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
} | |
], | |
"metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"getRoyalty\",\"outputs\":[{\"internalType\":\"address payable[]\",\"name\":\"recipients\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"getRoyaltyView\",\"outputs\":[{\"internalType\":\"address payable[]\",\"name\":\"recipients\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Lookup engine interface\",\"kind\":\"dev\",\"methods\":{\"getRoyalty(address,uint256,uint256)\":{\"params\":{\"tokenAddress\":\"- The address of the token\",\"tokenId\":\"- The id of the token\",\"value\":\"- The value you wish to get the royalty of returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get\"}},\"getRoyaltyView(address,uint256,uint256)\":{\"params\":{\"tokenAddress\":\"- The address of the token\",\"tokenId\":\"- The id of the token\",\"value\":\"- The value you wish to get the royalty of returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get\"}},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getRoyalty(address,uint256,uint256)\":{\"notice\":\"Get the royalty for a given token (address, id) and value amount. Does not cache the bps/amounts. Caches the spec for a given token address \"},\"getRoyaltyView(address,uint256,uint256)\":{\"notice\":\"View only version of getRoyalty \"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/IRoyaltyEngineV1.sol\":\"IRoyaltyEngineV1\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://be161e54f24e5c6fae81a12db1a8ae87bc5ae1b0ddc805d82a1440a68455088f\",\"dweb:/ipfs/QmP7C3CHdY9urF4dEMb9wmsp1wMxHF6nhA2yQE5SKiPAdy\"]},\"project:/contracts/IRoyaltyEngineV1.sol\":{\"keccak256\":\"0x088b901b9fe87d03d237b5a0a84ba35c18933dafb9fc344bd4d17a8085ea0387\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fa396e7cb04483aaffc2d50038d01a71816e5a3bc72021c5780e56a6437a1bcf\",\"dweb:/ipfs/QmUEawXCXimTSihzT2UBVvwVjmCa1ykFuwwQg9p6CapDzM\"]}},\"version\":1}", | |
"bytecode": "0x", | |
"deployedBytecode": "0x", | |
"immutableReferences": {}, | |
"generatedSources": [], | |
"deployedGeneratedSources": [], | |
"sourceMap": "", | |
"deployedSourceMap": "", | |
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/// @author: manifold.xyz\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\n/**\n * @dev Lookup engine interface\n */\ninterface IRoyaltyEngineV1 is IERC165 {\n\n /**\n * Get the royalty for a given token (address, id) and value amount. Does not cache the bps/amounts. Caches the spec for a given token address\n * \n * @param tokenAddress - The address of the token\n * @param tokenId - The id of the token\n * @param value - The value you wish to get the royalty of\n *\n * returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get\n */\n function getRoyalty(address tokenAddress, uint256 tokenId, uint256 value) external returns(address payable[] memory recipients, uint256[] memory amounts);\n\n /**\n * View only version of getRoyalty\n * \n * @param tokenAddress - The address of the token\n * @param tokenId - The id of the token\n * @param value - The value you wish to get the royalty of\n *\n * returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get\n */\n function getRoyaltyView(address tokenAddress, uint256 tokenId, uint256 value) external view returns(address payable[] memory recipients, uint256[] memory amounts);\n}", | |
"sourcePath": "/home/chung/git/manifoldxyz/royalty-registry-solidity/contracts/IRoyaltyEngineV1.sol", | |
"ast": { | |
"absolutePath": "project:/contracts/IRoyaltyEngineV1.sol", | |
"exportedSymbols": { | |
"IERC165": [ | |
4757 | |
], | |
"IRoyaltyEngineV1": [ | |
5395 | |
] | |
}, | |
"id": 5396, | |
"license": "MIT", | |
"nodeType": "SourceUnit", | |
"nodes": [ | |
{ | |
"id": 5358, | |
"literals": [ | |
"solidity", | |
"^", | |
"0.8", | |
".0" | |
], | |
"nodeType": "PragmaDirective", | |
"src": "33:23:31" | |
}, | |
{ | |
"absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol", | |
"file": "@openzeppelin/contracts/utils/introspection/IERC165.sol", | |
"id": 5359, | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "ImportDirective", | |
"scope": 5396, | |
"sourceUnit": 4758, | |
"src": "85:65:31", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"abstract": false, | |
"baseContracts": [ | |
{ | |
"baseName": { | |
"id": 5361, | |
"name": "IERC165", | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 4757, | |
"src": "222:7:31" | |
}, | |
"id": 5362, | |
"nodeType": "InheritanceSpecifier", | |
"src": "222:7:31" | |
} | |
], | |
"contractDependencies": [], | |
"contractKind": "interface", | |
"documentation": { | |
"id": 5360, | |
"nodeType": "StructuredDocumentation", | |
"src": "152:39:31", | |
"text": " @dev Lookup engine interface" | |
}, | |
"fullyImplemented": false, | |
"id": 5395, | |
"linearizedBaseContracts": [ | |
5395, | |
4757 | |
], | |
"name": "IRoyaltyEngineV1", | |
"nameLocation": "202:16:31", | |
"nodeType": "ContractDefinition", | |
"nodes": [ | |
{ | |
"documentation": { | |
"id": 5363, | |
"nodeType": "StructuredDocumentation", | |
"src": "237:465:31", | |
"text": " Get the royalty for a given token (address, id) and value amount. Does not cache the bps/amounts. Caches the spec for a given token address\n \n @param tokenAddress - The address of the token\n @param tokenId - The id of the token\n @param value - The value you wish to get the royalty of\n returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get" | |
}, | |
"functionSelector": "f533b802", | |
"id": 5378, | |
"implemented": false, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getRoyalty", | |
"nameLocation": "716:10:31", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 5370, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 5365, | |
"mutability": "mutable", | |
"name": "tokenAddress", | |
"nameLocation": "735:12:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "727:20:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 5364, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "727:7:31", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5367, | |
"mutability": "mutable", | |
"name": "tokenId", | |
"nameLocation": "757:7:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "749:15:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 5366, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "749:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5369, | |
"mutability": "mutable", | |
"name": "value", | |
"nameLocation": "774:5:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "766:13:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 5368, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "766:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "726:54:31" | |
}, | |
"returnParameters": { | |
"id": 5377, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 5373, | |
"mutability": "mutable", | |
"name": "recipients", | |
"nameLocation": "823:10:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "798:35:31", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_payable_$dyn_memory_ptr", | |
"typeString": "address payable[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 5371, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "798:15:31", | |
"stateMutability": "payable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"id": 5372, | |
"nodeType": "ArrayTypeName", | |
"src": "798:17:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_payable_$dyn_storage_ptr", | |
"typeString": "address payable[]" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5376, | |
"mutability": "mutable", | |
"name": "amounts", | |
"nameLocation": "852:7:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "835:24:31", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 5374, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "835:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 5375, | |
"nodeType": "ArrayTypeName", | |
"src": "835:9:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "797:63:31" | |
}, | |
"scope": 5395, | |
"src": "707:154:31", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"documentation": { | |
"id": 5379, | |
"nodeType": "StructuredDocumentation", | |
"src": "867:355:31", | |
"text": " View only version of getRoyalty\n \n @param tokenAddress - The address of the token\n @param tokenId - The id of the token\n @param value - The value you wish to get the royalty of\n returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get" | |
}, | |
"functionSelector": "3e104014", | |
"id": 5394, | |
"implemented": false, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getRoyaltyView", | |
"nameLocation": "1236:14:31", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 5386, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 5381, | |
"mutability": "mutable", | |
"name": "tokenAddress", | |
"nameLocation": "1259:12:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1251:20:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 5380, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1251:7:31", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5383, | |
"mutability": "mutable", | |
"name": "tokenId", | |
"nameLocation": "1281:7:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1273:15:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 5382, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1273:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5385, | |
"mutability": "mutable", | |
"name": "value", | |
"nameLocation": "1298:5:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1290:13:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 5384, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1290:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1250:54:31" | |
}, | |
"returnParameters": { | |
"id": 5393, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 5389, | |
"mutability": "mutable", | |
"name": "recipients", | |
"nameLocation": "1352:10:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1327:35:31", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_payable_$dyn_memory_ptr", | |
"typeString": "address payable[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 5387, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1327:15:31", | |
"stateMutability": "payable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"id": 5388, | |
"nodeType": "ArrayTypeName", | |
"src": "1327:17:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_payable_$dyn_storage_ptr", | |
"typeString": "address payable[]" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5392, | |
"mutability": "mutable", | |
"name": "amounts", | |
"nameLocation": "1381:7:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1364:24:31", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 5390, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1364:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 5391, | |
"nodeType": "ArrayTypeName", | |
"src": "1364:9:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1326:63:31" | |
}, | |
"scope": 5395, | |
"src": "1227:163:31", | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
} | |
], | |
"scope": 5396, | |
"src": "192:1200:31", | |
"usedErrors": [] | |
} | |
], | |
"src": "33:1359:31" | |
}, | |
"legacyAST": { | |
"absolutePath": "project:/contracts/IRoyaltyEngineV1.sol", | |
"exportedSymbols": { | |
"IERC165": [ | |
4757 | |
], | |
"IRoyaltyEngineV1": [ | |
5395 | |
] | |
}, | |
"id": 5396, | |
"license": "MIT", | |
"nodeType": "SourceUnit", | |
"nodes": [ | |
{ | |
"id": 5358, | |
"literals": [ | |
"solidity", | |
"^", | |
"0.8", | |
".0" | |
], | |
"nodeType": "PragmaDirective", | |
"src": "33:23:31" | |
}, | |
{ | |
"absolutePath": "@openzeppelin/contracts/utils/introspection/IERC165.sol", | |
"file": "@openzeppelin/contracts/utils/introspection/IERC165.sol", | |
"id": 5359, | |
"nameLocation": "-1:-1:-1", | |
"nodeType": "ImportDirective", | |
"scope": 5396, | |
"sourceUnit": 4758, | |
"src": "85:65:31", | |
"symbolAliases": [], | |
"unitAlias": "" | |
}, | |
{ | |
"abstract": false, | |
"baseContracts": [ | |
{ | |
"baseName": { | |
"id": 5361, | |
"name": "IERC165", | |
"nodeType": "IdentifierPath", | |
"referencedDeclaration": 4757, | |
"src": "222:7:31" | |
}, | |
"id": 5362, | |
"nodeType": "InheritanceSpecifier", | |
"src": "222:7:31" | |
} | |
], | |
"contractDependencies": [], | |
"contractKind": "interface", | |
"documentation": { | |
"id": 5360, | |
"nodeType": "StructuredDocumentation", | |
"src": "152:39:31", | |
"text": " @dev Lookup engine interface" | |
}, | |
"fullyImplemented": false, | |
"id": 5395, | |
"linearizedBaseContracts": [ | |
5395, | |
4757 | |
], | |
"name": "IRoyaltyEngineV1", | |
"nameLocation": "202:16:31", | |
"nodeType": "ContractDefinition", | |
"nodes": [ | |
{ | |
"documentation": { | |
"id": 5363, | |
"nodeType": "StructuredDocumentation", | |
"src": "237:465:31", | |
"text": " Get the royalty for a given token (address, id) and value amount. Does not cache the bps/amounts. Caches the spec for a given token address\n \n @param tokenAddress - The address of the token\n @param tokenId - The id of the token\n @param value - The value you wish to get the royalty of\n returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get" | |
}, | |
"functionSelector": "f533b802", | |
"id": 5378, | |
"implemented": false, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getRoyalty", | |
"nameLocation": "716:10:31", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 5370, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 5365, | |
"mutability": "mutable", | |
"name": "tokenAddress", | |
"nameLocation": "735:12:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "727:20:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 5364, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "727:7:31", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5367, | |
"mutability": "mutable", | |
"name": "tokenId", | |
"nameLocation": "757:7:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "749:15:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 5366, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "749:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5369, | |
"mutability": "mutable", | |
"name": "value", | |
"nameLocation": "774:5:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "766:13:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 5368, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "766:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "726:54:31" | |
}, | |
"returnParameters": { | |
"id": 5377, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 5373, | |
"mutability": "mutable", | |
"name": "recipients", | |
"nameLocation": "823:10:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "798:35:31", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_payable_$dyn_memory_ptr", | |
"typeString": "address payable[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 5371, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "798:15:31", | |
"stateMutability": "payable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"id": 5372, | |
"nodeType": "ArrayTypeName", | |
"src": "798:17:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_payable_$dyn_storage_ptr", | |
"typeString": "address payable[]" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5376, | |
"mutability": "mutable", | |
"name": "amounts", | |
"nameLocation": "852:7:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5378, | |
"src": "835:24:31", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 5374, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "835:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 5375, | |
"nodeType": "ArrayTypeName", | |
"src": "835:9:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "797:63:31" | |
}, | |
"scope": 5395, | |
"src": "707:154:31", | |
"stateMutability": "nonpayable", | |
"virtual": false, | |
"visibility": "external" | |
}, | |
{ | |
"documentation": { | |
"id": 5379, | |
"nodeType": "StructuredDocumentation", | |
"src": "867:355:31", | |
"text": " View only version of getRoyalty\n \n @param tokenAddress - The address of the token\n @param tokenId - The id of the token\n @param value - The value you wish to get the royalty of\n returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get" | |
}, | |
"functionSelector": "3e104014", | |
"id": 5394, | |
"implemented": false, | |
"kind": "function", | |
"modifiers": [], | |
"name": "getRoyaltyView", | |
"nameLocation": "1236:14:31", | |
"nodeType": "FunctionDefinition", | |
"parameters": { | |
"id": 5386, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 5381, | |
"mutability": "mutable", | |
"name": "tokenAddress", | |
"nameLocation": "1259:12:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1251:20:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
}, | |
"typeName": { | |
"id": 5380, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1251:7:31", | |
"stateMutability": "nonpayable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address", | |
"typeString": "address" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5383, | |
"mutability": "mutable", | |
"name": "tokenId", | |
"nameLocation": "1281:7:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1273:15:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 5382, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1273:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5385, | |
"mutability": "mutable", | |
"name": "value", | |
"nameLocation": "1298:5:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1290:13:31", | |
"stateVariable": false, | |
"storageLocation": "default", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
}, | |
"typeName": { | |
"id": 5384, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1290:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1250:54:31" | |
}, | |
"returnParameters": { | |
"id": 5393, | |
"nodeType": "ParameterList", | |
"parameters": [ | |
{ | |
"constant": false, | |
"id": 5389, | |
"mutability": "mutable", | |
"name": "recipients", | |
"nameLocation": "1352:10:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1327:35:31", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_payable_$dyn_memory_ptr", | |
"typeString": "address payable[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 5387, | |
"name": "address", | |
"nodeType": "ElementaryTypeName", | |
"src": "1327:15:31", | |
"stateMutability": "payable", | |
"typeDescriptions": { | |
"typeIdentifier": "t_address_payable", | |
"typeString": "address payable" | |
} | |
}, | |
"id": 5388, | |
"nodeType": "ArrayTypeName", | |
"src": "1327:17:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_address_payable_$dyn_storage_ptr", | |
"typeString": "address payable[]" | |
} | |
}, | |
"visibility": "internal" | |
}, | |
{ | |
"constant": false, | |
"id": 5392, | |
"mutability": "mutable", | |
"name": "amounts", | |
"nameLocation": "1381:7:31", | |
"nodeType": "VariableDeclaration", | |
"scope": 5394, | |
"src": "1364:24:31", | |
"stateVariable": false, | |
"storageLocation": "memory", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", | |
"typeString": "uint256[]" | |
}, | |
"typeName": { | |
"baseType": { | |
"id": 5390, | |
"name": "uint256", | |
"nodeType": "ElementaryTypeName", | |
"src": "1364:7:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_uint256", | |
"typeString": "uint256" | |
} | |
}, | |
"id": 5391, | |
"nodeType": "ArrayTypeName", | |
"src": "1364:9:31", | |
"typeDescriptions": { | |
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", | |
"typeString": "uint256[]" | |
} | |
}, | |
"visibility": "internal" | |
} | |
], | |
"src": "1326:63:31" | |
}, | |
"scope": 5395, | |
"src": "1227:163:31", | |
"stateMutability": "view", | |
"virtual": false, | |
"visibility": "external" | |
} | |
], | |
"scope": 5396, | |
"src": "192:1200:31", | |
"usedErrors": [] | |
} | |
], | |
"src": "33:1359:31" | |
}, | |
"compiler": { | |
"name": "solc", | |
"version": "0.8.7+commit.e28d00a7.Emscripten.clang" | |
}, | |
"networks": {}, | |
"schemaVersion": "3.4.3", | |
"updatedAt": "2022-02-27T17:51:02.167Z", | |
"devdoc": { | |
"details": "Lookup engine interface", | |
"kind": "dev", | |
"methods": { | |
"getRoyalty(address,uint256,uint256)": { | |
"params": { | |
"tokenAddress": "- The address of the token", | |
"tokenId": "- The id of the token", | |
"value": "- The value you wish to get the royalty of returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get" | |
} | |
}, | |
"getRoyaltyView(address,uint256,uint256)": { | |
"params": { | |
"tokenAddress": "- The address of the token", | |
"tokenId": "- The id of the token", | |
"value": "- The value you wish to get the royalty of returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get" | |
} | |
}, | |
"supportsInterface(bytes4)": { | |
"details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas." | |
} | |
}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": { | |
"getRoyalty(address,uint256,uint256)": { | |
"notice": "Get the royalty for a given token (address, id) and value amount. Does not cache the bps/amounts. Caches the spec for a given token address " | |
}, | |
"getRoyaltyView(address,uint256,uint256)": { | |
"notice": "View only version of getRoyalty " | |
} | |
}, | |
"version": 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment