Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 426 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Redeem Statu... | 16720993 | 505 days ago | IN | 0 ETH | 0.00085574 | ||||
Redeem | 16720978 | 505 days ago | IN | 0 ETH | 0.0017774 | ||||
Redeem | 16720946 | 505 days ago | IN | 0 ETH | 0.00225395 | ||||
Redeem | 16720908 | 505 days ago | IN | 0 ETH | 0.00228353 | ||||
Redeem | 16720896 | 505 days ago | IN | 0 ETH | 0.00269 | ||||
Redeem | 16720893 | 505 days ago | IN | 0 ETH | 0.0027635 | ||||
Redeem | 16720886 | 505 days ago | IN | 0 ETH | 0.00235547 | ||||
Redeem | 16720497 | 505 days ago | IN | 0 ETH | 0.00249801 | ||||
Redeem | 16720465 | 505 days ago | IN | 0 ETH | 0.00241506 | ||||
Redeem | 16720423 | 505 days ago | IN | 0 ETH | 0.00273669 | ||||
Redeem | 16720287 | 505 days ago | IN | 0 ETH | 0.00173007 | ||||
Redeem | 16720284 | 505 days ago | IN | 0 ETH | 0.00212825 | ||||
Redeem | 16720263 | 505 days ago | IN | 0 ETH | 0.00196472 | ||||
Redeem | 16720255 | 505 days ago | IN | 0 ETH | 0.00186175 | ||||
Redeem | 16720253 | 505 days ago | IN | 0 ETH | 0.00192627 | ||||
Redeem | 16720251 | 505 days ago | IN | 0 ETH | 0.00168388 | ||||
Redeem | 16720248 | 505 days ago | IN | 0 ETH | 0.00186146 | ||||
Redeem | 16720246 | 505 days ago | IN | 0 ETH | 0.00194953 | ||||
Redeem | 16720244 | 505 days ago | IN | 0 ETH | 0.00183513 | ||||
Redeem | 16720224 | 505 days ago | IN | 0 ETH | 0.00177271 | ||||
Redeem | 16720211 | 505 days ago | IN | 0 ETH | 0.00174095 | ||||
Redeem | 16720208 | 505 days ago | IN | 0 ETH | 0.00168766 | ||||
Redeem | 16720205 | 505 days ago | IN | 0 ETH | 0.00164141 | ||||
Redeem | 16720197 | 505 days ago | IN | 0 ETH | 0.0017043 | ||||
Redeem | 16720193 | 505 days ago | IN | 0 ETH | 0.00170421 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CountyFairFleaMarket
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /// @title County Fair FLea Market /// @notice burn and redeem contract for Negotiations With The Abyss /// @author transientlabs.xyz pragma solidity 0.8.17; import {Ownable} from "Ownable.sol"; interface BurnContract { function burn(address from, uint256[] calldata tokenIds, uint256[] calldata amounts) external; } interface RedeemContract { function externalMint(address recipient, uint256 tokenId) external; } contract CountyFairFleaMarket is Ownable { // State Variables bool public redeemOpen; BurnContract public burnContract; RedeemContract public redeemContract; mapping(uint256 => uint256) private _pointsForPrize; // constructor constructor(address burnContractAddress, address redeemContractAddress) Ownable() { burnContract = BurnContract(burnContractAddress); redeemContract = RedeemContract(redeemContractAddress); } /// @notice function to set points for a prize /// @dev requires owner function setPointsPerPrize(uint256[] calldata prizeTokenIds, uint256[] calldata prizePoints) external onlyOwner { require(prizeTokenIds.length == prizePoints.length, "array length mismatch"); for (uint256 i = 0; i < prizePoints.length; i++) { _pointsForPrize[prizeTokenIds[i]] = prizePoints[i]; } } /// @notice function to open/close the redeem /// @dev requires owner function setRedeemStatus(bool status) external onlyOwner { redeemOpen = status; } /// @notice redeem function function redeem(uint256 prizeTokenId) external { require(redeemOpen, "redeem not open"); uint256 numToBurn = _pointsForPrize[prizeTokenId]; require(numToBurn > 0, "invalid prize token id"); uint256[] memory tokenIds = new uint256[](1); tokenIds[0] = 1; uint256[] memory amounts = new uint256[](1); amounts[0] = numToBurn; burnContract.burn(msg.sender, tokenIds, amounts); redeemContract.externalMint(msg.sender, prizeTokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "CountyFairFleaMarket.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"burnContractAddress","type":"address"},{"internalType":"address","name":"redeemContractAddress","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"},{"inputs":[],"name":"burnContract","outputs":[{"internalType":"contract BurnContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"prizeTokenId","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemContract","outputs":[{"internalType":"contract RedeemContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeemOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"prizeTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"prizePoints","type":"uint256[]"}],"name":"setPointsPerPrize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setRedeemStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516108a13803806108a183398101604081905261002f916100d5565b61003833610069565b600180546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055610108565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100d057600080fd5b919050565b600080604083850312156100e857600080fd5b6100f1836100b9565b91506100ff602084016100b9565b90509250929050565b61078a806101176000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80637a4473e1116100665780637a4473e1146101095780638da5cb5b1461011c578063db006a751461012d578063deffe7f814610140578063f2fde38b1461015357600080fd5b80631c0973a41461009857806371003fdc146100c8578063715018a6146100ec57806378aaae25146100f6575b600080fd5b6001546100ab906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6000546100dc90600160a01b900460ff1681565b60405190151581526020016100bf565b6100f4610166565b005b6100f46101043660046105c5565b61017a565b6002546100ab906001600160a01b031681565b6000546001600160a01b03166100ab565b6100f461013b366004610631565b61023b565b6100f461014e36600461064a565b610430565b6100f4610161366004610673565b610456565b61016e6104cf565b6101786000610529565b565b6101826104cf565b8281146101ce5760405162461bcd60e51b81526020600482015260156024820152740c2e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b60448201526064015b60405180910390fd5b60005b81811015610234578282828181106101eb576101eb61069c565b90506020020135600360008787858181106102085761020861069c565b90506020020135815260200190815260200160002081905550808061022c906106b2565b9150506101d1565b5050505050565b600054600160a01b900460ff166102865760405162461bcd60e51b815260206004820152600f60248201526e3932b232b2b6903737ba1037b832b760891b60448201526064016101c5565b600081815260036020526040902054806102db5760405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a59081c1c9a5e99481d1bdad95b881a5960521b60448201526064016101c5565b604080516001808252818301909252600091602080830190803683370190505090506001816000815181106103125761031261069c565b602090810291909101015260408051600180825281830190925260009181602001602082028036833701905050905082816000815181106103555761035561069c565b6020908102919091010152600154604051633db0f8ab60e01b81526001600160a01b0390911690633db0f8ab9061039490339086908690600401610714565b600060405180830381600087803b1580156103ae57600080fd5b505af11580156103c2573d6000803e3d6000fd5b505060025460405163133f311360e31b8152336004820152602481018890526001600160a01b0390911692506399f988989150604401600060405180830381600087803b15801561041257600080fd5b505af1158015610426573d6000803e3d6000fd5b5050505050505050565b6104386104cf565b60008054911515600160a01b0260ff60a01b19909216919091179055565b61045e6104cf565b6001600160a01b0381166104c35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101c5565b6104cc81610529565b50565b6000546001600160a01b031633146101785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101c5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f84011261058b57600080fd5b50813567ffffffffffffffff8111156105a357600080fd5b6020830191508360208260051b85010111156105be57600080fd5b9250929050565b600080600080604085870312156105db57600080fd5b843567ffffffffffffffff808211156105f357600080fd5b6105ff88838901610579565b9096509450602087013591508082111561061857600080fd5b5061062587828801610579565b95989497509550505050565b60006020828403121561064357600080fd5b5035919050565b60006020828403121561065c57600080fd5b8135801515811461066c57600080fd5b9392505050565b60006020828403121561068557600080fd5b81356001600160a01b038116811461066c57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000600182016106d257634e487b7160e01b600052601160045260246000fd5b5060010190565b600081518084526020808501945080840160005b83811015610709578151875295820195908201906001016106ed565b509495945050505050565b6001600160a01b0384168152606060208201819052600090610738908301856106d9565b828103604084015261074a81856106d9565b969550505050505056fea2646970667358221220fcae50e99de33c8558240097a8d29d30e3f19042fd819c569bf8ea929ec389e564736f6c6343000811003300000000000000000000000071ce294ab5e26b3ae8d46d410e795c5265004130000000000000000000000000d2f62f16424666ac76a682ee910ca041d3bff43d
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80637a4473e1116100665780637a4473e1146101095780638da5cb5b1461011c578063db006a751461012d578063deffe7f814610140578063f2fde38b1461015357600080fd5b80631c0973a41461009857806371003fdc146100c8578063715018a6146100ec57806378aaae25146100f6575b600080fd5b6001546100ab906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6000546100dc90600160a01b900460ff1681565b60405190151581526020016100bf565b6100f4610166565b005b6100f46101043660046105c5565b61017a565b6002546100ab906001600160a01b031681565b6000546001600160a01b03166100ab565b6100f461013b366004610631565b61023b565b6100f461014e36600461064a565b610430565b6100f4610161366004610673565b610456565b61016e6104cf565b6101786000610529565b565b6101826104cf565b8281146101ce5760405162461bcd60e51b81526020600482015260156024820152740c2e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b60448201526064015b60405180910390fd5b60005b81811015610234578282828181106101eb576101eb61069c565b90506020020135600360008787858181106102085761020861069c565b90506020020135815260200190815260200160002081905550808061022c906106b2565b9150506101d1565b5050505050565b600054600160a01b900460ff166102865760405162461bcd60e51b815260206004820152600f60248201526e3932b232b2b6903737ba1037b832b760891b60448201526064016101c5565b600081815260036020526040902054806102db5760405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a59081c1c9a5e99481d1bdad95b881a5960521b60448201526064016101c5565b604080516001808252818301909252600091602080830190803683370190505090506001816000815181106103125761031261069c565b602090810291909101015260408051600180825281830190925260009181602001602082028036833701905050905082816000815181106103555761035561069c565b6020908102919091010152600154604051633db0f8ab60e01b81526001600160a01b0390911690633db0f8ab9061039490339086908690600401610714565b600060405180830381600087803b1580156103ae57600080fd5b505af11580156103c2573d6000803e3d6000fd5b505060025460405163133f311360e31b8152336004820152602481018890526001600160a01b0390911692506399f988989150604401600060405180830381600087803b15801561041257600080fd5b505af1158015610426573d6000803e3d6000fd5b5050505050505050565b6104386104cf565b60008054911515600160a01b0260ff60a01b19909216919091179055565b61045e6104cf565b6001600160a01b0381166104c35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101c5565b6104cc81610529565b50565b6000546001600160a01b031633146101785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101c5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f84011261058b57600080fd5b50813567ffffffffffffffff8111156105a357600080fd5b6020830191508360208260051b85010111156105be57600080fd5b9250929050565b600080600080604085870312156105db57600080fd5b843567ffffffffffffffff808211156105f357600080fd5b6105ff88838901610579565b9096509450602087013591508082111561061857600080fd5b5061062587828801610579565b95989497509550505050565b60006020828403121561064357600080fd5b5035919050565b60006020828403121561065c57600080fd5b8135801515811461066c57600080fd5b9392505050565b60006020828403121561068557600080fd5b81356001600160a01b038116811461066c57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000600182016106d257634e487b7160e01b600052601160045260246000fd5b5060010190565b600081518084526020808501945080840160005b83811015610709578151875295820195908201906001016106ed565b509495945050505050565b6001600160a01b0384168152606060208201819052600090610738908301856106d9565b828103604084015261074a81856106d9565b969550505050505056fea2646970667358221220fcae50e99de33c8558240097a8d29d30e3f19042fd819c569bf8ea929ec389e564736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000071ce294ab5e26b3ae8d46d410e795c5265004130000000000000000000000000d2f62f16424666ac76a682ee910ca041d3bff43d
-----Decoded View---------------
Arg [0] : burnContractAddress (address): 0x71cE294Ab5e26B3aE8d46D410E795C5265004130
Arg [1] : redeemContractAddress (address): 0xD2F62f16424666AC76a682ee910Ca041D3BFF43D
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000071ce294ab5e26b3ae8d46d410e795c5265004130
Arg [1] : 000000000000000000000000d2f62f16424666ac76a682ee910ca041d3bff43d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.