Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (25 sloc) 1.15 KB
pragma solidity ^0.5.2;
import "./AuctioneerManaged.sol";
contract TokenWhitelist is AuctioneerManaged {
// Mapping that stores the tokens, which are approved
// Only tokens approved by auctioneer generate frtToken tokens
// addressToken => boolApproved
mapping(address => bool) public approvedTokens;
event Approval(address indexed token, bool approved);
/// @dev for quick overview of approved Tokens
/// @param addressesToCheck are the ERC-20 token addresses to be checked whether they are approved
function getApprovedAddressesOfList(address[] calldata addressesToCheck) external view returns (bool[] memory) {
uint length = addressesToCheck.length;
bool[] memory isApproved = new bool[](length);
for (uint i = 0; i < length; i++) {
isApproved[i] = approvedTokens[addressesToCheck[i]];
return isApproved;
function updateApprovalOfToken(address[] memory token, bool approved) public onlyAuctioneer {
for (uint i = 0; i < token.length; i++) {
approvedTokens[token[i]] = approved;
emit Approval(token[i], approved);
You can’t perform that action at this time.