Skip to content

PriceOracleSentinel

PriceOracleSentinel

This contract validates if the operations are allowed depending on the PriceOracle health.

The PriceOracle is considered healthy once its completely up and the grace period has passed.

View Methods

isBorrowAllowed

function isBorrowAllowed()

Return Value

TypeDescription
boolReturns true if PriceOracle is up and grace period has passed

isLiquidationAllowed

function isLiquidationAllowed()

Return Value

TypeDescription
boolReturns true if PriceOracle is up and grace period has passed

getSequencerOracle

function getSequencerOracle()

Return Value

TypeDescription
addressAddress of the SequencerOracle.

getGracePeriod

function getGracePeriod()

Return Value

TypeDescription
uint256The duration of the grace period in seconds.

Write Methods

setSequencerOracle

function setSequencerOracle(address newSequencerOracle)

Call Params

NameTypeDescription
newSequencerOracleaddressaddress of the new SequecerOracle to be set.

setGracePeriod

function setGracePeriod(uint256 newGracePeriod

Call Params

NameTypeDescription
newGracePerioduint256duration of new grace period in seconds.

ABI

[
    {
        "inputs": [
            {
                "internalType": "contract IPoolAddressesProvider",
                "name": "provider",
                "type": "address"
            },
            {
                "internalType": "contract ISequencerOracle",
                "name": "oracle",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "gracePeriod",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "constructor"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "newGracePeriod",
                "type": "uint256"
            }
        ],
        "name": "GracePeriodUpdated",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "address",
                "name": "newSequencerOracle",
                "type": "address"
            }
        ],
        "name": "SequencerOracleUpdated",
        "type": "event"
    },
    {
        "inputs": [],
        "name": "ADDRESSES_PROVIDER",
        "outputs": [
            {
                "internalType": "contract IPoolAddressesProvider",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getGracePeriod",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getSequencerOracle",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "isBorrowAllowed",
        "outputs": [
            {
                "internalType": "bool",
                "name": "",
                "type": "bool"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "isLiquidationAllowed",
        "outputs": [
            {
                "internalType": "bool",
                "name": "",
                "type": "bool"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "newGracePeriod",
                "type": "uint256"
            }
        ],
        "name": "setGracePeriod",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "newSequencerOracle",
                "type": "address"
            }
        ],
        "name": "setSequencerOracle",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    }
]