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); /** 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); /** * mappings */ mapping(address => bool) private whitelistedTokens; /** * arrays */ address[] private tokenList; enum Category { Education, Health, Environment, Animals, HumanRights, Poverty, Other } modifier onlyAutomationOrOwner() { if (msg.sender != automationBot && msg.sender != owner()) { revert Charity__MustBeAutomatedOrOwner(msg.sender); } _; } /** events */ event DonationWithdrawn(address indexed organization, address indexed token, uint256 amount); event TokenWhitelisted(address token); event TokenRemoved(address token); constructor(Category _category) Ownable(msg.sender) { charityCategory = _category; } /** * @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 onlyOwner { 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 onlyOwner { 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; } /** * 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) { address organization = owner(); uint256 ethBalance = address(this).balance; if (!canWithdrawFunds) { return (false, abi.encode("Withdrawals Disabled")); } if (ethBalance > 0) { return ( true, abi.encodeCall( ICharity.withdrawToOrganization, (ETH_ADDRESS, ethBalance, organization) ) ); } address[] memory tokens = getWhitelistedTokens(); 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, organization) ) ); } } 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) { if (token == ETH_ADDRESS) { return address(this).balance; } else { return 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 organization The address to send the funds to. */ function withdrawToOrganization( address token, uint256 amount, address organization ) external onlyAutomationOrOwner nonReentrant { if (!canWithdrawFunds) { revert Charity__WithdrawalDisabled(); } if (token == ETH_ADDRESS) { if (address(this).balance < amount) { revert Charity__SendingFailed(); } (bool success, ) = organization.call{value: amount}(""); if (!success) { revert Charity__SendingFailed(); } } else { if (!whitelistedTokens[token]) { revert Charity__TokenNotWhitelisted(); } bool sendSuccess = IERC20(token).transfer(organization, amount); if (!sendSuccess) { revert Charity__SendingFailed(); } } emit DonationWithdrawn(organization, token, amount); } /** * @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 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": {} }
[{"inputs":[{"internalType":"enum Charity.Category","name":"_category","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Charity__InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"Charity__MustBeAutomatedOrOwner","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":"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":"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":"getWhitelistedTokens","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":"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":"organization","type":"address"}],"name":"withdrawToOrganization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040526002805461ff01600160b01b031916600117905534801561002457600080fd5b5060405161103a38038061103a833981016040819052610043916100f3565b338061006957604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b610072816100a3565b50600180556002805482919061ff0019166101008360068111156100985761009861011b565b021790555050610131565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561010557600080fd5b81516007811061011457600080fd5b9392505050565b634e487b7160e01b600052602160045260246000fd5b610efa806101406000396000f3fe6080604052600436106100f75760003560e01c80638da5cb5b1161008a578063db36281711610059578063db362817146102be578063e26f7900146102e4578063f2fde38b14610306578063f349736b1461032657600080fd5b80638da5cb5b1461021d578063a734f06e1461024f578063b51459fe14610277578063cf5303cf1461029b57600080fd5b8063363cb34d116100c6578063363cb34d1461019a578063496d9a0c146101ba57806370a08231146101da578063715018a61461020857600080fd5b80630c54c392146101035780631c88705d1461012557806326038e4d14610145578063326e55401461017a57600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b5061012361011e366004610ced565b610340565b005b34801561013157600080fd5b50610123610140366004610ced565b610372565b34801561015157600080fd5b5060025461016490610100900460ff1681565b6040516101719190610d0f565b60405180910390f35b34801561018657600080fd5b50610123610195366004610d45565b610510565b3480156101a657600080fd5b506101236101b5366004610ced565b61052b565b3480156101c657600080fd5b506101236101d5366004610d62565b610603565b3480156101e657600080fd5b506101fa6101f5366004610ced565b61086c565b604051908152602001610171565b34801561021457600080fd5b5061012361090d565b34801561022957600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610171565b34801561025b57600080fd5b5061023773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561028357600080fd5b5060025460ff165b6040519015158152602001610171565b3480156102a757600080fd5b506102b0610921565b604051610171929190610d9e565b3480156102ca57600080fd5b50600254610237906201000090046001600160a01b031681565b3480156102f057600080fd5b506102f9610b8f565b6040516101719190610df5565b34801561031257600080fd5b50610123610321366004610ced565b610bf1565b34801561033257600080fd5b5060025461028b9060ff1681565b610348610c2f565b600280546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b61037a610c2f565b6001600160a01b03811660009081526003602052604090205460ff166103b357604051635074a10760e01b815260040160405180910390fd5b6001600160a01b0381166000908152600360205260408120805460ff191690555b6004548110156104cf57816001600160a01b0316600482815481106103fb576103fb610e41565b6000918252602090912001546001600160a01b0316036104c7576004805461042590600190610e57565b8154811061043557610435610e41565b600091825260209091200154600480546001600160a01b03909216918390811061046157610461610e41565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060048054806104a0576104a0610e78565b600082815260209020810160001990810180546001600160a01b03191690550190556104cf565b6001016103d4565b506040516001600160a01b03821681527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd3906020015b60405180910390a150565b610518610c2f565b6002805460ff1916911515919091179055565b610533610c2f565b6001600160a01b03811660009081526003602052604090205460ff161561056d576040516314c0223760e21b815260040160405180910390fd5b6001600160a01b0381166000818152600360209081526040808320805460ff191660019081179091556004805491820181559093527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90920180546001600160a01b0319168417905590519182527f6a65f90b1a644d2faac467a21e07e50e3f8fa5846e26231d30ae79a417d3d2629101610505565b6002546201000090046001600160a01b0316331480159061062f57506000546001600160a01b03163314155b156106545760405163051222cd60e31b81523360048201526024015b60405180910390fd5b61065c610c5c565b60025460ff1661067f57604051634a6e592d60e11b815260040160405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b0384160161073f57814710156106c55760405163652b4abf60e01b815260040160405180910390fd5b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610712576040519150601f19603f3d011682016040523d82523d6000602084013e610717565b606091505b50509050806107395760405163652b4abf60e01b815260040160405180910390fd5b50610811565b6001600160a01b03831660009081526003602052604090205460ff1661077857604051635074a10760e01b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038281166004830152602482018490526000919085169063a9059cbb906044016020604051808303816000875af11580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef9190610e8e565b90508061080f5760405163652b4abf60e01b815260040160405180910390fd5b505b826001600160a01b0316816001600160a01b03167fe3e1bb45702d421c77dbd83c3b9336df12afc7514af1960cadb24210b5fb31628460405161085691815260200190565b60405180910390a361086760018055565b505050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b0383160161089a575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156108de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109029190610eab565b92915050565b919050565b610915610c2f565b61091f6000610c86565b565b6000606060006109396000546001600160a01b031690565b600254909150479060ff1661099b5760006040516020016109829060208082526014908201527315da5d1a191c985dd85b1cc8111a5cd8589b195960621b604082015260600190565b6040516020818303038152906040529350935050509091565b8015610a0f5760405173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6024820152604481018290526001600160a01b038316606482015260019060840160408051601f198184030181529190526020810180516001600160e01b031663125b668360e21b179052909590945092505050565b6000610a19610b8f565b905060005b8151811015610b3c576000828281518110610a3b57610a3b610e41565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610a8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaf9190610eab565b90508015610b33576001838381518110610acb57610acb610e41565b60209081029190910101516040516001600160a01b03918216602482015260448101849052908716606482015260840160408051601f198184030181529190526020810180516001600160e01b031663125b668360e21b179052909890975095505050505050565b50600101610a1e565b506000604051602001610b75906020808252601290820152714e6f2046756e647320417661696c61626c6560701b604082015260600190565b604051602081830303815290604052945094505050509091565b60606004805480602002602001604051908101604052809291908181526020018280548015610be757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bc9575b5050505050905090565b610bf9610c2f565b6001600160a01b038116610c2357604051631e4fbdf760e01b81526000600482015260240161064b565b610c2c81610c86565b50565b6000546001600160a01b0316331461091f5760405163118cdaa760e01b815233600482015260240161064b565b600260015403610c7f57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461090857600080fd5b600060208284031215610cff57600080fd5b610d0882610cd6565b9392505050565b6020810160078310610d3157634e487b7160e01b600052602160045260246000fd5b91905290565b8015158114610c2c57600080fd5b600060208284031215610d5757600080fd5b8135610d0881610d37565b600080600060608486031215610d7757600080fd5b610d8084610cd6565b925060208401359150610d9560408501610cd6565b90509250925092565b8215158152604060208201526000825180604084015260005b81811015610dd45760208186018101516060868401015201610db7565b506000606082850101526060601f19601f8301168401019150509392505050565b602080825282518282018190526000918401906040840190835b81811015610e365783516001600160a01b0316835260209384019390920191600101610e0f565b509095945050505050565b634e487b7160e01b600052603260045260246000fd5b8181038181111561090257634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b600060208284031215610ea057600080fd5b8151610d0881610d37565b600060208284031215610ebd57600080fd5b505191905056fea2646970667358221220b46fd5065dc4c06ae307ab1942c6a62d9340639d08509a1572d91b6663b8cff864736f6c634300081c00330000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106100f75760003560e01c80638da5cb5b1161008a578063db36281711610059578063db362817146102be578063e26f7900146102e4578063f2fde38b14610306578063f349736b1461032657600080fd5b80638da5cb5b1461021d578063a734f06e1461024f578063b51459fe14610277578063cf5303cf1461029b57600080fd5b8063363cb34d116100c6578063363cb34d1461019a578063496d9a0c146101ba57806370a08231146101da578063715018a61461020857600080fd5b80630c54c392146101035780631c88705d1461012557806326038e4d14610145578063326e55401461017a57600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b5061012361011e366004610ced565b610340565b005b34801561013157600080fd5b50610123610140366004610ced565b610372565b34801561015157600080fd5b5060025461016490610100900460ff1681565b6040516101719190610d0f565b60405180910390f35b34801561018657600080fd5b50610123610195366004610d45565b610510565b3480156101a657600080fd5b506101236101b5366004610ced565b61052b565b3480156101c657600080fd5b506101236101d5366004610d62565b610603565b3480156101e657600080fd5b506101fa6101f5366004610ced565b61086c565b604051908152602001610171565b34801561021457600080fd5b5061012361090d565b34801561022957600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610171565b34801561025b57600080fd5b5061023773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561028357600080fd5b5060025460ff165b6040519015158152602001610171565b3480156102a757600080fd5b506102b0610921565b604051610171929190610d9e565b3480156102ca57600080fd5b50600254610237906201000090046001600160a01b031681565b3480156102f057600080fd5b506102f9610b8f565b6040516101719190610df5565b34801561031257600080fd5b50610123610321366004610ced565b610bf1565b34801561033257600080fd5b5060025461028b9060ff1681565b610348610c2f565b600280546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b61037a610c2f565b6001600160a01b03811660009081526003602052604090205460ff166103b357604051635074a10760e01b815260040160405180910390fd5b6001600160a01b0381166000908152600360205260408120805460ff191690555b6004548110156104cf57816001600160a01b0316600482815481106103fb576103fb610e41565b6000918252602090912001546001600160a01b0316036104c7576004805461042590600190610e57565b8154811061043557610435610e41565b600091825260209091200154600480546001600160a01b03909216918390811061046157610461610e41565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060048054806104a0576104a0610e78565b600082815260209020810160001990810180546001600160a01b03191690550190556104cf565b6001016103d4565b506040516001600160a01b03821681527f4c910b69fe65a61f7531b9c5042b2329ca7179c77290aa7e2eb3afa3c8511fd3906020015b60405180910390a150565b610518610c2f565b6002805460ff1916911515919091179055565b610533610c2f565b6001600160a01b03811660009081526003602052604090205460ff161561056d576040516314c0223760e21b815260040160405180910390fd5b6001600160a01b0381166000818152600360209081526040808320805460ff191660019081179091556004805491820181559093527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90920180546001600160a01b0319168417905590519182527f6a65f90b1a644d2faac467a21e07e50e3f8fa5846e26231d30ae79a417d3d2629101610505565b6002546201000090046001600160a01b0316331480159061062f57506000546001600160a01b03163314155b156106545760405163051222cd60e31b81523360048201526024015b60405180910390fd5b61065c610c5c565b60025460ff1661067f57604051634a6e592d60e11b815260040160405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b0384160161073f57814710156106c55760405163652b4abf60e01b815260040160405180910390fd5b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610712576040519150601f19603f3d011682016040523d82523d6000602084013e610717565b606091505b50509050806107395760405163652b4abf60e01b815260040160405180910390fd5b50610811565b6001600160a01b03831660009081526003602052604090205460ff1661077857604051635074a10760e01b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b038281166004830152602482018490526000919085169063a9059cbb906044016020604051808303816000875af11580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef9190610e8e565b90508061080f5760405163652b4abf60e01b815260040160405180910390fd5b505b826001600160a01b0316816001600160a01b03167fe3e1bb45702d421c77dbd83c3b9336df12afc7514af1960cadb24210b5fb31628460405161085691815260200190565b60405180910390a361086760018055565b505050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b0383160161089a575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156108de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109029190610eab565b92915050565b919050565b610915610c2f565b61091f6000610c86565b565b6000606060006109396000546001600160a01b031690565b600254909150479060ff1661099b5760006040516020016109829060208082526014908201527315da5d1a191c985dd85b1cc8111a5cd8589b195960621b604082015260600190565b6040516020818303038152906040529350935050509091565b8015610a0f5760405173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6024820152604481018290526001600160a01b038316606482015260019060840160408051601f198184030181529190526020810180516001600160e01b031663125b668360e21b179052909590945092505050565b6000610a19610b8f565b905060005b8151811015610b3c576000828281518110610a3b57610a3b610e41565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610a8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaf9190610eab565b90508015610b33576001838381518110610acb57610acb610e41565b60209081029190910101516040516001600160a01b03918216602482015260448101849052908716606482015260840160408051601f198184030181529190526020810180516001600160e01b031663125b668360e21b179052909890975095505050505050565b50600101610a1e565b506000604051602001610b75906020808252601290820152714e6f2046756e647320417661696c61626c6560701b604082015260600190565b604051602081830303815290604052945094505050509091565b60606004805480602002602001604051908101604052809291908181526020018280548015610be757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bc9575b5050505050905090565b610bf9610c2f565b6001600160a01b038116610c2357604051631e4fbdf760e01b81526000600482015260240161064b565b610c2c81610c86565b50565b6000546001600160a01b0316331461091f5760405163118cdaa760e01b815233600482015260240161064b565b600260015403610c7f57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461090857600080fd5b600060208284031215610cff57600080fd5b610d0882610cd6565b9392505050565b6020810160078310610d3157634e487b7160e01b600052602160045260246000fd5b91905290565b8015158114610c2c57600080fd5b600060208284031215610d5757600080fd5b8135610d0881610d37565b600080600060608486031215610d7757600080fd5b610d8084610cd6565b925060208401359150610d9560408501610cd6565b90509250925092565b8215158152604060208201526000825180604084015260005b81811015610dd45760208186018101516060868401015201610db7565b506000606082850101526060601f19601f8301168401019150509392505050565b602080825282518282018190526000918401906040840190835b81811015610e365783516001600160a01b0316835260209384019390920191600101610e0f565b509095945050505050565b634e487b7160e01b600052603260045260246000fd5b8181038181111561090257634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b600060208284031215610ea057600080fd5b8151610d0881610d37565b600060208284031215610ebd57600080fd5b505191905056fea2646970667358221220b46fd5065dc4c06ae307ab1942c6a62d9340639d08509a1572d91b6663b8cff864736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _category (uint8): 0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
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.