OracleApproved
Inherits: Ownable, IOracleEvents
Author: @ShaneDuncan602, @oscarsernarosero, @TJ-Everett
This is an example on-chain oracle that maintains an approve list.
This is intended to be a model only. It stores the approve list internally and returns bool true if address is in list.
State Variables
approvedAddresses
Functions
constructor
Constructor that only serves the purpose of notifying the indexer of its creation via event
name
Return the contract name
Returns
Name | Type | Description |
---|---|---|
<none> | string | name the name of the contract |
addToApprovedList
Add addresses to the approve list. Restricted to owner.
Parameters
Name | Type | Description |
---|---|---|
newApproves | address[] | the addresses to add |
addAddressToApprovedList
Add single address to the approve list. Restricted to owner.
Parameters
Name | Type | Description |
---|---|---|
newApprove | address | the addresses to add |
removeFromAprovededList
Remove addresses from the approve list. Restricted to owner.
Parameters
Name | Type | Description |
---|---|---|
removeApproves | address[] | the addresses to remove |
isApproved
Check to see if address is in approved list
Parameters
Name | Type | Description |
---|---|---|
addr | address | the address to check |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | approved returns true if in the approved list, false if not. |
isApprovedVerbose
Check to see if address is in approved list. Also emits events based on the results
Parameters
Name | Type | Description |
---|---|---|
addr | address | the address to check |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | approved returns true if in the approved list, false if not. |