ChainLink.sol

View Source: contracts/ChainLink.sol

Contract Members

Constants & Variables

//internal members
mapping(address => contract AggregatorV3Interface) internal priceContractMapping;
uint256 internal constant expScale;
uint8 internal constant eighteen;

//public members
address public admin;
bool public paused;
address public wethAddressVerified;
address public wethAddressPublic;
contract AggregatorV3Interface public USDETHPriceFeed;

Events

event assetAdded(address indexed assetAddress, address indexed priceFeedContract);
event assetRemoved(address indexed assetAddress);
event adminChanged(address indexed oldAdmin, address indexed newAdmin);
event verifiedWethAddressSet(address indexed wethAddressVerified);
event publicWethAddressSet(address indexed wethAddressPublic);
event contractPausedOrUnpaused(bool  currentStatus);

Modifiers

  • onlyAdmin

onlyAdmin

modifier onlyAdmin() internal

Arguments

Functions

  • addAsset(address assetAddress, address priceFeedContract)

  • removeAsset(address assetAddress)

  • changeAdmin(address newAdmin)

  • setWethAddressVerified(address _wethAddressVerified)

  • setWethAddressPublic(address _wethAddressPublic)

  • togglePause()

  • getAssetPrice(address asset)

  • ()

addAsset

function addAsset(address assetAddress, address priceFeedContract) public nonpayable onlyAdmin

Arguments

removeAsset

function removeAsset(address assetAddress) public nonpayable onlyAdmin

Arguments

changeAdmin

function changeAdmin(address newAdmin) public nonpayable onlyAdmin

Arguments

setWethAddressVerified

function setWethAddressVerified(address _wethAddressVerified) public nonpayable onlyAdmin

Arguments

setWethAddressPublic

function setWethAddressPublic(address _wethAddressPublic) public nonpayable onlyAdmin

Arguments

togglePause

function togglePause() public nonpayable onlyAdmin

Arguments

getAssetPrice

function getAssetPrice(address asset) public view
returns(uint256, uint8)

Arguments

function () public payable

Arguments

Last updated