UNPKG

@mstable/protocol

Version:
1,708 lines (1,707 loc) 34.2 kB
[ { "inputs": [ { "internalType": "address", "name": "_nexus", "type": "address" }, { "internalType": "uint256", "name": "_recolFee", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "cacheSize", "type": "uint256" } ], "name": "CacheSizeChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amt", "type": "uint256" } ], "name": "DeficitMinted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "swapFee", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "redemptionFee", "type": "uint256" } ], "name": "FeesChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "forgeValidator", "type": "address" } ], "name": "ForgeValidatorChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "minter", "type": "address" }, { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "mAssetQuantity", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "input", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "inputQuantity", "type": "uint256" } ], "name": "Minted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "minter", "type": "address" }, { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "mAssetQuantity", "type": "uint256" }, { "indexed": false, "internalType": "address[]", "name": "inputs", "type": "address[]" }, { "indexed": false, "internalType": "uint256[]", "name": "inputQuantities", "type": "uint256[]" } ], "name": "MintedMulti", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "redeemer", "type": "address" }, { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "mAssetQuantity", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "output", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "outputQuantity", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "scaledFee", "type": "uint256" } ], "name": "Redeemed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "redeemer", "type": "address" }, { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "mAssetQuantity", "type": "uint256" }, { "indexed": false, "internalType": "address[]", "name": "outputs", "type": "address[]" }, { "indexed": false, "internalType": "uint256[]", "name": "outputQuantity", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256", "name": "scaledFee", "type": "uint256" } ], "name": "RedeemedMulti", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "creditor", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amt", "type": "uint256" } ], "name": "SurplusBurned", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "swapper", "type": "address" }, { "indexed": false, "internalType": "address", "name": "input", "type": "address" }, { "indexed": false, "internalType": "address", "name": "output", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "outputAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "scaledFee", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" } ], "name": "Swapped", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint128", "name": "min", "type": "uint128" }, { "indexed": false, "internalType": "uint128", "name": "max", "type": "uint128" } ], "name": "WeightLimitsChanged", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "bAssetIndexes", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "burnSurplus", "outputs": [ { "internalType": "uint256", "name": "burnAmount", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "collectInterest", "outputs": [ { "internalType": "uint256", "name": "mintAmount", "type": "uint256" }, { "internalType": "uint256", "name": "newSupply", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "collectPlatformInterest", "outputs": [ { "internalType": "uint256", "name": "mintAmount", "type": "uint256" }, { "internalType": "uint256", "name": "newSupply", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "data", "outputs": [ { "internalType": "uint256", "name": "swapFee", "type": "uint256" }, { "internalType": "uint256", "name": "redemptionFee", "type": "uint256" }, { "internalType": "uint256", "name": "cacheSize", "type": "uint256" }, { "internalType": "uint256", "name": "surplus", "type": "uint256" }, { "components": [ { "internalType": "bool", "name": "undergoingRecol", "type": "bool" }, { "internalType": "bool", "name": "failed", "type": "bool" } ], "internalType": "struct BasketState", "name": "basket", "type": "tuple" }, { "components": [ { "internalType": "uint64", "name": "initialA", "type": "uint64" }, { "internalType": "uint64", "name": "targetA", "type": "uint64" }, { "internalType": "uint64", "name": "rampStartTime", "type": "uint64" }, { "internalType": "uint64", "name": "rampEndTime", "type": "uint64" } ], "internalType": "struct AmpData", "name": "ampData", "type": "tuple" }, { "components": [ { "internalType": "uint128", "name": "min", "type": "uint128" }, { "internalType": "uint128", "name": "max", "type": "uint128" } ], "internalType": "struct WeightLimits", "name": "weightLimits", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } ], "name": "decreaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "deprecated_ampData", "outputs": [ { "internalType": "uint64", "name": "initialA", "type": "uint64" }, { "internalType": "uint64", "name": "targetA", "type": "uint64" }, { "internalType": "uint64", "name": "rampStartTime", "type": "uint64" }, { "internalType": "uint64", "name": "rampEndTime", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "deprecated_bAssetData", "outputs": [ { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint128", "name": "vaultBalance", "type": "uint128" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "deprecated_bAssetPersonal", "outputs": [ { "internalType": "address", "name": "addr", "type": "address" }, { "internalType": "address", "name": "integrator", "type": "address" }, { "internalType": "bool", "name": "hasTxFee", "type": "bool" }, { "internalType": "enum BassetStatus", "name": "status", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deprecated_basket", "outputs": [ { "internalType": "bool", "name": "undergoingRecol", "type": "bool" }, { "internalType": "bool", "name": "failed", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deprecated_cacheSize", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deprecated_forgeValidator", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deprecated_maxBassets", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deprecated_redemptionFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deprecated_surplus", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deprecated_swapFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deprecated_weightLimits", "outputs": [ { "internalType": "uint128", "name": "min", "type": "uint128" }, { "internalType": "uint128", "name": "max", "type": "uint128" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getBasket", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" }, { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_bAsset", "type": "address" } ], "name": "getBasset", "outputs": [ { "components": [ { "internalType": "address", "name": "addr", "type": "address" }, { "internalType": "address", "name": "integrator", "type": "address" }, { "internalType": "bool", "name": "hasTxFee", "type": "bool" }, { "internalType": "enum BassetStatus", "name": "status", "type": "uint8" } ], "internalType": "struct BassetPersonal", "name": "personal", "type": "tuple" }, { "components": [ { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint128", "name": "vaultBalance", "type": "uint128" } ], "internalType": "struct BassetData", "name": "bData", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getBassets", "outputs": [ { "components": [ { "internalType": "address", "name": "addr", "type": "address" }, { "internalType": "address", "name": "integrator", "type": "address" }, { "internalType": "bool", "name": "hasTxFee", "type": "bool" }, { "internalType": "enum BassetStatus", "name": "status", "type": "uint8" } ], "internalType": "struct BassetPersonal[]", "name": "personal", "type": "tuple[]" }, { "components": [ { "internalType": "uint128", "name": "ratio", "type": "uint128" }, { "internalType": "uint128", "name": "vaultBalance", "type": "uint128" } ], "internalType": "struct BassetData[]", "name": "bData", "type": "tuple[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getConfig", "outputs": [ { "components": [ { "internalType": "uint256", "name": "supply", "type": "uint256" }, { "internalType": "uint256", "name": "a", "type": "uint256" }, { "components": [ { "internalType": "uint128", "name": "min", "type": "uint128" }, { "internalType": "uint128", "name": "max", "type": "uint128" } ], "internalType": "struct WeightLimits", "name": "limits", "type": "tuple" }, { "internalType": "uint256", "name": "recolFee", "type": "uint256" } ], "internalType": "struct InvariantConfig", "name": "config", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_inputs", "type": "address[]" }, { "internalType": "uint256[]", "name": "_inputQuantities", "type": "uint256[]" } ], "name": "getMintMultiOutput", "outputs": [ { "internalType": "uint256", "name": "mintOutput", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_input", "type": "address" }, { "internalType": "uint256", "name": "_inputQuantity", "type": "uint256" } ], "name": "getMintOutput", "outputs": [ { "internalType": "uint256", "name": "mintOutput", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getPrice", "outputs": [ { "internalType": "uint256", "name": "price", "type": "uint256" }, { "internalType": "uint256", "name": "k", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_outputs", "type": "address[]" }, { "internalType": "uint256[]", "name": "_outputQuantities", "type": "uint256[]" } ], "name": "getRedeemExactBassetsOutput", "outputs": [ { "internalType": "uint256", "name": "mAssetQuantity", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_output", "type": "address" }, { "internalType": "uint256", "name": "_mAssetQuantity", "type": "uint256" } ], "name": "getRedeemOutput", "outputs": [ { "internalType": "uint256", "name": "bAssetOutput", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_input", "type": "address" }, { "internalType": "address", "name": "_output", "type": "address" }, { "internalType": "uint256", "name": "_inputQuantity", "type": "uint256" } ], "name": "getSwapOutput", "outputs": [ { "internalType": "uint256", "name": "swapOutput", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_bAsset", "type": "address" }, { "internalType": "bool", "name": "_belowPeg", "type": "bool" } ], "name": "handlePegLoss", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "addedValue", "type": "uint256" } ], "name": "increaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_nameArg", "type": "string" }, { "internalType": "string", "name": "_symbolArg", "type": "string" }, { "components": [ { "internalType": "address", "name": "addr", "type": "address" }, { "internalType": "address", "name": "integrator", "type": "address" }, { "internalType": "bool", "name": "hasTxFee", "type": "bool" }, { "internalType": "enum BassetStatus", "name": "status", "type": "uint8" } ], "internalType": "struct BassetPersonal[]", "name": "_bAssets", "type": "tuple[]" }, { "components": [ { "internalType": "uint256", "name": "a", "type": "uint256" }, { "components": [ { "internalType": "uint128", "name": "min", "type": "uint128" }, { "internalType": "uint128", "name": "max", "type": "uint128" } ], "internalType": "struct WeightLimits", "name": "limits", "type": "tuple" } ], "internalType": "struct BasicConfig", "name": "_config", "type": "tuple" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_bAssets", "type": "address[]" }, { "internalType": "address", "name": "_newIntegration", "type": "address" } ], "name": "migrateBassets", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_input", "type": "address" }, { "internalType": "uint256", "name": "_inputQuantity", "type": "uint256" }, { "internalType": "uint256", "name": "_minOutputQuantity", "type": "uint256" }, { "internalType": "address", "name": "_recipient", "type": "address" } ], "name": "mint", "outputs": [ { "internalType": "uint256", "name": "mintOutput", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "mintDeficit", "outputs": [ { "internalType": "uint256", "name": "mintAmount", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_inputs", "type": "address[]" }, { "internalType": "uint256[]", "name": "_inputQuantities", "type": "uint256[]" }, { "internalType": "uint256", "name": "_minOutputQuantity", "type": "uint256" }, { "internalType": "address", "name": "_recipient", "type": "address" } ], "name": "mintMulti", "outputs": [ { "internalType": "uint256", "name": "mintOutput", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_bAsset", "type": "address" } ], "name": "negateIsolation", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "nexus", "outputs": [ { "internalType": "contract INexus", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_output", "type": "address" }, { "internalType": "uint256", "name": "_mAssetQuantity", "type": "uint256" }, { "internalType": "uint256", "name": "_minOutputQuantity", "type": "uint256" }, { "internalType": "address", "name": "_recipient", "type": "address" } ], "name": "redeem", "outputs": [ { "internalType": "uint256", "name": "outputQuantity", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_outputs", "type": "address[]" }, { "internalType": "uint256[]", "name": "_outputQuantities", "type": "uint256[]" }, { "internalType": "uint256", "name": "_maxMassetQuantity", "type": "uint256" }, { "internalType": "address", "name": "_recipient", "type": "address" } ], "name": "redeemExactBassets", "outputs": [ { "internalType": "uint256", "name": "mAssetQuantity", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_mAssetQuantity", "type": "uint256" }, { "internalType": "uint256[]", "name": "_minOutputQuantities", "type": "uint256[]" }, { "internalType": "address", "name": "_recipient", "type": "address" } ], "name": "redeemMasset", "outputs": [ { "internalType": "uint256[]", "name": "outputQuantities", "type": "uint256[]" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_cacheSize", "type": "uint256" } ], "name": "setCacheSize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_swapFee", "type": "uint256" }, { "internalType": "uint256", "name": "_redemptionFee", "type": "uint256" } ], "name": "setFees", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_bAsset", "type": "address" }, { "internalType": "bool", "name": "_flag", "type": "bool" } ], "name": "setTransferFeesFlag", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint128", "name": "_min", "type": "uint128" }, { "internalType": "uint128", "name": "_max", "type": "uint128" } ], "name": "setWeightLimits", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_targetA", "type": "uint256" }, { "internalType": "uint256", "name": "_rampEndTime", "type": "uint256" } ], "name": "startRampA", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "stopRampA", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_input", "type": "address" }, { "internalType": "address", "name": "_output", "type": "address" }, { "internalType": "uint256", "name": "_inputQuantity", "type": "uint256" }, { "internalType": "uint256", "name": "_minOutputQuantity", "type": "uint256" }, { "internalType": "address", "name": "_recipient", "type": "address" } ], "name": "swap", "outputs": [ { "internalType": "uint256", "name": "swapOutput", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" } ]