UNPKG

niftyswap

Version:

AMM exchange for ERC-1155 tokens, inspired by Uniswap

414 lines (413 loc) 9.1 kB
{ "_format": "hh-sol-artifact-1", "contractName": "INiftyswapExchange", "sourceName": "contracts/interfaces/INiftyswapExchange.sol", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "buyer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256[]", "name": "tokensSoldIds", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "tokensSoldAmounts", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "currencyBoughtAmounts", "type": "uint256[]" } ], "name": "CurrencyPurchase", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "provider", "type": "address" }, { "indexed": false, "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "tokenAmounts", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "currencyAmounts", "type": "uint256[]" } ], "name": "LiquidityAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "provider", "type": "address" }, { "indexed": false, "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "tokenAmounts", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "currencyAmounts", "type": "uint256[]" } ], "name": "LiquidityRemoved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "buyer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256[]", "name": "tokensBoughtIds", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "tokensBoughtAmounts", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "currencySoldAmounts", "type": "uint256[]" } ], "name": "TokensPurchase", "type": "event" }, { "inputs": [ { "internalType": "uint256", "name": "_assetBoughtAmount", "type": "uint256" }, { "internalType": "uint256", "name": "_assetSoldReserve", "type": "uint256" }, { "internalType": "uint256", "name": "_assetBoughtReserve", "type": "uint256" } ], "name": "getBuyPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "getCurrencyInfo", "outputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "_ids", "type": "uint256[]" } ], "name": "getCurrencyReserves", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getFactoryAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "_ids", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "_tokensBought", "type": "uint256[]" } ], "name": "getPrice_currencyToToken", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "_ids", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "_tokensSold", "type": "uint256[]" } ], "name": "getPrice_tokenToCurrency", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_assetSoldAmount", "type": "uint256" }, { "internalType": "uint256", "name": "_assetSoldReserve", "type": "uint256" }, { "internalType": "uint256", "name": "_assetBoughtReserve", "type": "uint256" } ], "name": "getSellPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "getTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "_ids", "type": "uint256[]" } ], "name": "getTotalSupply", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "_from", "type": "address" }, { "internalType": "uint256[]", "name": "_ids", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "_amounts", "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": "_amount", "type": "uint256" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "onERC1155Received", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x", "deployedBytecode": "0x", "linkReferences": {}, "deployedLinkReferences": {} }