Skip to content

Instantly share code, notes, and snippets.

@thebkr7
Last active September 21, 2021 22:48
Show Gist options
  • Save thebkr7/caaf39d89ac634b83be9ffb89dbb91ee to your computer and use it in GitHub Desktop.
Save thebkr7/caaf39d89ac634b83be9ffb89dbb91ee to your computer and use it in GitHub Desktop.
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_provider",
"type": "address"
},
{
"internalType": "uint256",
"name": "_stableAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_minLiquidityTokens",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "addLiquidity",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "assetToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "int256",
"name": "_deltaStable",
"type": "int256"
},
{
"internalType": "int256",
"name": "_deltaAsset",
"type": "int256"
},
{
"internalType": "int256",
"name": "_stableBound",
"type": "int256"
}
],
"name": "changePosition",
"outputs": [
{
"internalType": "int256",
"name": "startAsset",
"type": "int256"
},
{
"internalType": "int256",
"name": "startStable",
"type": "int256"
},
{
"internalType": "int256",
"name": "totalAsset",
"type": "int256"
},
{
"internalType": "int256",
"name": "totalStable",
"type": "int256"
},
{
"internalType": "uint256",
"name": "tradeFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "traderPayout",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "exchangeConfig1",
"outputs": [
{
"internalType": "int256",
"name": "tradeFeeFraction",
"type": "int256"
},
{
"internalType": "int256",
"name": "timeFee",
"type": "int256"
},
{
"internalType": "uint256",
"name": "maxLeverage",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minCollateral",
"type": "uint256"
},
{
"internalType": "int256",
"name": "treasuryFraction",
"type": "int256"
},
{
"internalType": "uint256",
"name": "removeLiquidityFee",
"type": "uint256"
},
{
"internalType": "int256",
"name": "tradeLiquidityReserveFactor",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "exchangeConfig2",
"outputs": [
{
"internalType": "int256",
"name": "dfrRate",
"type": "int256"
},
{
"internalType": "int256",
"name": "liquidatorFrac",
"type": "int256"
},
{
"internalType": "int256",
"name": "maxLiquidatorFee",
"type": "int256"
},
{
"internalType": "int256",
"name": "poolLiquidationFrac",
"type": "int256"
},
{
"internalType": "int256",
"name": "maxPoolLiquidationFee",
"type": "int256"
},
{
"internalType": "int256",
"name": "adlFeePercent",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "exchangeState",
"outputs": [
{
"internalType": "enum IExchange.ExchangeState",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_stableAmount",
"type": "uint256"
}
],
"name": "getLiquidityTokenAmount",
"outputs": [
{
"internalType": "uint256",
"name": "assetAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "liquidityTokenAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "getLiquidityValue",
"outputs": [
{
"internalType": "uint256",
"name": "assetAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "stableAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getOraclePrice",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_trader",
"type": "address"
}
],
"name": "getPosition",
"outputs": [
{
"internalType": "int256",
"name": "asset",
"type": "int256"
},
{
"internalType": "int256",
"name": "stable",
"type": "int256"
},
{
"internalType": "uint8",
"name": "adlTrancheId",
"type": "uint8"
},
{
"internalType": "uint64",
"name": "adlShareClass",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRedeemableLiquidityTokenAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_trader",
"type": "address"
}
],
"name": "liquidate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "liquidityIncentives",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "liquidityToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_from",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "onTokenTransfer",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "pausePrice",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "priceOracle",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "_tokenAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_minAssetAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_minStableAmount",
"type": "uint256"
}
],
"name": "removeLiquidity",
"outputs": [
{
"internalType": "uint256",
"name": "assetAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "stableAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "int256",
"name": "_tradeFeeFraction",
"type": "int256"
},
{
"internalType": "int256",
"name": "_timeFee",
"type": "int256"
},
{
"internalType": "uint256",
"name": "_maxLeverage",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_minCollateral",
"type": "uint256"
},
{
"internalType": "int256",
"name": "_treasuryFraction",
"type": "int256"
},
{
"internalType": "uint256",
"name": "_removeLiquidityFee",
"type": "uint256"
},
{
"internalType": "int256",
"name": "_tradeLiquidityReserveFactor",
"type": "int256"
}
],
"name": "setExchangeConfig1",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "int256",
"name": "_dfrRate",
"type": "int256"
},
{
"internalType": "int256",
"name": "_liquidatorFrac",
"type": "int256"
},
{
"internalType": "int256",
"name": "_maxLiquidatorFee",
"type": "int256"
},
{
"internalType": "int256",
"name": "_poolLiquidationFrac",
"type": "int256"
},
{
"internalType": "int256",
"name": "_maxPoolLiquidationFee",
"type": "int256"
},
{
"internalType": "int256",
"name": "_adlFeePercent",
"type": "int256"
}
],
"name": "setExchangeConfig2",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "enum IExchange.ExchangeState",
"name": "_state",
"type": "uint8"
},
{
"internalType": "int256",
"name": "_pausePrice",
"type": "int256"
}
],
"name": "setExchangeState",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "stableToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "swapPool",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "tradingIncentives",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "treasury",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "wethToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment