UNPKG

@materia-dex/materia-contracts-proxy

Version:

Proxy contract for the Materia protocol

1,150 lines 22 kB
{ "deploy": { "VM:-": { "linkReferences": {}, "autoDeployLib": true }, "main:1": { "linkReferences": {}, "autoDeployLib": true }, "ropsten:3": { "linkReferences": {}, "autoDeployLib": true }, "rinkeby:4": { "linkReferences": {}, "autoDeployLib": true }, "kovan:42": { "linkReferences": {}, "autoDeployLib": true }, "görli:5": { "linkReferences": {}, "autoDeployLib": true }, "Custom": { "linkReferences": {}, "autoDeployLib": true } }, "data": { "bytecode": { "generatedSources": [], "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "deployedBytecode": { "generatedSources": [], "immutableReferences": {}, "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "gasEstimates": null, "methodIdentifiers": { "ETHEREUM_OBJECT_ID()": "be745fff", "addLiquidity(address,uint256,uint256,uint256,uint256,address,uint256)": "9187aaca", "addLiquidityETH(uint256,uint256,uint256,address,uint256)": "bb8a88bb", "bridgeToken()": "f4734b0c", "doubleProxy()": "4eb9b592", "erc20Wrapper()": "1b5f58c8", "factory()": "c45a0155", "getAmountIn(uint256,uint256,uint256)": "85f8c259", "getAmountOut(uint256,uint256,uint256)": "054d50d4", "getAmountsIn(uint256,address[])": "1f00ca74", "getAmountsOut(uint256,address[])": "d06ca61f", "getCrumbs(address,uint256,address)": "b6ec79fe", "isEthItem(address)": "47883c37", "liquidityAdder()": "55809f9f", "liquidityRemover()": "cafd47df", "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": "bc197c81", "onERC1155Received(address,address,uint256,uint256,bytes)": "f23a6e61", "quote(uint256,uint256,uint256)": "ad615dec", "removeLiquidity(address,uint256,uint256,uint256,address,uint256)": "96c92f5e", "removeLiquidityETH(uint256,uint256,uint256,address,uint256)": "ee1fae3c", "removeLiquidityETHWithPermit(uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": "678700e0", "removeLiquidityWithPermit(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": "104870fd", "retire(address,bool,address)": "5902ee21", "setBridgeToken(address)": "23ae8401", "setDefaultFees(uint256,uint256)": "b9bdb4ef", "setDoubleProxy(address)": "cbd99d03", "setErc20Wrapper(address)": "d7565a0c", "setEthereumObjectId(uint256)": "02af0fb5", "setFactory(address)": "5bb47808", "setFeeTo(address)": "f46901ed", "setFees(address,uint256,uint256)": "11f38472", "setLiquidityAdder(address,bool)": "16dc79ac", "setLiquidityRemover(address,bool)": "614d5c24", "setSwapper(address,bool)": "3f2617cb", "swapETHForExactTokens(uint256,address[],address,uint256)": "fb3bdb41", "swapExactETHForTokens(uint256,address[],address,uint256)": "7ff36ab5", "swapExactTokensForETH(uint256,uint256,address[],address,uint256)": "18cbafe5", "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)": "38ed1739", "swapTokensForExactETH(uint256,uint256,address[],address,uint256)": "4a25d94a", "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)": "8803dbee", "swapper()": "2b3297f9" } }, "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" } ] }