Source Code
Overview
S Balance
More Info
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Charity
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import {IGelatoChecker} from "../interfaces/IGelatoChecker.sol"; import {ICharity} from "../interfaces/ICharity.sol"; contract Charity is Ownable, ReentrancyGuard, IGelatoChecker, ICharity { /** state variables */ bool public canWithdrawFunds = true; Category public charityCategory; address public automationBot = address(0); address public immutable governorTimeLock; /** constants */ address public constant ETH_ADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); /** errors */ error Charity__InsufficientBalance(); error Charity__SendingFailed(); error Charity__WithdrawalDisabled(); error Charity__TokenAlreadyWhitelisted(); error Charity__TokenNotWhitelisted(); error Charity__MustBeAutomatedOrOwner(address caller); error Charity__OrganizationAlreadyExists(); error Charity__OrganizationNotFound(); error Charity__OnlyGovernor(); error Charity__GovernorCanNotBeZeroAddress(); /** * mappings */ mapping(address => bool) private whitelistedTokens; mapping(address => bool) private organizationExists; /** * arrays */ address[] private tokenList; address[] private organizations; enum Category { Education, Health, Environment, Animals, HumanRights, Poverty, Other } modifier onlyAutomationOrOwner() { if (msg.sender != automationBot && msg.sender != owner()) { revert Charity__MustBeAutomatedOrOwner(msg.sender); } _; } modifier onlyGovernor() { if (msg.sender != governorTimeLock) { revert Charity__OnlyGovernor(); } _; } /** events */ event DonationWithdrawn(address indexed organization, address indexed token, uint256 amount); event TokenWhitelisted(address token); event TokenRemoved(address token); event OrganizationAdded(address indexed organization); event OrganizationRemoved(address indexed organization); constructor(Category _category, address _newGovernorTimeLock) Ownable(msg.sender) { charityCategory = _category; governorTimeLock = _newGovernorTimeLock; if (_newGovernorTimeLock == address(0)) { revert Charity__GovernorCanNotBeZeroAddress(); } } /** * @dev Set the automation bot address. * @param _automation address of the automation bot */ function setAutomationBot(address _automation) external onlyOwner { automationBot = _automation; } /** * @dev Check if the contract can withdraw funds. */ function canWithdraw() external view returns (bool) { return canWithdrawFunds; } /** * @dev Set the status of the contract to withdraw funds. * @param status The status to set. */ function setCanWithdraw(bool status) external onlyOwner { canWithdrawFunds = status; } /** * @dev Adds a token to the whitelist. * @param token The address of the token to add. */ function addWhitelistedToken(address token) external onlyGovernor { if (whitelistedTokens[token]) { revert Charity__TokenAlreadyWhitelisted(); } whitelistedTokens[token] = true; tokenList.push(token); emit TokenWhitelisted(token); } /** * @dev Removes a token from the whitelist. * @param token The address of the token to remove. */ function removeWhitelistedToken(address token) external onlyGovernor { if (!whitelistedTokens[token]) { revert Charity__TokenNotWhitelisted(); } whitelistedTokens[token] = false; for (uint256 i = 0; i < tokenList.length; i++) { if (tokenList[i] == token) { tokenList[i] = tokenList[tokenList.length - 1]; tokenList.pop(); break; } } emit TokenRemoved(token); } /** * @dev Returns the list of whitelisted ERC-20 tokens. */ function getWhitelistedTokens() public view returns (address[] memory) { return tokenList; } /** * @dev Adds an organization to the list of organizations. * @param organization The address of the organization to add. */ function addOrganization(address organization) external onlyGovernor { if (organizationExists[organization]) { revert Charity__OrganizationAlreadyExists(); } organizationExists[organization] = true; organizations.push(organization); emit OrganizationAdded(organization); } /** * @dev Removes an organization from the list of organizations. * @param organization The address of the organization to remove. */ function removeOrganization(address organization) external onlyGovernor { if (!organizationExists[organization]) { revert Charity__OrganizationNotFound(); } organizationExists[organization] = false; uint256 length = organizations.length; for (uint256 i = 0; i < length; i++) { if (organizations[i] == organization) { organizations[i] = organizations[length - 1]; organizations.pop(); break; } } emit OrganizationRemoved(organization); } /** * @dev Returns the list of organizations. */ function getOrganizations() public view returns (address[] memory) { return organizations; } /** * Automates funds distribution to the organization. * @return canExec - whether the contract can execute the withdrawal * @return execPayload - the payload to execute the withdrawal */ function checker() external view returns (bool canExec, bytes memory execPayload) { uint256 orgCount = organizations.length; if (orgCount == 0) { return (false, abi.encode("No Organizations Available ")); } if (!canWithdrawFunds) { return (false, abi.encode("Withdrawals Disabled")); } uint256 ethBalance = address(this).balance; address[] memory tokens = tokenList; if (ethBalance > 0) { return ( true, abi.encodeCall( ICharity.withdrawToOrganization, (ETH_ADDRESS, ethBalance, organizations) ) ); } for (uint256 i = 0; i < tokens.length; i++) { uint256 tokenBalance = IERC20(tokens[i]).balanceOf(address(this)); if (tokenBalance > 0) { return ( true, abi.encodeCall( ICharity.withdrawToOrganization, (tokens[i], tokenBalance, organizations) ) ); } } return (false, abi.encode("No Funds Available")); } /** * @dev Check the balance of the contract. * @param token The address of the token to check the balance of. * @return The balance of the contract. */ function balanceOf(address token) external view returns (uint256) { return token == ETH_ADDRESS ? address(this).balance : IERC20(token).balanceOf(address(this)); } /** * @dev Withdraw the donation from the contract. * @param token The address of the token to withdraw. * @param amount The amount to withdraw. * @param orgs The list of organizations to withdraw to. */ function withdrawToOrganization( address token, uint256 amount, address[] memory orgs ) external onlyAutomationOrOwner nonReentrant { if (!canWithdrawFunds) { revert Charity__WithdrawalDisabled(); } uint256 orgCount = orgs.length; if (orgCount == 0) { revert Charity__OrganizationNotFound(); } uint256 share = amount / orgCount; for (uint256 i = 0; i < orgCount; i++) { if (token == ETH_ADDRESS) { (bool success, ) = orgs[i].call{value: share}(""); if (!success) { revert Charity__SendingFailed(); } } else { if (!whitelistedTokens[token]) { revert Charity__TokenNotWhitelisted(); } bool sendSuccess = IERC20(token).transfer(orgs[i], share); if (!sendSuccess) { revert Charity__SendingFailed(); } } emit DonationWithdrawn(orgs[i], token, share); } } /** * @dev Fallback function to receive ETH donations. */ receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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 (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @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); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at, * consider using {ReentrancyGuardTransient} instead. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.0; interface ICharity { function withdrawToOrganization( address token, uint256 amount, address[] memory organization ) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.0; interface IGelatoChecker { function checker() external view returns (bool canExec, bytes memory execPayload); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"enum Charity.Category","name":"_category","type":"uint8"},{"internalType":"address","name":"_newGovernorTimeLock","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Charity__GovernorCanNotBeZeroAddress","type":"error"},{"inputs":[],"name":"Charity__InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"Charity__MustBeAutomatedOrOwner","type":"error"},{"inputs":[],"name":"Charity__OnlyGovernor","type":"error"},{"inputs":[],"name":"Charity__OrganizationAlreadyExists","type":"error"},{"inputs":[],"name":"Charity__OrganizationNotFound","type":"error"},{"inputs":[],"name":"Charity__SendingFailed","type":"error"},{"inputs":[],"name":"Charity__TokenAlreadyWhitelisted","type":"error"},{"inputs":[],"name":"Charity__TokenNotWhitelisted","type":"error"},{"inputs":[],"name":"Charity__WithdrawalDisabled","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"organization","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DonationWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"organization","type":"address"}],"name":"OrganizationAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"organization","type":"address"}],"name":"OrganizationRemoved","type":"event"},{"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":"TokenRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"TokenWhitelisted","type":"event"},{"inputs":[],"name":"ETH_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"organization","type":"address"}],"name":"addOrganization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"addWhitelistedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"automationBot","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canWithdrawFunds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"charityCategory","outputs":[{"internalType":"enum Charity.Category","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checker","outputs":[{"internalType":"bool","name":"canExec","type":"bool"},{"internalType":"bytes","name":"execPayload","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOrganizations","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistedTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governorTimeLock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"organization","type":"address"}],"name":"removeOrganization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"removeWhitelistedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_automation","type":"address"}],"name":"setAutomationBot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setCanWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address[]","name":"orgs","type":"address[]"}],"name":"withdrawToOrganization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a06040526002805461ff01600160b01b031916600117905534801561002457600080fd5b5060405161177038038061177083398101604081905261004391610120565b338061006957604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b610072816100d0565b50600180556002805483919061ff0019166101008360068111156100985761009861016a565b02179055506001600160a01b03811660808190526100c95760405163bbd507a760e01b815260040160405180910390fd5b5050610180565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806040838503121561013357600080fd5b82516007811061014257600080fd5b60208401519092506001600160a01b038116811461015f57600080fd5b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b6080516115b96101b760003960008181610163015281816104320152818161062c015281816107450152610ff601526115b96000f3fe6080604052600436106101235760003560e01c80639754a3a8116100a0578063d68287df11610064578063d68287df14610360578063db36281714610380578063e26f7900146103a6578063f2fde38b146103bb578063f349736b146103db57600080fd5b80639754a3a8146102af578063a734f06e146102d1578063b51459fe146102f9578063b559d6231461031d578063cf5303cf1461033d57600080fd5b8063363cb34d116100e7578063363cb34d1461020e5780636ff2c6101461022e57806370a082311461024e578063715018a61461027c5780638da5cb5b1461029157600080fd5b80630c54c3921461012f5780631b1a200c146101515780631c88705d146101a257806326038e4d146101c2578063326e5540146101ee57600080fd5b3661012a57005b600080fd5b34801561013b57600080fd5b5061014f61014a36600461125b565b6103f5565b005b34801561015d57600080fd5b506101857f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101ae57600080fd5b5061014f6101bd36600461125b565b610427565b3480156101ce57600080fd5b506002546101e190610100900460ff1681565b604051610199919061127d565b3480156101fa57600080fd5b5061014f6102093660046112b3565b610606565b34801561021a57600080fd5b5061014f61022936600461125b565b610621565b34801561023a57600080fd5b5061014f61024936600461125b565b61073a565b34801561025a57600080fd5b5061026e61026936600461125b565b610910565b604051908152602001610199565b34801561028857600080fd5b5061014f6109ab565b34801561029d57600080fd5b506000546001600160a01b0316610185565b3480156102bb57600080fd5b506102c46109bf565b60405161019991906112d0565b3480156102dd57600080fd5b5061018573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561030557600080fd5b5060025460ff165b6040519015158152602001610199565b34801561032957600080fd5b5061014f610338366004611332565b610a21565b34801561034957600080fd5b50610352610d0c565b60405161019992919061141e565b34801561036c57600080fd5b5061014f61037b36600461125b565b610feb565b34801561038c57600080fd5b50600254610185906201000090046001600160a01b031681565b3480156103b257600080fd5b506102c46110fa565b3480156103c757600080fd5b5061014f6103d636600461125b565b61115a565b3480156103e757600080fd5b5060025461030d9060ff1681565b6103fd611198565b600280546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104705760405163573392e760e01b815260040160405180910390fd5b6001600160a01b03811660009081526003602052604090205460ff166104a957604051635074a10760e01b815260040160405180910390fd5b6001600160a01b0381166000908152600360205260408120805460ff191690555b6005548110156105c557816001600160a01b0316600582815481106104f1576104f1611475565b6000918252602090912001546001600160a01b0316036105bd576005805461051b9060019061148b565b8154811061052b5761052b611475565b600091825260209091200154600580546001600160a01b03909216918390811061055757610557611475565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506005805480610596576105966114ac565b600082815260209020810160001990810180546001600160a01b03191690550190556105c5565b6001016104ca565b506040516001600160a01b03821681527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd3906020015b60405180910390a150565b61060e611198565b6002805460ff1916911515919091179055565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461066a5760405163573392e760e01b815260040160405180910390fd5b6001600160a01b03811660009081526003602052604090205460ff16156106a4576040516314c0223760e21b815260040160405180910390fd5b6001600160a01b0381166000818152600360209081526040808320805460ff191660019081179091556005805491820181559093527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090920180546001600160a01b0319168417905590519182527f6a65f90b1a644d2faac467a21e07e50e3f8fa5846e26231d30ae79a417d3d26291016105fb565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107835760405163573392e760e01b815260040160405180910390fd5b6001600160a01b03811660009081526004602052604090205460ff166107bc576040516337b51e4d60e01b815260040160405180910390fd5b6001600160a01b0381166000908152600460205260408120805460ff19169055600654905b818110156108d757826001600160a01b03166006828154811061080657610806611475565b6000918252602090912001546001600160a01b0316036108cf57600661082d60018461148b565b8154811061083d5761083d611475565b600091825260209091200154600680546001600160a01b03909216918390811061086957610869611475565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060068054806108a8576108a86114ac565b600082815260209020810160001990810180546001600160a01b03191690550190556108d7565b6001016107e1565b506040516001600160a01b038316907fed5ec13b592dc90954aa49a121766af1b7ad6efcd03593524623dc93c35c6fa090600090a25050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146109a3576040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e91906114c2565b6109a5565b475b92915050565b6109b3611198565b6109bd60006111c5565b565b60606006805480602002602001604051908101604052809291908181526020018280548015610a1757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109f9575b5050505050905090565b6002546201000090046001600160a01b03163314801590610a4d57506000546001600160a01b03163314155b15610a725760405163051222cd60e31b81523360048201526024015b60405180910390fd5b610a7a611215565b60025460ff16610a9d57604051634a6e592d60e11b815260040160405180910390fd5b80516000819003610ac1576040516337b51e4d60e01b815260040160405180910390fd5b6000610acd82856114db565b905060005b82811015610cfb5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03871601610b92576000848281518110610b1357610b13611475565b60200260200101516001600160a01b03168360405160006040518083038185875af1925050503d8060008114610b65576040519150601f19603f3d011682016040523d82523d6000602084013e610b6a565b606091505b5050905080610b8c5760405163652b4abf60e01b815260040160405180910390fd5b50610c8d565b6001600160a01b03861660009081526003602052604090205460ff16610bcb57604051635074a10760e01b815260040160405180910390fd5b6000866001600160a01b031663a9059cbb868481518110610bee57610bee611475565b6020026020010151856040518363ffffffff1660e01b8152600401610c289291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af1158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b91906114fd565b905080610c8b5760405163652b4abf60e01b815260040160405180910390fd5b505b856001600160a01b0316848281518110610ca957610ca9611475565b60200260200101516001600160a01b03167fe3e1bb45702d421c77dbd83c3b9336df12afc7514af1960cadb24210b5fb316284604051610ceb91815260200190565b60405180910390a3600101610ad2565b505050610d0760018055565b505050565b600654600090606090808303610d77576000604051602001610d5f906020808252601b908201527f4e6f204f7267616e697a6174696f6e7320417661696c61626c65200000000000604082015260600190565b60405160208183030381529060405292509250509091565b60025460ff16610dbb576000604051602001610d5f9060208082526014908201527315da5d1a191c985dd85b1cc8111a5cd8589b195960621b604082015260600190565b600047905060006005805480602002602001604051908101604052809291908181526020018280548015610e1857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610dfa575b505050505090506000821115610e8a57600173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee836006604051602401610e549392919061151a565b60408051601f198184030181529190526020810180516001600160e01b031663b559d62360e01b17905290969095509350505050565b60005b8151811015610f98576000828281518110610eaa57610eaa611475565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1e91906114c2565b90508015610f8f576001838381518110610f3a57610f3a611475565b6020026020010151826006604051602401610f579392919061151a565b60408051601f198184030181529190526020810180516001600160e01b031663b559d62360e01b179052909890975095505050505050565b50600101610e8d565b506000604051602001610fd1906020808252601290820152714e6f2046756e647320417661696c61626c6560701b604082015260600190565b604051602081830303815290604052945094505050509091565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110345760405163573392e760e01b815260040160405180910390fd5b6001600160a01b03811660009081526004602052604090205460ff161561106e576040516301e9ba8360e01b815260040160405180910390fd5b6001600160a01b038116600081815260046020526040808220805460ff1916600190811790915560068054918201815583527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b03191684179055517ff84dfefd1424c476705a9a5ce3238cf6b203e946990646666c5bec8bc8043b2a9190a250565b60606005805480602002602001604051908101604052809291908181526020018280548015610a17576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109f9575050505050905090565b611162611198565b6001600160a01b03811661118c57604051631e4fbdf760e01b815260006004820152602401610a69565b611195816111c5565b50565b6000546001600160a01b031633146109bd5760405163118cdaa760e01b8152336004820152602401610a69565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60026001540361123857604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b80356001600160a01b038116811461125657600080fd5b919050565b60006020828403121561126d57600080fd5b6112768261123f565b9392505050565b602081016007831061129f57634e487b7160e01b600052602160045260246000fd5b91905290565b801515811461119557600080fd5b6000602082840312156112c557600080fd5b8135611276816112a5565b602080825282518282018190526000918401906040840190835b818110156113115783516001600160a01b03168352602093840193909201916001016112ea565b509095945050505050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561134757600080fd5b6113508461123f565b925060208401359150604084013567ffffffffffffffff81111561137357600080fd5b8401601f8101861361138457600080fd5b803567ffffffffffffffff81111561139e5761139e61131c565b8060051b604051601f19603f830116810181811067ffffffffffffffff821117156113cb576113cb61131c565b6040529182526020818401810192908101898411156113e957600080fd5b6020850194505b8385101561140f576114018561123f565b8152602094850194016113f0565b50809450505050509250925092565b8215158152604060208201526000825180604084015260005b818110156114545760208186018101516060868401015201611437565b506000606082850101526060601f19601f8301168401019150509392505050565b634e487b7160e01b600052603260045260246000fd5b818103818111156109a557634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000602082840312156114d457600080fd5b5051919050565b6000826114f857634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561150f57600080fd5b8151611276816112a5565b6001600160a01b0384168152602080820184905260606040830181905283549083018190526000848152918220906080840190835b818110156115765783546001600160a01b031683526001938401936020909301920161154f565b509097965050505050505056fea264697066735822122021c80eebd0c4b47b16dc2c34b6a3b75088bf908b5f31abeba8f5a2c5788a48e464736f6c634300081c00330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000447b8216eb90fd93ea0ce67cb60982c890cadd13
Deployed Bytecode
0x6080604052600436106101235760003560e01c80639754a3a8116100a0578063d68287df11610064578063d68287df14610360578063db36281714610380578063e26f7900146103a6578063f2fde38b146103bb578063f349736b146103db57600080fd5b80639754a3a8146102af578063a734f06e146102d1578063b51459fe146102f9578063b559d6231461031d578063cf5303cf1461033d57600080fd5b8063363cb34d116100e7578063363cb34d1461020e5780636ff2c6101461022e57806370a082311461024e578063715018a61461027c5780638da5cb5b1461029157600080fd5b80630c54c3921461012f5780631b1a200c146101515780631c88705d146101a257806326038e4d146101c2578063326e5540146101ee57600080fd5b3661012a57005b600080fd5b34801561013b57600080fd5b5061014f61014a36600461125b565b6103f5565b005b34801561015d57600080fd5b506101857f000000000000000000000000447b8216eb90fd93ea0ce67cb60982c890cadd1381565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101ae57600080fd5b5061014f6101bd36600461125b565b610427565b3480156101ce57600080fd5b506002546101e190610100900460ff1681565b604051610199919061127d565b3480156101fa57600080fd5b5061014f6102093660046112b3565b610606565b34801561021a57600080fd5b5061014f61022936600461125b565b610621565b34801561023a57600080fd5b5061014f61024936600461125b565b61073a565b34801561025a57600080fd5b5061026e61026936600461125b565b610910565b604051908152602001610199565b34801561028857600080fd5b5061014f6109ab565b34801561029d57600080fd5b506000546001600160a01b0316610185565b3480156102bb57600080fd5b506102c46109bf565b60405161019991906112d0565b3480156102dd57600080fd5b5061018573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561030557600080fd5b5060025460ff165b6040519015158152602001610199565b34801561032957600080fd5b5061014f610338366004611332565b610a21565b34801561034957600080fd5b50610352610d0c565b60405161019992919061141e565b34801561036c57600080fd5b5061014f61037b36600461125b565b610feb565b34801561038c57600080fd5b50600254610185906201000090046001600160a01b031681565b3480156103b257600080fd5b506102c46110fa565b3480156103c757600080fd5b5061014f6103d636600461125b565b61115a565b3480156103e757600080fd5b5060025461030d9060ff1681565b6103fd611198565b600280546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b336001600160a01b037f000000000000000000000000447b8216eb90fd93ea0ce67cb60982c890cadd1316146104705760405163573392e760e01b815260040160405180910390fd5b6001600160a01b03811660009081526003602052604090205460ff166104a957604051635074a10760e01b815260040160405180910390fd5b6001600160a01b0381166000908152600360205260408120805460ff191690555b6005548110156105c557816001600160a01b0316600582815481106104f1576104f1611475565b6000918252602090912001546001600160a01b0316036105bd576005805461051b9060019061148b565b8154811061052b5761052b611475565b600091825260209091200154600580546001600160a01b03909216918390811061055757610557611475565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506005805480610596576105966114ac565b600082815260209020810160001990810180546001600160a01b03191690550190556105c5565b6001016104ca565b506040516001600160a01b03821681527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd3906020015b60405180910390a150565b61060e611198565b6002805460ff1916911515919091179055565b336001600160a01b037f000000000000000000000000447b8216eb90fd93ea0ce67cb60982c890cadd13161461066a5760405163573392e760e01b815260040160405180910390fd5b6001600160a01b03811660009081526003602052604090205460ff16156106a4576040516314c0223760e21b815260040160405180910390fd5b6001600160a01b0381166000818152600360209081526040808320805460ff191660019081179091556005805491820181559093527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090920180546001600160a01b0319168417905590519182527f6a65f90b1a644d2faac467a21e07e50e3f8fa5846e26231d30ae79a417d3d26291016105fb565b336001600160a01b037f000000000000000000000000447b8216eb90fd93ea0ce67cb60982c890cadd1316146107835760405163573392e760e01b815260040160405180910390fd5b6001600160a01b03811660009081526004602052604090205460ff166107bc576040516337b51e4d60e01b815260040160405180910390fd5b6001600160a01b0381166000908152600460205260408120805460ff19169055600654905b818110156108d757826001600160a01b03166006828154811061080657610806611475565b6000918252602090912001546001600160a01b0316036108cf57600661082d60018461148b565b8154811061083d5761083d611475565b600091825260209091200154600680546001600160a01b03909216918390811061086957610869611475565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060068054806108a8576108a86114ac565b600082815260209020810160001990810180546001600160a01b03191690550190556108d7565b6001016107e1565b506040516001600160a01b038316907fed5ec13b592dc90954aa49a121766af1b7ad6efcd03593524623dc93c35c6fa090600090a25050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146109a3576040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e91906114c2565b6109a5565b475b92915050565b6109b3611198565b6109bd60006111c5565b565b60606006805480602002602001604051908101604052809291908181526020018280548015610a1757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109f9575b5050505050905090565b6002546201000090046001600160a01b03163314801590610a4d57506000546001600160a01b03163314155b15610a725760405163051222cd60e31b81523360048201526024015b60405180910390fd5b610a7a611215565b60025460ff16610a9d57604051634a6e592d60e11b815260040160405180910390fd5b80516000819003610ac1576040516337b51e4d60e01b815260040160405180910390fd5b6000610acd82856114db565b905060005b82811015610cfb5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03871601610b92576000848281518110610b1357610b13611475565b60200260200101516001600160a01b03168360405160006040518083038185875af1925050503d8060008114610b65576040519150601f19603f3d011682016040523d82523d6000602084013e610b6a565b606091505b5050905080610b8c5760405163652b4abf60e01b815260040160405180910390fd5b50610c8d565b6001600160a01b03861660009081526003602052604090205460ff16610bcb57604051635074a10760e01b815260040160405180910390fd5b6000866001600160a01b031663a9059cbb868481518110610bee57610bee611475565b6020026020010151856040518363ffffffff1660e01b8152600401610c289291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af1158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b91906114fd565b905080610c8b5760405163652b4abf60e01b815260040160405180910390fd5b505b856001600160a01b0316848281518110610ca957610ca9611475565b60200260200101516001600160a01b03167fe3e1bb45702d421c77dbd83c3b9336df12afc7514af1960cadb24210b5fb316284604051610ceb91815260200190565b60405180910390a3600101610ad2565b505050610d0760018055565b505050565b600654600090606090808303610d77576000604051602001610d5f906020808252601b908201527f4e6f204f7267616e697a6174696f6e7320417661696c61626c65200000000000604082015260600190565b60405160208183030381529060405292509250509091565b60025460ff16610dbb576000604051602001610d5f9060208082526014908201527315da5d1a191c985dd85b1cc8111a5cd8589b195960621b604082015260600190565b600047905060006005805480602002602001604051908101604052809291908181526020018280548015610e1857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610dfa575b505050505090506000821115610e8a57600173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee836006604051602401610e549392919061151a565b60408051601f198184030181529190526020810180516001600160e01b031663b559d62360e01b17905290969095509350505050565b60005b8151811015610f98576000828281518110610eaa57610eaa611475565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1e91906114c2565b90508015610f8f576001838381518110610f3a57610f3a611475565b6020026020010151826006604051602401610f579392919061151a565b60408051601f198184030181529190526020810180516001600160e01b031663b559d62360e01b179052909890975095505050505050565b50600101610e8d565b506000604051602001610fd1906020808252601290820152714e6f2046756e647320417661696c61626c6560701b604082015260600190565b604051602081830303815290604052945094505050509091565b336001600160a01b037f000000000000000000000000447b8216eb90fd93ea0ce67cb60982c890cadd1316146110345760405163573392e760e01b815260040160405180910390fd5b6001600160a01b03811660009081526004602052604090205460ff161561106e576040516301e9ba8360e01b815260040160405180910390fd5b6001600160a01b038116600081815260046020526040808220805460ff1916600190811790915560068054918201815583527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b03191684179055517ff84dfefd1424c476705a9a5ce3238cf6b203e946990646666c5bec8bc8043b2a9190a250565b60606005805480602002602001604051908101604052809291908181526020018280548015610a17576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109f9575050505050905090565b611162611198565b6001600160a01b03811661118c57604051631e4fbdf760e01b815260006004820152602401610a69565b611195816111c5565b50565b6000546001600160a01b031633146109bd5760405163118cdaa760e01b8152336004820152602401610a69565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60026001540361123857604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b80356001600160a01b038116811461125657600080fd5b919050565b60006020828403121561126d57600080fd5b6112768261123f565b9392505050565b602081016007831061129f57634e487b7160e01b600052602160045260246000fd5b91905290565b801515811461119557600080fd5b6000602082840312156112c557600080fd5b8135611276816112a5565b602080825282518282018190526000918401906040840190835b818110156113115783516001600160a01b03168352602093840193909201916001016112ea565b509095945050505050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561134757600080fd5b6113508461123f565b925060208401359150604084013567ffffffffffffffff81111561137357600080fd5b8401601f8101861361138457600080fd5b803567ffffffffffffffff81111561139e5761139e61131c565b8060051b604051601f19603f830116810181811067ffffffffffffffff821117156113cb576113cb61131c565b6040529182526020818401810192908101898411156113e957600080fd5b6020850194505b8385101561140f576114018561123f565b8152602094850194016113f0565b50809450505050509250925092565b8215158152604060208201526000825180604084015260005b818110156114545760208186018101516060868401015201611437565b506000606082850101526060601f19601f8301168401019150509392505050565b634e487b7160e01b600052603260045260246000fd5b818103818111156109a557634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000602082840312156114d457600080fd5b5051919050565b6000826114f857634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561150f57600080fd5b8151611276816112a5565b6001600160a01b0384168152602080820184905260606040830181905283549083018190526000848152918220906080840190835b818110156115765783546001600160a01b031683526001938401936020909301920161154f565b509097965050505050505056fea264697066735822122021c80eebd0c4b47b16dc2c34b6a3b75088bf908b5f31abeba8f5a2c5788a48e464736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000447b8216eb90fd93ea0ce67cb60982c890cadd13
-----Decoded View---------------
Arg [0] : _category (uint8): 0
Arg [1] : _newGovernorTimeLock (address): 0x447B8216Eb90FD93Ea0Ce67cb60982C890Cadd13
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 000000000000000000000000447b8216eb90fd93ea0ce67cb60982c890cadd13
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.