UNPKG

@materia-dex/materia-contracts-proxy

Version:

Proxy contract for the Materia protocol

909 lines 20.9 kB
{ "compiler": { "version": "0.8.0+commit.c7dfd78e" }, "language": "Solidity", "output": { "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "ApprovalForAll", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "objectId", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "tokenAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Mint", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "objectId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "tokenAddress", "type": "address" } ], "name": "NewItem", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "values", "type": "uint256[]" } ], "name": "TransferBatch", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "TransferSingle", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "value", "type": "string" }, { "indexed": true, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "URI", "type": "event" }, { "inputs": [ { "internalType": "uint256", "name": "objectId", "type": "uint256" } ], "name": "asInteroperable", "outputs": [ { "internalType": "contract IEthItemInteroperableInterface", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "accounts", "type": "address[]" }, { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" } ], "name": "balanceOfBatch", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "objectId", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "objectIds", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } ], "name": "burnBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "objectId", "type": "uint256" } ], "name": "decimals", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "objectId", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "emitTransferSingleEvent", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "factory", "outputs": [ { "internalType": "address", "name": "factoryAddress", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" } ], "name": "init", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "interoperableInterfaceModel", "type": "address" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" } ], "name": "init", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "interoperableInterfaceModel", "outputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" } ], "name": "isApprovedForAll", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "mainInterfaceVersion", "outputs": [ { "internalType": "uint256", "name": "ethItemInteroperableVersion", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "string", "name": "partialUri", "type": "string" } ], "name": "mint", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "modelVersion", "outputs": [ { "internalType": "uint256", "name": "modelVersionNumber", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "objectId", "type": "uint256" } ], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "safeBatchTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "objectId", "type": "uint256" } ], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "objectId", "type": "uint256" }, { "internalType": "uint256", "name": "ethItemAmount", "type": "uint256" } ], "name": "toInteroperableInterfaceAmount", "outputs": [ { "internalType": "uint256", "name": "interoperableInterfaceAmount", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "objectId", "type": "uint256" }, { "internalType": "uint256", "name": "erc20WrapperAmount", "type": "uint256" } ], "name": "toMainInterfaceAmount", "outputs": [ { "internalType": "uint256", "name": "mainInterfaceAmount", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "objectId", "type": "uint256" } ], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "objectId", "type": "uint256" } ], "name": "uri", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" } ], "devdoc": { "details": "This interface contains the commonn data provided by all the EthItem models", "kind": "dev", "methods": { "balanceOf(address,uint256)": { "details": "Returns the amount of tokens of token type `id` owned by `account`. Requirements: - `account` cannot be the zero address." }, "balanceOfBatch(address[],uint256[])": { "details": "xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. Requirements: - `accounts` and `ids` must have the same length." }, "decimals(uint256)": { "details": "Returns the decimals of the given token id", "params": { "objectId": "the id of the token whose decimals you want to know " } }, "factory()": { "returns": { "factoryAddress": "the address of the Contract which initialized this EthItem" } }, "init(string,string)": { "details": "Contract Initialization, the caller of this method should be a Contract containing the logic to provide the EthItemERC20WrapperModel to be used to create ERC20-based objectIds", "params": { "name": "the chosen name for this NFT", "symbol": "the chosen symbol (Ticker) for this NFT" } }, "isApprovedForAll(address,address)": { "details": "Returns true if `operator` is approved to transfer ``account``'s tokens. See {setApprovalForAll}." }, "modelVersion()": { "returns": { "modelVersionNumber": "The version number of the Model, it should be progressive" } }, "name(uint256)": { "details": "Returns the name of the given token id", "params": { "objectId": "the id of the token whose name you want to know " } }, "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { "details": "xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. Emits a {TransferBatch} event. Requirements: - `ids` and `amounts` must have the same length. - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value." }, "safeTransferFrom(address,address,uint256,uint256,bytes)": { "details": "Transfers `amount` tokens of token type `id` from `from` to `to`. Emits a {TransferSingle} event. Requirements: - `to` cannot be the zero address. - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. - `from` must have a balance of tokens of type `id` of at least `amount`. - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value." }, "setApprovalForAll(address,bool)": { "details": "Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, Emits an {ApprovalForAll} event. Requirements: - `operator` cannot be the caller." }, "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." }, "symbol(uint256)": { "details": "Returns the symbol of the given token id", "params": { "objectId": "the id of the token whose symbol you want to know " } }, "totalSupply(uint256)": { "details": "Returns the total supply of the given token id", "params": { "objectId": "the id of the token whose availability you want to know " } }, "uri(uint256)": { "details": "Returns the uri of the given token id", "params": { "objectId": "the id of the token whose uri you want to know " } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }, "settings": { "compilationTarget": { "localhost/proxy/contracts/interfaces/IEthItemModelBase.sol": "IEthItemModelBase" }, "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs" }, "optimizer": { "enabled": true, "runs": 9999 }, "remappings": [] }, "sources": { "localhost/proxy/contracts/interfaces/IBaseTokenData.sol": { "keccak256": "0xb02cb2c7ab9fbf94410ea13965f6e62ad4d348b6731396b5a2abddc166ccd6b0", "license": "MIT", "urls": [ "bzz-raw://110ed41f2461b9344138b591128b021b92f81d6f476fc709aeb76843a16562b7", "dweb:/ipfs/QmVJBCMwrVFA6wna2UCypYeY14jxPndotMpYkNztPNpoFj" ] }, "localhost/proxy/contracts/interfaces/IERC1155.sol": { "keccak256": "0xaa5e55648d433ba71d84fff3acee448218e17671e2c2ba2eeff1a83fc4b15be5", "license": "MIT", "urls": [ "bzz-raw://d1321493739df1579140492d5ee05071da8eb92acad2355a3402d92f6dba8718", "dweb:/ipfs/QmZsDJqPsJdJBPAv7M8Q2RQPUCJK5HaZeof6kqty45ypcr" ] }, "localhost/proxy/contracts/interfaces/IERC1155Receiver.sol": { "keccak256": "0x9c96a59c3d5d16b21c6ebb23b262748059cca44e1ad095fd65beb6b3fdd9ce7a", "license": "MIT", "urls": [ "bzz-raw://7eb00d2f71977ce2a09e17fd023f6d73d0982012a522d8e8165a767dd2fe7b7d", "dweb:/ipfs/QmPRkNMER5Er2LdP5sAAoondAp8R37ULZPpwxVekwf12U4" ] }, "localhost/proxy/contracts/interfaces/IERC1155Views.sol": { "keccak256": "0x165133ed153e90263b5cff3656bce55e46aaefc682bed5a593427e9f99c01026", "license": "MIT", "urls": [ "bzz-raw://8d8265b2c2503af1140b1bf5e4dd4ba36fdda7268b498288b9f9d40d156a122f", "dweb:/ipfs/QmNU2dX6ML4S5Kw1kemAxF6qTrcLj9btU5pGmRwAeTRZKC" ] }, "localhost/proxy/contracts/interfaces/IERC165.sol": { "keccak256": "0x6b058630929028f2cd42a2c5c94b70b5842bcc7e05cc24e98835921a3a93b2fc", "license": "MIT", "urls": [ "bzz-raw://e5bf4f4aba56d5fbe249c5fa292c3ad4931f65d9dea7c67f9ae829589db8ec37", "dweb:/ipfs/QmfZkhXuzB22rcGw44D3jwczciYzhhx3Jvtiki4dpjznZY" ] }, "localhost/proxy/contracts/interfaces/IERC20.sol": { "keccak256": "0xa8547ef7a4aabd9c15930d0caaedaf02826ec2345fa5015ba134b4087fd3eb06", "license": "MIT", "urls": [ "bzz-raw://ed005dc99628ad306463c7e1909c127fbedcb67ac3035c6ab6c69a438564665c", "dweb:/ipfs/QmXWTqBYXuNoKq5NgKQE9CzUzBG39a84qTvYTkSMxLZV3f" ] }, "localhost/proxy/contracts/interfaces/IERC20Data.sol": { "keccak256": "0xfe4e3c95be7c3f34f3a588d7d643025740b769d48330398a0d6b9e894534e070", "license": "MIT", "urls": [ "bzz-raw://5da70697458012ee9e6432d94b1a5258d36902b5f1790c479b0a3f03649de366", "dweb:/ipfs/QmSpkrRfK4cmVXuBrGb4MDmp9gLNKQrYqgiWCciqRFxJdU" ] }, "localhost/proxy/contracts/interfaces/IEthItemInteroperableInterface.sol": { "keccak256": "0x12a08da216dfe51bdcd7a7b2c03e12867bde71a042d2105e297db72a6660dc7b", "license": "MIT", "urls": [ "bzz-raw://479b884860e6cf3eceb37c5c8d7b318800a3473564e433047baf831a81e3f2bc", "dweb:/ipfs/QmSRMVcbnDq4dnNGF7wmbuLPCaVYcXwha4w9t1AgeMe6vN" ] }, "localhost/proxy/contracts/interfaces/IEthItemMainInterface.sol": { "keccak256": "0xb7f4f36ad000e9bd806a344f82b7933edc8b491716e063fe8ccdadf8218c3159", "license": "MIT", "urls": [ "bzz-raw://5cdaf6b7b0d2050b84b6247ab5a6e8b047b6f7bca4ee785407f7259864f1ac8b", "dweb:/ipfs/QmdGkKLMXAqUfGtotBrs6noR6c3QC7eqwmuuwnantscmqs" ] }, "localhost/proxy/contracts/interfaces/IEthItemModelBase.sol": { "keccak256": "0x2ef4d851f1127e58dc496490f84ebe5690bff39c48a0ff43338d0087e3b114da", "license": "MIT", "urls": [ "bzz-raw://7db0efdf2c2c6c758fa12146e9aa31ebe1fc7b1eaa36d644ada5a7696b22c627", "dweb:/ipfs/QmXP62zz7qHJtQfxNRoxPsPiJxhXTKaKRfjCHGxetwgYyV" ] } }, "version": 1 }