Polygon Sponsored slots available. Book your slot here!
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 164 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Redeem Vouchers | 65886706 | 119 days ago | IN | 0 POL | 0.0036438 | ||||
Redeem Vouchers | 60097487 | 264 days ago | IN | 0 POL | 0.0051232 | ||||
Redeem Vouchers | 56166418 | 364 days ago | IN | 0 POL | 0.01275166 | ||||
Redeem Vouchers | 55652521 | 378 days ago | IN | 0 POL | 0.01086587 | ||||
Redeem Vouchers | 55390424 | 385 days ago | IN | 0 POL | 0.00922008 | ||||
Redeem Vouchers | 55149873 | 391 days ago | IN | 0 POL | 0.01051293 | ||||
Redeem Vouchers | 55131083 | 391 days ago | IN | 0 POL | 0.00963431 | ||||
Redeem Vouchers | 55131082 | 391 days ago | IN | 0 POL | 0.02044151 | ||||
Redeem Vouchers | 55107838 | 392 days ago | IN | 0 POL | 0.00705612 | ||||
Redeem Vouchers | 55075267 | 393 days ago | IN | 0 POL | 0.002527 | ||||
Redeem Vouchers | 55027093 | 394 days ago | IN | 0 POL | 0.00409876 | ||||
Redeem Vouchers | 54679548 | 404 days ago | IN | 0 POL | 0.01120717 | ||||
Redeem Vouchers | 54590852 | 406 days ago | IN | 0 POL | 0.0062416 | ||||
Redeem Vouchers | 54263212 | 414 days ago | IN | 0 POL | 0.0127448 | ||||
Redeem Vouchers | 54262423 | 414 days ago | IN | 0 POL | 0.02067076 | ||||
Redeem Vouchers | 54261899 | 414 days ago | IN | 0 POL | 0.02172574 | ||||
Redeem Vouchers | 54049041 | 420 days ago | IN | 0 POL | 0.00505357 | ||||
Redeem Vouchers | 54007539 | 421 days ago | IN | 0 POL | 0.00479879 | ||||
Redeem Vouchers | 53991696 | 421 days ago | IN | 0 POL | 0.00484813 | ||||
Redeem Vouchers | 53988063 | 421 days ago | IN | 0 POL | 0.00496476 | ||||
Redeem Vouchers | 53983239 | 421 days ago | IN | 0 POL | 0.00476858 | ||||
Redeem Vouchers | 53959265 | 422 days ago | IN | 0 POL | 0.0024176 | ||||
Redeem Vouchers | 53871388 | 424 days ago | IN | 0 POL | 0.00520293 | ||||
Redeem Vouchers | 53859274 | 424 days ago | IN | 0 POL | 0.00601578 | ||||
Redeem Vouchers | 53839071 | 425 days ago | IN | 0 POL | 0.00676882 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
VoucherBananaRedeemer
Compiler Version
v0.8.23+commit.f704f362
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.2; /* WL voucher banana redeemer by gaspacho.eth */ import "IERC20.sol"; import "IERC1155.sol"; import "IERC721.sol"; import "Ownable.sol"; import "ERC1155Holder.sol"; contract VoucherBananaRedeemer is Ownable, ERC1155Holder { IERC20 polyBanana; IERC1155 pnkAssets; uint256 voucherId; uint256 voucherPrice; constructor( address _bananaAddress, address _pnkAssetsAddress, address _initOwner, uint256 _initVoucherId, uint256 _initVoucherPrice ) Ownable(_initOwner) { polyBanana = IERC20(_bananaAddress); pnkAssets = IERC1155(_pnkAssetsAddress); voucherId = _initVoucherId; voucherPrice = _initVoucherPrice; } // -- Events event Redeem(address indexed _from, uint256 _vouchersBurned, uint256 _bananaRedeemed); // -- User Functions function redeemVouchers(uint256 _amount) external { uint256 bananaReward = _amount * voucherPrice; pnkAssets.safeTransferFrom(msg.sender, address(this), voucherId, _amount, ''); polyBanana.transfer(msg.sender, bananaReward); emit Redeem(msg.sender, _amount, bananaReward); } // -- Owner Functions function O_setVoucherPrice(uint256 _newPrice) external onlyOwner { voucherPrice = _newPrice; } function O_setVoucherInfo(address _pnkAssetsAddress, uint256 _id) external onlyOwner { pnkAssets = IERC1155(_pnkAssetsAddress); voucherId = _id; } function O_setBananaAddress(address _bananaAddress) external onlyOwner { polyBanana = IERC20(_bananaAddress); } function O_rescueERC20(uint256 _amount, address _tokenAddress) external onlyOwner { IERC20(_tokenAddress).transfer(owner(), _amount); } function O_rescueERC721(uint256 _id, address _tokenAddress) external onlyOwner { IERC721(_tokenAddress).safeTransferFrom(address(this), owner(), _id); } function O_rescueERC1155(uint256 _id, uint256 _amount, address _tokenAddress) external onlyOwner { IERC1155(_tokenAddress).safeTransferFrom(address(this), owner(), _id, _amount, ''); } // -- View Utils function previewRedeem(uint256 _amount) external view returns (uint256) { return _amount * voucherPrice; } function redeemerInfo() external view returns (address, address, uint256, uint256, uint256) { return ( address(polyBanana), address(pnkAssets), voucherId, voucherPrice, polyBanana.balanceOf(address(this)) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.20; import {IERC165} from "IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the value of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] calldata accounts, uint256[] calldata ids ) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155Received} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `value` amount. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `values` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ 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 // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/utils/ERC1155Holder.sol) pragma solidity ^0.8.20; import {IERC165, ERC165} from "ERC165.sol"; import {IERC1155Receiver} from "IERC1155Receiver.sol"; /** * @dev Simple implementation of `IERC1155Receiver` that will allow a contract to hold ERC1155 tokens. * * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be * stuck. */ abstract contract ERC1155Holder is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.20; import {IERC165} from "IERC165.sol"; /** * @dev Interface that must be implemented by smart contracts in order to receive * ERC-1155 token transfers. */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @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(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @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)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "voucherBananaRedeemer.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_bananaAddress","type":"address"},{"internalType":"address","name":"_pnkAssetsAddress","type":"address"},{"internalType":"address","name":"_initOwner","type":"address"},{"internalType":"uint256","name":"_initVoucherId","type":"uint256"},{"internalType":"uint256","name":"_initVoucherPrice","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"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":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_vouchersBurned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_bananaRedeemed","type":"uint256"}],"name":"Redeem","type":"event"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"O_rescueERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"O_rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"O_rescueERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bananaAddress","type":"address"}],"name":"O_setBananaAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pnkAssetsAddress","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"O_setVoucherInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"O_setVoucherPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","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":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","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":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"redeemVouchers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemerInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610d2c380380610d2c83398101604081905261002f91610113565b826001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b610067816100a7565b50600180546001600160a01b039687166001600160a01b031991821617909155600280549590961694169390931790935550600391909155600455610169565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b038116811461010e57600080fd5b919050565b600080600080600060a0868803121561012b57600080fd5b610134866100f7565b9450610142602087016100f7565b9350610150604087016100f7565b6060870151608090970151959894975095949392505050565b610bb4806101786000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063b4e7a54511610097578063d1c570ea11610066578063d1c570ea14610212578063f23a6e6114610225578063f2fde38b14610244578063f7aef5551461025757600080fd5b8063b4e7a545146101a1578063b7bbca8b146101b4578063bc197c81146101c7578063c7b06d59146101ff57600080fd5b806365a685e3116100d357806365a685e314610158578063715018a61461016b5780638da5cb5b14610173578063b0ae27fe1461018e57600080fd5b806301ffc9a7146100fa5780634cdad5061461012257806351c3004614610143575b600080fd5b61010d610108366004610794565b610292565b60405190151581526020015b60405180910390f35b6101356101303660046107c5565b6102c9565b604051908152602001610119565b6101566101513660046107fa565b6102d9565b005b61015661016636600461082f565b61035b565b610156610389565b6000546040516001600160a01b039091168152602001610119565b61015661019c366004610859565b61039d565b6101566101af3660046107c5565b6103c7565b6101566101c2366004610874565b6104f8565b6101e66101d53660046109d7565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610119565b61015661020d3660046107c5565b610597565b610156610220366004610874565b6105a4565b6101e6610233366004610a81565b63f23a6e6160e01b95945050505050565b610156610252366004610859565b610639565b61025f61067c565b604080516001600160a01b039687168152959094166020860152928401919091526060830152608082015260a001610119565b60006001600160e01b03198216630271189760e51b14806102c357506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000600454826102c39190610ae6565b6102e1610717565b806001600160a01b031663f242432a306103036000546001600160a01b031690565b86866040518563ffffffff1660e01b81526004016103249493929190610b0b565b600060405180830381600087803b15801561033e57600080fd5b505af1158015610352573d6000803e3d6000fd5b50505050505050565b610363610717565b600280546001600160a01b0319166001600160a01b039390931692909217909155600355565b610391610717565b61039b6000610744565b565b6103a5610717565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600454826103d79190610ae6565b600254600354604051637921219560e11b81529293506001600160a01b039091169163f242432a9161041191339130918890600401610b0b565b600060405180830381600087803b15801561042b57600080fd5b505af115801561043f573d6000803e3d6000fd5b505060015460405163a9059cbb60e01b8152336004820152602481018590526001600160a01b03909116925063a9059cbb91506044016020604051808303816000875af1158015610494573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b89190610b43565b50604080518381526020810183905233917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929910160405180910390a25050565b610500610717565b806001600160a01b031663a9059cbb6105216000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af115801561056e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105929190610b43565b505050565b61059f610717565b600455565b6105ac610717565b806001600160a01b03166342842e0e306105ce6000546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101859052606401600060405180830381600087803b15801561061d57600080fd5b505af1158015610631573d6000803e3d6000fd5b505050505050565b610641610717565b6001600160a01b03811661067057604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61067981610744565b50565b600154600254600354600480546040516370a0823160e01b8152309281019290925260009485948594859485946001600160a01b0394851694909316929084906370a0823190602401602060405180830381865afa1580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190610b65565b945094509450945094509091929394565b6000546001600160a01b0316331461039b5760405163118cdaa760e01b8152336004820152602401610667565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156107a657600080fd5b81356001600160e01b0319811681146107be57600080fd5b9392505050565b6000602082840312156107d757600080fd5b5035919050565b80356001600160a01b03811681146107f557600080fd5b919050565b60008060006060848603121561080f57600080fd5b8335925060208401359150610826604085016107de565b90509250925092565b6000806040838503121561084257600080fd5b61084b836107de565b946020939093013593505050565b60006020828403121561086b57600080fd5b6107be826107de565b6000806040838503121561088757600080fd5b82359150610897602084016107de565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156108df576108df6108a0565b604052919050565b600082601f8301126108f857600080fd5b8135602067ffffffffffffffff821115610914576109146108a0565b8160051b6109238282016108b6565b928352848101820192828101908785111561093d57600080fd5b83870192505b8483101561095c57823582529183019190830190610943565b979650505050505050565b600082601f83011261097857600080fd5b813567ffffffffffffffff811115610992576109926108a0565b6109a5601f8201601f19166020016108b6565b8181528460208386010111156109ba57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156109ef57600080fd5b6109f8866107de565b9450610a06602087016107de565b9350604086013567ffffffffffffffff80821115610a2357600080fd5b610a2f89838a016108e7565b94506060880135915080821115610a4557600080fd5b610a5189838a016108e7565b93506080880135915080821115610a6757600080fd5b50610a7488828901610967565b9150509295509295909350565b600080600080600060a08688031215610a9957600080fd5b610aa2866107de565b9450610ab0602087016107de565b93506040860135925060608601359150608086013567ffffffffffffffff811115610ada57600080fd5b610a7488828901610967565b80820281158282048414176102c357634e487b7160e01b600052601160045260246000fd5b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b600060208284031215610b5557600080fd5b815180151581146107be57600080fd5b600060208284031215610b7757600080fd5b505191905056fea264697066735822122036f63e597c937699760bf56261ef2b97d84b403073cb1ff34755280fbf4b8e5b64736f6c63430008170033000000000000000000000000bc91347e80886453f3f8bbd6d7ac07c122d87735000000000000000000000000543dc6ca8381e8a1dd425bd7a686d5d7295f950e000000000000000000000000a6fd3673aa4ecf066b3eae30d41cc773495071e800000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000056bc75e2d63100000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063b4e7a54511610097578063d1c570ea11610066578063d1c570ea14610212578063f23a6e6114610225578063f2fde38b14610244578063f7aef5551461025757600080fd5b8063b4e7a545146101a1578063b7bbca8b146101b4578063bc197c81146101c7578063c7b06d59146101ff57600080fd5b806365a685e3116100d357806365a685e314610158578063715018a61461016b5780638da5cb5b14610173578063b0ae27fe1461018e57600080fd5b806301ffc9a7146100fa5780634cdad5061461012257806351c3004614610143575b600080fd5b61010d610108366004610794565b610292565b60405190151581526020015b60405180910390f35b6101356101303660046107c5565b6102c9565b604051908152602001610119565b6101566101513660046107fa565b6102d9565b005b61015661016636600461082f565b61035b565b610156610389565b6000546040516001600160a01b039091168152602001610119565b61015661019c366004610859565b61039d565b6101566101af3660046107c5565b6103c7565b6101566101c2366004610874565b6104f8565b6101e66101d53660046109d7565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610119565b61015661020d3660046107c5565b610597565b610156610220366004610874565b6105a4565b6101e6610233366004610a81565b63f23a6e6160e01b95945050505050565b610156610252366004610859565b610639565b61025f61067c565b604080516001600160a01b039687168152959094166020860152928401919091526060830152608082015260a001610119565b60006001600160e01b03198216630271189760e51b14806102c357506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000600454826102c39190610ae6565b6102e1610717565b806001600160a01b031663f242432a306103036000546001600160a01b031690565b86866040518563ffffffff1660e01b81526004016103249493929190610b0b565b600060405180830381600087803b15801561033e57600080fd5b505af1158015610352573d6000803e3d6000fd5b50505050505050565b610363610717565b600280546001600160a01b0319166001600160a01b039390931692909217909155600355565b610391610717565b61039b6000610744565b565b6103a5610717565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000600454826103d79190610ae6565b600254600354604051637921219560e11b81529293506001600160a01b039091169163f242432a9161041191339130918890600401610b0b565b600060405180830381600087803b15801561042b57600080fd5b505af115801561043f573d6000803e3d6000fd5b505060015460405163a9059cbb60e01b8152336004820152602481018590526001600160a01b03909116925063a9059cbb91506044016020604051808303816000875af1158015610494573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b89190610b43565b50604080518381526020810183905233917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929910160405180910390a25050565b610500610717565b806001600160a01b031663a9059cbb6105216000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af115801561056e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105929190610b43565b505050565b61059f610717565b600455565b6105ac610717565b806001600160a01b03166342842e0e306105ce6000546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101859052606401600060405180830381600087803b15801561061d57600080fd5b505af1158015610631573d6000803e3d6000fd5b505050505050565b610641610717565b6001600160a01b03811661067057604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b61067981610744565b50565b600154600254600354600480546040516370a0823160e01b8152309281019290925260009485948594859485946001600160a01b0394851694909316929084906370a0823190602401602060405180830381865afa1580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190610b65565b945094509450945094509091929394565b6000546001600160a01b0316331461039b5760405163118cdaa760e01b8152336004820152602401610667565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156107a657600080fd5b81356001600160e01b0319811681146107be57600080fd5b9392505050565b6000602082840312156107d757600080fd5b5035919050565b80356001600160a01b03811681146107f557600080fd5b919050565b60008060006060848603121561080f57600080fd5b8335925060208401359150610826604085016107de565b90509250925092565b6000806040838503121561084257600080fd5b61084b836107de565b946020939093013593505050565b60006020828403121561086b57600080fd5b6107be826107de565b6000806040838503121561088757600080fd5b82359150610897602084016107de565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156108df576108df6108a0565b604052919050565b600082601f8301126108f857600080fd5b8135602067ffffffffffffffff821115610914576109146108a0565b8160051b6109238282016108b6565b928352848101820192828101908785111561093d57600080fd5b83870192505b8483101561095c57823582529183019190830190610943565b979650505050505050565b600082601f83011261097857600080fd5b813567ffffffffffffffff811115610992576109926108a0565b6109a5601f8201601f19166020016108b6565b8181528460208386010111156109ba57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156109ef57600080fd5b6109f8866107de565b9450610a06602087016107de565b9350604086013567ffffffffffffffff80821115610a2357600080fd5b610a2f89838a016108e7565b94506060880135915080821115610a4557600080fd5b610a5189838a016108e7565b93506080880135915080821115610a6757600080fd5b50610a7488828901610967565b9150509295509295909350565b600080600080600060a08688031215610a9957600080fd5b610aa2866107de565b9450610ab0602087016107de565b93506040860135925060608601359150608086013567ffffffffffffffff811115610ada57600080fd5b610a7488828901610967565b80820281158282048414176102c357634e487b7160e01b600052601160045260246000fd5b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b600060208284031215610b5557600080fd5b815180151581146107be57600080fd5b600060208284031215610b7757600080fd5b505191905056fea264697066735822122036f63e597c937699760bf56261ef2b97d84b403073cb1ff34755280fbf4b8e5b64736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bc91347e80886453f3f8bbd6d7ac07c122d87735000000000000000000000000543dc6ca8381e8a1dd425bd7a686d5d7295f950e000000000000000000000000a6fd3673aa4ecf066b3eae30d41cc773495071e800000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000056bc75e2d63100000
-----Decoded View---------------
Arg [0] : _bananaAddress (address): 0xbC91347e80886453F3f8bBd6d7aC07C122D87735
Arg [1] : _pnkAssetsAddress (address): 0x543dc6cA8381E8A1Dd425bD7a686d5D7295F950e
Arg [2] : _initOwner (address): 0xa6fD3673Aa4ecf066B3eAe30D41cC773495071E8
Arg [3] : _initVoucherId (uint256): 5
Arg [4] : _initVoucherPrice (uint256): 100000000000000000000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000bc91347e80886453f3f8bbd6d7ac07c122d87735
Arg [1] : 000000000000000000000000543dc6ca8381e8a1dd425bd7a686d5d7295f950e
Arg [2] : 000000000000000000000000a6fd3673aa4ecf066b3eae30d41cc773495071e8
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [4] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
POL | 100.00% | $0.097959 | 9,400 | $920.81 |
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.