@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
1,997 lines • 1.45 MB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "int256",
"name": "current",
"type": "int256"
},
{
"indexed": true,
"internalType": "uint256",
"name": "roundId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"name": "AnswerUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
},
{
"indexed": false,
"internalType": "string",
"name": "comment",
"type": "string"
}
],
"name": "LogPriceDataBlockNumberSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "priceId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "triggeredAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "depeggedAt",
"type": "uint256"
}
],
"name": "LogPriceDataDepegged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "priceId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "priceDeviation",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "currentPrice",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "lastPrice",
"type": "uint256"
}
],
"name": "LogPriceDataDeviationExceeded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "priceId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timeDifference",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "currentCreatedAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "lastCreatedAt",
"type": "uint256"
}
],
"name": "LogPriceDataHeartbeatExceeded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "priceId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
}
],
"name": "LogPriceDataProcessed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "priceId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "triggeredAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "recoveredAt",
"type": "uint256"
}
],
"name": "LogPriceDataRecovered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "priceId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "triggeredAt",
"type": "uint256"
}
],
"name": "LogPriceDataTriggered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "updatedTriggeredAt",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "forcedDepegAt",
"type": "uint256"
}
],
"name": "LogUsdcProviderForcedDepeg",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "resetDepegAt",
"type": "uint256"
}
],
"name": "LogUsdcProviderResetDepeg",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "roundId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "startedBy",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "startedAt",
"type": "uint256"
}
],
"name": "NewRound",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "CHAINLINK_HEARTBEAT_MARGIN",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CHAINLINK_TEST_DESCRIPTION",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CHAINLINK_TEST_VERSION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CHAINLINK_USDC_DECIMALS",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CHAINLINK_USDC_USD_DEVIATION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CHAINLINK_USDC_USD_FEED_GOERLI",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CHAINLINK_USDC_USD_FEED_MAINNET",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CHAINLINK_USDC_USD_HEARTBEAT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DEPEG_RECOVERY_PRICE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DEPEG_RECOVERY_WINDOW",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DEPEG_TRIGGER_PRICE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "GANACHE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "GANACHE2",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "GOERLI",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAINNET",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MUMBAI",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "PRICE_HISTORY_SIZE",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "PRICE_INFO_HISTORY_DURATION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "USDC_CONTACT_ADDRESS_GOERLI",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "USDC_CONTACT_ADDRESS_MAINNET",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "int256",
"name": "answer",
"type": "int256"
},
{
"internalType": "uint256",
"name": "startedAt",
"type": "uint256"
}
],
"name": "addRoundData",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "description",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "deviation",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "forceDepegForNextPriceInfo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getAggregatorAddress",
"outputs": [
{
"internalType": "address",
"name": "priceInfoSourceAddress",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roundId",
"type": "uint256"
}
],
"name": "getAnswer",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getChainlinkAggregatorAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint80",
"name": "roundId",
"type": "uint80"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"name": "getCompliance",
"outputs": [
{
"internalType": "bool",
"name": "priceDeviationIsValid",
"type": "bool"
},
{
"internalType": "bool",
"name": "heartbeetIsValid",
"type": "bool"
},
{
"internalType": "uint256",
"name": "previousPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "previousUpdatedAt",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roundId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"name": "getComplianceState",
"outputs": [
{
"internalType": "enum IPriceDataProvider.ComplianceState",
"name": "compliance",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDecimals",
"outputs": [
{
"internalType": "uint8",
"name": "priceInfoDecimals",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDepegPriceInfo",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "enum IPriceDataProvider.ComplianceState",
"name": "compliance",
"type": "uint8"
},
{
"internalType": "enum IPriceDataProvider.StabilityState",
"name": "stability",
"type": "uint8"
},
{
"internalType": "enum IPriceDataProvider.EventType",
"name": "eventType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "triggeredAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "depeggedAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
}
],
"internalType": "struct IPriceDataProvider.PriceInfo",
"name": "priceInfo",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDepeggedAt",
"outputs": [
{
"internalType": "uint256",
"name": "depeggedAt",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDepeggedBlockNumber",
"outputs": [
{
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDeviation",
"outputs": [
{
"internalType": "uint256",
"name": "deviationLevel",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getHeartbeat",
"outputs": [
{
"internalType": "uint256",
"name": "heartbeatSeconds",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getLatestPriceInfo",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "enum IPriceDataProvider.ComplianceState",
"name": "compliance",
"type": "uint8"
},
{
"internalType": "enum IPriceDataProvider.StabilityState",
"name": "stability",
"type": "uint8"
},
{
"internalType": "enum IPriceDataProvider.EventType",
"name": "eventType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "triggeredAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "depeggedAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
}
],
"internalType": "struct IPriceDataProvider.PriceInfo",
"name": "priceInfo",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint80",
"name": "_roundId",
"type": "uint80"
}
],
"name": "getRoundData",
"outputs": [
{
"internalType": "uint80",
"name": "roundId",
"type": "uint80"
},
{
"internalType": "int256",
"name": "answer",
"type": "int256"
},
{
"internalType": "uint256",
"name": "startedAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
},
{
"internalType": "uint80",
"name": "answeredInRound",
"type": "uint80"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roundId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"name": "getStability",
"outputs": [
{
"internalType": "enum IPriceDataProvider.StabilityState",
"name": "stability",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTargetPrice",
"outputs": [
{
"internalType": "uint256",
"name": "targetPrice",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roundId",
"type": "uint256"
}
],
"name": "getTimestamp",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTriggeredAt",
"outputs": [
{
"internalType": "uint256",
"name": "triggeredAt",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "heartbeat",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "heartbeatMargin",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "price1",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price2",
"type": "uint256"
}
],
"name": "isExceedingDeviation",
"outputs": [
{
"internalType": "bool",
"name": "isExceeding",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "time1",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "time2",
"type": "uint256"
}
],
"name": "isExceedingHeartbeat",
"outputs": [
{
"internalType": "bool",
"name": "isExceeding",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isMainnet",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isMainnetProvider",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isNewPriceInfoEventAvailable",
"outputs": [
{
"internalType": "bool",
"name": "newEvent",
"type": "bool"
},
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "enum IPriceDataProvider.ComplianceState",
"name": "compliance",
"type": "uint8"
},
{
"internalType": "enum IPriceDataProvider.StabilityState",
"name": "stability",
"type": "uint8"
},
{
"internalType": "enum IPriceDataProvider.EventType",
"name": "eventType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "triggeredAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "depeggedAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
}
],
"internalType": "struct IPriceDataProvider.PriceInfo",
"name": "priceInfo",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "timeSinceEvent",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isTestnet",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isTestnetProvider",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "latestAnswer",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "latestRound",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "latestRoundData",
"outputs": [
{
"internalType": "uint80",
"name": "roundId",
"type": "uint80"
},
{
"internalType": "int256",
"name": "answer",
"type": "int256"
},
{
"internalType": "uint256",
"name": "startedAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
},
{
"internalType": "uint80",
"name": "answeredInRound",
"type": "uint80"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "latestTimestamp",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "processLatestPriceInfo",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "enum IPriceDataProvider.ComplianceState",
"name": "compliance",
"type": "uint8"
},
{
"internalType": "enum IPriceDataProvider.StabilityState",
"name": "stability",
"type": "uint8"
},
{
"internalType": "enum IPriceDataProvider.EventType",
"name": "eventType",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "triggeredAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "depeggedAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
}
],
"internalType": "struct IPriceDataProvider.PriceInfo",
"name": "priceInfo",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "resetDepeg",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint128",
"name": "blockNumber",
"type": "uint128"
},
{
"internalType": "string",
"name": "comment",
"type": "string"
}
],
"name": "setDepeggedBlockNumber",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint80",
"name": "roundId",
"type": "uint80"
},
{
"internalType": "int256",
"name": "answer",
"type": "int256"
},
{
"internalType": "uint256",
"name": "startedAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
},
{
"internalType": "uint80",
"name": "answeredInRound",
"type": "uint80"
}
],
"name": "setRoundData",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"allSourcePaths": {
"0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"47": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorInterface.sol",
"48": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol",
"49": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol",
"5": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"50": "contracts/AggregatorDataProvider.sol",
"55": "contracts/IPriceDataProvider.sol",
"56": "contracts/UsdcPriceDataProvider.sol"
},
"ast": {
"absolutePath": "contracts/UsdcPriceDataProvider.sol",
"exportedSymbols": {
"AggregatorDataProvider": [
612
],
"AggregatorInterface": [
15696
],
"AggregatorV2V3Interface": [
9485
],
"AggregatorV3Interface": [
15742
],
"Context": [
15648
],
"IERC20": [
15820
],
"IERC20Metadata": [
9510
],
"IPriceDataProvider": [
4897
],
"Ownable": [
9476
],
"UsdcPriceDataProvider": [
5840
]
},
"id": 5841,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4899,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:56"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"file": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"id": 4900,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 5841,
"sourceUnit": 9511,
"src": "63:75:56",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/AggregatorDataProvider.sol",
"file": "./AggregatorDataProvider.sol",
"id": 4901,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 5841,
"sourceUnit": 613,
"src": "140:38:56",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/IPriceDataProvider.sol",
"file": "./IPriceDataProvider.sol",
"id": 4902,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 5841,
"sourceUnit": 4898,
"src": "179:34:56",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 4903,
"name": "AggregatorDataProvider",
"nodeType": "IdentifierPath",
"referencedDeclaration": 612,
"src": "253:22:56"
},
"id": 4904,
"nodeType": "InheritanceSpecifier",
"src": "253:22:56"
},
{
"baseName": {
"id": 4905,
"name": "IPriceDataProvider",
"nodeType": "IdentifierPath",
"referencedDeclaration": 4897,
"src": "282:18:56"
},
"id": 4906,
"nodeType": "InheritanceSpecifier",
"src": "282:18:56"
}
],
"contractDependencies": [
612,
4897,
9476,
9485,
15648,
15696,
15742
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5840,
"linearizedBaseContracts": [
5840,
4897,
612,
9485,
15742,
15696,
9476,
15648
],
"name": "UsdcPriceDataProvider",
"nameLocation": "224:21:56",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"functionSelector": "a389b74b",
"id": 4909,
"mutability": "constant",
"name": "USDC_CONTACT_ADDRESS_MAINNET",
"nameLocation": "331:28:56",
"nodeType": "VariableDeclaration",
"scope": 5840,
"src": "307:97:56",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4907,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "307:7:56",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"hexValue": "307841306238363939316336323138623336633164313944346132653945623063453336303665423438",
"id": 4908,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "362:42:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "fe0db1b1",
"id": 4912,
"mutability": "constant",
"name": "USDC_CONTACT_ADDRESS_GOERLI",
"nameLocation": "434:27:56",
"nodeType": "VariableDeclaration",
"scope": 5840,
"src": "410:96:56",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4910,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "410:7:56",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"hexValue": "307830373836356336453837423946373032353533373765303234616365363633304331456161333746",
"id": 4911,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "464:42:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"value": "0x07865c6E87B9F70255377e024ace6630C1Eaa37F"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "c2d0884b",
"id": 4915,
"mutability": "constant",
"name": "CHAINLINK_USDC_USD_FEED_MAINNET",
"nameLocation": "537:31:56",
"nodeType": "VariableDeclaration",
"scope": 5840,
"src": "513:100:56",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4913,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "513:7:56",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"hexValue": "307838664666466664344166423631313562393534426433323663626537423442413537363831386636",
"id": 4914,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "571:42:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"value": "0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "15854e52",
"id": 4918,
"mutability": "constant",
"name": "CHAINLINK_USDC_USD_FEED_GOERLI",
"nameLocation": "643:30:56",
"nodeType": "VariableDeclaration",
"scope": 5840,
"src": "619:99:56",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4916,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "619:7:56",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"hexValue": "307841623563343935383032393441666637373637304638333965613432356635623738616233416537",
"id": 4917,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "676:42:56",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"value": "0xAb5c49580294Aff77670F839ea425f5b78ab3Ae7"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "bb21257d",
"id": 4921,
"mutability": "constant",
"name": "CHAINLINK_USDC_DECIMALS",
"nameLocation": "746:23:56",
"nodeType": "VariableDeclaration",
"scope": 5840,
"src": "724:49:56",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 4919,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "724:5:56",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"hexValue": "38",
"id": 4920,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "772:1:56",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "2dc4583c",
"id": 4930,
"mutability": "constant",
"name": "DEPEG_TRIGGER_PRICE",
"nameLocation": "804:19:56",
"nodeType": "VariableDeclaration",
"scope": 5840,
"src": "780:86:56",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4922,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "780:7:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4929,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4927,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "393935",
"id": 4923,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "826:3:56",
"typeDescriptions": {
"typeIdentifier": "t_rational_995_by_1",
"typeString": "int_const 995"
},
"value": "995"
},
"nodeType": "BinaryOperation",
"operator": "*",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 4926,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 4924,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "832:2:56",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"id": 4925,
"name": "CHAINLINK_USDC_DECIMALS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4921,
"src": "836:23:56",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "832:27:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "826:33:56",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "31303030",
"id": 4928,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "862:4:56",
"typeDescriptions": {
"typeIdentifier": "t_rational_1000_by_1",
"typeString": "int_const 1000"
},
"value": "1000"
},
"src": "826:40:56",
"typeDescriptions": {
"ty