Overview
GLMR Balance
GLMR Value
$0.00View more zero value Internal Transactions in Advanced View mode
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x847B57F2...C6aaa80ae The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
AirdropFund
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import "../interfaces/IMultiFeeDistribution.sol";
contract AirdropFund is Ownable, Initializable {
uint256 public constant ALLOCATION = 50_000_000 ether; // 5% of allocation
uint256 public claimedAmount;
IMultiFeeDistribution public rewardMinter;
mapping(address => bool) public airdropPools;
function currentBalance() public view returns (uint256) {
return ALLOCATION - claimedAmount;
}
function transfer(address _receiver, uint256 _amount) external {
require(airdropPools[msg.sender], "Only Airdrop pools can request");
require(_receiver != address(0), "Invalid address");
require(_amount > 0, "invalid amount");
require(_amount <= currentBalance(), "> balance");
claimedAmount = claimedAmount + _amount;
rewardMinter.mint(_receiver, _amount);
}
// =================================================
// RESTRICTED FUNCTIONS
// =================================================
function setPool(address _pool, bool _added) external onlyOwner {
airdropPools[_pool] = _added;
emit PoolSet(_pool, _added);
}
function setMinter(IMultiFeeDistribution _rewardMinter) external onlyOwner {
require(address(rewardMinter) == address(0), "Can redefine rewardMinter");
rewardMinter = _rewardMinter;
}
// =================================================
// EVENTS
// =================================================
event PoolSet(address _pool, bool _added);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/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() {
_setOwner(_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 {
_setOwner(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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Modifier to protect an initializer function from being invoked twice.
*/
modifier initializer() {
require(_initializing || !_initialized, "Initializable: contract is already initialized");
bool isTopLevelCall = !_initializing;
if (isTopLevelCall) {
_initializing = true;
_initialized = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IMultiFeeDistribution {
function addReward(address rewardsToken, address distributor) external;
function mint(address user, uint256 amount) external;
function notifyRewardAmount(IERC20 rewardsToken, uint256 reward) external;
}// SPDX-License-Identifier: MIT
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;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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":"_pool","type":"address"},{"indexed":false,"internalType":"bool","name":"_added","type":"bool"}],"name":"PoolSet","type":"event"},{"inputs":[],"name":"ALLOCATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"airdropPools","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardMinter","outputs":[{"internalType":"contract IMultiFeeDistribution","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IMultiFeeDistribution","name":"_rewardMinter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"bool","name":"_added","type":"bool"}],"name":"setPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107168061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80639668ceb8116100715780639668ceb8146101485780639b8e556314610151578063a9059cbb14610164578063ce845d1d14610177578063f2fde38b1461017f578063fca3b5aa1461019257600080fd5b806320bec12c146100ae5780636fef839e146100c3578063715018a6146100fb578063889646ea146101035780638da5cb5b14610123575b600080fd5b6100c16100bc3660046105ea565b6101a5565b005b6100e66100d13660046105c7565b60036020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100c161023b565b6101156a295be96e6406697200000081565b6040519081526020016100f2565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100f2565b61011560015481565b600254610130906001600160a01b031681565b6100c1610172366004610626565b610271565b610115610417565b6100c161018d3660046105c7565b610437565b6100c16101a03660046105c7565b6104d2565b6000546001600160a01b031633146101d85760405162461bcd60e51b81526004016101cf90610651565b60405180910390fd5b6001600160a01b038216600081815260036020908152604091829020805460ff19168515159081179091558251938452908301527fbcdb576d64c4678982245c04cc666ba25083e99a4a1dfbcf19275b037abc06f5910160405180910390a15050565b6000546001600160a01b031633146102655760405162461bcd60e51b81526004016101cf90610651565b61026f6000610577565b565b3360009081526003602052604090205460ff166102d05760405162461bcd60e51b815260206004820152601e60248201527f4f6e6c792041697264726f7020706f6f6c732063616e2072657175657374000060448201526064016101cf565b6001600160a01b0382166103185760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016101cf565b600081116103595760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a5908185b5bdd5b9d60921b60448201526064016101cf565b610361610417565b81111561039c5760405162461bcd60e51b81526020600482015260096024820152683e2062616c616e636560b81b60448201526064016101cf565b806001546103aa9190610686565b6001556002546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050505050565b60006001546a295be96e64066972000000610432919061069e565b905090565b6000546001600160a01b031633146104615760405162461bcd60e51b81526004016101cf90610651565b6001600160a01b0381166104c65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101cf565b6104cf81610577565b50565b6000546001600160a01b031633146104fc5760405162461bcd60e51b81526004016101cf90610651565b6002546001600160a01b0316156105555760405162461bcd60e51b815260206004820152601960248201527f43616e207265646566696e65207265776172644d696e7465720000000000000060448201526064016101cf565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156105d8578081fd5b81356105e3816106cb565b9392505050565b600080604083850312156105fc578081fd5b8235610607816106cb565b91506020830135801515811461061b578182fd5b809150509250929050565b60008060408385031215610638578182fd5b8235610643816106cb565b946020939093013593505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610699576106996106b5565b500190565b6000828210156106b0576106b06106b5565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146104cf57600080fdfea26469706673582212209ab8531ceae648285dd8b3147c119299f1f4c3104f0c16bfa91230cd38a36ca764736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80639668ceb8116100715780639668ceb8146101485780639b8e556314610151578063a9059cbb14610164578063ce845d1d14610177578063f2fde38b1461017f578063fca3b5aa1461019257600080fd5b806320bec12c146100ae5780636fef839e146100c3578063715018a6146100fb578063889646ea146101035780638da5cb5b14610123575b600080fd5b6100c16100bc3660046105ea565b6101a5565b005b6100e66100d13660046105c7565b60036020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6100c161023b565b6101156a295be96e6406697200000081565b6040519081526020016100f2565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100f2565b61011560015481565b600254610130906001600160a01b031681565b6100c1610172366004610626565b610271565b610115610417565b6100c161018d3660046105c7565b610437565b6100c16101a03660046105c7565b6104d2565b6000546001600160a01b031633146101d85760405162461bcd60e51b81526004016101cf90610651565b60405180910390fd5b6001600160a01b038216600081815260036020908152604091829020805460ff19168515159081179091558251938452908301527fbcdb576d64c4678982245c04cc666ba25083e99a4a1dfbcf19275b037abc06f5910160405180910390a15050565b6000546001600160a01b031633146102655760405162461bcd60e51b81526004016101cf90610651565b61026f6000610577565b565b3360009081526003602052604090205460ff166102d05760405162461bcd60e51b815260206004820152601e60248201527f4f6e6c792041697264726f7020706f6f6c732063616e2072657175657374000060448201526064016101cf565b6001600160a01b0382166103185760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016101cf565b600081116103595760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a5908185b5bdd5b9d60921b60448201526064016101cf565b610361610417565b81111561039c5760405162461bcd60e51b81526020600482015260096024820152683e2062616c616e636560b81b60448201526064016101cf565b806001546103aa9190610686565b6001556002546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050505050565b60006001546a295be96e64066972000000610432919061069e565b905090565b6000546001600160a01b031633146104615760405162461bcd60e51b81526004016101cf90610651565b6001600160a01b0381166104c65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101cf565b6104cf81610577565b50565b6000546001600160a01b031633146104fc5760405162461bcd60e51b81526004016101cf90610651565b6002546001600160a01b0316156105555760405162461bcd60e51b815260206004820152601960248201527f43616e207265646566696e65207265776172644d696e7465720000000000000060448201526064016101cf565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156105d8578081fd5b81356105e3816106cb565b9392505050565b600080604083850312156105fc578081fd5b8235610607816106cb565b91506020830135801515811461061b578182fd5b809150509250929050565b60008060408385031215610638578182fd5b8235610643816106cb565b946020939093013593505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610699576106996106b5565b500190565b6000828210156106b0576106b06106b5565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146104cf57600080fdfea26469706673582212209ab8531ceae648285dd8b3147c119299f1f4c3104f0c16bfa91230cd38a36ca764736f6c63430008040033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in GLMR
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.