UNPKG

@materia-dex/materia-contracts-proxy

Version:

Proxy contract for the Materia protocol

1,232 lines 27.1 kB
{ "compiler": { "version": "0.8.0+commit.c7dfd78e" }, "language": "Solidity", "output": { "abi": [ { "inputs": [], "name": "ETHEREUM_OBJECT_ID", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "tokenAmountDesired", "type": "uint256" }, { "internalType": "uint256", "name": "bridgeAmountDesired", "type": "uint256" }, { "internalType": "uint256", "name": "tokenAmountMin", "type": "uint256" }, { "internalType": "uint256", "name": "bridgeAmountMin", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "addLiquidity", "outputs": [ { "internalType": "uint256", "name": "amountA", "type": "uint256" }, { "internalType": "uint256", "name": "amountB", "type": "uint256" }, { "internalType": "uint256", "name": "liquidity", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bridgeAmountDesired", "type": "uint256" }, { "internalType": "uint256", "name": "EthAmountMin", "type": "uint256" }, { "internalType": "uint256", "name": "bridgeAmountMin", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "addLiquidityETH", "outputs": [ { "internalType": "uint256", "name": "amountToken", "type": "uint256" }, { "internalType": "uint256", "name": "amountETH", "type": "uint256" }, { "internalType": "uint256", "name": "liquidity", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "bridgeToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "doubleProxy", "outputs": [ { "internalType": "contract IDoubleProxy", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "erc20Wrapper", "outputs": [ { "internalType": "contract IERC20WrapperV1", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "factory", "outputs": [ { "internalType": "contract IMateriaFactory", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "reserveIn", "type": "uint256" }, { "internalType": "uint256", "name": "reserveOut", "type": "uint256" } ], "name": "getAmountIn", "outputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "reserveIn", "type": "uint256" }, { "internalType": "uint256", "name": "reserveOut", "type": "uint256" } ], "name": "getAmountOut", "outputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" } ], "name": "getAmountsIn", "outputs": [ { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" } ], "name": "getAmountsOut", "outputs": [ { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" } ], "name": "getCrumbs", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "isEthItem", "outputs": [ { "internalType": "address", "name": "collection", "type": "address" }, { "internalType": "bool", "name": "ethItem", "type": "bool" }, { "internalType": "uint256", "name": "itemId", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "liquidityAdder", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "liquidityRemover", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "values", "type": "uint256[]" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "onERC1155BatchReceived", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "onERC1155Received", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountA", "type": "uint256" }, { "internalType": "uint256", "name": "reserveA", "type": "uint256" }, { "internalType": "uint256", "name": "reserveB", "type": "uint256" } ], "name": "quote", "outputs": [ { "internalType": "uint256", "name": "amountB", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, { "internalType": "uint256", "name": "tokenAmountMin", "type": "uint256" }, { "internalType": "uint256", "name": "bridgeAmountMin", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "removeLiquidity", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, { "internalType": "uint256", "name": "bridgeAmountMin", "type": "uint256" }, { "internalType": "uint256", "name": "EthAmountMin", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "removeLiquidityETH", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, { "internalType": "uint256", "name": "ethAmountMin", "type": "uint256" }, { "internalType": "uint256", "name": "bridgeAmountMin", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "bool", "name": "approveMax", "type": "bool" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "removeLiquidityETHWithPermit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "liquidity", "type": "uint256" }, { "internalType": "uint256", "name": "tokenAmountMin", "type": "uint256" }, { "internalType": "uint256", "name": "bridgeAmountMin", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "bool", "name": "approveMax", "type": "bool" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "removeLiquidityWithPermit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOrchestrator", "type": "address" }, { "internalType": "bool", "name": "destroyOld", "type": "bool" }, { "internalType": "address", "name": "receiver", "type": "address" } ], "name": "retire", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newBridgeToken", "type": "address" } ], "name": "setBridgeToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "materiaFee", "type": "uint256" }, { "internalType": "uint256", "name": "swapFee", "type": "uint256" } ], "name": "setDefaultFees", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newDoubleProxy", "type": "address" } ], "name": "setDoubleProxy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newErc20Wrapper", "type": "address" } ], "name": "setErc20Wrapper", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "newEthereumObjectId", "type": "uint256" } ], "name": "setEthereumObjectId", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newFactory", "type": "address" } ], "name": "setFactory", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "feeTo", "type": "address" } ], "name": "setFeeTo", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "materiaFee", "type": "uint256" }, { "internalType": "uint256", "name": "swapFee", "type": "uint256" } ], "name": "setFees", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_adder", "type": "address" }, { "internalType": "bool", "name": "destroyOld", "type": "bool" } ], "name": "setLiquidityAdder", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_remover", "type": "address" }, { "internalType": "bool", "name": "destroyOld", "type": "bool" } ], "name": "setLiquidityRemover", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_swapper", "type": "address" }, { "internalType": "bool", "name": "destroyOld", "type": "bool" } ], "name": "setSwapper", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "swapETHForExactTokens", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "swapExactETHForTokens", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "swapExactTokensForETH", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "swapExactTokensForTokens", "outputs": [ { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "amountInMax", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "swapTokensForExactETH", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "uint256", "name": "amountInMax", "type": "uint256" }, { "internalType": "address[]", "name": "path", "type": "address[]" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" } ], "name": "swapTokensForExactTokens", "outputs": [ { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "swapper", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ], "devdoc": { "kind": "dev", "methods": { "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": { "details": "Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81, or its own function selector).", "params": { "data": "Additional data with no specified format", "from": "The address which previously owned the token", "ids": "An array containing ids of each token being transferred (order and length must match values array)", "operator": "The address which initiated the batch transfer (i.e. msg.sender)", "values": "An array containing amounts of each token being transferred (order and length must match ids array)" }, "returns": { "_0": "`bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed" } }, "onERC1155Received(address,address,uint256,uint256,bytes)": { "details": "Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61, or its own function selector).", "params": { "data": "Additional data with no specified format", "from": "The address which previously owned the token", "id": "The ID of the token being transferred", "operator": "The address which initiated the transfer (i.e. msg.sender)", "value": "The amount of tokens being transferred" }, "returns": { "_0": "`bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed" } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }, "settings": { "compilationTarget": { "localhost/proxy/contracts/interfaces/IMateriaOrchestrator.sol": "IMateriaOrchestrator" }, "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs" }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [] }, "sources": { "localhost/proxy/contracts/interfaces/IBaseTokenData.sol": { "keccak256": "0xb02cb2c7ab9fbf94410ea13965f6e62ad4d348b6731396b5a2abddc166ccd6b0", "license": "MIT", "urls": [ "bzz-raw://110ed41f2461b9344138b591128b021b92f81d6f476fc709aeb76843a16562b7", "dweb:/ipfs/QmVJBCMwrVFA6wna2UCypYeY14jxPndotMpYkNztPNpoFj" ] }, "localhost/proxy/contracts/interfaces/IDoubleProxy.sol": { "keccak256": "0x6aeb466382773c1601c68336697008b346daa75f93cd70ad875366f3e9ffc52b", "license": "UNLICENSED", "urls": [ "bzz-raw://4849af2a64e200f3800519f222e4c5e56554af11bdefbba1321e329ea37f2226", "dweb:/ipfs/QmNoLMob8K11aor5ymjcviDoaLyUPkVHRe1uRNrmQqiioN" ] }, "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": "0x1e37c0672c8b126c1962605427b70bdb93e6deb37bb086bfa91355072449f810", "license": "MIT", "urls": [ "bzz-raw://de7b376c2da4c1ad9fe9e37c31871228778e27a43d7bf9de4a8d8a9a9712f46a", "dweb:/ipfs/QmPd41MzMckfbxvf2g9W1GPLzFeZt39LCmS4GXGD7AEUbr" ] }, "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/IERC20WrapperV1.sol": { "keccak256": "0xb11ab8431790ecf02d6380277e277a1e44fcf1cbc81973301149e7080157ea4a", "license": "MIT", "urls": [ "bzz-raw://1b5dfc1840e8834ba39b1a634fdc2ba67d250adc4f8540f0ee33e16439ccb9cd", "dweb:/ipfs/QmTyF4vz44kcYuLuZAEW7tBxWuMiNZAojDKopi8oeudgk3" ] }, "localhost/proxy/contracts/interfaces/IEthItemInteroperableInterface.sol": { "keccak256": "0xd6c86125dbcd0941a00ee9727d1a37c4e0558b8d917f661d8059b85fe297ca42", "license": "MIT", "urls": [ "bzz-raw://7d7bd235c9e3447a082147c068e6f71b04677b279a640fcb76c5b32ab5d13370", "dweb:/ipfs/QmXZJZ388qAKj2DeHDKAucrPReDqqpmKrh9NFtkkib5Yqe" ] }, "localhost/proxy/contracts/interfaces/IEthItemMainInterface.sol": { "keccak256": "0x1bc85f4e88618a2d75910da856d5d43a87213463dae57054b44aa0e2220c43e0", "license": "MIT", "urls": [ "bzz-raw://12240288d6503024c37ad756722f451ad3d819affd30b9d54ca0e06942c414b0", "dweb:/ipfs/QmU1hLcanobgXgEEXbbA56YPob23ghDXXqjK7gCCXbj3mT" ] }, "localhost/proxy/contracts/interfaces/IEthItemModelBase.sol": { "keccak256": "0x2ef4d851f1127e58dc496490f84ebe5690bff39c48a0ff43338d0087e3b114da", "license": "MIT", "urls": [ "bzz-raw://7db0efdf2c2c6c758fa12146e9aa31ebe1fc7b1eaa36d644ada5a7696b22c627", "dweb:/ipfs/QmXP62zz7qHJtQfxNRoxPsPiJxhXTKaKRfjCHGxetwgYyV" ] }, "localhost/proxy/contracts/interfaces/IMateriaFactory.sol": { "keccak256": "0x30a380a82e00a4e2424f93e77bff443375840af0186a3cc8a97373fd0e97dd78", "license": "UNLICENSED", "urls": [ "bzz-raw://da75cdac567e74bb38792e0a75d05a3c5d3411e39273e964d0552a1ddc133e5a", "dweb:/ipfs/QmRcLYfFaYt5CVHBEpZhiiCrVhKuUS55NeCttYRcfguiLJ" ] }, "localhost/proxy/contracts/interfaces/IMateriaOrchestrator.sol": { "keccak256": "0x781d29af72b668362f173efc35fac7913b2a12c6b8f27ff953bfe6f2d488e0ea", "license": "UNLICENSED", "urls": [ "bzz-raw://34bcfd08665ab381540176329121999595692104f97ef699f30157a006602870", "dweb:/ipfs/QmPajW1ce8BdXGa2juHu8aZPktnGuNttFt3X3BhT2czyVH" ] } }, "version": 1 }