ETH Price: $3,240.33 (-0.44%)
Gas: 2 Gwei

Contract

0x8D62d7614Ac7c6425e5790cdEFfa6b0869201Fb4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw USDC152841652022-08-05 19:16:21722 days ago1659726981IN
0x8D62d761...869201Fb4
0 ETH0.0012915224.00239679
Withdraw Crown152841612022-08-05 19:15:36722 days ago1659726936IN
0x8D62d761...869201Fb4
0 ETH0.0007951618.30400824
Buy Crown152329442022-07-28 19:43:19730 days ago1659037399IN
0x8D62d761...869201Fb4
0 ETH0.003215328.33945768
Buy Crown151873862022-07-21 17:54:50737 days ago1658426090IN
0x8D62d761...869201Fb4
0 ETH0.0023031920.30017781
Buy Crown150415562022-06-28 20:49:17760 days ago1656449357IN
0x8D62d761...869201Fb4
0 ETH0.0058733151.76685785
Buy Crown150390782022-06-28 9:46:59760 days ago1656409619IN
0x8D62d761...869201Fb4
0 ETH0.0026952223.75550138
Buy Crown150379952022-06-28 4:50:56760 days ago1656391856IN
0x8D62d761...869201Fb4
0 ETH0.0030126626.55332607
Buy Crown150292642022-06-26 13:46:36762 days ago1656251196IN
0x8D62d761...869201Fb4
0 ETH0.0043764145.41879856
Buy Crown150263692022-06-26 0:38:03763 days ago1656203883IN
0x8D62d761...869201Fb4
0 ETH0.0023640924.53780769
Buy Crown150209242022-06-25 0:11:18764 days ago1656115878IN
0x8D62d761...869201Fb4
0 ETH0.0050130744.1847636
Buy Crown150204872022-06-24 22:14:17764 days ago1656108857IN
0x8D62d761...869201Fb4
0 ETH0.0065811357.99943612
Buy Crown150186012022-06-24 13:56:36764 days ago1656078996IN
0x8D62d761...869201Fb4
0 ETH0.0060596553.4092772
Buy Crown150153852022-06-23 23:21:52765 days ago1656026512IN
0x8D62d761...869201Fb4
0 ETH0.0037862333.36799729
Buy Crown150153222022-06-23 23:06:42765 days ago1656025602IN
0x8D62d761...869201Fb4
0 ETH0.0038198333.66764689
Buy Crown150099632022-06-22 22:57:17766 days ago1655938637IN
0x8D62d761...869201Fb4
0 ETH0.0022546623.39912166
Buy Crown150068552022-06-22 8:54:54766 days ago1655888094IN
0x8D62d761...869201Fb4
0 ETH0.0027993824.67353017
Buy Crown150056602022-06-22 3:39:58767 days ago1655869198IN
0x8D62d761...869201Fb4
0 ETH0.002644527.4483096
Buy Crown150056462022-06-22 3:35:50767 days ago1655868950IN
0x8D62d761...869201Fb4
0 ETH0.002819324.85174507
Buy Crown150011352022-06-21 7:33:42767 days ago1655796822IN
0x8D62d761...869201Fb4
0 ETH0.002653523.38779891
Buy Crown150008942022-06-21 6:23:28767 days ago1655792608IN
0x8D62d761...869201Fb4
0 ETH0.0037475133.03029536
Buy Crown149981842022-06-20 19:07:47768 days ago1655752067IN
0x8D62d761...869201Fb4
0 ETH0.0025054322.08272418
Buy Crown149916982022-06-19 16:25:41769 days ago1655655941IN
0x8D62d761...869201Fb4
0 ETH0.0025533526.50219384
Buy Crown149915792022-06-19 15:55:16769 days ago1655654116IN
0x8D62d761...869201Fb4
0 ETH0.0032672933.91243265
Buy Crown149910122022-06-19 13:30:15769 days ago1655645415IN
0x8D62d761...869201Fb4
0 ETH0.0021819322.64431999
Buy Crown149909912022-06-19 13:24:51769 days ago1655645091IN
0x8D62d761...869201Fb4
0 ETH0.002975226.2231952
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CrownVendor

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : CrownVendor.sol
pragma solidity 0.8.14;
// SPDX-License-Identifier: MIT

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

/// @title Crown Capital Token Vendor
/// @author sters.eth
/// @notice Contract will emit Crown for USDC
contract CrownVendor is Ownable, ReentrancyGuard { 

    string public constant name = "Crown Capital Vendor";

    // @dev Token Contracts
    IERC20 public _crownToken;
    IERC20 public _usdcToken;
    
    // @dev the conversion rate of USDC to Crown
    uint256 public USDCPerCrown;

    // @dev boolean to turn whitelist requirement on and off
    bool public whitelist;

    // @dev whitelist addresses
    address[] public wlAddresses;

    // Initialize events
    event PayUSDC(address sender, uint256 amount);
    event BoughtCrown(address receiver, uint256 amount);
    event WithdrawCrown(address owner, uint256 vendorBalance);
    event WithdrawUSDC(address owner, uint256 vendorBalance);
    event WhitelistStatusUpdated(address _from, bool status);
    event AddedWlAddress(address _from, address userAddress);
    event RemovedWlAddress(address _from, address userAddress);
    event ResetWhitelist(address _from);


    constructor(IERC20 crownAddress, IERC20 usdcAddress) {
        _crownToken = crownAddress;
        _usdcToken = usdcAddress;
        USDCPerCrown = 200000;
        whitelist=false;
    }


    /**
    * @notice Set the USDC to Crown rate with 6 digit accuracy (e.g. $0.20 CROWN/USDC = 200000)
    */
    function setUSDCPerCrown(uint256 rate) external onlyOwner {
       USDCPerCrown = rate;
    }


    /** @dev set whitelist to true or false.
    */  
    function setWhitelist(bool status) external onlyOwner {
        whitelist = status;
        emit WhitelistStatusUpdated(msg.sender, status);
    }


    /** @dev Owner may add addresses to whitelist.
    * @param userAddress address of user with whitelist access.
    */  
    function addToWhitelist(address userAddress) external onlyOwner {
        require(userAddress != address(0), 'address can not be zero address');
        wlAddresses.push(userAddress);
        emit AddedWlAddress(msg.sender, userAddress);
    }


    /// @dev deletes an address from the whitelist if found in whitelist
    function removeAddressFromWl(address userAddress) external onlyOwner {
        for (
            uint256 wlIndex = 0;
            wlIndex < wlAddresses.length;
            wlIndex++
        ) {
            if(userAddress == wlAddresses[wlIndex]){
                if(wlAddresses.length == 1){
                    resetWhitelist();
                }                    
                else {
                    wlAddresses[wlIndex] = wlAddresses[wlAddresses.length - 1];
                    wlAddresses.pop(); // Remove the last element
                    emit RemovedWlAddress(msg.sender, userAddress);
                }
            }
        }
    }


  /// @dev deletes all entries from whitelist
  function resetWhitelist() public onlyOwner {
      delete wlAddresses;
      emit ResetWhitelist(msg.sender);
  }


    /**
    * @notice Allow users to buy crown for USDC by specifying the number of Crown tokens desired. 
    */
    function buyCrown(uint256 crownTokens) external nonReentrant {
        // Check that the requested amount of tokens to sell is more than 0
        require(crownTokens > 0, "Specify an amount of Crown greater than zero");

        // Check that the Vendor's balance is enough to do the swap
        uint256 vendorBalance = _crownToken.balanceOf(address(this));
        require(vendorBalance >= crownTokens, "Vendor contract does not have a suffcient Crown balance.");
        
        // Check if whitelist is active
        if(whitelist){
            bool userOnWhitelist = false;
            for (
                uint256 wlIndex = 0;
                wlIndex < wlAddresses.length;
                wlIndex++
            ) {
                if(msg.sender == wlAddresses[wlIndex]){
                    userOnWhitelist = true;
                }
            }
            require(userOnWhitelist, "User not found on whitelist");
        }

        // Calculate USDC needed
        uint256 usdcToSpend = crownToUSDC(crownTokens);

        // Check that the user's USDC balance is enough to do the swap
        address sender = msg.sender;
        uint256 userBalance = _usdcToken.balanceOf(sender);
        require(userBalance >= usdcToSpend, "You do not have enough USDC.");

        // Check that user has approved the contract
        uint256 contractAllowance = _usdcToken.allowance(sender, address(this));
        require(contractAllowance >= usdcToSpend, "Must approve this contract to spend more USDC.");

        // Transfer USDC from user to contract
        (bool recieved) = _usdcToken.transferFrom(sender, address(this), usdcToSpend);
        require(recieved, "Failed to transfer USDC from vendor to user");
        emit PayUSDC(sender, usdcToSpend);

        // Send Crown to Purchaser
        (bool sent) = _crownToken.transfer(sender, crownTokens);
        require(sent, "Failed to transfer Crown from  to vendor");
        emit BoughtCrown(sender, crownTokens);
    }


    /**
    * @notice Allow the owner of the contract to withdraw all $USDC
    */
    function withdrawUSDC() external onlyOwner {
      uint256 vendorBalance = _usdcToken.balanceOf(address(this));
      require(vendorBalance > 0, "Nothing to Withdraw");
      (bool sent) = _usdcToken.transfer(msg.sender, vendorBalance);
      require(sent, "Failed to transfer tokens from user to Farm");

      emit WithdrawUSDC(msg.sender, vendorBalance);
    }


    /**
    * @notice Allow the owner of the contract to withdraw all $CROWN
    */
    function withdrawCrown() external onlyOwner {
      uint256 vendorBalance = _crownToken.balanceOf(address(this));
      require(vendorBalance > 0, "Nothing to Withdraw");
      (bool sent) = _crownToken.transfer(msg.sender, vendorBalance);
      require(sent, "Failed to transfer tokens from user to Farm");

      emit WithdrawCrown(msg.sender, vendorBalance);
    }


    /**
    * @notice Helper function: Convert Crown tokens to USDC 
    */
    function crownToUSDC(uint256 crownTokens) public view returns (uint256 usdc) {
      usdc = (crownTokens * USDCPerCrown)/10**18;
      return usdc;
    }


    /**
    * @notice Helper function: Convert USDC tokens to Crown
    */
    function usdcToCrown(uint256 USDC) external view returns (uint256 crownTokens) {
      crownTokens = (USDC / USDCPerCrown) * 10**18;
      return crownTokens;
    }
}

File 2 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 5 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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 you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 5 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"crownAddress","type":"address"},{"internalType":"contract IERC20","name":"usdcAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"address","name":"userAddress","type":"address"}],"name":"AddedWlAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BoughtCrown","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PayUSDC","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"address","name":"userAddress","type":"address"}],"name":"RemovedWlAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"}],"name":"ResetWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"WhitelistStatusUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"vendorBalance","type":"uint256"}],"name":"WithdrawCrown","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"vendorBalance","type":"uint256"}],"name":"WithdrawUSDC","type":"event"},{"inputs":[],"name":"USDCPerCrown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_crownToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_usdcToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"crownTokens","type":"uint256"}],"name":"buyCrown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"crownTokens","type":"uint256"}],"name":"crownToUSDC","outputs":[{"internalType":"uint256","name":"usdc","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":"address","name":"userAddress","type":"address"}],"name":"removeAddressFromWl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rate","type":"uint256"}],"name":"setUSDCPerCrown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"USDC","type":"uint256"}],"name":"usdcToCrown","outputs":[{"internalType":"uint256","name":"crownTokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawCrown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawUSDC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"wlAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506040516200157e3803806200157e8339810160408190526200003491620000f3565b6200003f3362000086565b60018055600280546001600160a01b039384166001600160a01b0319918216179091556003805492909316911617905562030d406004556005805460ff191690556200012b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000ee57600080fd5b919050565b600080604083850312156200010757600080fd5b6200011283620000d6565b91506200012260208401620000d6565b90509250929050565b611443806200013b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80638923d5a2116100ad578063d932dd2811610071578063d932dd2814610260578063db01f6b914610273578063e43252d714610286578063f2fde38b14610299578063f958a657146102ac57600080fd5b80638923d5a2146101ec5780638da5cb5b1461021757806393e59dc114610228578063aa6d4b9d14610245578063d8fc063d1461025857600080fd5b80635c5c2add116100f45780635c5c2add14610194578063715018a6146101ab578063718b8948146101b35780638131796a146101c657806386a6b90d146101d957600080fd5b806306fdde031461012657806322c742fb1461016f578063399131c7146101795780635909865a1461018c575b600080fd5b6101596040518060400160405280601481526020017321b937bbb71021b0b834ba30b6102b32b73237b960611b81525081565b60405161016691906111db565b60405180910390f35b6101776102bf565b005b610177610187366004611230565b61047a565b61017761060d565b61019d60045481565b604051908152602001610166565b610177610678565b61019d6101c1366004611260565b6106ae565b6101776101d4366004611260565b6106d6565b6101776101e7366004611260565b610d1a565b6003546101ff906001600160a01b031681565b6040516001600160a01b039091168152602001610166565b6000546001600160a01b03166101ff565b6005546102359060ff1681565b6040519015158152602001610166565b6101ff610253366004611260565b610d49565b610177610d73565b61019d61026e366004611260565b610f1d565b6002546101ff906001600160a01b031681565b610177610294366004611230565b610f40565b6101776102a7366004611230565b61104c565b6101776102ba366004611287565b6110e7565b6000546001600160a01b031633146102f25760405162461bcd60e51b81526004016102e9906112a4565b60405180910390fd5b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561033b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035f91906112d9565b9050600081116103a75760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20576974686472617760681b60448201526064016102e9565b60025460405163a9059cbb60e01b8152336004820152602481018390526000916001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156103f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041d91906112f2565b90508061043c5760405162461bcd60e51b81526004016102e99061130f565b60408051338152602081018490527fb10149b92ce21de500c8f3e66603ae47fd6fea0ae5f201b29dd8fe65ad3543dd91015b60405180910390a15050565b6000546001600160a01b031633146104a45760405162461bcd60e51b81526004016102e9906112a4565b60005b60065481101561060957600681815481106104c4576104c461135a565b6000918252602090912001546001600160a01b03908116908316036105f7576006546001036104fa576104f561060d565b6105f7565b6006805461050a90600190611386565b8154811061051a5761051a61135a565b600091825260209091200154600680546001600160a01b0390921691839081106105465761054661135a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060068054806105855761058561139d565b600082815260209020810160001990810180546001600160a01b03191690550190556040517f992a5e69fe3227e80346d056920f1cc15efaef7029edf651d479ebe786f15b51906105ee90339085906001600160a01b0392831681529116602082015260400190565b60405180910390a15b80610601816113b3565b9150506104a7565b5050565b6000546001600160a01b031633146106375760405162461bcd60e51b81526004016102e9906112a4565b610643600660006111a9565b6040513381527f58e10c917c134d65faca8844aeab68c57f4d9b625eb645b20a95b22338240d999060200160405180910390a1565b6000546001600160a01b031633146106a25760405162461bcd60e51b81526004016102e9906112a4565b6106ac6000611159565b565b6000600454826106be91906113cc565b6106d090670de0b6b3a76400006113ee565b92915050565b6002600154036107285760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102e9565b60026001558061078f5760405162461bcd60e51b815260206004820152602c60248201527f5370656369667920616e20616d6f756e74206f662043726f776e20677265617460448201526b6572207468616e207a65726f60a01b60648201526084016102e9565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156107d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fc91906112d9565b9050818110156108745760405162461bcd60e51b815260206004820152603860248201527f56656e646f7220636f6e747261637420646f6573206e6f74206861766520612060448201527f737566666369656e742043726f776e2062616c616e63652e000000000000000060648201526084016102e9565b60055460ff1615610922576000805b6006548110156108d257600681815481106108a0576108a061135a565b6000918252602090912001546001600160a01b031633036108c057600191505b806108ca816113b3565b915050610883565b50806109205760405162461bcd60e51b815260206004820152601b60248201527f55736572206e6f7420666f756e64206f6e2077686974656c697374000000000060448201526064016102e9565b505b600061092d83610f1d565b6003546040516370a0823160e01b815233600482018190529293506000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561097b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099f91906112d9565b9050828110156109f15760405162461bcd60e51b815260206004820152601c60248201527f596f7520646f206e6f74206861766520656e6f75676820555344432e0000000060448201526064016102e9565b600354604051636eb1769f60e11b81526001600160a01b038481166004830152306024830152600092169063dd62ed3e90604401602060405180830381865afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6691906112d9565b905083811015610acf5760405162461bcd60e51b815260206004820152602e60248201527f4d75737420617070726f7665207468697320636f6e747261637420746f20737060448201526d32b7321036b7b932902aa9a2219760911b60648201526084016102e9565b6003546040516323b872dd60e01b81526001600160a01b0385811660048301523060248301526044820187905260009216906323b872dd906064016020604051808303816000875af1158015610b29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4d91906112f2565b905080610bb05760405162461bcd60e51b815260206004820152602b60248201527f4661696c656420746f207472616e7366657220555344432066726f6d2076656e60448201526a3237b9103a37903ab9b2b960a91b60648201526084016102e9565b604080516001600160a01b0386168152602081018790527fe786909deb56c735dfec70c4f42afacde58a94baf0a4228eb6d4d00fa40474d4910160405180910390a160025460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018a9052600092169063a9059cbb906044016020604051808303816000875af1158015610c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6a91906112f2565b905080610cca5760405162461bcd60e51b815260206004820152602860248201527f4661696c656420746f207472616e736665722043726f776e2066726f6d20207460448201526737903b32b73237b960c11b60648201526084016102e9565b604080516001600160a01b0387168152602081018a90527fa58124197299bb35136c1f2d7ed5598aa9d9add3f09eada412aeb2b564b7e2d2910160405180910390a1505060018055505050505050565b6000546001600160a01b03163314610d445760405162461bcd60e51b81526004016102e9906112a4565b600455565b60068181548110610d5957600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610d9d5760405162461bcd60e51b81526004016102e9906112a4565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610de6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0a91906112d9565b905060008111610e525760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20576974686472617760681b60448201526064016102e9565b60035460405163a9059cbb60e01b8152336004820152602481018390526000916001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec891906112f2565b905080610ee75760405162461bcd60e51b81526004016102e99061130f565b60408051338152602081018490527f23ee1b877cb0081138b4973c5b2eca0133c573ad526550935d83aaade37666ca910161046e565b6000670de0b6b3a764000060045483610f3691906113ee565b6106d091906113cc565b6000546001600160a01b03163314610f6a5760405162461bcd60e51b81526004016102e9906112a4565b6001600160a01b038116610fc05760405162461bcd60e51b815260206004820152601f60248201527f616464726573732063616e206e6f74206265207a65726f20616464726573730060448201526064016102e9565b600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0383169081179091556040805133815260208101929092527fbaf5275c69143f208f4331e0ccc82b510db67d4ebf4aba6c5a016234dcddb95191015b60405180910390a150565b6000546001600160a01b031633146110765760405162461bcd60e51b81526004016102e9906112a4565b6001600160a01b0381166110db5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102e9565b6110e481611159565b50565b6000546001600160a01b031633146111115760405162461bcd60e51b81526004016102e9906112a4565b6005805460ff19168215159081179091556040805133815260208101929092527f49081ac6f68c0541ea8f82b948be21b0f16d1d550ad509a8324fec504e2744179101611041565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b50805460008255906000526020600020908101906110e491905b808211156111d757600081556001016111c3565b5090565b600060208083528351808285015260005b81811015611208578581018301518582016040015282016111ec565b8181111561121a576000604083870101525b50601f01601f1916929092016040019392505050565b60006020828403121561124257600080fd5b81356001600160a01b038116811461125957600080fd5b9392505050565b60006020828403121561127257600080fd5b5035919050565b80151581146110e457600080fd5b60006020828403121561129957600080fd5b813561125981611279565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156112eb57600080fd5b5051919050565b60006020828403121561130457600080fd5b815161125981611279565b6020808252602b908201527f4661696c656420746f207472616e7366657220746f6b656e732066726f6d207560408201526a73657220746f204661726d60a81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561139857611398611370565b500390565b634e487b7160e01b600052603160045260246000fd5b6000600182016113c5576113c5611370565b5060010190565b6000826113e957634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561140857611408611370565b50029056fea2646970667358221220e4be6720c7a8b61c07b8db74c973ba6d3e47d6517a5a702b2c4a7dd0519bd1d564736f6c634300080e0033000000000000000000000000444d6088b0f625f8c20192623b3c43001135e0fa000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101215760003560e01c80638923d5a2116100ad578063d932dd2811610071578063d932dd2814610260578063db01f6b914610273578063e43252d714610286578063f2fde38b14610299578063f958a657146102ac57600080fd5b80638923d5a2146101ec5780638da5cb5b1461021757806393e59dc114610228578063aa6d4b9d14610245578063d8fc063d1461025857600080fd5b80635c5c2add116100f45780635c5c2add14610194578063715018a6146101ab578063718b8948146101b35780638131796a146101c657806386a6b90d146101d957600080fd5b806306fdde031461012657806322c742fb1461016f578063399131c7146101795780635909865a1461018c575b600080fd5b6101596040518060400160405280601481526020017321b937bbb71021b0b834ba30b6102b32b73237b960611b81525081565b60405161016691906111db565b60405180910390f35b6101776102bf565b005b610177610187366004611230565b61047a565b61017761060d565b61019d60045481565b604051908152602001610166565b610177610678565b61019d6101c1366004611260565b6106ae565b6101776101d4366004611260565b6106d6565b6101776101e7366004611260565b610d1a565b6003546101ff906001600160a01b031681565b6040516001600160a01b039091168152602001610166565b6000546001600160a01b03166101ff565b6005546102359060ff1681565b6040519015158152602001610166565b6101ff610253366004611260565b610d49565b610177610d73565b61019d61026e366004611260565b610f1d565b6002546101ff906001600160a01b031681565b610177610294366004611230565b610f40565b6101776102a7366004611230565b61104c565b6101776102ba366004611287565b6110e7565b6000546001600160a01b031633146102f25760405162461bcd60e51b81526004016102e9906112a4565b60405180910390fd5b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561033b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035f91906112d9565b9050600081116103a75760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20576974686472617760681b60448201526064016102e9565b60025460405163a9059cbb60e01b8152336004820152602481018390526000916001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156103f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041d91906112f2565b90508061043c5760405162461bcd60e51b81526004016102e99061130f565b60408051338152602081018490527fb10149b92ce21de500c8f3e66603ae47fd6fea0ae5f201b29dd8fe65ad3543dd91015b60405180910390a15050565b6000546001600160a01b031633146104a45760405162461bcd60e51b81526004016102e9906112a4565b60005b60065481101561060957600681815481106104c4576104c461135a565b6000918252602090912001546001600160a01b03908116908316036105f7576006546001036104fa576104f561060d565b6105f7565b6006805461050a90600190611386565b8154811061051a5761051a61135a565b600091825260209091200154600680546001600160a01b0390921691839081106105465761054661135a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060068054806105855761058561139d565b600082815260209020810160001990810180546001600160a01b03191690550190556040517f992a5e69fe3227e80346d056920f1cc15efaef7029edf651d479ebe786f15b51906105ee90339085906001600160a01b0392831681529116602082015260400190565b60405180910390a15b80610601816113b3565b9150506104a7565b5050565b6000546001600160a01b031633146106375760405162461bcd60e51b81526004016102e9906112a4565b610643600660006111a9565b6040513381527f58e10c917c134d65faca8844aeab68c57f4d9b625eb645b20a95b22338240d999060200160405180910390a1565b6000546001600160a01b031633146106a25760405162461bcd60e51b81526004016102e9906112a4565b6106ac6000611159565b565b6000600454826106be91906113cc565b6106d090670de0b6b3a76400006113ee565b92915050565b6002600154036107285760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102e9565b60026001558061078f5760405162461bcd60e51b815260206004820152602c60248201527f5370656369667920616e20616d6f756e74206f662043726f776e20677265617460448201526b6572207468616e207a65726f60a01b60648201526084016102e9565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156107d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fc91906112d9565b9050818110156108745760405162461bcd60e51b815260206004820152603860248201527f56656e646f7220636f6e747261637420646f6573206e6f74206861766520612060448201527f737566666369656e742043726f776e2062616c616e63652e000000000000000060648201526084016102e9565b60055460ff1615610922576000805b6006548110156108d257600681815481106108a0576108a061135a565b6000918252602090912001546001600160a01b031633036108c057600191505b806108ca816113b3565b915050610883565b50806109205760405162461bcd60e51b815260206004820152601b60248201527f55736572206e6f7420666f756e64206f6e2077686974656c697374000000000060448201526064016102e9565b505b600061092d83610f1d565b6003546040516370a0823160e01b815233600482018190529293506000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561097b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099f91906112d9565b9050828110156109f15760405162461bcd60e51b815260206004820152601c60248201527f596f7520646f206e6f74206861766520656e6f75676820555344432e0000000060448201526064016102e9565b600354604051636eb1769f60e11b81526001600160a01b038481166004830152306024830152600092169063dd62ed3e90604401602060405180830381865afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6691906112d9565b905083811015610acf5760405162461bcd60e51b815260206004820152602e60248201527f4d75737420617070726f7665207468697320636f6e747261637420746f20737060448201526d32b7321036b7b932902aa9a2219760911b60648201526084016102e9565b6003546040516323b872dd60e01b81526001600160a01b0385811660048301523060248301526044820187905260009216906323b872dd906064016020604051808303816000875af1158015610b29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4d91906112f2565b905080610bb05760405162461bcd60e51b815260206004820152602b60248201527f4661696c656420746f207472616e7366657220555344432066726f6d2076656e60448201526a3237b9103a37903ab9b2b960a91b60648201526084016102e9565b604080516001600160a01b0386168152602081018790527fe786909deb56c735dfec70c4f42afacde58a94baf0a4228eb6d4d00fa40474d4910160405180910390a160025460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018a9052600092169063a9059cbb906044016020604051808303816000875af1158015610c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6a91906112f2565b905080610cca5760405162461bcd60e51b815260206004820152602860248201527f4661696c656420746f207472616e736665722043726f776e2066726f6d20207460448201526737903b32b73237b960c11b60648201526084016102e9565b604080516001600160a01b0387168152602081018a90527fa58124197299bb35136c1f2d7ed5598aa9d9add3f09eada412aeb2b564b7e2d2910160405180910390a1505060018055505050505050565b6000546001600160a01b03163314610d445760405162461bcd60e51b81526004016102e9906112a4565b600455565b60068181548110610d5957600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610d9d5760405162461bcd60e51b81526004016102e9906112a4565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610de6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0a91906112d9565b905060008111610e525760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20576974686472617760681b60448201526064016102e9565b60035460405163a9059cbb60e01b8152336004820152602481018390526000916001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec891906112f2565b905080610ee75760405162461bcd60e51b81526004016102e99061130f565b60408051338152602081018490527f23ee1b877cb0081138b4973c5b2eca0133c573ad526550935d83aaade37666ca910161046e565b6000670de0b6b3a764000060045483610f3691906113ee565b6106d091906113cc565b6000546001600160a01b03163314610f6a5760405162461bcd60e51b81526004016102e9906112a4565b6001600160a01b038116610fc05760405162461bcd60e51b815260206004820152601f60248201527f616464726573732063616e206e6f74206265207a65726f20616464726573730060448201526064016102e9565b600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0383169081179091556040805133815260208101929092527fbaf5275c69143f208f4331e0ccc82b510db67d4ebf4aba6c5a016234dcddb95191015b60405180910390a150565b6000546001600160a01b031633146110765760405162461bcd60e51b81526004016102e9906112a4565b6001600160a01b0381166110db5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102e9565b6110e481611159565b50565b6000546001600160a01b031633146111115760405162461bcd60e51b81526004016102e9906112a4565b6005805460ff19168215159081179091556040805133815260208101929092527f49081ac6f68c0541ea8f82b948be21b0f16d1d550ad509a8324fec504e2744179101611041565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b50805460008255906000526020600020908101906110e491905b808211156111d757600081556001016111c3565b5090565b600060208083528351808285015260005b81811015611208578581018301518582016040015282016111ec565b8181111561121a576000604083870101525b50601f01601f1916929092016040019392505050565b60006020828403121561124257600080fd5b81356001600160a01b038116811461125957600080fd5b9392505050565b60006020828403121561127257600080fd5b5035919050565b80151581146110e457600080fd5b60006020828403121561129957600080fd5b813561125981611279565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156112eb57600080fd5b5051919050565b60006020828403121561130457600080fd5b815161125981611279565b6020808252602b908201527f4661696c656420746f207472616e7366657220746f6b656e732066726f6d207560408201526a73657220746f204661726d60a81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561139857611398611370565b500390565b634e487b7160e01b600052603160045260246000fd5b6000600182016113c5576113c5611370565b5060010190565b6000826113e957634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561140857611408611370565b50029056fea2646970667358221220e4be6720c7a8b61c07b8db74c973ba6d3e47d6517a5a702b2c4a7dd0519bd1d564736f6c634300080e0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000444d6088b0f625f8c20192623b3c43001135e0fa000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

-----Decoded View---------------
Arg [0] : crownAddress (address): 0x444d6088B0F625f8C20192623B3C43001135E0fa
Arg [1] : usdcAddress (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000444d6088b0f625f8c20192623b3c43001135e0fa
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.