ETH Price: $2,135.02 (+3.38%)

Contract

0x9DFeCc75D2B9dF1aE2cd4E76b5d4a4BdB4365E0D
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unpause148991072022-06-03 20:10:411389 days ago1654287041IN
0x9DFeCc75...dB4365E0D
0 ETH0.0021224874.0160123
Set Voucher Valu...148991032022-06-03 20:09:261389 days ago1654286966IN
0x9DFeCc75...dB4365E0D
0 ETH0.0031847965.95686857

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
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:
UMADVoucherRedeemer

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

import "@animoca/ethereum-contracts-assets@v1.1.2/contracts/token/ERC1155/ERC1155TokenReceiver.sol";
import "@animoca/ethereum-contracts-assets@v1.1.2/contracts/token/ERC1155/IERC1155InventoryBurnable.sol";
import "@animoca/ethereum-contracts-core@v1.1.1/contracts/utils/Recoverable.sol";
import "@animoca/ethereum-contracts-core@v1.1.1/contracts/lifecycle/Pausable.sol";
import "@openzeppelin/contracts@v3.4/math/SafeMath.sol";


contract UMADVoucherRedeemer is Recoverable, Pausable, ERC1155TokenReceiver{
    
    using ERC20Wrapper for IWrappedERC20;
    using SafeMath for uint256;

    IERC1155InventoryBurnable public immutable vouchersContract;
    IWrappedERC20 public immutable tokenContract;
    address public tokenHolder;

    mapping (uint256 => uint256) private _voucherTokenAmount;

    /**
     * Constructor.
     * @param _vouchersContract the address of the vouchers contract.
     * @param _tokenContract the address of the ERC20 token contract.
     * @param _tokenHolder the address of the ERC20 token holder.
     */
    constructor(
        IERC1155InventoryBurnable _vouchersContract,
        IWrappedERC20 _tokenContract,
        address _tokenHolder
    ) Ownable(msg.sender) Pausable(true){
        vouchersContract = _vouchersContract;
        tokenContract = _tokenContract;
        tokenHolder = _tokenHolder;
    }

    /**
     * Sets the ERC20 token value for voucher.
     * @dev Reverts if the sender is not the contract owner.
     * @param tokenIds the id of the voucher.
     * @param amounts value of the voucher in ERC20 token.
     */
    function setVoucherValues(uint256[] memory tokenIds, uint256[] memory amounts) external virtual{
        _requireOwnership(_msgSender());
        require(tokenIds.length == amounts.length, "UMADVoucherRedeemer: invalid length of array");
        for(uint256 i; i < tokenIds.length; ++i){
            uint256 amount = amounts[i];
            require(amount > 0, "UMADVoucherRedeemer: invalid amount");
            _voucherTokenAmount[tokenIds[i]] = amount;
        }
    }

    /**
     * Gets the ERC20 token value for voucher.
     * @param tokenId the id of the voucher.
     */
    function getVoucherValue(uint256 tokenId) external view virtual returns (uint256){
        return _voucherTokenAmount[tokenId];
    }

    /**
     * Validates the validity of the voucher and returns its value.
     * @dev Reverts if the voucher is not a valid voucher.
     * @param tokenId the id of the voucher.
     * @return the value of the voucher in ERC20 token.
     */
    function _voucherValue(uint256 tokenId) internal view virtual returns (uint256) {
        uint256 tokenValue = _voucherTokenAmount[tokenId];
        require(tokenValue > 0, "UMADVoucherRedeemer: invalid voucher");
        return tokenValue;
    }

    /**
     * Sets the token holder address.
     * @dev Reverts if the sender is not the contract owner.
     * @param _tokenHolder the new address for the token holder.
     */
    function setTokenHolder(address _tokenHolder) external virtual {
        _requireOwnership(_msgSender());
        tokenHolder = _tokenHolder;
    }

    /**
     * Pause the redeem function.
     * @dev Reverts if the sender is not the contract owner.
     */
    function pause() public{
        _requireOwnership(_msgSender());
        _pause();
    }

    /**
     * Unpause the redeem function.
     * @dev Reverts if the sender is not the contract owner.
     */
    function unpause() public{
        _requireOwnership(_msgSender());
        _unpause();
    }

    /**
     * Handle the receipt of a single ERC1155 token type.
     * @dev See {IERC1155TokenReceiver-onERC1155Received(address,address,uint256,uint256,bytes)}.
     */
    function onERC1155Received(
        address, /*operator*/
        address from,
        uint256 id,
        uint256 value,
        bytes calldata /*data*/
    ) external virtual override returns (bytes4) {
        _requireNotPaused();
        require(msg.sender == address(vouchersContract), "UMADVoucherRedeemer: wrong sender");
        vouchersContract.burnFrom(address(this), id, value); 
        uint256 tokenAmount = _voucherValue(id).mul(value);
        tokenContract.wrappedTransferFrom(tokenHolder, from, tokenAmount);
        return _ERC1155_RECEIVED;
    }

    /**
     * Handle the receipt of multiple ERC1155 token types.
     * @dev See {IERC1155TokenReceiver-onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)}.
     */
    function onERC1155BatchReceived(
        address, /*operator*/
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata /*data*/
    ) external virtual override returns (bytes4) {
        _requireNotPaused();
        require(msg.sender == address(vouchersContract), "UMADVoucherRedeemer: wrong sender");
        vouchersContract.batchBurnFrom(address(this), ids, values);
        uint256 tokenAmount;
        for (uint256 i; i != ids.length; ++i) {
            uint256 id = ids[i];
            tokenAmount = tokenAmount.add(_voucherValue(id).mul(values[i]));
        }
        tokenContract.wrappedTransferFrom(tokenHolder, from, tokenAmount);
        return _ERC1155_BATCH_RECEIVED;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

import {ManagedIdentity} from "../metatx/ManagedIdentity.sol";

/**
 * @dev Contract which allows children to implement pausability.
 */
abstract contract Pausable is ManagedIdentity {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool public paused;

    constructor(bool paused_) {
        paused = paused_;
    }

    function _requireNotPaused() internal view {
        require(!paused, "Pausable: paused");
    }

    function _requirePaused() internal view {
        require(paused, "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual {
        _requireNotPaused();
        paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual {
        _requirePaused();
        paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

import {ManagedIdentity} from "../metatx/ManagedIdentity.sol";
import {Ownable} from "../access/Ownable.sol";
import {IWrappedERC20, ERC20Wrapper} from "./ERC20Wrapper.sol";

abstract contract Recoverable is ManagedIdentity, Ownable {
    using ERC20Wrapper for IWrappedERC20;

    /**
     * Extract ERC20 tokens which were accidentally sent to the contract to a list of accounts.
     * Warning: this function should be overriden for contracts which are supposed to hold ERC20 tokens
     * so that the extraction is limited to only amounts sent accidentally.
     * @dev Reverts if the sender is not the contract owner.
     * @dev Reverts if `accounts`, `tokens` and `amounts` do not have the same length.
     * @dev Reverts if one of `tokens` is does not implement the ERC20 transfer function.
     * @dev Reverts if one of the ERC20 transfers fail for any reason.
     * @param accounts the list of accounts to transfer the tokens to.
     * @param tokens the list of ERC20 token addresses.
     * @param amounts the list of token amounts to transfer.
     */
    function recoverERC20s(
        address[] calldata accounts,
        address[] calldata tokens,
        uint256[] calldata amounts
    ) external virtual {
        _requireOwnership(_msgSender());
        uint256 length = accounts.length;
        require(length == tokens.length && length == amounts.length, "Recov: inconsistent arrays");
        for (uint256 i = 0; i != length; ++i) {
            IWrappedERC20(tokens[i]).wrappedTransfer(accounts[i], amounts[i]);
        }
    }

    /**
     * Extract ERC721 tokens which were accidentally sent to the contract to a list of accounts.
     * Warning: this function should be overriden for contracts which are supposed to hold ERC721 tokens
     * so that the extraction is limited to only tokens sent accidentally.
     * @dev Reverts if the sender is not the contract owner.
     * @dev Reverts if `accounts`, `contracts` and `amounts` do not have the same length.
     * @dev Reverts if one of `contracts` is does not implement the ERC721 transferFrom function.
     * @dev Reverts if one of the ERC721 transfers fail for any reason.
     * @param accounts the list of accounts to transfer the tokens to.
     * @param contracts the list of ERC721 contract addresses.
     * @param tokenIds the list of token ids to transfer.
     */
    function recoverERC721s(
        address[] calldata accounts,
        address[] calldata contracts,
        uint256[] calldata tokenIds
    ) external virtual {
        _requireOwnership(_msgSender());
        uint256 length = accounts.length;
        require(length == contracts.length && length == tokenIds.length, "Recov: inconsistent arrays");
        for (uint256 i = 0; i != length; ++i) {
            IRecoverableERC721(contracts[i]).transferFrom(address(this), accounts[i], tokenIds[i]);
        }
    }
}

interface IRecoverableERC721 {
    /// See {IERC721-transferFrom(address,address,uint256)}
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

/**
 * @title ERC-1155 Inventory additional burning interface
 * @dev See https://eips.ethereum.org/EIPS/eip-1155
 */
interface IERC1155InventoryBurnable {
    /**
     * Burns some token.
     * @dev Reverts if the sender is not approved.
     * @dev Reverts if `id` does not represent a token.
     * @dev Reverts if `id` represents a fungible token and `value` is 0.
     * @dev Reverts if `id` represents a fungible token and `value` is higher than `from`'s balance.
     * @dev Reverts if `id` represents a non-fungible token and `value` is not 1.
     * @dev Reverts if `id` represents a non-fungible token which is not owned by `from`.
     * @dev Emits an {IERC1155-TransferSingle} event.
     * @param from Address of the current token owner.
     * @param id Identifier of the token to burn.
     * @param value Amount of token to burn.
     */
    function burnFrom(
        address from,
        uint256 id,
        uint256 value
    ) external;

    /**
     * Burns multiple tokens.
     * @dev Reverts if `ids` and `values` have different lengths.
     * @dev Reverts if the sender is not approved.
     * @dev Reverts if one of `ids` does not represent a token.
     * @dev Reverts if one of `ids` represents a fungible token and `value` is 0.
     * @dev Reverts if one of `ids` represents a fungible token and `value` is higher than `from`'s balance.
     * @dev Reverts if one of `ids` represents a non-fungible token and `value` is not 1.
     * @dev Reverts if one of `ids` represents a non-fungible token which is not owned by `from`.
     * @dev Emits an {IERC1155-TransferBatch} event.
     * @param from Address of the current tokens owner.
     * @param ids Identifiers of the tokens to burn.
     * @param values Amounts of tokens to burn.
     */
    function batchBurnFrom(
        address from,
        uint256[] calldata ids,
        uint256[] calldata values
    ) external;
}

File 6 of 13 : ERC1155TokenReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

import {IERC1155TokenReceiver} from "./IERC1155TokenReceiver.sol";
import {IERC165} from "@animoca/ethereum-contracts-core/contracts/introspection/IERC165.sol";

abstract contract ERC1155TokenReceiver is IERC1155TokenReceiver, IERC165 {
    bytes4 private constant _ERC165_INTERFACE_ID = type(IERC165).interfaceId;
    bytes4 private constant _ERC1155_TOKEN_RECEIVER_INTERFACE_ID = type(IERC1155TokenReceiver).interfaceId;

    // bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))
    bytes4 internal constant _ERC1155_RECEIVED = 0xf23a6e61;

    // bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))
    bytes4 internal constant _ERC1155_BATCH_RECEIVED = 0xbc197c81;

    bytes4 internal constant _ERC1155_REJECTED = 0xffffffff;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == _ERC165_INTERFACE_ID || interfaceId == _ERC1155_TOKEN_RECEIVER_INTERFACE_ID;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

import {AddressIsContract} from "./types/AddressIsContract.sol";

/**
 * @title ERC20Wrapper
 * Wraps ERC20 functions to support non-standard implementations which do not return a bool value.
 * Calls to the wrapped functions revert only if they throw or if they return false.
 */
library ERC20Wrapper {
    using AddressIsContract for address;

    function wrappedTransfer(
        IWrappedERC20 token,
        address to,
        uint256 value
    ) internal {
        _callWithOptionalReturnData(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function wrappedTransferFrom(
        IWrappedERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callWithOptionalReturnData(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function wrappedApprove(
        IWrappedERC20 token,
        address spender,
        uint256 value
    ) internal {
        _callWithOptionalReturnData(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function _callWithOptionalReturnData(IWrappedERC20 token, bytes memory callData) internal {
        address target = address(token);
        require(target.isContract(), "ERC20Wrapper: non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory data) = target.call(callData);
        if (success) {
            if (data.length != 0) {
                require(abi.decode(data, (bool)), "ERC20Wrapper: operation failed");
            }
        } else {
            // revert using a standard revert message
            if (data.length == 0) {
                revert("ERC20Wrapper: operation failed");
            }

            // revert using the revert message coming from the call
            assembly {
                let size := mload(data)
                revert(add(32, data), size)
            }
        }
    }
}

interface IWrappedERC20 {
    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

import {ManagedIdentity} from "../metatx/ManagedIdentity.sol";
import {IERC173} from "./IERC173.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 ManagedIdentity, IERC173 {
    address internal _owner;

    /**
     * Initializes the contract, setting the deployer as the initial owner.
     * @dev Emits an {IERC173-OwnershipTransferred(address,address)} event.
     */
    constructor(address owner_) {
        _owner = owner_;
        emit OwnershipTransferred(address(0), owner_);
    }

    /**
     * Gets the address of the current contract owner.
     */
    function owner() public view virtual override returns (address) {
        return _owner;
    }

    /**
     * See {IERC173-transferOwnership(address)}
     * @dev Reverts if the sender is not the current contract owner.
     * @param newOwner the address of the new owner. Use the zero address to renounce the ownership.
     */
    function transferOwnership(address newOwner) public virtual override {
        _requireOwnership(_msgSender());
        _owner = newOwner;
        emit OwnershipTransferred(_owner, newOwner);
    }

    /**
     * @dev Reverts if `account` is not the contract owner.
     * @param account the account to test.
     */
    function _requireOwnership(address account) internal virtual {
        require(account == this.owner(), "Ownable: not the owner");
    }
}

File 9 of 13 : ManagedIdentity.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

/*
 * 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.
 */
abstract contract ManagedIdentity {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

/**
 * @title ERC-1155 Multi Token Standard, token receiver
 * @dev See https://eips.ethereum.org/EIPS/eip-1155
 * Interface for any contract that wants to support transfers from ERC1155 asset contracts.
 * Note: The ERC-165 identifier for this interface is 0x4e2312e0.
 */
interface IERC1155TokenReceiver {
    /**
     * @notice Handle the receipt of a single ERC1155 token type.
     * An ERC1155 contract MUST call this function on a recipient contract, at the end of a `safeTransferFrom` after the balance update.
     * This function MUST return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     *  (i.e. 0xf23a6e61) to accept the transfer.
     * Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
     * @param operator  The address which initiated the transfer (i.e. msg.sender)
     * @param from      The address which previously owned the token
     * @param id        The ID of the token being transferred
     * @param value     The amount of tokens being transferred
     * @param data      Additional data with no specified format
     * @return bytes4   `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @notice Handle the receipt of multiple ERC1155 token types.
     * An ERC1155 contract MUST call this function on a recipient contract, at the end of a `safeBatchTransferFrom` after the balance updates.
     * This function MUST return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     *  (i.e. 0xbc197c81) if to accept the transfer(s).
     * Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
     * @param operator  The address which initiated the batch transfer (i.e. msg.sender)
     * @param from      The address which previously owned the token
     * @param ids       An array containing ids of each token being transferred (order and length must match _values array)
     * @param values    An array containing amounts of each token being transferred (order and length must match _ids array)
     * @param data      Additional data with no specified format
     * @return          `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

// SPDX-License-Identifier: MIT

// Partially derived from OpenZeppelin:
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/406c83649bd6169fc1b578e08506d78f0873b276/contracts/utils/Address.sol

pragma solidity >=0.7.6 <0.8.0;

/**
 * @dev Upgrades the address type to check if it is a contract.
 */
library AddressIsContract {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.7.6 <0.8.0;

/**
 * @title ERC-173 Contract Ownership Standard
 * Note: the ERC-165 identifier for this interface is 0x7f5828d0
 */
interface IERC173 {
    /**
     * Event emited when ownership of a contract changes.
     * @param previousOwner the previous owner.
     * @param newOwner the new owner.
     */
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * Get the address of the owner
     * @return The address of the owner.
     */
    function owner() external view returns (address);

    /**
     * Set the address of the new owner of the contract
     * Set newOwner to address(0) to renounce any ownership.
     * @dev Emits an {OwnershipTransferred} event.
     * @param newOwner The address of the new owner of the contract. Using the zero address means renouncing ownership.
     */
    function transferOwnership(address newOwner) external;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC1155InventoryBurnable","name":"_vouchersContract","type":"address"},{"internalType":"contract IWrappedERC20","name":"_tokenContract","type":"address"},{"internalType":"address","name":"_tokenHolder","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getVoucherValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"recoverERC20s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"address[]","name":"contracts","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"recoverERC721s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenHolder","type":"address"}],"name":"setTokenHolder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"setVoucherValues","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"contract IWrappedERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenHolder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vouchersContract","outputs":[{"internalType":"contract IERC1155InventoryBurnable","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c060405234801561001057600080fd5b506040516120d73803806120d78339818101604052606081101561003357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050600133806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35080600060146101000a81548160ff021916908315150217905550508273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505060805160601c60a05160601c611ecc61020b60003980610bd65280610ff252806113bc525080610b955280610da45280610e48528061122052806112c45250611ecc6000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806373c8a95811610097578063c3666c3611610066578063c3666c36146106b3578063f23a6e61146107d6578063f29d2f28146108d6578063f2fde38b1461091a57610100565b806373c8a958146103bc5780638456cb59146104df5780638da5cb5b146104e9578063bc197c811461051d57610100565b8063474f2891116100d3578063474f2891146102f257806348058a6a1461032657806355a373d6146103685780635c975abb1461039c57610100565b806301ffc9a71461010557806316921129146101685780633f4ba83a146102b4578063420a83e7146102be575b600080fd5b6101506004803603602081101561011b57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061095e565b60405180821515815260200191505060405180910390f35b6102b26004803603604081101561017e57600080fd5b810190808035906020019064010000000081111561019b57600080fd5b8201836020820111156101ad57600080fd5b803590602001918460208302840111640100000000831117156101cf57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561022f57600080fd5b82018360208201111561024157600080fd5b8035906020019184602083028401116401000000008311171561026357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610a30565b005b6102bc610b53565b005b6102c6610b6d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102fa610b93565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103526004803603602081101561033c57600080fd5b8101908080359060200190929190505050610bb7565b6040518082815260200191505060405180910390f35b610370610bd4565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103a4610bf8565b60405180821515815260200191505060405180910390f35b6104dd600480360360608110156103d257600080fd5b81019080803590602001906401000000008111156103ef57600080fd5b82018360208201111561040157600080fd5b8035906020019184602083028401116401000000008311171561042357600080fd5b90919293919293908035906020019064010000000081111561044457600080fd5b82018360208201111561045657600080fd5b8035906020019184602083028401116401000000008311171561047857600080fd5b90919293919293908035906020019064010000000081111561049957600080fd5b8201836020820111156104ab57600080fd5b803590602001918460208302840111640100000000831117156104cd57600080fd5b9091929391929390505050610c0b565b005b6104e7610d55565b005b6104f1610d6f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61067e600480360360a081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561059057600080fd5b8201836020820111156105a257600080fd5b803590602001918460208302840111640100000000831117156105c457600080fd5b9091929391929390803590602001906401000000008111156105e557600080fd5b8201836020820111156105f757600080fd5b8035906020019184602083028401116401000000008311171561061957600080fd5b90919293919293908035906020019064010000000081111561063a57600080fd5b82018360208201111561064c57600080fd5b8035906020019184600183028401116401000000008311171561066e57600080fd5b9091929391929390505050610d98565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6107d4600480360360608110156106c957600080fd5b81019080803590602001906401000000008111156106e657600080fd5b8201836020820111156106f857600080fd5b8035906020019184602083028401116401000000008311171561071a57600080fd5b90919293919293908035906020019064010000000081111561073b57600080fd5b82018360208201111561074d57600080fd5b8035906020019184602083028401116401000000008311171561076f57600080fd5b90919293919293908035906020019064010000000081111561079057600080fd5b8201836020820111156107a257600080fd5b803590602001918460208302840111640100000000831117156107c457600080fd5b909192939192939050505061104e565b005b6108a1600480360360a08110156107ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561085d57600080fd5b82018360208201111561086f57600080fd5b8035906020019184600183028401116401000000008311171561089157600080fd5b9091929391929390505050611214565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610918600480360360208110156108ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611416565b005b61095c6004803603602081101561093057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061146a565b005b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610a2957507f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b610a40610a3b611537565b61153f565b8051825114610a9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611e05602c913960400191505060405180910390fd5b60005b8251811015610b4e576000828281518110610ab457fe5b6020026020010151905060008111610b17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611de26023913960400191505060405180910390fd5b8060026000868581518110610b2857fe5b602002602001015181526020019081526020016000208190555050806001019050610a9d565b505050565b610b63610b5e611537565b61153f565b610b6b611663565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600060026000838152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600060149054906101000a900460ff1681565b610c1b610c16611537565b61153f565b60008686905090508484905081148015610c3757508282905081145b610ca9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f5265636f763a20696e636f6e73697374656e742061727261797300000000000081525060200191505060405180910390fd5b60005b818114610d4b57610d40888883818110610cc257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16858584818110610ceb57fe5b90506020020135888885818110610cfe57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b806001019050610cac565b5050505050505050565b610d65610d60611537565b61153f565b610d6d61177d565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610da26117f6565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611e316021913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16638053493430898989896040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925060200280828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925060200280828437600081840152601f19601f820116905080830192505050975050505050505050600060405180830381600087803b158015610f3d57600080fd5b505af1158015610f51573d6000803e3d6000fd5b505050506000805b888890508114610fc7576000898983818110610f7157fe5b905060200201359050610fb9610faa898985818110610f8c57fe5b90506020020135610f9c8461187b565b6118f690919063ffffffff16565b8461197c90919063ffffffff16565b925050806001019050610f59565b50611037600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611a04909392919063ffffffff16565b63bc197c8160e01b91505098975050505050505050565b61105e611059611537565b61153f565b6000868690509050848490508114801561107a57508282905081145b6110ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f5265636f763a20696e636f6e73697374656e742061727261797300000000000081525060200191505060405180910390fd5b60005b81811461120a5785858281811061110257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd308a8a8581811061114757fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1687878681811061117057fe5b905060200201356040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b1580156111e757600080fd5b505af11580156111fb573d6000803e3d6000fd5b505050508060010190506110ef565b5050505050505050565b600061121e6117f6565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112c2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611e316021913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663124d91e53087876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050600060405180830381600087803b15801561135b57600080fd5b505af115801561136f573d6000803e3d6000fd5b505050506000611390856113828861187b565b6118f690919063ffffffff16565b9050611401600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1688837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611a04909392919063ffffffff16565b63f23a6e6160e01b9150509695505050505050565b611426611421611537565b61153f565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61147a611475611537565b61153f565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b600033905090565b3073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561158557600080fd5b505afa158015611599573d6000803e3d6000fd5b505050506040513d60208110156115af57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611660576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4f776e61626c653a206e6f7420746865206f776e65720000000000000000000081525060200191505060405180910390fd5b50565b61166b611ac5565b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6116ae611537565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6117788363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611b49565b505050565b6117856117f6565b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117c9611537565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff1615611879576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b565b60008060026000848152602001908152602001600020549050600081116118ed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611e526024913960400191505060405180910390fd5b80915050919050565b6000808314156119095760009050611976565b600082840290508284828161191a57fe5b0414611971576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611e766021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156119fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b611abf846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611b49565b50505050565b600060149054906101000a900460ff16611b47576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b565b6000829050611b6d8173ffffffffffffffffffffffffffffffffffffffff16611dce565b611bdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4552433230577261707065723a206e6f6e2d636f6e747261637400000000000081525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b60208310611c2d5780518252602082019150602081019050602083039250611c0a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c8f576040519150601f19603f3d011682016040523d82523d6000602084013e611c94565b606091505b50915091508115611d46576000815114611d4157808060200190516020811015611cbd57600080fd5b8101908080519060200190929190505050611d40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4552433230577261707065723a206f7065726174696f6e206661696c6564000081525060200191505060405180910390fd5b5b611dc7565b600081511415611dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4552433230577261707065723a206f7065726174696f6e206661696c6564000081525060200191505060405180910390fd5b80518082602001fd5b5050505050565b600080823b90506000811191505091905056fe554d4144566f756368657252656465656d65723a20696e76616c696420616d6f756e74554d4144566f756368657252656465656d65723a20696e76616c6964206c656e677468206f66206172726179554d4144566f756368657252656465656d65723a2077726f6e672073656e646572554d4144566f756368657252656465656d65723a20696e76616c696420766f7563686572536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212205dcdc5417d5d0c404cdde96b0c8f3f72362f1d8ae3f52a6444f6525e4838e39964736f6c6343000706003300000000000000000000000087a3747c9942d8351cc85aac2f94807b27a37c0d00000000000000000000000031c2415c946928e9fd1af83cdfa38d3edbd4326f00000000000000000000000019759efb3cebbc0b8d260ee180fee1344ba3d00e

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101005760003560e01c806373c8a95811610097578063c3666c3611610066578063c3666c36146106b3578063f23a6e61146107d6578063f29d2f28146108d6578063f2fde38b1461091a57610100565b806373c8a958146103bc5780638456cb59146104df5780638da5cb5b146104e9578063bc197c811461051d57610100565b8063474f2891116100d3578063474f2891146102f257806348058a6a1461032657806355a373d6146103685780635c975abb1461039c57610100565b806301ffc9a71461010557806316921129146101685780633f4ba83a146102b4578063420a83e7146102be575b600080fd5b6101506004803603602081101561011b57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061095e565b60405180821515815260200191505060405180910390f35b6102b26004803603604081101561017e57600080fd5b810190808035906020019064010000000081111561019b57600080fd5b8201836020820111156101ad57600080fd5b803590602001918460208302840111640100000000831117156101cf57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561022f57600080fd5b82018360208201111561024157600080fd5b8035906020019184602083028401116401000000008311171561026357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610a30565b005b6102bc610b53565b005b6102c6610b6d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102fa610b93565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103526004803603602081101561033c57600080fd5b8101908080359060200190929190505050610bb7565b6040518082815260200191505060405180910390f35b610370610bd4565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103a4610bf8565b60405180821515815260200191505060405180910390f35b6104dd600480360360608110156103d257600080fd5b81019080803590602001906401000000008111156103ef57600080fd5b82018360208201111561040157600080fd5b8035906020019184602083028401116401000000008311171561042357600080fd5b90919293919293908035906020019064010000000081111561044457600080fd5b82018360208201111561045657600080fd5b8035906020019184602083028401116401000000008311171561047857600080fd5b90919293919293908035906020019064010000000081111561049957600080fd5b8201836020820111156104ab57600080fd5b803590602001918460208302840111640100000000831117156104cd57600080fd5b9091929391929390505050610c0b565b005b6104e7610d55565b005b6104f1610d6f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61067e600480360360a081101561053357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561059057600080fd5b8201836020820111156105a257600080fd5b803590602001918460208302840111640100000000831117156105c457600080fd5b9091929391929390803590602001906401000000008111156105e557600080fd5b8201836020820111156105f757600080fd5b8035906020019184602083028401116401000000008311171561061957600080fd5b90919293919293908035906020019064010000000081111561063a57600080fd5b82018360208201111561064c57600080fd5b8035906020019184600183028401116401000000008311171561066e57600080fd5b9091929391929390505050610d98565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6107d4600480360360608110156106c957600080fd5b81019080803590602001906401000000008111156106e657600080fd5b8201836020820111156106f857600080fd5b8035906020019184602083028401116401000000008311171561071a57600080fd5b90919293919293908035906020019064010000000081111561073b57600080fd5b82018360208201111561074d57600080fd5b8035906020019184602083028401116401000000008311171561076f57600080fd5b90919293919293908035906020019064010000000081111561079057600080fd5b8201836020820111156107a257600080fd5b803590602001918460208302840111640100000000831117156107c457600080fd5b909192939192939050505061104e565b005b6108a1600480360360a08110156107ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561085d57600080fd5b82018360208201111561086f57600080fd5b8035906020019184600183028401116401000000008311171561089157600080fd5b9091929391929390505050611214565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610918600480360360208110156108ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611416565b005b61095c6004803603602081101561093057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061146a565b005b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610a2957507f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b610a40610a3b611537565b61153f565b8051825114610a9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611e05602c913960400191505060405180910390fd5b60005b8251811015610b4e576000828281518110610ab457fe5b6020026020010151905060008111610b17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611de26023913960400191505060405180910390fd5b8060026000868581518110610b2857fe5b602002602001015181526020019081526020016000208190555050806001019050610a9d565b505050565b610b63610b5e611537565b61153f565b610b6b611663565b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f00000000000000000000000087a3747c9942d8351cc85aac2f94807b27a37c0d81565b600060026000838152602001908152602001600020549050919050565b7f00000000000000000000000031c2415c946928e9fd1af83cdfa38d3edbd4326f81565b600060149054906101000a900460ff1681565b610c1b610c16611537565b61153f565b60008686905090508484905081148015610c3757508282905081145b610ca9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f5265636f763a20696e636f6e73697374656e742061727261797300000000000081525060200191505060405180910390fd5b60005b818114610d4b57610d40888883818110610cc257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16858584818110610ceb57fe5b90506020020135888885818110610cfe57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166116db9092919063ffffffff16565b806001019050610cac565b5050505050505050565b610d65610d60611537565b61153f565b610d6d61177d565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610da26117f6565b7f00000000000000000000000087a3747c9942d8351cc85aac2f94807b27a37c0d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611e316021913960400191505060405180910390fd5b7f00000000000000000000000087a3747c9942d8351cc85aac2f94807b27a37c0d73ffffffffffffffffffffffffffffffffffffffff16638053493430898989896040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925060200280828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925060200280828437600081840152601f19601f820116905080830192505050975050505050505050600060405180830381600087803b158015610f3d57600080fd5b505af1158015610f51573d6000803e3d6000fd5b505050506000805b888890508114610fc7576000898983818110610f7157fe5b905060200201359050610fb9610faa898985818110610f8c57fe5b90506020020135610f9c8461187b565b6118f690919063ffffffff16565b8461197c90919063ffffffff16565b925050806001019050610f59565b50611037600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a837f00000000000000000000000031c2415c946928e9fd1af83cdfa38d3edbd4326f73ffffffffffffffffffffffffffffffffffffffff16611a04909392919063ffffffff16565b63bc197c8160e01b91505098975050505050505050565b61105e611059611537565b61153f565b6000868690509050848490508114801561107a57508282905081145b6110ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f5265636f763a20696e636f6e73697374656e742061727261797300000000000081525060200191505060405180910390fd5b60005b81811461120a5785858281811061110257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd308a8a8581811061114757fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1687878681811061117057fe5b905060200201356040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b1580156111e757600080fd5b505af11580156111fb573d6000803e3d6000fd5b505050508060010190506110ef565b5050505050505050565b600061121e6117f6565b7f00000000000000000000000087a3747c9942d8351cc85aac2f94807b27a37c0d73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112c2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611e316021913960400191505060405180910390fd5b7f00000000000000000000000087a3747c9942d8351cc85aac2f94807b27a37c0d73ffffffffffffffffffffffffffffffffffffffff1663124d91e53087876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050600060405180830381600087803b15801561135b57600080fd5b505af115801561136f573d6000803e3d6000fd5b505050506000611390856113828861187b565b6118f690919063ffffffff16565b9050611401600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1688837f00000000000000000000000031c2415c946928e9fd1af83cdfa38d3edbd4326f73ffffffffffffffffffffffffffffffffffffffff16611a04909392919063ffffffff16565b63f23a6e6160e01b9150509695505050505050565b611426611421611537565b61153f565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61147a611475611537565b61153f565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b600033905090565b3073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561158557600080fd5b505afa158015611599573d6000803e3d6000fd5b505050506040513d60208110156115af57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611660576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4f776e61626c653a206e6f7420746865206f776e65720000000000000000000081525060200191505060405180910390fd5b50565b61166b611ac5565b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6116ae611537565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6117788363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611b49565b505050565b6117856117f6565b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117c9611537565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff1615611879576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b565b60008060026000848152602001908152602001600020549050600081116118ed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611e526024913960400191505060405180910390fd5b80915050919050565b6000808314156119095760009050611976565b600082840290508284828161191a57fe5b0414611971576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611e766021913960400191505060405180910390fd5b809150505b92915050565b6000808284019050838110156119fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b611abf846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611b49565b50505050565b600060149054906101000a900460ff16611b47576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b565b6000829050611b6d8173ffffffffffffffffffffffffffffffffffffffff16611dce565b611bdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4552433230577261707065723a206e6f6e2d636f6e747261637400000000000081525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff16846040518082805190602001908083835b60208310611c2d5780518252602082019150602081019050602083039250611c0a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c8f576040519150601f19603f3d011682016040523d82523d6000602084013e611c94565b606091505b50915091508115611d46576000815114611d4157808060200190516020811015611cbd57600080fd5b8101908080519060200190929190505050611d40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4552433230577261707065723a206f7065726174696f6e206661696c6564000081525060200191505060405180910390fd5b5b611dc7565b600081511415611dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4552433230577261707065723a206f7065726174696f6e206661696c6564000081525060200191505060405180910390fd5b80518082602001fd5b5050505050565b600080823b90506000811191505091905056fe554d4144566f756368657252656465656d65723a20696e76616c696420616d6f756e74554d4144566f756368657252656465656d65723a20696e76616c6964206c656e677468206f66206172726179554d4144566f756368657252656465656d65723a2077726f6e672073656e646572554d4144566f756368657252656465656d65723a20696e76616c696420766f7563686572536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212205dcdc5417d5d0c404cdde96b0c8f3f72362f1d8ae3f52a6444f6525e4838e39964736f6c63430007060033

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

00000000000000000000000087a3747c9942d8351cc85aac2f94807b27a37c0d00000000000000000000000031c2415c946928e9fd1af83cdfa38d3edbd4326f00000000000000000000000019759efb3cebbc0b8d260ee180fee1344ba3d00e

-----Decoded View---------------
Arg [0] : _vouchersContract (address): 0x87a3747C9942d8351Cc85AaC2f94807B27A37c0D
Arg [1] : _tokenContract (address): 0x31c2415c946928e9FD1Af83cdFA38d3eDBD4326f
Arg [2] : _tokenHolder (address): 0x19759Efb3cebbc0b8d260Ee180Fee1344ba3D00e

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000087a3747c9942d8351cc85aac2f94807b27a37c0d
Arg [1] : 00000000000000000000000031c2415c946928e9fd1af83cdfa38d3edbd4326f
Arg [2] : 00000000000000000000000019759efb3cebbc0b8d260ee180fee1344ba3d00e


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.