ETH Price: $3,217.01 (+1.16%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Wrap237911732025-11-13 15:27:3528 days ago1763047655IN
0x38a9aF1B...D3D5dCA00
0 ETH0.000224832.08499781
Unwrap237797922025-11-12 1:13:4730 days ago1762910027IN
0x38a9aF1B...D3D5dCA00
0 ETH0.000008150.190418
Wrap237797822025-11-12 1:11:4730 days ago1762909907IN
0x38a9aF1B...D3D5dCA00
0 ETH0.00002190.16880916

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WrappedUnicorns

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

/**
 * @title Wrapped Unicorns w🦄
 * @notice A 1:1 ERC-20 wrapper for the historic 2016 Unicorns 🦄 token, 
 *         created by Alex Van de Sande for 2.014+ ETH donors of the FoudationTipJar.
 * @dev The original token remains at 0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7 and must be wrapped via `approve` and then `wrap`.
*/

// Interface to the original 2016 Unicorn token 🦄
interface IUnicorns {
    function transferFrom(address from, address to, uint256 value) external;
    function transfer(address to, uint256 value) external;
    function balanceOf(address owner) external view returns (uint256);
}

contract WrappedUnicorns {
    // --- Metadata ---
    string public constant name = "Unicorns";
    string public constant symbol = unicode"w🦄";
    uint8  public constant decimals = 0;

    /// @notice Immutable reference to the original Unicorns token 🦄
    IUnicorns public immutable unicorns;

    // --- ERC-20 storage ---
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;
    uint256 public totalSupply;

    // --- Events ---
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Wrapped(address indexed from, uint256 amount);
    event Unwrapped(address indexed to, uint256 amount);

    constructor() {
        unicorns = IUnicorns(0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7);
    }

    // ----------------------------
    // Wrap / Unwrap (core logic)
    // ----------------------------

    /// @notice Lock Unicorns and mint equivalent wrapped Unicorn tokens.
    /// @dev User must first call `approve(wrapper, amount)` on the Unicorn token.
    function wrap(uint256 amount) external {
        require(amount > 0, "zero amount");
        unicorns.transferFrom(msg.sender, address(this), amount);

        balanceOf[msg.sender] += amount;
        totalSupply += amount;

        emit Transfer(address(0), msg.sender, amount);
        emit Wrapped(msg.sender, amount);
    }

    /// @notice Burn wrapped Unicorn tokens to redeem the same number of Unicorns.
    function unwrap(uint256 amount) external {
        require(amount > 0, "zero amount");
        uint256 bal = balanceOf[msg.sender];
        require(bal >= amount, "insufficient balance");

        balanceOf[msg.sender] = bal - amount;
        totalSupply -= amount;

        unicorns.transfer(msg.sender, amount);

        emit Transfer(msg.sender, address(0), amount);
        emit Unwrapped(msg.sender, amount);
    }

    // ----------------------------
    // ERC-20 functions
    // ----------------------------

    function transfer(address to, uint256 amount) external returns (bool) {
        _transfer(msg.sender, to, amount);
        return true;
    }

    function approve(address spender, uint256 amount) external returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    function transferFrom(address from, address to, uint256 amount) external returns (bool) {
        uint256 allowed = allowance[from][msg.sender];
        require(allowed >= amount, "allowance exceeded");
        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;
        _transfer(from, to, amount);
        return true;
    }

    function _transfer(address from, address to, uint256 amount) internal {
        require(to != address(0), "transfer to zero");
        uint256 bal = balanceOf[from];
        require(bal >= amount, "insufficient balance");

        balanceOf[from] = bal - amount;
        balanceOf[to] += amount;
        emit Transfer(from, to, amount);
    }

    // ----------------------------
    // Block accidental ETH sends
    // ----------------------------
    receive() external payable { revert(); }
    fallback() external payable { revert(); }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"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":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unwrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Wrapped","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","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":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":[],"name":"unicorns","outputs":[{"internalType":"contract IUnicorns","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a0604052348015600f57600080fd5b507389205a3a3b2a69de6dbf7f01ed13b2108b2c43e7608052608051610a3461005160003960008181610221015281816104f9015261062e0152610a346000f3fe6080604052600436106100a75760003560e01c806395d89b411161006457806395d89b41146101be578063a9059cbb146101ef578063be4feef31461020f578063dd62ed3e1461025b578063de0e9a3e14610293578063ea598cb0146102b557600080fd5b806306fdde03146100ac578063095ea7b3146100f657806318160ddd1461012657806323b872dd1461014a578063313ce5671461016a57806370a0823114610191575b600080fd5b3480156100b857600080fd5b506100e060405180604001604052806008815260200167556e69636f726e7360c01b81525081565b6040516100ed9190610883565b60405180910390f35b34801561010257600080fd5b506101166101113660046108ed565b6102d5565b60405190151581526020016100ed565b34801561013257600080fd5b5061013c60025481565b6040519081526020016100ed565b34801561015657600080fd5b50610116610165366004610917565b610342565b34801561017657600080fd5b5061017f600081565b60405160ff90911681526020016100ed565b34801561019d57600080fd5b5061013c6101ac366004610954565b60006020819052908152604090205481565b3480156101ca57600080fd5b506100e0604051806040016040528060058152602001641dfc27e9a160da1b81525081565b3480156101fb57600080fd5b5061011661020a3660046108ed565b6103fe565b34801561021b57600080fd5b506102437f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100ed565b34801561026757600080fd5b5061013c610276366004610976565b600160209081526000928352604080842090915290825290205481565b34801561029f57600080fd5b506102b36102ae3660046109a9565b610414565b005b3480156102c157600080fd5b506102b36102d03660046109a9565b6105ce565b3360008181526001602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103309086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0383166000908152600160209081526040808320338452909152812054828110156103b05760405162461bcd60e51b8152602060048201526012602482015271185b1b1bddd85b98d948195e18d95959195960721b60448201526064015b60405180910390fd5b60001981146103e8576103c383826109d8565b6001600160a01b03861660009081526001602090815260408083203384529091529020555b6103f3858585610740565b506001949350505050565b600061040b338484610740565b50600192915050565b600081116104525760405162461bcd60e51b815260206004820152600b60248201526a1e995c9bc8185b5bdd5b9d60aa1b60448201526064016103a7565b33600090815260208190526040902054818110156104a95760405162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b60448201526064016103a7565b6104b382826109d8565b33600090815260208190526040812091909155600280548492906104d89084906109d8565b909155505060405163a9059cbb60e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90604401600060405180830381600087803b15801561054557600080fd5b505af1158015610559573d6000803e3d6000fd5b5050604051848152600092503391507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a360405182815233907f95ae649bfaaef9def56a52f4fb2d9e8fa5496bb7082930e442c74cc76b03dcb39060200160405180910390a25050565b6000811161060c5760405162461bcd60e51b815260206004820152600b60248201526a1e995c9bc8185b5bdd5b9d60aa1b60448201526064016103a7565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd90606401600060405180830381600087803b15801561067a57600080fd5b505af115801561068e573d6000803e3d6000fd5b505033600090815260208190526040812080548594509092506106b29084906109eb565b9250508190555080600260008282546106cb91906109eb565b909155505060405181815233906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a360405181815233907f4700c1726b4198077cd40320a32c45265a1910521eb0ef713dd1d8412413d7fc9060200160405180910390a250565b6001600160a01b0382166107895760405162461bcd60e51b815260206004820152601060248201526f7472616e7366657220746f207a65726f60801b60448201526064016103a7565b6001600160a01b038316600090815260208190526040902054818110156107e95760405162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b60448201526064016103a7565b6107f382826109d8565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906108299084906109eb565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161087591815260200190565b60405180910390a350505050565b602081526000825180602084015260005b818110156108b15760208186018101516040868401015201610894565b506000604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b03811681146108e857600080fd5b919050565b6000806040838503121561090057600080fd5b610909836108d1565b946020939093013593505050565b60008060006060848603121561092c57600080fd5b610935846108d1565b9250610943602085016108d1565b929592945050506040919091013590565b60006020828403121561096657600080fd5b61096f826108d1565b9392505050565b6000806040838503121561098957600080fd5b610992836108d1565b91506109a0602084016108d1565b90509250929050565b6000602082840312156109bb57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561033c5761033c6109c2565b8082018082111561033c5761033c6109c256fea2646970667358221220498b46dcb7974e6c7de418f153941cfadc0a5617381b2126d9fba180c0741ef264736f6c634300081e0033

Deployed Bytecode

0x6080604052600436106100a75760003560e01c806395d89b411161006457806395d89b41146101be578063a9059cbb146101ef578063be4feef31461020f578063dd62ed3e1461025b578063de0e9a3e14610293578063ea598cb0146102b557600080fd5b806306fdde03146100ac578063095ea7b3146100f657806318160ddd1461012657806323b872dd1461014a578063313ce5671461016a57806370a0823114610191575b600080fd5b3480156100b857600080fd5b506100e060405180604001604052806008815260200167556e69636f726e7360c01b81525081565b6040516100ed9190610883565b60405180910390f35b34801561010257600080fd5b506101166101113660046108ed565b6102d5565b60405190151581526020016100ed565b34801561013257600080fd5b5061013c60025481565b6040519081526020016100ed565b34801561015657600080fd5b50610116610165366004610917565b610342565b34801561017657600080fd5b5061017f600081565b60405160ff90911681526020016100ed565b34801561019d57600080fd5b5061013c6101ac366004610954565b60006020819052908152604090205481565b3480156101ca57600080fd5b506100e0604051806040016040528060058152602001641dfc27e9a160da1b81525081565b3480156101fb57600080fd5b5061011661020a3660046108ed565b6103fe565b34801561021b57600080fd5b506102437f00000000000000000000000089205a3a3b2a69de6dbf7f01ed13b2108b2c43e781565b6040516001600160a01b0390911681526020016100ed565b34801561026757600080fd5b5061013c610276366004610976565b600160209081526000928352604080842090915290825290205481565b34801561029f57600080fd5b506102b36102ae3660046109a9565b610414565b005b3480156102c157600080fd5b506102b36102d03660046109a9565b6105ce565b3360008181526001602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103309086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0383166000908152600160209081526040808320338452909152812054828110156103b05760405162461bcd60e51b8152602060048201526012602482015271185b1b1bddd85b98d948195e18d95959195960721b60448201526064015b60405180910390fd5b60001981146103e8576103c383826109d8565b6001600160a01b03861660009081526001602090815260408083203384529091529020555b6103f3858585610740565b506001949350505050565b600061040b338484610740565b50600192915050565b600081116104525760405162461bcd60e51b815260206004820152600b60248201526a1e995c9bc8185b5bdd5b9d60aa1b60448201526064016103a7565b33600090815260208190526040902054818110156104a95760405162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b60448201526064016103a7565b6104b382826109d8565b33600090815260208190526040812091909155600280548492906104d89084906109d8565b909155505060405163a9059cbb60e01b8152336004820152602481018390527f00000000000000000000000089205a3a3b2a69de6dbf7f01ed13b2108b2c43e76001600160a01b03169063a9059cbb90604401600060405180830381600087803b15801561054557600080fd5b505af1158015610559573d6000803e3d6000fd5b5050604051848152600092503391507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a360405182815233907f95ae649bfaaef9def56a52f4fb2d9e8fa5496bb7082930e442c74cc76b03dcb39060200160405180910390a25050565b6000811161060c5760405162461bcd60e51b815260206004820152600b60248201526a1e995c9bc8185b5bdd5b9d60aa1b60448201526064016103a7565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000089205a3a3b2a69de6dbf7f01ed13b2108b2c43e76001600160a01b0316906323b872dd90606401600060405180830381600087803b15801561067a57600080fd5b505af115801561068e573d6000803e3d6000fd5b505033600090815260208190526040812080548594509092506106b29084906109eb565b9250508190555080600260008282546106cb91906109eb565b909155505060405181815233906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a360405181815233907f4700c1726b4198077cd40320a32c45265a1910521eb0ef713dd1d8412413d7fc9060200160405180910390a250565b6001600160a01b0382166107895760405162461bcd60e51b815260206004820152601060248201526f7472616e7366657220746f207a65726f60801b60448201526064016103a7565b6001600160a01b038316600090815260208190526040902054818110156107e95760405162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b60448201526064016103a7565b6107f382826109d8565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906108299084906109eb565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161087591815260200190565b60405180910390a350505050565b602081526000825180602084015260005b818110156108b15760208186018101516040868401015201610894565b506000604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b03811681146108e857600080fd5b919050565b6000806040838503121561090057600080fd5b610909836108d1565b946020939093013593505050565b60008060006060848603121561092c57600080fd5b610935846108d1565b9250610943602085016108d1565b929592945050506040919091013590565b60006020828403121561096657600080fd5b61096f826108d1565b9392505050565b6000806040838503121561098957600080fd5b610992836108d1565b91506109a0602084016108d1565b90509250929050565b6000602082840312156109bb57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561033c5761033c6109c2565b8082018082111561033c5761033c6109c256fea2646970667358221220498b46dcb7974e6c7de418f153941cfadc0a5617381b2126d9fba180c0741ef264736f6c634300081e0033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.