Source Code
Latest 25 from a total of 29 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Claim Dividends | 16180179 | 1090 days ago | IN | 0 ETH | 0.00153482 | ||||
| Claim Dividends | 16070267 | 1105 days ago | IN | 0 ETH | 0.00131296 | ||||
| Claim Dividends | 16056867 | 1107 days ago | IN | 0 ETH | 0.00105425 | ||||
| Claim Dividends | 15835613 | 1138 days ago | IN | 0 ETH | 0.00124895 | ||||
| Claim Dividends | 15832680 | 1138 days ago | IN | 0 ETH | 0.00247331 | ||||
| Claim Dividends | 15832658 | 1138 days ago | IN | 0 ETH | 0.00231551 | ||||
| Claim Shares | 15568745 | 1175 days ago | IN | 0 ETH | 0.00091784 | ||||
| Claim Shares | 15568538 | 1175 days ago | IN | 0 ETH | 0.00066304 | ||||
| Claim Dividends | 15406858 | 1201 days ago | IN | 0 ETH | 0.0011868 | ||||
| Claim Dividends | 15377462 | 1205 days ago | IN | 0 ETH | 0.00064364 | ||||
| Claim Dividends | 15213926 | 1231 days ago | IN | 0 ETH | 0.00203599 | ||||
| Claim Shares | 15132933 | 1244 days ago | IN | 0 ETH | 0.00175877 | ||||
| Claim Dividends | 14984243 | 1269 days ago | IN | 0 ETH | 0.00276345 | ||||
| Grant Role | 14829319 | 1294 days ago | IN | 0 ETH | 0.00097607 | ||||
| Grant Role | 14829311 | 1294 days ago | IN | 0 ETH | 0.00105483 | ||||
| Grant Role | 14823038 | 1295 days ago | IN | 0 ETH | 0.00056955 | ||||
| Grant Role | 14716735 | 1312 days ago | IN | 0 ETH | 0.00151319 | ||||
| Grant Role | 14557136 | 1338 days ago | IN | 0 ETH | 0.00114257 | ||||
| Set Shares Distr... | 14557126 | 1338 days ago | IN | 0 ETH | 0.0004329 | ||||
| Grant Role | 14557093 | 1338 days ago | IN | 0 ETH | 0.00062576 | ||||
| Grant Role | 14550816 | 1338 days ago | IN | 0 ETH | 0.00089435 | ||||
| Grant Role | 14550694 | 1339 days ago | IN | 0 ETH | 0.00072591 | ||||
| Grant Role | 14550649 | 1339 days ago | IN | 0 ETH | 0.00146284 | ||||
| Set Shares Distr... | 14550620 | 1339 days ago | IN | 0 ETH | 0.00106437 | ||||
| Set Dividends Di... | 14550615 | 1339 days ago | IN | 0 ETH | 0.00131555 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ShibaCardsBank
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "./abstracts/ShibaCardsAccessible.sol";
import "./abstracts/ShibaCardsSharesDistributable.sol";
import "./abstracts/ShibaCardsDividendsDistributable.sol";
import "./abstracts/ShibaCardsWithdrawable.sol";
import "./interfaces/IBank.sol";
import "./interfaces/IDistributer.sol";
contract ShibaCardsBank is
IBank,
ShibaCardsAccessible,
ShibaCardsDividendsDistributable,
ShibaCardsSharesDistributable,
ShibaCardsWithdrawable
{
using SafeMath for uint256;
ERC20Burnable public erc20;
uint256 public constant BURN = 5;
uint256 public constant DISTRIBUTE = 20;
uint256 public constant TRANSFER_FEES = 7;
uint256 public constant TRANSFER_DISTRIBUTION = 2;
uint256 public constant TRANSFER_BURN = 1;
function setERC20(ERC20Burnable _erc20) public onlyAdmin {
erc20 = _erc20;
}
modifier requireERC20() {
require(address(erc20) != address(0), "No ERC20 defined.");
_;
}
/**
* @dev Pay in ERC20, burn 5%
*/
function makePayment(address from, uint256 amount)
public
override
requireERC20
onlyWhitelisted
{
SafeERC20.safeTransferFrom(erc20, from, address(this), amount);
_burn(amount.div(100).mul(BURN));
}
/**
* @dev Transfer in ERC20, burn 5%
*/
function transfer(
address from,
address to,
uint256 amount
) public override requireERC20 onlyWhitelisted {
uint256 burn = amount.div(100).mul(TRANSFER_BURN);
uint256 fees = amount.div(100).mul(TRANSFER_FEES);
uint256 distribution = amount.div(100).mul(TRANSFER_DISTRIBUTION);
SafeERC20.safeTransferFrom(erc20, from, address(this), burn.add(fees).add(distribution));
SafeERC20.safeTransferFrom(erc20, from, to, amount.sub(burn).sub(fees).sub(distribution));
sharesDistributer.distribute(fees);
dividendsDistributer.distribute(distribution);
_burn(burn);
}
function _burn(uint256 amount) internal {
erc20.burn(amount);
emit ERC20Burned(amount);
}
/**
* @dev Send ERC20
*/
function _send(address to, uint256 amount) internal requireERC20 {
SafeERC20.safeTransfer(erc20, to, amount);
}
function distribute(uint256 amount)
public
override
onlyWhitelisted
{
require(amount > 0, "Amount must be greater than 0.");
uint256 total = 100;
dividendsDistributer.distribute(amount.div(100).mul(DISTRIBUTE));
sharesDistributer.distribute(amount.div(100).mul(total.sub(DISTRIBUTE).sub(BURN)));
}
/**
* @dev Withdraw collaborator shares
*/
function claimShares() external override {
uint256 shares = sharesDistributer.prepareClaim(_msgSender());
require(shares > 0, "No shares");
_send(_msgSender(), shares);
emit SharesClaimed(_msgSender(), shares);
}
/**
* @dev Claim your dividends
*/
function claimDividends() external override {
uint256 shares = dividendsDistributer.prepareClaim(_msgSender());
require(shares > 0, "No shares");
_send(_msgSender(), shares);
emit DividendsClaimed(_msgSender(), shares);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IDistributer.sol";
interface ISharesDistributer is IDistributer {
/**
* @dev Move shares from one to another
*/
function moveShares(
address from,
address to,
uint256 shares
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IDistributer.sol";
interface IDividendsDistributer is IDistributer {
event SharesAdded(address to, uint256 shares);
event SharesTransferred(address from, address to, uint256 shares);
event SharesRemoved(address from, uint256 shares);
/**
* @dev Add shares to wallet
*/
function addShares(address to, uint256 shares) external;
/**
* @dev Remove shares from wallet
*/
function removeShares(address from, uint256 shares) external;
/**
* @dev Move shares from one to another
*/
function transferShares(
address from,
address to,
uint256 shares
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IDistributer {
/**
* @dev Distribute money
*/
function distribute(uint256 amount) external;
/**
* @dev Display claimable amount
*/
function claimable() external view returns (uint256);
/**
* @dev Prepares claiming
*/
function prepareClaim(address account) external returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBank {
event SharesClaimed(address account, uint256 amount);
event DividendsClaimed(address account, uint256 amount);
event ERC20Burned(uint256 amount);
/**
* @dev Make payment
*/
function makePayment(address from, uint256 amount) external;
/**
* @dev Distribute Shares
*/
function distribute(uint256 amount) external;
/**
* @dev Transfer ERC20
*/
function transfer(
address from,
address to,
uint256 amount
) external;
/**
* @dev Claim your shares
*/
function claimShares() external;
/**
* @dev Claim your dividends
*/
function claimDividends() external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./ShibaCardsAccessible.sol";
abstract contract ShibaCardsWithdrawable is ShibaCardsAccessible {
function withdrawERC20(address token) public onlyAdmin {
SafeERC20.safeTransferFrom(IERC20(token), address(this), _msgSender(), IERC20(token).balanceOf(address(this)));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ShibaCardsAccessible.sol";
import "../interfaces/ISharesDistributer.sol";
import "../interfaces/IDividendsDistributer.sol";
abstract contract ShibaCardsSharesDistributable is ShibaCardsAccessible {
ISharesDistributer public sharesDistributer;
function setSharesDistributer(address distributer)
public
onlyAdmin
{
sharesDistributer = ISharesDistributer(distributer);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ShibaCardsAccessible.sol";
import "../interfaces/ISharesDistributer.sol";
import "../interfaces/IDividendsDistributer.sol";
abstract contract ShibaCardsDividendsDistributable is ShibaCardsAccessible {
IDividendsDistributer public dividendsDistributer;
function setDividendsDistributer(address distributer)
public
onlyAdmin
{
dividendsDistributer = IDividendsDistributer(distributer);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
abstract contract ShibaCardsAccessible is AccessControl {
address private _owner;
bytes32 public constant WHITELISTED = keccak256("WHITELISTED");
constructor() {
_setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
_owner = _msgSender();
}
/**
* @dev Returns the address of the current owner. Required to identify as the owner of the contract on some platforms like Opensea.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @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 onlyAdmin {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_owner = _msgSender();
}
/// @dev Restricted to members of the whitelisted or admin role.
modifier onlyWhitelistedOrAdmin() {
require(
isWhitelisted(_msgSender()) || isAdmin(_msgSender()),
"Restricted to whitelisted or admin"
);
_;
}
/// @dev Restricted to members of the whitelisted role.
modifier onlyWhitelisted() {
require(isWhitelisted(_msgSender()), "Restricted to whitelisted.");
_;
}
/// @dev Return `true` if the account belongs to the whitelisted role.
function isWhitelisted(address account) public view virtual returns (bool) {
return hasRole(WHITELISTED, account);
}
/// @dev Restricted to members of the admin role.
modifier onlyAdmin() {
require(isAdmin(_msgSender()), "Restricted to admins.");
_;
}
/// @dev Return `true` if the account belongs to the admin role.
function isAdmin(address account) public view virtual returns (bool) {
return hasRole(DEFAULT_ADMIN_ROLE, account);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)
pragma solidity ^0.8.0;
import "../ERC20.sol";
import "../../../utils/Context.sol";
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)
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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, _allowances[owner][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = _allowances[owner][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_balances[to] += amount;
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Spend `amount` form the allowance of `owner` toward `spender`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}{
"remappings": [],
"optimizer": {
"enabled": false,
"runs": 200
},
"evmVersion": "london",
"libraries": {},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DividendsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Burned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SharesClaimed","type":"event"},{"inputs":[],"name":"BURN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISTRIBUTE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_BURN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_DISTRIBUTION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_FEES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELISTED","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dividendsDistributer","outputs":[{"internalType":"contract IDividendsDistributer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20","outputs":[{"internalType":"contract ERC20Burnable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"makePayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"distributer","type":"address"}],"name":"setDividendsDistributer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20Burnable","name":"_erc20","type":"address"}],"name":"setERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"distributer","type":"address"}],"name":"setSharesDistributer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sharesDistributer","outputs":[{"internalType":"contract ISharesDistributer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","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"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b50620000366000801b6200002a6200008c60201b60201c565b6200009460201b60201c565b620000466200008c60201b60201c565b600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000205565b600033905090565b620000a68282620000aa60201b60201c565b5050565b620000bc82826200019b60201b60201c565b6200019757600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200013c6200008c60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b612eff80620002156000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063785e9e8611610104578063beabacc8116100a2578063f2fde38b11610071578063f2fde38b146104e4578063f4f3b20014610500578063f98cf07c1461051c578063faef989f14610538576101cf565b8063beabacc814610472578063c0a2526c1461048e578063c29a6fda146104ac578063d547741f146104c8576101cf565b806391c05b0b116100de57806391c05b0b146103ea57806391d1485414610406578063982c65cd14610436578063a217fddf14610454576101cf565b8063785e9e861461039057806380fef5af146103ae5780638da5cb5b146103cc576101cf565b806336568abe11610171578063593d8e431161014b578063593d8e4314610340578063649224921461034a578063668038e014610368578063708f1e3314610372576101cf565b806336568abe146102d657806339fb549c146102f25780633af32abf14610310576101cf565b8063248a9ca3116101ad578063248a9ca31461023e57806324d7806c1461026e57806328899d211461029e5780632f2ff15d146102ba576101cf565b806301ffc9a7146101d45780630b71f1161461020457806321c9737d14610222575b600080fd5b6101ee60048036038101906101e991906121b8565b610556565b6040516101fb9190612603565b60405180910390f35b61020c6105d0565b604051610219919061261e565b60405180910390f35b61023c6004803603810190610237919061205e565b6105f4565b005b6102586004803603810190610253919061214b565b610687565b604051610265919061261e565b60405180910390f35b6102886004803603810190610283919061205e565b6106a6565b6040516102959190612603565b60405180910390f35b6102b860048036038101906102b3919061205e565b6106bc565b005b6102d460048036038101906102cf9190612178565b61074f565b005b6102f060048036038101906102eb9190612178565b610778565b005b6102fa6107fb565b604051610307919061280c565b60405180910390f35b61032a6004803603810190610325919061205e565b610800565b6040516103379190612603565b60405180910390f35b610348610833565b005b610352610982565b60405161035f919061280c565b60405180910390f35b610370610987565b005b61037a610ad6565b6040516103879190612654565b60405180910390f35b610398610afc565b6040516103a59190612639565b60405180910390f35b6103b6610b22565b6040516103c3919061280c565b60405180910390f35b6103d4610b27565b6040516103e19190612588565b60405180910390f35b61040460048036038101906103ff9190612212565b610b51565b005b610420600480360381019061041b9190612178565b610d78565b60405161042d9190612603565b60405180910390f35b61043e610de2565b60405161044b919061280c565b60405180910390f35b61045c610de7565b604051610469919061261e565b60405180910390f35b61048c6004803603810190610487919061208b565b610dee565b005b610496611131565b6040516104a3919061280c565b60405180910390f35b6104c660048036038101906104c191906121e5565b611136565b005b6104e260048036038101906104dd9190612178565b6111c9565b005b6104fe60048036038101906104f9919061205e565b6111f2565b005b61051a6004803603810190610515919061205e565b6112fc565b005b610536600480360381019061053191906120de565b6113e9565b005b61054061152b565b60405161054d919061266f565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105c957506105c882611551565b5b9050919050565b7fe799c73ff785ac053943f5d98452f7fa0bcf54da67826fc217d6094dec75c5ee81565b6106046105ff6115bb565b6106a6565b610643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063a9061278c565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806000838152602001908152602001600020600101549050919050565b60006106b56000801b83610d78565b9050919050565b6106cc6106c76115bb565b6106a6565b61070b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107029061278c565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61075882610687565b610769816107646115bb565b6115c3565b6107738383611660565b505050565b6107806115bb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e4906127ec565b60405180910390fd5b6107f78282611740565b5050565b600181565b600061082c7fe799c73ff785ac053943f5d98452f7fa0bcf54da67826fc217d6094dec75c5ee83610d78565b9050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635493af1a61087b6115bb565b6040518263ffffffff1660e01b81526004016108979190612588565b602060405180830381600087803b1580156108b157600080fd5b505af11580156108c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e9919061223f565b90506000811161092e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109259061272c565b60405180910390fd5b61093f6109396115bb565b82611821565b7f649fde579b8ba49bd4fbcb330614cb075b8d53c352c5adc49161b6f654e400a26109686115bb565b826040516109779291906125da565b60405180910390a150565b600281565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635493af1a6109cf6115bb565b6040518263ffffffff1660e01b81526004016109eb9190612588565b602060405180830381600087803b158015610a0557600080fd5b505af1158015610a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3d919061223f565b905060008111610a82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a799061272c565b60405180910390fd5b610a93610a8d6115bb565b82611821565b7f16b8533c95f66ab8c192c98ddcf5031bcb3ee6f4022988bdadd57d3422da3073610abc6115bb565b82604051610acb9291906125da565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610b61610b5c6115bb565b610800565b610ba0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b979061276c565b60405180910390fd5b60008111610be3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bda906126cc565b60405180910390fd5b600060649050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391c05b0b610c4e6014610c406064876118e490919063ffffffff16565b6118fa90919063ffffffff16565b6040518263ffffffff1660e01b8152600401610c6a919061280c565b600060405180830381600087803b158015610c8457600080fd5b505af1158015610c98573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391c05b0b610d26610d046005610cf660148761191090919063ffffffff16565b61191090919063ffffffff16565b610d186064876118e490919063ffffffff16565b6118fa90919063ffffffff16565b6040518263ffffffff1660e01b8152600401610d42919061280c565b600060405180830381600087803b158015610d5c57600080fd5b505af1158015610d70573d6000803e3d6000fd5b505050505050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600781565b6000801b81565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610e80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e779061270c565b60405180910390fd5b610e90610e8b6115bb565b610800565b610ecf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec69061276c565b60405180910390fd5b6000610ef86001610eea6064856118e490919063ffffffff16565b6118fa90919063ffffffff16565b90506000610f236007610f156064866118e490919063ffffffff16565b6118fa90919063ffffffff16565b90506000610f4e6002610f406064876118e490919063ffffffff16565b6118fa90919063ffffffff16565b9050610fa2600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168730610f9d85610f8f888a61192690919063ffffffff16565b61192690919063ffffffff16565b61193c565b611006600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878761100185610ff388610fe58b8d61191090919063ffffffff16565b61191090919063ffffffff16565b61191090919063ffffffff16565b61193c565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391c05b0b836040518263ffffffff1660e01b8152600401611061919061280c565b600060405180830381600087803b15801561107b57600080fd5b505af115801561108f573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391c05b0b826040518263ffffffff1660e01b81526004016110ee919061280c565b600060405180830381600087803b15801561110857600080fd5b505af115801561111c573d6000803e3d6000fd5b50505050611129836119c5565b505050505050565b600581565b6111466111416115bb565b6106a6565b611185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117c9061278c565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6111d282610687565b6111e3816111de6115bb565b6115c3565b6111ed8383611740565b505050565b6112026111fd6115bb565b6106a6565b611241576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112389061278c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156112b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a8906126ec565b60405180910390fd5b6112b96115bb565b600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61130c6113076115bb565b6106a6565b61134b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113429061278c565b60405180910390fd5b6113e681306113586115bb565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016113919190612588565b60206040518083038186803b1580156113a957600080fd5b505afa1580156113bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e1919061223f565b61193c565b50565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561147b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114729061270c565b60405180910390fd5b61148b6114866115bb565b610800565b6114ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c19061276c565b60405180910390fd5b6114f8600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683308461193c565b61152761152260056115146064856118e490919063ffffffff16565b6118fa90919063ffffffff16565b6119c5565b5050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6115cd8282610d78565b61165c576115f28173ffffffffffffffffffffffffffffffffffffffff166014611a8c565b6116008360001c6020611a8c565b60405160200161161192919061254e565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611653919061268a565b60405180910390fd5b5050565b61166a8282610d78565b61173c57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506116e16115bb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b61174a8282610d78565b1561181d57600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506117c26115bb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156118b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118aa9061270c565b60405180910390fd5b6118e0600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383611cc8565b5050565b600081836118f291906128ba565b905092915050565b6000818361190891906128eb565b905092915050565b6000818361191e9190612945565b905092915050565b600081836119349190612864565b905092915050565b6119bf846323b872dd60e01b85858560405160240161195d939291906125a3565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d4e565b50505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b8152600401611a20919061280c565b600060405180830381600087803b158015611a3a57600080fd5b505af1158015611a4e573d6000803e3d6000fd5b505050507fd976351317d13047d00856cd0b0a448dadbe01d5faf33fba1c759c70aa81bc9e81604051611a81919061280c565b60405180910390a150565b606060006002836002611a9f91906128eb565b611aa99190612864565b67ffffffffffffffff811115611ac257611ac1612b4d565b5b6040519080825280601f01601f191660200182016040528015611af45781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611b2c57611b2b612b1e565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611b9057611b8f612b1e565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611bd091906128eb565b611bda9190612864565b90505b6001811115611c7a577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611c1c57611c1b612b1e565b5b1a60f81b828281518110611c3357611c32612b1e565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611c7390612a96565b9050611bdd565b5060008414611cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb5906126ac565b60405180910390fd5b8091505092915050565b611d498363a9059cbb60e01b8484604051602401611ce79291906125da565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d4e565b505050565b6000611db0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611e159092919063ffffffff16565b9050600081511115611e105780806020019051810190611dd0919061211e565b611e0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e06906127cc565b60405180910390fd5b5b505050565b6060611e248484600085611e2d565b90509392505050565b606082471015611e72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e699061274c565b60405180910390fd5b611e7b85611f41565b611eba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb1906127ac565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611ee39190612537565b60006040518083038185875af1925050503d8060008114611f20576040519150601f19603f3d011682016040523d82523d6000602084013e611f25565b606091505b5091509150611f35828286611f64565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315611f7457829050611fc4565b600083511115611f875782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fbb919061268a565b60405180910390fd5b9392505050565b600081359050611fda81612e3f565b92915050565b600081519050611fef81612e56565b92915050565b60008135905061200481612e6d565b92915050565b60008135905061201981612e84565b92915050565b60008135905061202e81612e9b565b92915050565b60008135905061204381612eb2565b92915050565b60008151905061205881612eb2565b92915050565b60006020828403121561207457612073612b7c565b5b600061208284828501611fcb565b91505092915050565b6000806000606084860312156120a4576120a3612b7c565b5b60006120b286828701611fcb565b93505060206120c386828701611fcb565b92505060406120d486828701612034565b9150509250925092565b600080604083850312156120f5576120f4612b7c565b5b600061210385828601611fcb565b925050602061211485828601612034565b9150509250929050565b60006020828403121561213457612133612b7c565b5b600061214284828501611fe0565b91505092915050565b60006020828403121561216157612160612b7c565b5b600061216f84828501611ff5565b91505092915050565b6000806040838503121561218f5761218e612b7c565b5b600061219d85828601611ff5565b92505060206121ae85828601611fcb565b9150509250929050565b6000602082840312156121ce576121cd612b7c565b5b60006121dc8482850161200a565b91505092915050565b6000602082840312156121fb576121fa612b7c565b5b60006122098482850161201f565b91505092915050565b60006020828403121561222857612227612b7c565b5b600061223684828501612034565b91505092915050565b60006020828403121561225557612254612b7c565b5b600061226384828501612049565b91505092915050565b61227581612979565b82525050565b6122848161298b565b82525050565b61229381612997565b82525050565b60006122a482612827565b6122ae818561283d565b93506122be818560208601612a63565b80840191505092915050565b6122d381612a09565b82525050565b6122e281612a1b565b82525050565b6122f181612a2d565b82525050565b600061230282612832565b61230c8185612848565b935061231c818560208601612a63565b61232581612b81565b840191505092915050565b600061233b82612832565b6123458185612859565b9350612355818560208601612a63565b80840191505092915050565b600061236e602083612848565b915061237982612b92565b602082019050919050565b6000612391601e83612848565b915061239c82612bbb565b602082019050919050565b60006123b4602683612848565b91506123bf82612be4565b604082019050919050565b60006123d7601183612848565b91506123e282612c33565b602082019050919050565b60006123fa600983612848565b915061240582612c5c565b602082019050919050565b600061241d602683612848565b915061242882612c85565b604082019050919050565b6000612440601a83612848565b915061244b82612cd4565b602082019050919050565b6000612463601583612848565b915061246e82612cfd565b602082019050919050565b6000612486601d83612848565b915061249182612d26565b602082019050919050565b60006124a9601783612859565b91506124b482612d4f565b601782019050919050565b60006124cc602a83612848565b91506124d782612d78565b604082019050919050565b60006124ef601183612859565b91506124fa82612dc7565b601182019050919050565b6000612512602f83612848565b915061251d82612df0565b604082019050919050565b612531816129ff565b82525050565b60006125438284612299565b915081905092915050565b60006125598261249c565b91506125658285612330565b9150612570826124e2565b915061257c8284612330565b91508190509392505050565b600060208201905061259d600083018461226c565b92915050565b60006060820190506125b8600083018661226c565b6125c5602083018561226c565b6125d26040830184612528565b949350505050565b60006040820190506125ef600083018561226c565b6125fc6020830184612528565b9392505050565b6000602082019050612618600083018461227b565b92915050565b6000602082019050612633600083018461228a565b92915050565b600060208201905061264e60008301846122ca565b92915050565b600060208201905061266960008301846122d9565b92915050565b600060208201905061268460008301846122e8565b92915050565b600060208201905081810360008301526126a481846122f7565b905092915050565b600060208201905081810360008301526126c581612361565b9050919050565b600060208201905081810360008301526126e581612384565b9050919050565b60006020820190508181036000830152612705816123a7565b9050919050565b60006020820190508181036000830152612725816123ca565b9050919050565b60006020820190508181036000830152612745816123ed565b9050919050565b6000602082019050818103600083015261276581612410565b9050919050565b6000602082019050818103600083015261278581612433565b9050919050565b600060208201905081810360008301526127a581612456565b9050919050565b600060208201905081810360008301526127c581612479565b9050919050565b600060208201905081810360008301526127e5816124bf565b9050919050565b6000602082019050818103600083015261280581612505565b9050919050565b60006020820190506128216000830184612528565b92915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061286f826129ff565b915061287a836129ff565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156128af576128ae612ac0565b5b828201905092915050565b60006128c5826129ff565b91506128d0836129ff565b9250826128e0576128df612aef565b5b828204905092915050565b60006128f6826129ff565b9150612901836129ff565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561293a57612939612ac0565b5b828202905092915050565b6000612950826129ff565b915061295b836129ff565b92508282101561296e5761296d612ac0565b5b828203905092915050565b6000612984826129df565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006129d882612979565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000612a1482612a3f565b9050919050565b6000612a2682612a3f565b9050919050565b6000612a3882612a3f565b9050919050565b6000612a4a82612a51565b9050919050565b6000612a5c826129df565b9050919050565b60005b83811015612a81578082015181840152602081019050612a66565b83811115612a90576000848401525b50505050565b6000612aa1826129ff565b91506000821415612ab557612ab4612ac0565b5b600182039050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e20302e0000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4e6f20455243323020646566696e65642e000000000000000000000000000000600082015250565b7f4e6f207368617265730000000000000000000000000000000000000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f5265737472696374656420746f2077686974656c69737465642e000000000000600082015250565b7f5265737472696374656420746f2061646d696e732e0000000000000000000000600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b612e4881612979565b8114612e5357600080fd5b50565b612e5f8161298b565b8114612e6a57600080fd5b50565b612e7681612997565b8114612e8157600080fd5b50565b612e8d816129a1565b8114612e9857600080fd5b50565b612ea4816129cd565b8114612eaf57600080fd5b50565b612ebb816129ff565b8114612ec657600080fd5b5056fea26469706673582212203805856d74569d856b91958b94100cd8dd4b5e6637e29211992e8916b620f21a64736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063785e9e8611610104578063beabacc8116100a2578063f2fde38b11610071578063f2fde38b146104e4578063f4f3b20014610500578063f98cf07c1461051c578063faef989f14610538576101cf565b8063beabacc814610472578063c0a2526c1461048e578063c29a6fda146104ac578063d547741f146104c8576101cf565b806391c05b0b116100de57806391c05b0b146103ea57806391d1485414610406578063982c65cd14610436578063a217fddf14610454576101cf565b8063785e9e861461039057806380fef5af146103ae5780638da5cb5b146103cc576101cf565b806336568abe11610171578063593d8e431161014b578063593d8e4314610340578063649224921461034a578063668038e014610368578063708f1e3314610372576101cf565b806336568abe146102d657806339fb549c146102f25780633af32abf14610310576101cf565b8063248a9ca3116101ad578063248a9ca31461023e57806324d7806c1461026e57806328899d211461029e5780632f2ff15d146102ba576101cf565b806301ffc9a7146101d45780630b71f1161461020457806321c9737d14610222575b600080fd5b6101ee60048036038101906101e991906121b8565b610556565b6040516101fb9190612603565b60405180910390f35b61020c6105d0565b604051610219919061261e565b60405180910390f35b61023c6004803603810190610237919061205e565b6105f4565b005b6102586004803603810190610253919061214b565b610687565b604051610265919061261e565b60405180910390f35b6102886004803603810190610283919061205e565b6106a6565b6040516102959190612603565b60405180910390f35b6102b860048036038101906102b3919061205e565b6106bc565b005b6102d460048036038101906102cf9190612178565b61074f565b005b6102f060048036038101906102eb9190612178565b610778565b005b6102fa6107fb565b604051610307919061280c565b60405180910390f35b61032a6004803603810190610325919061205e565b610800565b6040516103379190612603565b60405180910390f35b610348610833565b005b610352610982565b60405161035f919061280c565b60405180910390f35b610370610987565b005b61037a610ad6565b6040516103879190612654565b60405180910390f35b610398610afc565b6040516103a59190612639565b60405180910390f35b6103b6610b22565b6040516103c3919061280c565b60405180910390f35b6103d4610b27565b6040516103e19190612588565b60405180910390f35b61040460048036038101906103ff9190612212565b610b51565b005b610420600480360381019061041b9190612178565b610d78565b60405161042d9190612603565b60405180910390f35b61043e610de2565b60405161044b919061280c565b60405180910390f35b61045c610de7565b604051610469919061261e565b60405180910390f35b61048c6004803603810190610487919061208b565b610dee565b005b610496611131565b6040516104a3919061280c565b60405180910390f35b6104c660048036038101906104c191906121e5565b611136565b005b6104e260048036038101906104dd9190612178565b6111c9565b005b6104fe60048036038101906104f9919061205e565b6111f2565b005b61051a6004803603810190610515919061205e565b6112fc565b005b610536600480360381019061053191906120de565b6113e9565b005b61054061152b565b60405161054d919061266f565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105c957506105c882611551565b5b9050919050565b7fe799c73ff785ac053943f5d98452f7fa0bcf54da67826fc217d6094dec75c5ee81565b6106046105ff6115bb565b6106a6565b610643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063a9061278c565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806000838152602001908152602001600020600101549050919050565b60006106b56000801b83610d78565b9050919050565b6106cc6106c76115bb565b6106a6565b61070b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107029061278c565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61075882610687565b610769816107646115bb565b6115c3565b6107738383611660565b505050565b6107806115bb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146107ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e4906127ec565b60405180910390fd5b6107f78282611740565b5050565b600181565b600061082c7fe799c73ff785ac053943f5d98452f7fa0bcf54da67826fc217d6094dec75c5ee83610d78565b9050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635493af1a61087b6115bb565b6040518263ffffffff1660e01b81526004016108979190612588565b602060405180830381600087803b1580156108b157600080fd5b505af11580156108c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e9919061223f565b90506000811161092e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109259061272c565b60405180910390fd5b61093f6109396115bb565b82611821565b7f649fde579b8ba49bd4fbcb330614cb075b8d53c352c5adc49161b6f654e400a26109686115bb565b826040516109779291906125da565b60405180910390a150565b600281565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635493af1a6109cf6115bb565b6040518263ffffffff1660e01b81526004016109eb9190612588565b602060405180830381600087803b158015610a0557600080fd5b505af1158015610a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3d919061223f565b905060008111610a82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a799061272c565b60405180910390fd5b610a93610a8d6115bb565b82611821565b7f16b8533c95f66ab8c192c98ddcf5031bcb3ee6f4022988bdadd57d3422da3073610abc6115bb565b82604051610acb9291906125da565b60405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610b61610b5c6115bb565b610800565b610ba0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b979061276c565b60405180910390fd5b60008111610be3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bda906126cc565b60405180910390fd5b600060649050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391c05b0b610c4e6014610c406064876118e490919063ffffffff16565b6118fa90919063ffffffff16565b6040518263ffffffff1660e01b8152600401610c6a919061280c565b600060405180830381600087803b158015610c8457600080fd5b505af1158015610c98573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391c05b0b610d26610d046005610cf660148761191090919063ffffffff16565b61191090919063ffffffff16565b610d186064876118e490919063ffffffff16565b6118fa90919063ffffffff16565b6040518263ffffffff1660e01b8152600401610d42919061280c565b600060405180830381600087803b158015610d5c57600080fd5b505af1158015610d70573d6000803e3d6000fd5b505050505050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600781565b6000801b81565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610e80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e779061270c565b60405180910390fd5b610e90610e8b6115bb565b610800565b610ecf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec69061276c565b60405180910390fd5b6000610ef86001610eea6064856118e490919063ffffffff16565b6118fa90919063ffffffff16565b90506000610f236007610f156064866118e490919063ffffffff16565b6118fa90919063ffffffff16565b90506000610f4e6002610f406064876118e490919063ffffffff16565b6118fa90919063ffffffff16565b9050610fa2600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168730610f9d85610f8f888a61192690919063ffffffff16565b61192690919063ffffffff16565b61193c565b611006600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16878761100185610ff388610fe58b8d61191090919063ffffffff16565b61191090919063ffffffff16565b61191090919063ffffffff16565b61193c565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391c05b0b836040518263ffffffff1660e01b8152600401611061919061280c565b600060405180830381600087803b15801561107b57600080fd5b505af115801561108f573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391c05b0b826040518263ffffffff1660e01b81526004016110ee919061280c565b600060405180830381600087803b15801561110857600080fd5b505af115801561111c573d6000803e3d6000fd5b50505050611129836119c5565b505050505050565b600581565b6111466111416115bb565b6106a6565b611185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117c9061278c565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6111d282610687565b6111e3816111de6115bb565b6115c3565b6111ed8383611740565b505050565b6112026111fd6115bb565b6106a6565b611241576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112389061278c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156112b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a8906126ec565b60405180910390fd5b6112b96115bb565b600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61130c6113076115bb565b6106a6565b61134b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113429061278c565b60405180910390fd5b6113e681306113586115bb565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016113919190612588565b60206040518083038186803b1580156113a957600080fd5b505afa1580156113bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e1919061223f565b61193c565b50565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561147b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114729061270c565b60405180910390fd5b61148b6114866115bb565b610800565b6114ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c19061276c565b60405180910390fd5b6114f8600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683308461193c565b61152761152260056115146064856118e490919063ffffffff16565b6118fa90919063ffffffff16565b6119c5565b5050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6115cd8282610d78565b61165c576115f28173ffffffffffffffffffffffffffffffffffffffff166014611a8c565b6116008360001c6020611a8c565b60405160200161161192919061254e565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611653919061268a565b60405180910390fd5b5050565b61166a8282610d78565b61173c57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506116e16115bb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b61174a8282610d78565b1561181d57600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506117c26115bb565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156118b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118aa9061270c565b60405180910390fd5b6118e0600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383611cc8565b5050565b600081836118f291906128ba565b905092915050565b6000818361190891906128eb565b905092915050565b6000818361191e9190612945565b905092915050565b600081836119349190612864565b905092915050565b6119bf846323b872dd60e01b85858560405160240161195d939291906125a3565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d4e565b50505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b8152600401611a20919061280c565b600060405180830381600087803b158015611a3a57600080fd5b505af1158015611a4e573d6000803e3d6000fd5b505050507fd976351317d13047d00856cd0b0a448dadbe01d5faf33fba1c759c70aa81bc9e81604051611a81919061280c565b60405180910390a150565b606060006002836002611a9f91906128eb565b611aa99190612864565b67ffffffffffffffff811115611ac257611ac1612b4d565b5b6040519080825280601f01601f191660200182016040528015611af45781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611b2c57611b2b612b1e565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611b9057611b8f612b1e565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611bd091906128eb565b611bda9190612864565b90505b6001811115611c7a577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611c1c57611c1b612b1e565b5b1a60f81b828281518110611c3357611c32612b1e565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611c7390612a96565b9050611bdd565b5060008414611cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb5906126ac565b60405180910390fd5b8091505092915050565b611d498363a9059cbb60e01b8484604051602401611ce79291906125da565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d4e565b505050565b6000611db0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611e159092919063ffffffff16565b9050600081511115611e105780806020019051810190611dd0919061211e565b611e0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e06906127cc565b60405180910390fd5b5b505050565b6060611e248484600085611e2d565b90509392505050565b606082471015611e72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e699061274c565b60405180910390fd5b611e7b85611f41565b611eba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb1906127ac565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611ee39190612537565b60006040518083038185875af1925050503d8060008114611f20576040519150601f19603f3d011682016040523d82523d6000602084013e611f25565b606091505b5091509150611f35828286611f64565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315611f7457829050611fc4565b600083511115611f875782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fbb919061268a565b60405180910390fd5b9392505050565b600081359050611fda81612e3f565b92915050565b600081519050611fef81612e56565b92915050565b60008135905061200481612e6d565b92915050565b60008135905061201981612e84565b92915050565b60008135905061202e81612e9b565b92915050565b60008135905061204381612eb2565b92915050565b60008151905061205881612eb2565b92915050565b60006020828403121561207457612073612b7c565b5b600061208284828501611fcb565b91505092915050565b6000806000606084860312156120a4576120a3612b7c565b5b60006120b286828701611fcb565b93505060206120c386828701611fcb565b92505060406120d486828701612034565b9150509250925092565b600080604083850312156120f5576120f4612b7c565b5b600061210385828601611fcb565b925050602061211485828601612034565b9150509250929050565b60006020828403121561213457612133612b7c565b5b600061214284828501611fe0565b91505092915050565b60006020828403121561216157612160612b7c565b5b600061216f84828501611ff5565b91505092915050565b6000806040838503121561218f5761218e612b7c565b5b600061219d85828601611ff5565b92505060206121ae85828601611fcb565b9150509250929050565b6000602082840312156121ce576121cd612b7c565b5b60006121dc8482850161200a565b91505092915050565b6000602082840312156121fb576121fa612b7c565b5b60006122098482850161201f565b91505092915050565b60006020828403121561222857612227612b7c565b5b600061223684828501612034565b91505092915050565b60006020828403121561225557612254612b7c565b5b600061226384828501612049565b91505092915050565b61227581612979565b82525050565b6122848161298b565b82525050565b61229381612997565b82525050565b60006122a482612827565b6122ae818561283d565b93506122be818560208601612a63565b80840191505092915050565b6122d381612a09565b82525050565b6122e281612a1b565b82525050565b6122f181612a2d565b82525050565b600061230282612832565b61230c8185612848565b935061231c818560208601612a63565b61232581612b81565b840191505092915050565b600061233b82612832565b6123458185612859565b9350612355818560208601612a63565b80840191505092915050565b600061236e602083612848565b915061237982612b92565b602082019050919050565b6000612391601e83612848565b915061239c82612bbb565b602082019050919050565b60006123b4602683612848565b91506123bf82612be4565b604082019050919050565b60006123d7601183612848565b91506123e282612c33565b602082019050919050565b60006123fa600983612848565b915061240582612c5c565b602082019050919050565b600061241d602683612848565b915061242882612c85565b604082019050919050565b6000612440601a83612848565b915061244b82612cd4565b602082019050919050565b6000612463601583612848565b915061246e82612cfd565b602082019050919050565b6000612486601d83612848565b915061249182612d26565b602082019050919050565b60006124a9601783612859565b91506124b482612d4f565b601782019050919050565b60006124cc602a83612848565b91506124d782612d78565b604082019050919050565b60006124ef601183612859565b91506124fa82612dc7565b601182019050919050565b6000612512602f83612848565b915061251d82612df0565b604082019050919050565b612531816129ff565b82525050565b60006125438284612299565b915081905092915050565b60006125598261249c565b91506125658285612330565b9150612570826124e2565b915061257c8284612330565b91508190509392505050565b600060208201905061259d600083018461226c565b92915050565b60006060820190506125b8600083018661226c565b6125c5602083018561226c565b6125d26040830184612528565b949350505050565b60006040820190506125ef600083018561226c565b6125fc6020830184612528565b9392505050565b6000602082019050612618600083018461227b565b92915050565b6000602082019050612633600083018461228a565b92915050565b600060208201905061264e60008301846122ca565b92915050565b600060208201905061266960008301846122d9565b92915050565b600060208201905061268460008301846122e8565b92915050565b600060208201905081810360008301526126a481846122f7565b905092915050565b600060208201905081810360008301526126c581612361565b9050919050565b600060208201905081810360008301526126e581612384565b9050919050565b60006020820190508181036000830152612705816123a7565b9050919050565b60006020820190508181036000830152612725816123ca565b9050919050565b60006020820190508181036000830152612745816123ed565b9050919050565b6000602082019050818103600083015261276581612410565b9050919050565b6000602082019050818103600083015261278581612433565b9050919050565b600060208201905081810360008301526127a581612456565b9050919050565b600060208201905081810360008301526127c581612479565b9050919050565b600060208201905081810360008301526127e5816124bf565b9050919050565b6000602082019050818103600083015261280581612505565b9050919050565b60006020820190506128216000830184612528565b92915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061286f826129ff565b915061287a836129ff565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156128af576128ae612ac0565b5b828201905092915050565b60006128c5826129ff565b91506128d0836129ff565b9250826128e0576128df612aef565b5b828204905092915050565b60006128f6826129ff565b9150612901836129ff565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561293a57612939612ac0565b5b828202905092915050565b6000612950826129ff565b915061295b836129ff565b92508282101561296e5761296d612ac0565b5b828203905092915050565b6000612984826129df565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006129d882612979565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000612a1482612a3f565b9050919050565b6000612a2682612a3f565b9050919050565b6000612a3882612a3f565b9050919050565b6000612a4a82612a51565b9050919050565b6000612a5c826129df565b9050919050565b60005b83811015612a81578082015181840152602081019050612a66565b83811115612a90576000848401525b50505050565b6000612aa1826129ff565b91506000821415612ab557612ab4612ac0565b5b600182039050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e20302e0000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4e6f20455243323020646566696e65642e000000000000000000000000000000600082015250565b7f4e6f207368617265730000000000000000000000000000000000000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f5265737472696374656420746f2077686974656c69737465642e000000000000600082015250565b7f5265737472696374656420746f2061646d696e732e0000000000000000000000600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b612e4881612979565b8114612e5357600080fd5b50565b612e5f8161298b565b8114612e6a57600080fd5b50565b612e7681612997565b8114612e8157600080fd5b50565b612e8d816129a1565b8114612e9857600080fd5b50565b612ea4816129cd565b8114612eaf57600080fd5b50565b612ebb816129ff565b8114612ec657600080fd5b5056fea26469706673582212203805856d74569d856b91958b94100cd8dd4b5e6637e29211992e8916b620f21a64736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $0.000008 | 26,576,962.9192 | $225.64 |
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.