Git Source

Inherits: Ownable, IOracleEvents

Author: @ShaneDuncan602, @oscarsernarosero, @TJ-Everett

This is an example on-chain oracle that maintains a denied list.

This is intended to be a model only. It stores the Denied list internally and returns bool true if address is in list.

State Variables

deniedAddresses

mapping(address => bool) private deniedAddresses;

Functions

constructor

Constructor that only serves the purpose of notifying the indexer of its creation via event

constructor();

name

Return the contract name

function name() external pure returns (string memory);

Returns

NameTypeDescription
<none>stringname the name of the contract

addToDeniedList

Add addresses to the denied list. Restricted to owner.

function addToDeniedList(address[] memory newDeniedAddrs) public onlyOwner;

Parameters

NameTypeDescription
newDeniedAddrsaddress[]the addresses to add

addAddressToDeniedList

Add single address to the denied list. Restricted to owner.

function addAddressToDeniedList(address newDeniedAddr) public onlyOwner;

Parameters

NameTypeDescription
newDeniedAddraddressthe addresses to add

removeFromDeniedList

Remove addresses from the Denied list. Restricted to owner.

function removeFromDeniedList(address[] memory removeDeniedAddrs) public onlyOwner;

Parameters

NameTypeDescription
removeDeniedAddrsaddress[]the addresses to remove

isDenied

Check to see if address is in denied list

function isDenied(address addr) public view returns (bool);

Parameters

NameTypeDescription
addraddressthe address to check

Returns

NameTypeDescription
<none>booldenied returns true if in the denied list, false if not.

isDeniedVerbose

Check to see if address is in denied list. Also emits events based on the results

function isDeniedVerbose(address addr) public returns (bool);

Parameters

NameTypeDescription
addraddressthe address to check

Returns

NameTypeDescription
<none>booldenied returns true if in the denied list, false if not.