ETH Price: $3,285.99 (-5.14%)

Contract

0xe4d3a12DA965504354F45db21D945270c1238BdB
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Redeem199251402024-05-22 11:31:59188 days ago1716377519IN
0xe4d3a12D...0c1238BdB
0 ETH0.0009807510.22877872
Redeem193216682024-02-27 21:47:47272 days ago1709070467IN
0xe4d3a12D...0c1238BdB
0 ETH0.0045575347.53271942
Redeem192433782024-02-16 22:18:35283 days ago1708121915IN
0xe4d3a12D...0c1238BdB
0 ETH0.001749118.24224563
Redeem192297812024-02-15 0:31:59285 days ago1707957119IN
0xe4d3a12D...0c1238BdB
0 ETH0.0019944320.80097952
Redeem188997862023-12-30 17:22:11332 days ago1703956931IN
0xe4d3a12D...0c1238BdB
0 ETH0.0029846431.12834864
Redeem188941272023-12-29 22:14:47332 days ago1703888087IN
0xe4d3a12D...0c1238BdB
0 ETH0.0017070517.80366356
Redeem188931712023-12-29 19:00:47333 days ago1703876447IN
0xe4d3a12D...0c1238BdB
0 ETH0.0021902422.84313651
Redeem188485542023-12-23 12:36:23339 days ago1703334983IN
0xe4d3a12D...0c1238BdB
0 ETH0.0021305622.22067411
Redeem188226262023-12-19 21:20:23342 days ago1703020823IN
0xe4d3a12D...0c1238BdB
0 ETH0.0051591353.80713628
Redeem188084802023-12-17 21:40:59344 days ago1702849259IN
0xe4d3a12D...0c1238BdB
0 ETH0.0034099635.56422841
Redeem188069042023-12-17 16:22:59345 days ago1702830179IN
0xe4d3a12D...0c1238BdB
0 ETH0.0043794545.67551311
Redeem187771262023-12-13 12:03:11349 days ago1702468991IN
0xe4d3a12D...0c1238BdB
0 ETH0.0032126533.50630966
Redeem187461632023-12-09 4:02:23353 days ago1702094543IN
0xe4d3a12D...0c1238BdB
0 ETH0.0026611127.75402467
Redeem187319442023-12-07 4:10:11355 days ago1701922211IN
0xe4d3a12D...0c1238BdB
0 ETH0.0029872831.15584581
Redeem187197542023-12-05 11:09:59357 days ago1701774599IN
0xe4d3a12D...0c1238BdB
0 ETH0.0044769946.69275284
Redeem186998082023-12-02 16:07:23360 days ago1701533243IN
0xe4d3a12D...0c1238BdB
0 ETH0.0033900935.35690136
Redeem186222122023-11-21 19:26:23371 days ago1700594783IN
0xe4d3a12D...0c1238BdB
0 ETH0.0051338153.54307099
Redeem185826812023-11-16 6:33:35376 days ago1700116415IN
0xe4d3a12D...0c1238BdB
0 ETH0.0022786423.7650467
Redeem185736582023-11-15 0:15:59377 days ago1700007359IN
0xe4d3a12D...0c1238BdB
0 ETH0.0031442332.79278449
Redeem185296632023-11-08 20:36:11383 days ago1699475771IN
0xe4d3a12D...0c1238BdB
0 ETH0.0034331235.80571394
Redeem184506832023-10-28 19:08:59395 days ago1698520139IN
0xe4d3a12D...0c1238BdB
0 ETH0.002320924.20587389
Redeem183515122023-10-14 22:09:59408 days ago1697321399IN
0xe4d3a12D...0c1238BdB
0 ETH0.000497895.19280284
Redeem183434872023-10-13 19:13:59410 days ago1697224439IN
0xe4d3a12D...0c1238BdB
0 ETH0.000751857.84147087
Redeem183365872023-10-12 20:01:59410 days ago1697140919IN
0xe4d3a12D...0c1238BdB
0 ETH0.00090149.40119102
Redeem182292682023-09-27 19:46:11425 days ago1695843971IN
0xe4d3a12D...0c1238BdB
0 ETH0.0024162725.20048198
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:
BasicSingleRecordedRedeemer

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 99999 runs

Other Settings:
default evmVersion
File 1 of 4 : BasicSingleRecordedRedeemer.sol
// SPDX-License-Identifier: MIT
// Copyright 2023 PROOF Holdings Inc
pragma solidity ^0.8.0;

import {IVoucherToken} from "./interfaces/IVoucherToken.sol";
import {BasicSingleRedeemer} from "./BasicSingleRedeemer.sol";

/**
 * @notice Basic redeemer contract with internal bookkeeping.
 */
contract BasicSingleRecordedRedeemer is BasicSingleRedeemer {
    /**
     * @notice Keeps track of who redeemed which voucher.
     */
    mapping(address => mapping(IVoucherToken => uint256[])) internal
        _redeemedVouchers;

    /**
     * @notice Redeems a voucher and emits an event as proof.
     */
    function redeem(IVoucherToken voucher, uint256 tokenId)
        public
        virtual
        override
    {
        _redeemedVouchers[msg.sender][voucher].push(tokenId);
        super.redeem(voucher, tokenId);
    }

    /**
     * @notice Returns the number of vouchers redeemed by a given address.
     */
    function numVouchersRedeemed(address sender, IVoucherToken voucher)
        public
        view
        returns (uint256)
    {
        return _redeemedVouchers[sender][voucher].length;
    }

    /**
     * @notice Returns the voucher tokenIds redeemed by a given address.
     */
    function redeemedVoucherIds(address sender, IVoucherToken voucher)
        public
        view
        returns (uint256[] memory)
    {
        return _redeemedVouchers[sender][voucher];
    }

    /**
     * @notice  Returns the voucher tokenId redeemed by a given address at a
     * given index.
     */
    function redeemedVoucherIdAt(
        address sender,
        IVoucherToken voucher,
        uint256 idx
    ) public view returns (uint256) {
        return _redeemedVouchers[sender][voucher][idx];
    }
}

File 2 of 4 : BasicSingleRedeemer.sol
// SPDX-License-Identifier: MIT
// Copyright 2023 PROOF Holdings Inc
pragma solidity ^0.8.0;

import {IVoucherToken} from "./interfaces/IVoucherToken.sol";
import {ISingleRedeemer} from "./interfaces/ISingleRedeemer.sol";

interface BasicSingleRedeemerEvents {
    /**
     * @notice Emitted on redemption.
     */
    event VoucherRedeemed(
        address indexed sender, IVoucherToken indexed voucher, uint256 tokenId
    );
}

/**
 * @notice Basic redeemer contract without any internal bookkeeping.
 */
contract BasicSingleRedeemer is ISingleRedeemer, BasicSingleRedeemerEvents {
    /**
     * @notice Redeems a voucher and emits an event as proof.
     */
    function redeem(IVoucherToken voucher, uint256 tokenId) public virtual {
        emit VoucherRedeemed(msg.sender, voucher, tokenId);
        voucher.redeem(msg.sender, tokenId);
    }
}

File 3 of 4 : ISingleRedeemer.sol
// SPDX-License-Identifier: MIT
// Copyright 2023 PROOF Holdings Inc
pragma solidity ^0.8.0;

import {IVoucherToken} from "./IVoucherToken.sol";

/**
 * @notice Interface for a contract that should allow users to redeem a given
 * voucher token.
 */
interface ISingleRedeemer {
    /**
     * @notice Redeems a given voucher.
     * @dev This MUST inform the voucher contract about the redemption by
     * calling its `redeem` method.
     */
    function redeem(IVoucherToken token, uint256 tokenId) external;
}

File 4 of 4 : IVoucherToken.sol
// SPDX-License-Identifier: MIT
// Copyright 2023 PROOF Holdings Inc
pragma solidity ^0.8.0;

/**
 * @notice Interface for a redeemable Voucher token preventing double spending
 * through internal book-keeping (e.g. burning the token, token property, etc.).
 * @dev Voucher tokens are intendent to be redeemed through a redeemer contract.
 */
interface IVoucherToken {
    /**
     * @notice Thrown if the redemption caller is not allowed to spend a given
     * voucher.
     */
    error RedeemerCallerNotAllowedToSpendVoucher(
        address sender, uint256 tokenId
    );

    /**
     * @notice Thrown if a redeemer contract is not allowed to redeem this
     * voucher.
     */
    error RedeemerNotApproved(address);

    /**
     * @notice Interface through which a `IRedeemer` contract informs the
     * voucher about its redemption.
     * @param sender The address that initiate the redemption on the
     * redeemer contract.
     * @param tokenId The voucher token to be redeemed.
     * @dev This function MUST be called by redeemer contracts.
     * @dev MUST revert with `RedeemerNotApproved` if the calling redeemer
     * contract is not approved to spend this voucher.
     * @dev MUST revert with `RedeemerCallerNotAllowedToSpendVoucher` if
     * sender is not allowed to spend tokenId.
     */
    function redeem(address sender, uint256 tokenId) external;
}

Settings
{
  "remappings": [
    "@divergencetech/ethier/=lib/ethier-v0.27.0/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ERC721A/=lib/ERC721A/contracts/",
    "constants/=../constants/src/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc721a/=lib/ERC721A/",
    "ethier/=lib/ethier/contracts/",
    "ethier_root/=lib/ethier/",
    "forge-std/=lib/forge-std/src/",
    "moonbirds-contract/=lib/moonbirds-contract/",
    "moonbirds/=lib/moonbirds-contract/contracts/",
    "openzeppelin-contracts-upgradeable/=lib/operator-filter-registry/lib/openzeppelin-contracts-upgradeable/contracts/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "operator-filter-registry/=lib/operator-filter-registry/",
    "payment-conduit_root/=../payment-conduit/",
    "redeemable-voucher/=src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 99999
  },
  "metadata": {
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"contract IVoucherToken","name":"voucher","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"VoucherRedeemed","type":"event"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"contract IVoucherToken","name":"voucher","type":"address"}],"name":"numVouchersRedeemed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IVoucherToken","name":"voucher","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"contract IVoucherToken","name":"voucher","type":"address"},{"internalType":"uint256","name":"idx","type":"uint256"}],"name":"redeemedVoucherIdAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"contract IVoucherToken","name":"voucher","type":"address"}],"name":"redeemedVoucherIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50610467806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80631e9a69501461005157806328d6a61214610066578063cb26d1fe1461008f578063e3ef19e2146100b0575b600080fd5b61006461005f366004610318565b6100f4565b005b610079610074366004610344565b610140565b604051610086919061037d565b60405180910390f35b6100a261009d3660046103c1565b6101c4565b604051908152602001610086565b6100a26100be366004610344565b73ffffffffffffffffffffffffffffffffffffffff91821660009081526020818152604080832093909416825291909152205490565b3360009081526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616845282528220805460018101825590835291200181905561013c828261021c565b5050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152602081815260408083209385168352928152908290208054835181840281018401909452808452606093928301828280156101b757602002820191906000526020600020905b8154815260200190600101908083116101a3575b5050505050905092915050565b73ffffffffffffffffffffffffffffffffffffffff808416600090815260208181526040808320938616835292905290812080548390811061020857610208610402565b906000526020600020015490509392505050565b60405181815273ffffffffffffffffffffffffffffffffffffffff83169033907fb936c844cd542ac20938a5230b08dec69708081712a30c2b354c119e49acac269060200160405180910390a36040517f1e9a69500000000000000000000000000000000000000000000000000000000081523360048201526024810182905273ffffffffffffffffffffffffffffffffffffffff831690631e9a695090604401600060405180830381600087803b1580156102d757600080fd5b505af11580156102eb573d6000803e3d6000fd5b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461031557600080fd5b50565b6000806040838503121561032b57600080fd5b8235610336816102f3565b946020939093013593505050565b6000806040838503121561035757600080fd5b8235610362816102f3565b91506020830135610372816102f3565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156103b557835183529284019291840191600101610399565b50909695505050505050565b6000806000606084860312156103d657600080fd5b83356103e1816102f3565b925060208401356103f1816102f3565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220b42a4485f74458b9396544dafd3b3a6c20365207389a6966a68e404d32fab41364736f6c63430008120033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80631e9a69501461005157806328d6a61214610066578063cb26d1fe1461008f578063e3ef19e2146100b0575b600080fd5b61006461005f366004610318565b6100f4565b005b610079610074366004610344565b610140565b604051610086919061037d565b60405180910390f35b6100a261009d3660046103c1565b6101c4565b604051908152602001610086565b6100a26100be366004610344565b73ffffffffffffffffffffffffffffffffffffffff91821660009081526020818152604080832093909416825291909152205490565b3360009081526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616845282528220805460018101825590835291200181905561013c828261021c565b5050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152602081815260408083209385168352928152908290208054835181840281018401909452808452606093928301828280156101b757602002820191906000526020600020905b8154815260200190600101908083116101a3575b5050505050905092915050565b73ffffffffffffffffffffffffffffffffffffffff808416600090815260208181526040808320938616835292905290812080548390811061020857610208610402565b906000526020600020015490509392505050565b60405181815273ffffffffffffffffffffffffffffffffffffffff83169033907fb936c844cd542ac20938a5230b08dec69708081712a30c2b354c119e49acac269060200160405180910390a36040517f1e9a69500000000000000000000000000000000000000000000000000000000081523360048201526024810182905273ffffffffffffffffffffffffffffffffffffffff831690631e9a695090604401600060405180830381600087803b1580156102d757600080fd5b505af11580156102eb573d6000803e3d6000fd5b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461031557600080fd5b50565b6000806040838503121561032b57600080fd5b8235610336816102f3565b946020939093013593505050565b6000806040838503121561035757600080fd5b8235610362816102f3565b91506020830135610372816102f3565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156103b557835183529284019291840191600101610399565b50909695505050505050565b6000806000606084860312156103d657600080fd5b83356103e1816102f3565b925060208401356103f1816102f3565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220b42a4485f74458b9396544dafd3b3a6c20365207389a6966a68e404d32fab41364736f6c63430008120033

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.