Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 7 from a total of 7 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Remove Approved ... | 20671018 | 142 days ago | IN | 0 ETH | 0.00020308 | ||||
Add Approved Tok... | 18536709 | 441 days ago | IN | 0 ETH | 0.00335788 | ||||
Transfer Ownersh... | 18465083 | 451 days ago | IN | 0 ETH | 0.00169377 | ||||
Add Approved Tok... | 17893848 | 531 days ago | IN | 0 ETH | 0.00128261 | ||||
Add Approved Tok... | 17139578 | 637 days ago | IN | 0 ETH | 0.00286722 | ||||
Add Approved Tok... | 16941904 | 665 days ago | IN | 0 ETH | 0.00225303 | ||||
Transfer Ownersh... | 16941893 | 665 days ago | IN | 0 ETH | 0.00082119 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
FranklinTokenWhitelist
Compiler Version
v0.8.16+commit.07a7930e
Contract Source Code (Solidity Standard Json-Input format)
// contracts/Franklin.sol // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.16; import "Ownable.sol"; contract FranklinTokenWhitelist is Ownable { /// ============ EVENTS ============ /// @notice Emits address of the ERC20 token approved event TokenApproved(address _token); /// @notice Emits address of the ERC20 token removed event TokenRemoved(address _token); /// ============ STORAGE VARIABLES ============ /** @dev The approvedTokens array and registeredToken mapping are used to manage the tokens approved for payroll. This is used to ensure that tokens in the treasury which are not allocated to Payroll are not accidentally used in a payroll run */ address[] private approvedTokens; /// @dev Mapping manages registerdTokens and indicates if a _token is registered mapping(address => bool) private registeredToken; constructor(address[] memory initially_approved_tokens) { for (uint256 i = 0; i < initially_approved_tokens.length; ) { addApprovedToken(initially_approved_tokens[i]); unchecked { i++; } } } /// Protect owner by overriding renounceOwnership function renounceOwnership() public virtual override { revert("Cant renounce"); } /// ============ MODIFIERS ============ modifier onlyApprovedTokens(address _token) { require(registeredToken[_token], "Token not approved"); _; } /// ============ VIEW FUNCTIONS ============ function getApprovedTokens() external view returns (address[] memory) { return (approvedTokens); } function isApprovedToken(address _token) external view returns (bool) { return (registeredToken[_token]); } /// ============ TOKEN MANAGEMENT FUNCTIONS ============ /** @notice Adds the ERC20 token address to the registeredToken array and creates a mapping that returns a boolean showing the token is approved. */ /// @dev This function is public because it is called by the initializer /// @param _token The ERC20 token to be approved function addApprovedToken(address _token) public onlyOwner { require(!registeredToken[_token], "Token already approved"); require(_token != address(0), "No 0x0 address"); registeredToken[_token] = true; approvedTokens.push(_token); emit TokenApproved(_token); } /** @notice Removes the ERC20 token from the registeredToken array and deletes the mapping used to confirm a token is approved */ /// @param _token The ERC20 token to be removed function removeApprovedToken(address _token) external onlyOwner onlyApprovedTokens(_token) { // set mapping to false registeredToken[_token] = false; // remove from approved token array for (uint256 i = 0; i < approvedTokens.length; ) { if (approvedTokens[i] == _token) { // replace deleted _token with last _token in array approvedTokens[i] = approvedTokens[approvedTokens.length - 1]; // remove last spot in array approvedTokens.pop(); break; } unchecked { i++; } } emit TokenRemoved(_token); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "FranklinTokenWhitelist.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address[]","name":"initially_approved_tokens","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"}],"name":"TokenApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"}],"name":"TokenRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"addApprovedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getApprovedTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"isApprovedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removeApprovedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610ade380380610ade83398101604081905261002f916102a5565b6100383361007b565b60005b81518110156100745761006c82828151811061005957610059610369565b60200260200101516100cb60201b60201c565b60010161003b565b505061037f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b0316331461012a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b03811660009081526002602052604090205460ff16156101935760405162461bcd60e51b815260206004820152601660248201527f546f6b656e20616c726561647920617070726f766564000000000000000000006044820152606401610121565b6001600160a01b0381166101da5760405162461bcd60e51b815260206004820152600e60248201526d4e6f20307830206164647265737360901b6044820152606401610121565b6001600160a01b0381166000818152600260209081526040808320805460ff191660019081179091558054808201825593527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690920180546001600160a01b0319168417905590519182527f5f5916d70d5479c1795a9d461360dfa5c673bc37904c8ab4fcbdc970b9e90f3d910160405180910390a150565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146102a057600080fd5b919050565b600060208083850312156102b857600080fd5b82516001600160401b03808211156102cf57600080fd5b818501915085601f8301126102e357600080fd5b8151818111156102f5576102f5610273565b8060051b604051601f19603f8301168101818110858211171561031a5761031a610273565b60405291825284820192508381018501918883111561033857600080fd5b938501935b8285101561035d5761034e85610289565b8452938501939285019261033d565b98975050505050505050565b634e487b7160e01b600052603260045260246000fd5b6107508061038e6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063715018a61161005b578063715018a6146100ed5780638da5cb5b146100f5578063cd10534b14610110578063f2fde38b1461012357600080fd5b80632d5ad3d5146100825780635705987a146100c35780636afc0c5f146100d8575b600080fd5b6100ae610090366004610615565b6001600160a01b031660009081526002602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d66100d1366004610615565b610136565b005b6100e0610324565b6040516100ba9190610645565b6100d6610386565b6000546040516001600160a01b0390911681526020016100ba565b6100d661011e366004610615565b6103be565b6100d6610131366004610615565b61052a565b6000546001600160a01b031633146101695760405162461bcd60e51b815260040161016090610692565b60405180910390fd5b6001600160a01b038116600090815260026020526040902054819060ff166101c85760405162461bcd60e51b8152602060048201526012602482015271151bdad95b881b9bdd08185c1c1c9bdd995960721b6044820152606401610160565b6001600160a01b0382166000908152600260205260408120805460ff191690555b6001548110156102e357826001600160a01b031660018281548110610210576102106106c7565b6000918252602090912001546001600160a01b0316036102db57600180546102399082906106dd565b81548110610249576102496106c7565b600091825260209091200154600180546001600160a01b039092169183908110610275576102756106c7565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060018054806102b4576102b4610704565b600082815260209020810160001990810180546001600160a01b03191690550190556102e3565b6001016101e9565b506040516001600160a01b03831681527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd39060200160405180910390a15050565b6060600180548060200260200160405190810160405280929190818152602001828054801561037c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161035e575b5050505050905090565b60405162461bcd60e51b815260206004820152600d60248201526c43616e742072656e6f756e636560981b6044820152606401610160565b6000546001600160a01b031633146103e85760405162461bcd60e51b815260040161016090610692565b6001600160a01b03811660009081526002602052604090205460ff161561044a5760405162461bcd60e51b8152602060048201526016602482015275151bdad95b88185b1c9958591e48185c1c1c9bdd995960521b6044820152606401610160565b6001600160a01b0381166104915760405162461bcd60e51b815260206004820152600e60248201526d4e6f20307830206164647265737360901b6044820152606401610160565b6001600160a01b0381166000818152600260209081526040808320805460ff191660019081179091558054808201825593527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690920180546001600160a01b0319168417905590519182527f5f5916d70d5479c1795a9d461360dfa5c673bc37904c8ab4fcbdc970b9e90f3d910160405180910390a150565b6000546001600160a01b031633146105545760405162461bcd60e51b815260040161016090610692565b6001600160a01b0381166105b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610160565b6105c2816105c5565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561062757600080fd5b81356001600160a01b038116811461063e57600080fd5b9392505050565b6020808252825182820181905260009190848201906040850190845b818110156106865783516001600160a01b031683529284019291840191600101610661565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b818103818111156106fe57634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220bbcbc65487694379b34d827bf8ab39da7121c52eed99b2f3047f1f190dfe36c964736f6c6343000810003300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063715018a61161005b578063715018a6146100ed5780638da5cb5b146100f5578063cd10534b14610110578063f2fde38b1461012357600080fd5b80632d5ad3d5146100825780635705987a146100c35780636afc0c5f146100d8575b600080fd5b6100ae610090366004610615565b6001600160a01b031660009081526002602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6100d66100d1366004610615565b610136565b005b6100e0610324565b6040516100ba9190610645565b6100d6610386565b6000546040516001600160a01b0390911681526020016100ba565b6100d661011e366004610615565b6103be565b6100d6610131366004610615565b61052a565b6000546001600160a01b031633146101695760405162461bcd60e51b815260040161016090610692565b60405180910390fd5b6001600160a01b038116600090815260026020526040902054819060ff166101c85760405162461bcd60e51b8152602060048201526012602482015271151bdad95b881b9bdd08185c1c1c9bdd995960721b6044820152606401610160565b6001600160a01b0382166000908152600260205260408120805460ff191690555b6001548110156102e357826001600160a01b031660018281548110610210576102106106c7565b6000918252602090912001546001600160a01b0316036102db57600180546102399082906106dd565b81548110610249576102496106c7565b600091825260209091200154600180546001600160a01b039092169183908110610275576102756106c7565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060018054806102b4576102b4610704565b600082815260209020810160001990810180546001600160a01b03191690550190556102e3565b6001016101e9565b506040516001600160a01b03831681527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd39060200160405180910390a15050565b6060600180548060200260200160405190810160405280929190818152602001828054801561037c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161035e575b5050505050905090565b60405162461bcd60e51b815260206004820152600d60248201526c43616e742072656e6f756e636560981b6044820152606401610160565b6000546001600160a01b031633146103e85760405162461bcd60e51b815260040161016090610692565b6001600160a01b03811660009081526002602052604090205460ff161561044a5760405162461bcd60e51b8152602060048201526016602482015275151bdad95b88185b1c9958591e48185c1c1c9bdd995960521b6044820152606401610160565b6001600160a01b0381166104915760405162461bcd60e51b815260206004820152600e60248201526d4e6f20307830206164647265737360901b6044820152606401610160565b6001600160a01b0381166000818152600260209081526040808320805460ff191660019081179091558054808201825593527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690920180546001600160a01b0319168417905590519182527f5f5916d70d5479c1795a9d461360dfa5c673bc37904c8ab4fcbdc970b9e90f3d910160405180910390a150565b6000546001600160a01b031633146105545760405162461bcd60e51b815260040161016090610692565b6001600160a01b0381166105b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610160565b6105c2816105c5565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561062757600080fd5b81356001600160a01b038116811461063e57600080fd5b9392505050565b6020808252825182820181905260009190848201906040850190845b818110156106865783516001600160a01b031683529284019291840191600101610661565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b818103818111156106fe57634e487b7160e01b600052601160045260246000fd5b92915050565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220bbcbc65487694379b34d827bf8ab39da7121c52eed99b2f3047f1f190dfe36c964736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
-----Decoded View---------------
Arg [0] : initially_approved_tokens (address[]): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0xdAC17F958D2ee523a2206206994597C13D831ec7,0x6B175474E89094C44Da98b954EedeAC495271d0F
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [2] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [3] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [4] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.