Contract ABI [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sponsor",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"name": "Deposit",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "settlementPrice",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "shutdowntimestamp",
"type": "uint256"
}
],
"name": "EmergencyShutdown",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sponsor",
"type": "address"
}
],
"name": "EndedSponsorPosition",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sponsor",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "liquidator",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "liquidatedTokens",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "liquidatedCollateral",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "collateralReward",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "liquidationTime",
"type": "uint256"
}
],
"name": "Liquidation",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sponsor",
"type": "address"
}
],
"name": "NewSponsor",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sponsor",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "feeAmount",
"type": "uint256"
}
],
"name": "PositionCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sponsor",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenAmount",
"type": "uint256"
}
],
"name": "Redeem",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sponsor",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "numTokensRepaid",
"type": "uint256"
},
{
"indexed": true,
"internalType": "uint256",
"name": "newTokenCount",
"type": "uint256"
}
],
"name": "Repay",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "collateralReturned",
"type": "uint256"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokensBurned",
"type": "uint256"
}
],
"name": "SettleEmergencyShutdown",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sponsor",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"name": "Withdrawal",
"type": "event"
},
{
"inputs": [],
"name": "capMintAmount",
"outputs": [
{
"internalType": "uint256",
"name": "capMint",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "claimFee",
"outputs": [
{
"internalType": "uint256",
"name": "feeClaimed",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sponsor",
"type": "address"
}
],
"name": "collateralCoverage",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "collateralRequirement",
"outputs": [
{
"internalType": "uint256",
"name": "collReq",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "collateralToken",
"outputs": [
{
"internalType": "contract IERC20",
"name": "collateral",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "numTokens",
"type": "uint256"
}
],
"name": "create",
"outputs": [
{
"internalType": "uint256",
"name": "feeAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sponsor",
"type": "address"
}
],
"name": "deleteSponsorPosition",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sponsor",
"type": "address"
},
{
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"name": "depositTo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "emergencyShutdown",
"outputs": [
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "emergencyShutdownPrice",
"outputs": [
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "emergencyShutdownTime",
"outputs": [
{
"internalType": "uint256",
"name": "time",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "excessTokensBeneficiary",
"outputs": [
{
"internalType": "address",
"name": "beneficiary",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "feeInfo",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "feePercentage",
"type": "uint256"
},
{
"internalType": "address[]",
"name": "feeRecipients",
"type": "address[]"
},
{
"internalType": "uint32[]",
"name": "feeProportions",
"type": "uint32[]"
},
{
"internalType": "uint256",
"name": "totalFeeProportions",
"type": "uint256"
}
],
"internalType": "struct ICreditLineStorage.Fee",
"name": "fee",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getGlobalPositionData",
"outputs": [
{
"internalType": "uint256",
"name": "totCollateral",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "totTokensOutstanding",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sponsor",
"type": "address"
}
],
"name": "getPositionData",
"outputs": [
{
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokensAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "contract IStandardERC20",
"name": "collateralToken",
"type": "address"
},
{
"internalType": "contract IMintableBurnableERC20",
"name": "syntheticToken",
"type": "address"
},
{
"internalType": "bytes32",
"name": "priceFeedIdentifier",
"type": "bytes32"
},
{
"components": [
{
"internalType": "uint256",
"name": "rawValue",
"type": "uint256"
}
],
"internalType": "struct FixedPoint.Unsigned",
"name": "minSponsorTokens",
"type": "tuple"
},
{
"internalType": "address",
"name": "excessTokenBeneficiary",
"type": "address"
},
{
"internalType": "uint8",
"name": "version",
"type": "uint8"
},
{
"internalType": "contract ISynthereumFinder",
"name": "synthereumFinder",
"type": "address"
}
],
"internalType": "struct ICreditLineStorage.PositionManagerParams",
"name": "_positionManagerData",
"type": "tuple"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "forwarder",
"type": "address"
}
],
"name": "isTrustedForwarder",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sponsor",
"type": "address"
},
{
"internalType": "uint256",
"name": "maxTokensToLiquidate",
"type": "uint256"
}
],
"name": "liquidate",
"outputs": [
{
"internalType": "uint256",
"name": "tokensLiquidated",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "collateralLiquidated",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "collateralReward",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sponsor",
"type": "address"
}
],
"name": "liquidationPrice",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "liquidationReward",
"outputs": [
{
"internalType": "uint256",
"name": "rewardPct",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "minSponsorTokens",
"outputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "priceIdentifier",
"outputs": [
{
"internalType": "bytes32",
"name": "identifier",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "numTokens",
"type": "uint256"
}
],
"name": "redeem",
"outputs": [
{
"internalType": "uint256",
"name": "amountWithdrawn",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "numTokens",
"type": "uint256"
}
],
"name": "repay",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "settleEmergencyShutdown",
"outputs": [
{
"internalType": "uint256",
"name": "amountWithdrawn",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "synthereumFinder",
"outputs": [
{
"internalType": "contract ISynthereumFinder",
"name": "finder",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "syntheticToken",
"outputs": [
{
"internalType": "contract IERC20",
"name": "synthToken",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "syntheticTokenSymbol",
"outputs": [
{
"internalType": "string",
"name": "symbol",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalFeeAmount",
"outputs": [
{
"internalType": "uint256",
"name": "totalFee",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC20",
"name": "token",
"type": "address"
}
],
"name": "trimExcess",
"outputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "typology",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "feeGainer",
"type": "address"
}
],
"name": "userFeeGained",
"outputs": [
{
"internalType": "uint256",
"name": "feeGained",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "uint8",
"name": "contractVersion",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [
{
"internalType": "uint256",
"name": "amountWithdrawn",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]