S Price: $0.691876 (-4.91%)

Contract Diff Checker

Contract Name:
OracleFromRedstone

Contract Source Code:

File 1 of 1 : OracleFromRedstone

# @version 0.3.10
"""
@title OracleFromRedstone
@author Curve.Fi
@license MIT
"""
interface Redstone:
    def latestAnswer() -> uint256: view
    def decimals() -> uint256: view


REDSTONE: public(immutable(Redstone))
DECIMAL_MULTIPLIER: public(immutable(uint256))


@external
def __init__(
        redstone: Redstone
    ):
    REDSTONE = redstone
    DECIMAL_MULTIPLIER = 10**(18 - redstone.decimals())


@external
@view
def price() -> uint256:
    return REDSTONE.latestAnswer() * DECIMAL_MULTIPLIER


@external
def price_w() -> uint256:
    return REDSTONE.latestAnswer() * DECIMAL_MULTIPLIER

Please enter a contract address above to load the contract details and source code.

Context size (optional):