Documentation Index
Fetch the complete documentation index at: https://thrackle.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Git Source
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
mapping(address => bool) private approvedAddresses;
Functions
constructor
Constructor that only serves the purpose of notifying the indexer of its creation via event
name
Return the contract name
function name() external pure returns (string memory);
Returns
| Name | Type | Description |
|---|
<none> | string | name the name of the contract |
addToApprovedList
Add addresses to the approve list. Restricted to owner.
function addToApprovedList(address[] memory newApproves) public onlyOwner;
Parameters
| Name | Type | Description |
|---|
newApproves | address[] | the addresses to add |
addAddressToApprovedList
Add single address to the approve list. Restricted to owner.
function addAddressToApprovedList(address newApprove) public onlyOwner;
Parameters
| Name | Type | Description |
|---|
newApprove | address | the addresses to add |
removeFromAprovededList
Remove addresses from the approve list. Restricted to owner.
function removeFromAprovededList(address[] memory removeApproves) public onlyOwner;
Parameters
| Name | Type | Description |
|---|
removeApproves | address[] | the addresses to remove |
isApproved
Check to see if address is in approved list
function isApproved(address addr) public view returns (bool);
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
function isApprovedVerbose(address addr) public returns (bool);
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. |