Overview
ETH Balance
25.551678883880811283 ETH
Eth Value
$99,531.52 (@ $3,895.30/ETH)Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer | 11408762 | 1466 days ago | IN | 0.8 ETH | 0.00249399 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
19390227 | 279 days ago | 12.77583944 ETH | ||||
13498445 | 1142 days ago | 12.77583944 ETH | ||||
13448315 | 1150 days ago | 25.55167888 ETH | ||||
13041381 | 1214 days ago | 0.05495473 ETH | ||||
13041344 | 1214 days ago | 0.03076417 ETH | ||||
13035735 | 1214 days ago | 0.01456493 ETH | ||||
13034981 | 1215 days ago | 0.0578207 ETH | ||||
13034944 | 1215 days ago | 0.03264513 ETH | ||||
13029301 | 1215 days ago | 0.01433331 ETH | ||||
13028579 | 1216 days ago | 0.05624415 ETH | ||||
13028544 | 1216 days ago | 0.03254707 ETH | ||||
13022900 | 1216 days ago | 0.01541588 ETH | ||||
13022175 | 1217 days ago | 0.05805777 ETH | ||||
13022168 | 1217 days ago | 0.05813665 ETH | ||||
13022125 | 1217 days ago | 0.03301905 ETH | ||||
13022100 | 1217 days ago | 0.03301905 ETH | ||||
13022098 | 1217 days ago | 0.03301905 ETH | ||||
13016459 | 1217 days ago | 0.01530548 ETH | ||||
13015768 | 1218 days ago | 0.06301577 ETH | ||||
13015698 | 1218 days ago | 0.03828732 ETH | ||||
13010017 | 1218 days ago | 0.01669991 ETH | ||||
13009368 | 1218 days ago | 0.0616607 ETH | ||||
13009297 | 1219 days ago | 0.03526731 ETH | ||||
13003585 | 1219 days ago | 0.01471371 ETH | ||||
13002968 | 1219 days ago | 0.06163127 ETH |
Loading...
Loading
Contract Name:
WhereIsMyDragonTreasure
Compiler Version
v0.7.4+commit.3f05b770
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: MIT pragma solidity ^0.7.4; import "./IERC1155Receiver.sol"; import "./ERC165.sol"; import "./IEthItem.sol"; contract WhereIsMyDragonTreasure is IERC1155Receiver, ERC165 { address private _source; uint256 private _legendaryCard; uint256 private _singleReward; uint256 private _legendaryCardAmount; uint256 private _startBlock; uint256 private _redeemed; constructor(address source, uint256 legendaryCard, uint256 legendaryCardAmount, uint256 startBlock) { _source = source; _legendaryCard = legendaryCard; _legendaryCardAmount = legendaryCardAmount; _startBlock = startBlock; _registerInterfaces(); } function _registerInterfaces() private { _registerInterface(this.onERC1155Received.selector); _registerInterface(this.onERC1155BatchReceived.selector); } receive() external payable { if(block.number >= _startBlock) { payable(msg.sender).transfer(msg.value); return; } _singleReward = address(this).balance / _legendaryCardAmount; } function data() public view returns(uint256 balance, uint256 singleReward, uint256 startBlock, uint256 redeemed) { balance = address(this).balance; singleReward = _singleReward; startBlock = _startBlock; redeemed = _redeemed; } function onERC1155Received( address, address from, uint256 objectId, uint256 amount, bytes memory ) public override returns(bytes4) { uint256[] memory objectIds = new uint256[](1); objectIds[0] = objectId; uint256[] memory amounts = new uint256[](1); amounts[0] = amount; _checkBurnAndTransfer(from, objectIds, amounts); return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address from, uint256[] memory objectIds, uint256[] memory amounts, bytes memory ) public override returns(bytes4) { _checkBurnAndTransfer(from, objectIds, amounts); return this.onERC1155BatchReceived.selector; } function _checkBurnAndTransfer(address from, uint256[] memory objectIds, uint256[] memory amounts) private { require(msg.sender == _source, "Unauthorized Action"); require(block.number >= _startBlock, "Redeem Period still not started"); for(uint256 i = 0; i < objectIds.length; i++) { require(objectIds[i] == _legendaryCard, "Wrong Card!"); _redeemed += amounts[i]; payable(from).transfer(_singleReward * amounts[i]); } IEthItem(_source).burnBatch(objectIds, amounts); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.4; import "./IERC165.sol"; abstract contract ERC165 is IERC165 { bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; mapping(bytes4 => bool) private _supportedInterfaces; constructor () { _registerInterface(_INTERFACE_ID_ERC165); } function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return _supportedInterfaces[interfaceId]; } function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
//SPDX-License-Identifier: MIT pragma solidity ^0.7.4; import "./IERC165.sol"; interface IERC1155Receiver is IERC165 { function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns(bytes4); function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns(bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.4; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.4; interface IEthItem { function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; function burnBatch( uint256[] calldata objectIds, uint256[] calldata amounts ) external; }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"source","type":"address"},{"internalType":"uint256","name":"legendaryCard","type":"uint256"},{"internalType":"uint256","name":"legendaryCardAmount","type":"uint256"},{"internalType":"uint256","name":"startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"data","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"singleReward","type":"uint256"},{"internalType":"uint256","name":"startBlock","type":"uint256"},{"internalType":"uint256","name":"redeemed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"objectIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","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":"objectId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516108bd3803806108bd8339818101604052608081101561003357600080fd5b508051602082015160408301516060909301519192909161005a6301ffc9a760e01b610095565b600180546001600160a01b0319166001600160a01b03861617905560028390556004829055600581905561008c610119565b5050505061013b565b6001600160e01b031980821614156100f4576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b61012963f23a6e6160e01b610095565b61013963bc197c8160e01b610095565b565b6107738061014a6000396000f3fe6080604052600436106100435760003560e01c806301ffc9a71461009a57806373d4a13a146100e2578063bc197c811461011d578063f23a6e611461030857610095565b366100955760055443106100835760405133903480156108fc02916000818181858888f1935050505015801561007d573d6000803e3d6000fd5b50610093565b600454478161008e57fe5b046003555b005b600080fd5b3480156100a657600080fd5b506100ce600480360360208110156100bd57600080fd5b50356001600160e01b0319166103de565b604080519115158252519081900360200190f35b3480156100ee57600080fd5b506100f76103fd565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561012957600080fd5b506102eb600480360360a081101561014057600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561017357600080fd5b82018360208201111561018557600080fd5b803590602001918460208302840111600160201b831117156101a657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156101f557600080fd5b82018360208201111561020757600080fd5b803590602001918460208302840111600160201b8311171561022857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561027757600080fd5b82018360208201111561028957600080fd5b803590602001918460018302840111600160201b831117156102aa57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040a945050505050565b604080516001600160e01b03199092168252519081900360200190f35b34801561031457600080fd5b506102eb600480360360a081101561032b57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b81111561036a57600080fd5b82018360208201111561037c57600080fd5b803590602001918460018302840111600160201b8311171561039d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610429945050505050565b6001600160e01b03191660009081526020819052604090205460ff1690565b6003546005546006544793565b60006104178585856104c5565b5063bc197c8160e01b95945050505050565b6040805160018082528183019092526000916060919060208083019080368337019050509050848160008151811061045d57fe5b6020908102919091010152604080516001808252818301909252606091816020016020820280368337019050509050848160008151811061049a57fe5b6020026020010181815250506104b18783836104c5565b5063f23a6e6160e01b979650505050505050565b6001546001600160a01b0316331461051a576040805162461bcd60e51b81526020600482015260136024820152722ab730baba3437b934bd32b21020b1ba34b7b760691b604482015290519081900360640190fd5b600554431015610571576040805162461bcd60e51b815260206004820152601f60248201527f52656465656d20506572696f64207374696c6c206e6f74207374617274656400604482015290519081900360640190fd5b60005b82518110156106505760025483828151811061058c57fe5b6020026020010151146105d4576040805162461bcd60e51b815260206004820152600b60248201526a57726f6e6720436172642160a81b604482015290519081900360640190fd5b8181815181106105e057fe5b6020026020010151600660008282540192505081905550836001600160a01b03166108fc83838151811061061057fe5b6020026020010151600354029081150290604051600060405180830381858888f19350505050158015610647573d6000803e3d6000fd5b50600101610574565b50600154604080516383ca4b6f60e01b8152600481019182528451604482015284516001600160a01b03909316926383ca4b6f9286928692829160248101916064909101906020808801910280838360005b838110156106ba5781810151838201526020016106a2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156106f95781810151838201526020016106e1565b50505050905001945050505050600060405180830381600087803b15801561072057600080fd5b505af1158015610734573d6000803e3d6000fd5b5050505050505056fea2646970667358221220a7d3fb06ef9c6b1647d296c2db9c56917fc170c451cc5d7b255e249eeda83e1d64736f6c63430007040033000000000000000000000000b6ab68a44ecc9fb2244aab83eb2f6dba54205ebf00000000000000000000000022e6559f495f97af51ff56719cdff80f65a0b93a00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000cd255c
Deployed Bytecode
0x6080604052600436106100435760003560e01c806301ffc9a71461009a57806373d4a13a146100e2578063bc197c811461011d578063f23a6e611461030857610095565b366100955760055443106100835760405133903480156108fc02916000818181858888f1935050505015801561007d573d6000803e3d6000fd5b50610093565b600454478161008e57fe5b046003555b005b600080fd5b3480156100a657600080fd5b506100ce600480360360208110156100bd57600080fd5b50356001600160e01b0319166103de565b604080519115158252519081900360200190f35b3480156100ee57600080fd5b506100f76103fd565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561012957600080fd5b506102eb600480360360a081101561014057600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561017357600080fd5b82018360208201111561018557600080fd5b803590602001918460208302840111600160201b831117156101a657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156101f557600080fd5b82018360208201111561020757600080fd5b803590602001918460208302840111600160201b8311171561022857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561027757600080fd5b82018360208201111561028957600080fd5b803590602001918460018302840111600160201b831117156102aa57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061040a945050505050565b604080516001600160e01b03199092168252519081900360200190f35b34801561031457600080fd5b506102eb600480360360a081101561032b57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b81111561036a57600080fd5b82018360208201111561037c57600080fd5b803590602001918460018302840111600160201b8311171561039d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610429945050505050565b6001600160e01b03191660009081526020819052604090205460ff1690565b6003546005546006544793565b60006104178585856104c5565b5063bc197c8160e01b95945050505050565b6040805160018082528183019092526000916060919060208083019080368337019050509050848160008151811061045d57fe5b6020908102919091010152604080516001808252818301909252606091816020016020820280368337019050509050848160008151811061049a57fe5b6020026020010181815250506104b18783836104c5565b5063f23a6e6160e01b979650505050505050565b6001546001600160a01b0316331461051a576040805162461bcd60e51b81526020600482015260136024820152722ab730baba3437b934bd32b21020b1ba34b7b760691b604482015290519081900360640190fd5b600554431015610571576040805162461bcd60e51b815260206004820152601f60248201527f52656465656d20506572696f64207374696c6c206e6f74207374617274656400604482015290519081900360640190fd5b60005b82518110156106505760025483828151811061058c57fe5b6020026020010151146105d4576040805162461bcd60e51b815260206004820152600b60248201526a57726f6e6720436172642160a81b604482015290519081900360640190fd5b8181815181106105e057fe5b6020026020010151600660008282540192505081905550836001600160a01b03166108fc83838151811061061057fe5b6020026020010151600354029081150290604051600060405180830381858888f19350505050158015610647573d6000803e3d6000fd5b50600101610574565b50600154604080516383ca4b6f60e01b8152600481019182528451604482015284516001600160a01b03909316926383ca4b6f9286928692829160248101916064909101906020808801910280838360005b838110156106ba5781810151838201526020016106a2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156106f95781810151838201526020016106e1565b50505050905001945050505050600060405180830381600087803b15801561072057600080fd5b505af1158015610734573d6000803e3d6000fd5b5050505050505056fea2646970667358221220a7d3fb06ef9c6b1647d296c2db9c56917fc170c451cc5d7b255e249eeda83e1d64736f6c63430007040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b6ab68a44ecc9fb2244aab83eb2f6dba54205ebf00000000000000000000000022e6559f495f97af51ff56719cdff80f65a0b93a00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000cd255c
-----Decoded View---------------
Arg [0] : source (address): 0xb6ab68A44eCc9fb2244AaB83eB2f6dbA54205EBf
Arg [1] : legendaryCard (uint256): 199242316350403115624675989599876480538394016058
Arg [2] : legendaryCardAmount (uint256): 6
Arg [3] : startBlock (uint256): 13444444
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000b6ab68a44ecc9fb2244aab83eb2f6dba54205ebf
Arg [1] : 00000000000000000000000022e6559f495f97af51ff56719cdff80f65a0b93a
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [3] : 0000000000000000000000000000000000000000000000000000000000cd255c
Deployed Bytecode Sourcemap
140:2628:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;948:11;;932:12;:27;929:116;;975:39;;983:10;;1004:9;975:39;;;;;;;;;1004:9;983:10;975:39;;;;;;;;;;;;;;;;;;;;;1028:7;;929:116;1094:20;;1070:21;:44;;;;;;1054:13;:60;892:229;140:2628;;;;;327:140:0;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;327:140:0;-1:-1:-1;;;;;;327:140:0;;:::i;:::-;;;;;;;;;;;;;;;;;;1127:263:4;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1876:334;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1876:334:4;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1876:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1876:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1876:334:4;;;;;;;;-1:-1:-1;1876:334:4;;-1:-1:-1;;;;;1876:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1876:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1876:334:4;;;;;;;;-1:-1:-1;1876:334:4;;-1:-1:-1;;;;;1876:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1876:334:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1876:334:4;;-1:-1:-1;1876:334:4;;-1:-1:-1;;;;;1876:334:4:i;:::-;;;;-1:-1:-1;;;;;;1876:334:4;;;;;;;;;;;;;;1396:474;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1396:474:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1396:474:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1396:474:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1396:474:4;;-1:-1:-1;1396:474:4;;-1:-1:-1;;;;;1396:474:4:i;327:140:0:-;-1:-1:-1;;;;;;427:33:0;404:4;427:33;;;;;;;;;;;;;;327:140::o;1127:263:4:-;1306:13;;1342:11;;1374:9;;1260:21;;1127:263::o;1876:334::-;2085:6;2103:47;2125:4;2131:9;2142:7;2103:21;:47::i;:::-;-1:-1:-1;;;;1876:334:4;;;;;;;:::o;1396:474::-;1627:16;;;1641:1;1627:16;;;;;;;;;1580:6;;1598:26;;1627:16;;;;;;;;;;;;-1:-1:-1;1627:16:4;1598:45;;1668:8;1653:9;1663:1;1653:12;;;;;;;;;;;;;;;;;:23;1713:16;;;1727:1;1713:16;;;;;;;;;1686:24;;1713:16;;;;;;;;;;;;-1:-1:-1;1713:16:4;1686:43;;1752:6;1739:7;1747:1;1739:10;;;;;;;;;;;;;:19;;;;;1768:47;1790:4;1796:9;1807:7;1768:21;:47::i;:::-;-1:-1:-1;;;;1832:31:4;1396:474;-1:-1:-1;;;;;;;1396:474:4:o;2216:550::-;2355:7;;-1:-1:-1;;;;;2355:7:4;2341:10;:21;2333:53;;;;;-1:-1:-1;;;2333:53:4;;;;;;;;;;;;-1:-1:-1;;;2333:53:4;;;;;;;;;;;;;;;2420:11;;2404:12;:27;;2396:71;;;;;-1:-1:-1;;;2396:71:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;2481:9;2477:226;2500:9;:16;2496:1;:20;2477:226;;;2561:14;;2545:9;2555:1;2545:12;;;;;;;;;;;;;;:30;2537:54;;;;;-1:-1:-1;;;2537:54:4;;;;;;;;;;;;-1:-1:-1;;;2537:54:4;;;;;;;;;;;;;;;2618:7;2626:1;2618:10;;;;;;;;;;;;;;2605:9;;:23;;;;;;;;;;;2650:4;-1:-1:-1;;;;;2642:22:4;:50;2681:7;2689:1;2681:10;;;;;;;;;;;;;;2665:13;;:26;2642:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2518:3:4;;2477:226;;;-1:-1:-1;2721:7:4;;2712:47;;;-1:-1:-1;;;2712:47:4;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2721:7:4;;;;2712:27;;2740:9;;2751:7;;2712:47;;;;;;;;;;;;;;;;;;;;2721:7;2712:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2216:550;;;:::o
Swarm Source
ipfs://a7d3fb06ef9c6b1647d296c2db9c56917fc170c451cc5d7b255e249eeda83e1d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,895.3 | 25.5517 | $99,531.52 |
Loading...
Loading
[ Download: CSV Export ]
[ 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.