ChainLink.sol
View Source: contracts/ChainLink.sol

Contract Members

Constants & Variables
1
//internal members
2
mapping(address => contract AggregatorV3Interface) internal priceContractMapping;
3
uint256 internal constant expScale;
4
uint8 internal constant eighteen;
5
6
//public members
7
address public admin;
8
bool public paused;
9
address public wethAddressVerified;
10
address public wethAddressPublic;
11
contract AggregatorV3Interface public USDETHPriceFeed;
Copied!
Events
1
event assetAdded(address indexed assetAddress, address indexed priceFeedContract);
2
event assetRemoved(address indexed assetAddress);
3
event adminChanged(address indexed oldAdmin, address indexed newAdmin);
4
event verifiedWethAddressSet(address indexed wethAddressVerified);
5
event publicWethAddressSet(address indexed wethAddressPublic);
6
event contractPausedOrUnpaused(bool currentStatus);
Copied!

Modifiers

  • onlyAdmin

onlyAdmin

1
modifier onlyAdmin() internal
Copied!
Arguments
Name
Type
Description

Functions

  • addAsset(address assetAddress, address priceFeedContract)
  • removeAsset(address assetAddress)
  • changeAdmin(address newAdmin)
  • setWethAddressVerified(address _wethAddressVerified)
  • setWethAddressPublic(address _wethAddressPublic)
  • togglePause()
  • getAssetPrice(address asset)
  • ()

addAsset

1
function addAsset(address assetAddress, address priceFeedContract) public nonpayable onlyAdmin
Copied!
Arguments
Name
Type
Description
assetAddress
address
priceFeedContract
address

removeAsset

1
function removeAsset(address assetAddress) public nonpayable onlyAdmin
Copied!
Arguments
Name
Type
Description
assetAddress
address

changeAdmin

1
function changeAdmin(address newAdmin) public nonpayable onlyAdmin
Copied!
Arguments
Name
Type
Description
newAdmin
address

setWethAddressVerified

1
function setWethAddressVerified(address _wethAddressVerified) public nonpayable onlyAdmin
Copied!
Arguments
Name
Type
Description
_wethAddressVerified
address

setWethAddressPublic

1
function setWethAddressPublic(address _wethAddressPublic) public nonpayable onlyAdmin
Copied!
Arguments
Name
Type
Description
_wethAddressPublic
address

togglePause

1
function togglePause() public nonpayable onlyAdmin
Copied!
Arguments
Name
Type
Description

getAssetPrice

1
function getAssetPrice(address asset) public view
2
returns(uint256, uint8)
Copied!
Arguments
Name
Type
Description
asset
address

1
function () public payable
Copied!
Arguments
Name
Type
Description