Overview
BERA Balance
BERA Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BeraBitcoin
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.28; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; contract BeraBitcoin is Initializable, ERC20Upgradeable, ReentrancyGuardUpgradeable, OwnableUpgradeable { /// @notice The role that can mint and burn beraBTC. bytes32 private constant CUSTODIAN_ROLE = keccak256("CUSTODIAN_ROLE"); /// @notice The role that can mint and burn beraBTC. bytes32 private constant EXCESS_STAKE_ROLE = keccak256("EXCESS_STAKE_ROLE"); /// @notice The role that can blacklist addresses. bytes32 private constant BLACKLISTER_ROLE = keccak256("BLACKLISTER_ROLE"); /// @notice The mint fee rate. uint256 public mintFeeRate; /// @notice The redeem fee rate. uint256 public redeemFeeRate; /// @notice The base rate. uint256 public constant BASE_RATE = 10000; /// @notice The treasury address. address public treasury; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* Events */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @notice Emitted when a role is granted to an account. /// @param role The role that was granted. /// @param account The account that was granted the role. event RoleGranted(bytes32 indexed role, address indexed account); /// @notice Emitted when a role is revoked from an account. /// @param role The role that was revoked. /// @param account The account that was revoked from the role. event RoleRevoked(bytes32 indexed role, address indexed account); /// @notice Emitted when the mint fee rate is set. /// @param newMintFeeRate The new mint fee rate. event MintFeeRateSet(uint256 newMintFeeRate); /// @notice Emitted when the redeem fee rate is set. /// @param newRedeemFeeRate The new redeem fee rate. event RedeemFeeRateSet(uint256 newRedeemFeeRate); /// @notice Emitted when beraBTC is minted by the custodian. /// @param to The address that received the minted beraBTC. /// @param value The amount of beraBTC that was minted. /// @param fee The amount of beraBTC that was minted as a fee. event CustodianMinted(address indexed to, uint256 value, uint256 fee); /// @notice Emitted when beraBTC is minted by the excess stake role. /// @param to The address that received the minted beraBTC. /// @param value The amount of beraBTC that was minted. /// @param fee The amount of beraBTC that was minted as a fee. event ExcessStakeMinted(address indexed to, uint256 value, uint256 fee); /// @notice Emitted when beraBTC is redeemed. /// @param from The address that redeemed the beraBTC. /// @param burned The amount of beraBTC that was burned. /// @param value The amount of beraBTC that was redeemed. /// @param recipient The recipient of the redeemed btc. event Redeemed( address indexed from, uint256 burned, uint256 value, string recipient ); /// @notice Emitted when an address is blacklisted. /// @param account The address that was blacklisted. /// @param caller The address that called the function. event Blacklisted(address indexed account, address indexed caller); /// @notice Emitted when an address is removed from the blacklist. /// @param account The address that was removed from the blacklist. /// @param caller The address that called the function. event RemovedFromBlacklist(address indexed account, address indexed caller); /// @notice Emitted when the treasury address is set. /// @param newTreasury The new treasury address. event TreasurySet(address newTreasury); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* Errors */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @notice Emitted when an account is blacklisted. error AccountIsBlacklisted(); /// @notice Emitted when an account is not authorized to perform an action. error UnauthorizedRole(bytes32 role); /// @notice Emitted when an invalid fee rate is set. error InvalidFeeRate(uint256 newFeeRate); /// @notice Emitted when a transfer is attempted to a blacklisted account. /// @param blacklistedAccount The address that was blacklisted. error TransferToBlacklistedAccount(address blacklistedAccount); /// @notice Emitted when a transfer is attempted from a blacklisted account. /// @param blacklistedAccount The address that was blacklisted. error TransferFromBlacklistedAccount(address blacklistedAccount); /// @notice The blacklist of addresses. mapping(address => bool) private _blacklist; /// @notice The roles of accounts. mapping(bytes32 => mapping(address => bool)) public roles; /// @notice Modifier to check if an account has a specific role. /// @param role The role to check. modifier onlyRole(bytes32 role) { if (!roles[role][msg.sender]) revert UnauthorizedRole(role); _; } /// @notice Modifier to check if an account is not blacklisted. modifier notBlacklisted() { if (isBlacklisted(msg.sender)) revert AccountIsBlacklisted(); _; } /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize( address admin, address _treasury, uint256 _mintFeeRate, uint256 _redeemFeeRate ) public initializer { __ReentrancyGuard_init(); __ERC20_init("Bera Bitcoin", "beraBTC"); __Ownable_init(admin); treasury = _treasury; mintFeeRate = _mintFeeRate; redeemFeeRate = _redeemFeeRate; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* Setters */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ function setMintFeeRate(uint256 newMintFeeRate) external onlyOwner { if (newMintFeeRate > BASE_RATE) revert InvalidFeeRate(newMintFeeRate); mintFeeRate = newMintFeeRate; emit MintFeeRateSet(newMintFeeRate); } function setRedeemFeeRate(uint256 newRedeemFeeRate) external onlyOwner { if (newRedeemFeeRate > BASE_RATE) revert InvalidFeeRate(newRedeemFeeRate); redeemFeeRate = newRedeemFeeRate; emit RedeemFeeRateSet(newRedeemFeeRate); } function setTreasury(address newTreasury) external onlyOwner { treasury = newTreasury; emit TreasurySet(newTreasury); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* Getters */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ function decimals() public pure override returns (uint8) { return 8; } function version() public pure returns (string memory) { return "v1.0.2"; } function isBlacklisted(address account) public view returns (bool) { return _blacklist[account]; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* Role Management */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @notice Grants a role to an account. /// @param role The role to grant. /// @param account The account to grant the role to. function grantRole(bytes32 role, address account) external onlyOwner { roles[role][account] = true; emit RoleGranted(role, account); } /// @notice Revokes a role from an account. /// @param role The role to revoke. /// @param account The account to revoke the role from. function revokeRole(bytes32 role, address account) external onlyOwner { roles[role][account] = false; emit RoleRevoked(role, account); } /// @notice Mints beraBTC by the custodian. /// @param to The address to mint the beraBTC to. /// @param value The amount of beraBTC to mint. function custodianMint( address to, uint256 value ) public onlyRole(CUSTODIAN_ROLE) nonReentrant { if (isBlacklisted(to)) revert AccountIsBlacklisted(); uint256 fee = 0; if (mintFeeRate > 0) { fee = (value * mintFeeRate) / BASE_RATE; _mint(treasury, fee); } _mint(to, value - fee); emit CustodianMinted(to, value, fee); } /// @notice Mints beraBTC by the excess stake role. /// @param account The address to mint the beraBTC to. /// @param value The amount of beraBTC to mint. function excessStakeMint( address account, uint256 value ) public onlyRole(EXCESS_STAKE_ROLE) nonReentrant { if (isBlacklisted(account)) revert AccountIsBlacklisted(); uint256 fee = 0; if (mintFeeRate > 0) { fee = (value * mintFeeRate) / BASE_RATE; _mint(treasury, fee); } _mint(account, value - fee); emit ExcessStakeMinted(account, value, fee); } /// @notice Redeems beraBTC. /// @param value The amount of beraBTC to redeem. /// @param recipient The recipient of the redeemed btc. function redeem( uint256 value, string memory recipient ) public nonReentrant { if (isBlacklisted(msg.sender)) revert AccountIsBlacklisted(); uint256 fee = 0; // only msg.sender is not treasury charge a fee if (redeemFeeRate > 0 && msg.sender != treasury) { fee = (value * redeemFeeRate) / BASE_RATE; _transfer(msg.sender, treasury, fee); } _burn(msg.sender, value - fee); emit Redeemed(msg.sender, value - fee, fee, recipient); } /// @notice Adds an address to the blacklist. /// @param account The address to add to the blacklist. function addToBlacklist( address account ) public onlyRole(BLACKLISTER_ROLE) nonReentrant { _blacklist[account] = true; emit Blacklisted(account, msg.sender); } /// @notice Removes an address from the blacklist. /// @param account The address to remove from the blacklist. function removeFromBlacklist( address account ) public onlyRole(BLACKLISTER_ROLE) nonReentrant { _blacklist[account] = false; emit RemovedFromBlacklist(account, msg.sender); } /// @inheritdoc ERC20Upgradeable function transfer( address to, uint256 amount ) public override notBlacklisted returns (bool) { if (isBlacklisted(to)) revert TransferToBlacklistedAccount(to); return super.transfer(to, amount); } /// @inheritdoc ERC20Upgradeable function transferFrom( address from, address to, uint256 amount ) public override notBlacklisted returns (bool) { if (isBlacklisted(from)) revert TransferFromBlacklistedAccount(from); return super.transferFrom(from, to, amount); } /// @inheritdoc ERC20Upgradeable function approve( address spender, uint256 amount ) public override notBlacklisted returns (bool) { return super.approve(spender, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; import {Initializable} from "../../proxy/utils/Initializable.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}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * 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 ERC-20 * applications. */ abstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors { /// @custom:storage-location erc7201:openzeppelin.storage.ERC20 struct ERC20Storage { mapping(address account => uint256) _balances; mapping(address account => mapping(address spender => uint256)) _allowances; uint256 _totalSupply; string _name; string _symbol; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00; function _getERC20Storage() private pure returns (ERC20Storage storage $) { assembly { $.slot := ERC20StorageLocation } } /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { ERC20Storage storage $ = _getERC20Storage(); $._name = name_; $._symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); return $._name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); 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 default value returned by this function, unless * it's 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 returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` 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 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Skips emitting an {Approval} event indicating an allowance update. This is not * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. * * 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 `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * 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. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { ERC20Storage storage $ = _getERC20Storage(); if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows $._totalSupply += value; } else { uint256 fromBalance = $._balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. $._balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. $._totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. $._balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` 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. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * * ```solidity * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { ERC20Storage storage $ = _getERC20Storage(); if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } $._allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance < type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at, * consider using {ReentrancyGuardTransient} instead. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard struct ReentrancyGuardStorage { uint256 _status; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00; function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) { assembly { $.slot := ReentrancyGuardStorageLocation } } /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); $._status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // On the first call to nonReentrant, _status will be NOT_ENTERED if ($._status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail $._status = ENTERED; } function _nonReentrantAfter() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) $._status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); return $._status == ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC-20 standard. */ 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 v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
{ "remappings": [ "solady/=lib/solady/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccountIsBlacklisted","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"newFeeRate","type":"uint256"}],"name":"InvalidFeeRate","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"blacklistedAccount","type":"address"}],"name":"TransferFromBlacklistedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"blacklistedAccount","type":"address"}],"name":"TransferToBlacklistedAccount","type":"error"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"UnauthorizedRole","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"CustodianMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"ExcessStakeMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMintFeeRate","type":"uint256"}],"name":"MintFeeRateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRedeemFeeRate","type":"uint256"}],"name":"RedeemFeeRateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"burned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"string","name":"recipient","type":"string"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"RemovedFromBlacklist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","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"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTreasury","type":"address"}],"name":"TreasurySet","type":"event"},{"inputs":[],"name":"BASE_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addToBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"custodianMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"excessStakeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_mintFeeRate","type":"uint256"},{"internalType":"uint256","name":"_redeemFeeRate","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"string","name":"recipient","type":"string"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeFromBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"roles","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMintFeeRate","type":"uint256"}],"name":"setMintFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRedeemFeeRate","type":"uint256"}],"name":"setRedeemFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
6080604052348015600e575f5ffd5b5060156019565b60c9565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560685760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c65780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b611a0b806100d65f395ff3fe608060405234801561000f575f5ffd5b50600436106101d1575f3560e01c806361d027b3116100fe578063addc3f411161009e578063f0f442601161006e578063f0f442601461042a578063f2fde38b1461043d578063f8fc08b914610450578063fe575a871461047d575f5ffd5b8063addc3f41146103de578063d547741f146103f1578063dd62ed3e14610404578063eb990c5914610417575f5ffd5b806387132628116100d957806387132628146103805780638da5cb5b1461039357806395d89b41146103c3578063a9059cbb146103cb575f5ffd5b806361d027b31461031957806370a0823114610344578063715018a614610378575f5ffd5b80632f2ff15d1161017457806344337ea11161014457806344337ea1146102c8578063537df3b6146102db57806354fd4d50146102ee5780635872e6fa14610310575f5ffd5b80632f2ff15d1461028a578063313ce5671461029d5780633143ab57146102ac57806341910f90146102bf575f5ffd5b806318819a31116101af57806318819a311461024757806321e822c51461024f57806323b872dd1461026457806324b76fd514610277575f5ffd5b806306fdde03146101d5578063095ea7b3146101f357806318160ddd14610216575b5f5ffd5b6101dd610490565b6040516101ea91906115a6565b60405180910390f35b6102066102013660046115d3565b610550565b60405190151581526020016101ea565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b6040519081526020016101ea565b6102395f5481565b61026261025d3660046115fb565b61058b565b005b610206610272366004611612565b6105fa565b610262610285366004611660565b610667565b61026261029836600461171d565b610762565b604051600881526020016101ea565b6102626102ba3660046115fb565b6107c4565b61023961271081565b6102626102d6366004611747565b610826565b6102626102e9366004611747565b610901565b6040805180820190915260068152653b189718171960d11b60208201526101dd565b61023960015481565b60025461032c906001600160a01b031681565b6040516001600160a01b0390911681526020016101ea565b610239610352366004611747565b6001600160a01b03165f9081525f5160206119965f395f51905f52602052604090205490565b6102626109d9565b61026261038e3660046115d3565b6109ec565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031661032c565b6101dd610b3d565b6102066103d93660046115d3565b610b7b565b6102626103ec3660046115d3565b610bdf565b6102626103ff36600461171d565b610d0b565b610239610412366004611760565b610d6a565b610262610425366004611788565b610db3565b610262610438366004611747565b610f3d565b61026261044b366004611747565b610f93565b61020661045e36600461171d565b600460209081525f928352604080842090915290825290205460ff1681565b61020661048b366004611747565b610fd0565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060915f5160206119965f395f51905f52916104ce906117c7565b80601f01602080910402602001604051908101604052809291908181526020018280546104fa906117c7565b80156105455780601f1061051c57610100808354040283529160200191610545565b820191905f5260205f20905b81548152906001019060200180831161052857829003601f168201915b505050505091505090565b5f61055a33610fd0565b15610578576040516355b99b9560e11b815260040160405180910390fd5b6105828383610fed565b90505b92915050565b610593611004565b6127108111156105be576040516336e6824b60e21b8152600481018290526024015b60405180910390fd5b60018190556040518181527f614d0dba59ce7a9d3d2532023863fa3185eea8ea95bd986937e244d271e24aac906020015b60405180910390a150565b5f61060433610fd0565b15610622576040516355b99b9560e11b815260040160405180910390fd5b61062b84610fd0565b156106545760405163410e402f60e01b81526001600160a01b03851660048201526024016105b5565b61065f84848461105f565b949350505050565b61066f611082565b61067833610fd0565b15610696576040516355b99b9560e11b815260040160405180910390fd5b6001545f90158015906106b457506002546001600160a01b03163314155b156106ef57612710600154846106ca9190611813565b6106d4919061182a565b6002549091506106ef9033906001600160a01b0316836110b9565b610702336106fd8386611849565b611116565b337f1808b841eb16c14c59b7f58642fb214dc5a2fe88a2844142a9b1cc36aa9e3d0c61072e8386611849565b838560405161073f9392919061185c565b60405180910390a25061075e60015f5160206119b65f395f51905f5255565b5050565b61076a611004565b5f8281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551909184917f2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f39190a35050565b6107cc611004565b6127108111156107f2576040516336e6824b60e21b8152600481018290526024016105b5565b5f8190556040518181527f2e33d500ef4e4fe2a0cffa0a719aeabee99da3b8e14d4247be011bf0d6bd70fa906020016105ef565b335f9081527fcd35cb1b1618147bb2fd9b042b8ba9937963b2d70a2e61e77ca9105a2e935fd760205260409020547f98db8a220cd0f09badce9f22d0ba7e93edb3d404448cc3560d391ab096ad16e99060ff166108995760405163315bfbf160e11b8152600481018290526024016105b5565b6108a1611082565b6001600160a01b0382165f81815260036020526040808220805460ff19166001179055513392917fd36871fdf6981136f3ac0564927005901eda06f7a9dff1e8b2a1d7846b8ebb5091a361075e60015f5160206119b65f395f51905f5255565b335f9081527fcd35cb1b1618147bb2fd9b042b8ba9937963b2d70a2e61e77ca9105a2e935fd760205260409020547f98db8a220cd0f09badce9f22d0ba7e93edb3d404448cc3560d391ab096ad16e99060ff166109745760405163315bfbf160e11b8152600481018290526024016105b5565b61097c611082565b6001600160a01b0382165f81815260036020526040808220805460ff19169055513392917f576a9aef294e1b4baf3617fde4cbc80ba5344d5eb508222f29e558981704a45791a361075e60015f5160206119b65f395f51905f5255565b6109e1611004565b6109ea5f61115d565b565b335f9081527f1149abdacdcfeae53fd228bf85482586626476507ee3998c58512372f73c2c5260205260409020547fe28434228950b641dbbc0178de89daa359a87c6ee0d8399aeace52a98fe902b99060ff16610a5f5760405163315bfbf160e11b8152600481018290526024016105b5565b610a67611082565b610a7083610fd0565b15610a8e576040516355b99b9560e11b815260040160405180910390fd5b5f805415610ac9576127105f5484610aa69190611813565b610ab0919061182a565b600254909150610ac9906001600160a01b0316826111cd565b610adc84610ad78386611849565b6111cd565b60408051848152602081018390526001600160a01b038616917fb46ee8c6b5deda3534f80679d8333b7246a4ced51558cb716ed4daee35b4e86d91015b60405180910390a250610b3860015f5160206119b65f395f51905f5255565b505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060915f5160206119965f395f51905f52916104ce906117c7565b5f610b8533610fd0565b15610ba3576040516355b99b9560e11b815260040160405180910390fd5b610bac83610fd0565b15610bd5576040516349b6200f60e11b81526001600160a01b03841660048201526024016105b5565b6105828383611201565b335f9081527f9ed2841df6c51372bb005a5de8c5dfa34f6f3623d77a62166a8d9e509237ece460205260409020547fd63df3124ab9d25c43f1de0b4b2d1871b3b6e7f89d94baee140070afc1e726a69060ff16610c525760405163315bfbf160e11b8152600481018290526024016105b5565b610c5a611082565b610c6383610fd0565b15610c81576040516355b99b9560e11b815260040160405180910390fd5b5f805415610cbc576127105f5484610c999190611813565b610ca3919061182a565b600254909150610cbc906001600160a01b0316826111cd565b610cca84610ad78386611849565b60408051848152602081018390526001600160a01b038616917f48e5e0e2d0a56918715ddc344ed5a3a95ff592e7a5b6fa6fdfa069596bbf27469101610b19565b610d13611004565b5f8281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551909184917f155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a529190a35050565b6001600160a01b039182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f81158015610df85750825b90505f8267ffffffffffffffff166001148015610e145750303b155b905081158015610e22575080155b15610e405760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610e6a57845460ff60401b1916600160401b1785555b610e7261120e565b610ebf6040518060400160405280600c81526020016b2132b930902134ba31b7b4b760a11b815250604051806040016040528060078152602001666265726142544360c81b81525061121e565b610ec889611230565b600280546001600160a01b0319166001600160a01b038a161790555f87905560018690558315610f3257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b610f45611004565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f3c864541ef71378c6229510ed90f376565ee42d9c5e0904a984a9e863e6db44f906020016105ef565b610f9b611004565b6001600160a01b038116610fc457604051631e4fbdf760e01b81525f60048201526024016105b5565b610fcd8161115d565b50565b6001600160a01b03165f9081526003602052604090205460ff1690565b5f33610ffa818585611241565b5060019392505050565b336110367f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146109ea5760405163118cdaa760e01b81523360048201526024016105b5565b5f3361106c85828561124e565b6110778585856110b9565b506001949350505050565b5f5160206119b65f395f51905f528054600119016110b357604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b6001600160a01b0383166110e257604051634b637e8f60e11b81525f60048201526024016105b5565b6001600160a01b03821661110b5760405163ec442f0560e01b81525f60048201526024016105b5565b610b388383836112b2565b6001600160a01b03821661113f57604051634b637e8f60e11b81525f60048201526024016105b5565b61075e825f836112b2565b60015f5160206119b65f395f51905f5255565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6001600160a01b0382166111f65760405163ec442f0560e01b81525f60048201526024016105b5565b61075e5f83836112b2565b5f33610ffa8185856110b9565b6112166113eb565b6109ea611434565b6112266113eb565b61075e828261143c565b6112386113eb565b610fcd8161148c565b610b388383836001611494565b5f6112598484610d6a565b90505f198110156112ac578181101561129e57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016105b5565b6112ac84848484035f611494565b50505050565b5f5160206119965f395f51905f526001600160a01b0384166112ec5781816002015f8282546112e19190611883565b9091555061135c9050565b6001600160a01b0384165f908152602082905260409020548281101561133e5760405163391434e360e21b81526001600160a01b038616600482015260248101829052604481018490526064016105b5565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b03831661137a576002810180548390039055611398565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113dd91815260200190565b60405180910390a350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166109ea57604051631afcd79f60e31b815260040160405180910390fd5b61114a6113eb565b6114446113eb565b5f5160206119965f395f51905f527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0361147d84826118da565b50600481016112ac83826118da565b610f9b6113eb565b5f5160206119965f395f51905f526001600160a01b0385166114cb5760405163e602df0560e01b81525f60048201526024016105b5565b6001600160a01b0384166114f457604051634a1406b160e11b81525f60048201526024016105b5565b6001600160a01b038086165f9081526001830160209081526040808320938816835292905220839055811561157157836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258560405161156891815260200190565b60405180910390a35b5050505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105826020830184611578565b80356001600160a01b03811681146115ce575f5ffd5b919050565b5f5f604083850312156115e4575f5ffd5b6115ed836115b8565b946020939093013593505050565b5f6020828403121561160b575f5ffd5b5035919050565b5f5f5f60608486031215611624575f5ffd5b61162d846115b8565b925061163b602085016115b8565b929592945050506040919091013590565b634e487b7160e01b5f52604160045260245ffd5b5f5f60408385031215611671575f5ffd5b82359150602083013567ffffffffffffffff81111561168e575f5ffd5b8301601f8101851361169e575f5ffd5b803567ffffffffffffffff8111156116b8576116b861164c565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156116e7576116e761164c565b6040528181528282016020018710156116fe575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f5f6040838503121561172e575f5ffd5b8235915061173e602084016115b8565b90509250929050565b5f60208284031215611757575f5ffd5b610582826115b8565b5f5f60408385031215611771575f5ffd5b61177a836115b8565b915061173e602084016115b8565b5f5f5f5f6080858703121561179b575f5ffd5b6117a4856115b8565b93506117b2602086016115b8565b93969395505050506040820135916060013590565b600181811c908216806117db57607f821691505b6020821081036117f957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610585576105856117ff565b5f8261184457634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610585576105856117ff565b838152826020820152606060408201525f61187a6060830184611578565b95945050505050565b80820180821115610585576105856117ff565b601f821115610b3857805f5260205f20601f840160051c810160208510156118bb5750805b601f840160051c820191505b81811015611571575f81556001016118c7565b815167ffffffffffffffff8111156118f4576118f461164c565b6119088161190284546117c7565b84611896565b6020601f82116001811461193a575f83156119235750848201515b5f19600385901b1c1916600184901b178455611571565b5f84815260208120601f198516915b828110156119695787850151825560209485019460019092019101611949565b508482101561198657868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a2646970667358221220b58dd87555e9ac953163155fdb9964c33f10226a4830e849e0b364e92488966264736f6c634300081c0033
Deployed Bytecode
0x608060405234801561000f575f5ffd5b50600436106101d1575f3560e01c806361d027b3116100fe578063addc3f411161009e578063f0f442601161006e578063f0f442601461042a578063f2fde38b1461043d578063f8fc08b914610450578063fe575a871461047d575f5ffd5b8063addc3f41146103de578063d547741f146103f1578063dd62ed3e14610404578063eb990c5914610417575f5ffd5b806387132628116100d957806387132628146103805780638da5cb5b1461039357806395d89b41146103c3578063a9059cbb146103cb575f5ffd5b806361d027b31461031957806370a0823114610344578063715018a614610378575f5ffd5b80632f2ff15d1161017457806344337ea11161014457806344337ea1146102c8578063537df3b6146102db57806354fd4d50146102ee5780635872e6fa14610310575f5ffd5b80632f2ff15d1461028a578063313ce5671461029d5780633143ab57146102ac57806341910f90146102bf575f5ffd5b806318819a31116101af57806318819a311461024757806321e822c51461024f57806323b872dd1461026457806324b76fd514610277575f5ffd5b806306fdde03146101d5578063095ea7b3146101f357806318160ddd14610216575b5f5ffd5b6101dd610490565b6040516101ea91906115a6565b60405180910390f35b6102066102013660046115d3565b610550565b60405190151581526020016101ea565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b6040519081526020016101ea565b6102395f5481565b61026261025d3660046115fb565b61058b565b005b610206610272366004611612565b6105fa565b610262610285366004611660565b610667565b61026261029836600461171d565b610762565b604051600881526020016101ea565b6102626102ba3660046115fb565b6107c4565b61023961271081565b6102626102d6366004611747565b610826565b6102626102e9366004611747565b610901565b6040805180820190915260068152653b189718171960d11b60208201526101dd565b61023960015481565b60025461032c906001600160a01b031681565b6040516001600160a01b0390911681526020016101ea565b610239610352366004611747565b6001600160a01b03165f9081525f5160206119965f395f51905f52602052604090205490565b6102626109d9565b61026261038e3660046115d3565b6109ec565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031661032c565b6101dd610b3d565b6102066103d93660046115d3565b610b7b565b6102626103ec3660046115d3565b610bdf565b6102626103ff36600461171d565b610d0b565b610239610412366004611760565b610d6a565b610262610425366004611788565b610db3565b610262610438366004611747565b610f3d565b61026261044b366004611747565b610f93565b61020661045e36600461171d565b600460209081525f928352604080842090915290825290205460ff1681565b61020661048b366004611747565b610fd0565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060915f5160206119965f395f51905f52916104ce906117c7565b80601f01602080910402602001604051908101604052809291908181526020018280546104fa906117c7565b80156105455780601f1061051c57610100808354040283529160200191610545565b820191905f5260205f20905b81548152906001019060200180831161052857829003601f168201915b505050505091505090565b5f61055a33610fd0565b15610578576040516355b99b9560e11b815260040160405180910390fd5b6105828383610fed565b90505b92915050565b610593611004565b6127108111156105be576040516336e6824b60e21b8152600481018290526024015b60405180910390fd5b60018190556040518181527f614d0dba59ce7a9d3d2532023863fa3185eea8ea95bd986937e244d271e24aac906020015b60405180910390a150565b5f61060433610fd0565b15610622576040516355b99b9560e11b815260040160405180910390fd5b61062b84610fd0565b156106545760405163410e402f60e01b81526001600160a01b03851660048201526024016105b5565b61065f84848461105f565b949350505050565b61066f611082565b61067833610fd0565b15610696576040516355b99b9560e11b815260040160405180910390fd5b6001545f90158015906106b457506002546001600160a01b03163314155b156106ef57612710600154846106ca9190611813565b6106d4919061182a565b6002549091506106ef9033906001600160a01b0316836110b9565b610702336106fd8386611849565b611116565b337f1808b841eb16c14c59b7f58642fb214dc5a2fe88a2844142a9b1cc36aa9e3d0c61072e8386611849565b838560405161073f9392919061185c565b60405180910390a25061075e60015f5160206119b65f395f51905f5255565b5050565b61076a611004565b5f8281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551909184917f2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f39190a35050565b6107cc611004565b6127108111156107f2576040516336e6824b60e21b8152600481018290526024016105b5565b5f8190556040518181527f2e33d500ef4e4fe2a0cffa0a719aeabee99da3b8e14d4247be011bf0d6bd70fa906020016105ef565b335f9081527fcd35cb1b1618147bb2fd9b042b8ba9937963b2d70a2e61e77ca9105a2e935fd760205260409020547f98db8a220cd0f09badce9f22d0ba7e93edb3d404448cc3560d391ab096ad16e99060ff166108995760405163315bfbf160e11b8152600481018290526024016105b5565b6108a1611082565b6001600160a01b0382165f81815260036020526040808220805460ff19166001179055513392917fd36871fdf6981136f3ac0564927005901eda06f7a9dff1e8b2a1d7846b8ebb5091a361075e60015f5160206119b65f395f51905f5255565b335f9081527fcd35cb1b1618147bb2fd9b042b8ba9937963b2d70a2e61e77ca9105a2e935fd760205260409020547f98db8a220cd0f09badce9f22d0ba7e93edb3d404448cc3560d391ab096ad16e99060ff166109745760405163315bfbf160e11b8152600481018290526024016105b5565b61097c611082565b6001600160a01b0382165f81815260036020526040808220805460ff19169055513392917f576a9aef294e1b4baf3617fde4cbc80ba5344d5eb508222f29e558981704a45791a361075e60015f5160206119b65f395f51905f5255565b6109e1611004565b6109ea5f61115d565b565b335f9081527f1149abdacdcfeae53fd228bf85482586626476507ee3998c58512372f73c2c5260205260409020547fe28434228950b641dbbc0178de89daa359a87c6ee0d8399aeace52a98fe902b99060ff16610a5f5760405163315bfbf160e11b8152600481018290526024016105b5565b610a67611082565b610a7083610fd0565b15610a8e576040516355b99b9560e11b815260040160405180910390fd5b5f805415610ac9576127105f5484610aa69190611813565b610ab0919061182a565b600254909150610ac9906001600160a01b0316826111cd565b610adc84610ad78386611849565b6111cd565b60408051848152602081018390526001600160a01b038616917fb46ee8c6b5deda3534f80679d8333b7246a4ced51558cb716ed4daee35b4e86d91015b60405180910390a250610b3860015f5160206119b65f395f51905f5255565b505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060915f5160206119965f395f51905f52916104ce906117c7565b5f610b8533610fd0565b15610ba3576040516355b99b9560e11b815260040160405180910390fd5b610bac83610fd0565b15610bd5576040516349b6200f60e11b81526001600160a01b03841660048201526024016105b5565b6105828383611201565b335f9081527f9ed2841df6c51372bb005a5de8c5dfa34f6f3623d77a62166a8d9e509237ece460205260409020547fd63df3124ab9d25c43f1de0b4b2d1871b3b6e7f89d94baee140070afc1e726a69060ff16610c525760405163315bfbf160e11b8152600481018290526024016105b5565b610c5a611082565b610c6383610fd0565b15610c81576040516355b99b9560e11b815260040160405180910390fd5b5f805415610cbc576127105f5484610c999190611813565b610ca3919061182a565b600254909150610cbc906001600160a01b0316826111cd565b610cca84610ad78386611849565b60408051848152602081018390526001600160a01b038616917f48e5e0e2d0a56918715ddc344ed5a3a95ff592e7a5b6fa6fdfa069596bbf27469101610b19565b610d13611004565b5f8281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551909184917f155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a529190a35050565b6001600160a01b039182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f81158015610df85750825b90505f8267ffffffffffffffff166001148015610e145750303b155b905081158015610e22575080155b15610e405760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610e6a57845460ff60401b1916600160401b1785555b610e7261120e565b610ebf6040518060400160405280600c81526020016b2132b930902134ba31b7b4b760a11b815250604051806040016040528060078152602001666265726142544360c81b81525061121e565b610ec889611230565b600280546001600160a01b0319166001600160a01b038a161790555f87905560018690558315610f3257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b610f45611004565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f3c864541ef71378c6229510ed90f376565ee42d9c5e0904a984a9e863e6db44f906020016105ef565b610f9b611004565b6001600160a01b038116610fc457604051631e4fbdf760e01b81525f60048201526024016105b5565b610fcd8161115d565b50565b6001600160a01b03165f9081526003602052604090205460ff1690565b5f33610ffa818585611241565b5060019392505050565b336110367f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b0316146109ea5760405163118cdaa760e01b81523360048201526024016105b5565b5f3361106c85828561124e565b6110778585856110b9565b506001949350505050565b5f5160206119b65f395f51905f528054600119016110b357604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b6001600160a01b0383166110e257604051634b637e8f60e11b81525f60048201526024016105b5565b6001600160a01b03821661110b5760405163ec442f0560e01b81525f60048201526024016105b5565b610b388383836112b2565b6001600160a01b03821661113f57604051634b637e8f60e11b81525f60048201526024016105b5565b61075e825f836112b2565b60015f5160206119b65f395f51905f5255565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6001600160a01b0382166111f65760405163ec442f0560e01b81525f60048201526024016105b5565b61075e5f83836112b2565b5f33610ffa8185856110b9565b6112166113eb565b6109ea611434565b6112266113eb565b61075e828261143c565b6112386113eb565b610fcd8161148c565b610b388383836001611494565b5f6112598484610d6a565b90505f198110156112ac578181101561129e57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016105b5565b6112ac84848484035f611494565b50505050565b5f5160206119965f395f51905f526001600160a01b0384166112ec5781816002015f8282546112e19190611883565b9091555061135c9050565b6001600160a01b0384165f908152602082905260409020548281101561133e5760405163391434e360e21b81526001600160a01b038616600482015260248101829052604481018490526064016105b5565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b03831661137a576002810180548390039055611398565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113dd91815260200190565b60405180910390a350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166109ea57604051631afcd79f60e31b815260040160405180910390fd5b61114a6113eb565b6114446113eb565b5f5160206119965f395f51905f527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0361147d84826118da565b50600481016112ac83826118da565b610f9b6113eb565b5f5160206119965f395f51905f526001600160a01b0385166114cb5760405163e602df0560e01b81525f60048201526024016105b5565b6001600160a01b0384166114f457604051634a1406b160e11b81525f60048201526024016105b5565b6001600160a01b038086165f9081526001830160209081526040808320938816835292905220839055811561157157836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258560405161156891815260200190565b60405180910390a35b5050505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6105826020830184611578565b80356001600160a01b03811681146115ce575f5ffd5b919050565b5f5f604083850312156115e4575f5ffd5b6115ed836115b8565b946020939093013593505050565b5f6020828403121561160b575f5ffd5b5035919050565b5f5f5f60608486031215611624575f5ffd5b61162d846115b8565b925061163b602085016115b8565b929592945050506040919091013590565b634e487b7160e01b5f52604160045260245ffd5b5f5f60408385031215611671575f5ffd5b82359150602083013567ffffffffffffffff81111561168e575f5ffd5b8301601f8101851361169e575f5ffd5b803567ffffffffffffffff8111156116b8576116b861164c565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156116e7576116e761164c565b6040528181528282016020018710156116fe575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f5f6040838503121561172e575f5ffd5b8235915061173e602084016115b8565b90509250929050565b5f60208284031215611757575f5ffd5b610582826115b8565b5f5f60408385031215611771575f5ffd5b61177a836115b8565b915061173e602084016115b8565b5f5f5f5f6080858703121561179b575f5ffd5b6117a4856115b8565b93506117b2602086016115b8565b93969395505050506040820135916060013590565b600181811c908216806117db57607f821691505b6020821081036117f957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610585576105856117ff565b5f8261184457634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610585576105856117ff565b838152826020820152606060408201525f61187a6060830184611578565b95945050505050565b80820180821115610585576105856117ff565b601f821115610b3857805f5260205f20601f840160051c810160208510156118bb5750805b601f840160051c820191505b81811015611571575f81556001016118c7565b815167ffffffffffffffff8111156118f4576118f461164c565b6119088161190284546117c7565b84611896565b6020601f82116001811461193a575f83156119235750848201515b5f19600385901b1c1916600184901b178455611571565b5f84815260208120601f198516915b828110156119695787850151825560209485019460019092019101611949565b508482101561198657868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a2646970667358221220b58dd87555e9ac953163155fdb9964c33f10226a4830e849e0b364e92488966264736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
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.