Contract 0x46CA2bf8188303887d6AF76ddD316AFa233b2ec9 1

 

Contract Overview

Balance:
0 Ether

EtherValue:
$0.00

Token:
 
Txn Hash
Method
Block
From
To
Value
0xf70444cc76a2a1e50b032f3b38ae6f9e9ad9104967546d564bb3d0e09a89a22fTransfer(pending)2022-11-27 1:53:421 day 17 hrs ago0xcf99594e0eb80797e212eddbd08da1e6f687af7f IN 0x46ca2bf8188303887d6af76ddd316afa233b2ec90.000053930742140943 Ether(Pending)(Pending)
0xe48174c11ecd85406144ea45335a0aa030b1766f3424b0b2d337ceb0e9901090Withdraw Token113540992020-11-29 14:11:37729 days 5 hrs ago0x90cf79f90aeca1e5a7652a9fdc4c2dc98e995a17 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0005872714.1
0xaa4bcf3b0b0e8a0787191547b7996c08b3e8a1c3ee87d35a0ec04bc1c8ce96a2Reveal113422732020-11-27 18:58:15731 days 18 mins ago0x136d473d0c3965d7630f346152101e741074825f IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.00037215.00000171
0x9ae7559ae995f11475c958745e37614061b8d3af9c1e3c0adc5440206fd221beWithdraw113341992020-11-26 13:11:40732 days 6 hrs ago0x90cf79f90aeca1e5a7652a9fdc4c2dc98e995a17 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0010962337
0xb7c72b3ae72b2a0b791cb237e41a320033f13606dd2437425ca44bad294f7131Commit113339782020-11-26 12:22:01732 days 6 hrs ago0x136d473d0c3965d7630f346152101e741074825f IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0055246789.00000145
0xb9edd5a1a154e6285731df48bea330387c40c26c2a14d01255db28f4037143e6Reveal113339652020-11-26 12:19:39732 days 6 hrs ago0x8e403e9af7f759435d0a8515ab89103f709077e0 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.00086835
0x76d3637f6f8db5850ea5cb096b6fa34a87e4beccb5ce5b1426423164d5644cf6Reveal113337702020-11-26 11:36:12732 days 7 hrs ago0xe8f9435c827ba891658d060df8b5228e723ecb40 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.00276749110
0x8999faeccdba56d483bff2ec1fed5fa79a1bd9a9bfe682f96e03f426505337ceReveal113337442020-11-26 11:30:51732 days 7 hrs ago0xfbd61ca0144e889350d0904f21aee6786c3d4fa3 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0012579550
0xce3d0d4252986f39b44c771c1ed9195148674f50e677c2e36db1866da58c1698Reveal113337422020-11-26 11:30:41732 days 7 hrs ago0xe8f9435c827ba891658d060df8b5228e723ecb40 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.00377385150
0x8f5d6029605779037306eaf6d61d6733f31d805f07eb2f6787fe6d44209e80d9Commit113337262020-11-26 11:26:53732 days 7 hrs ago0xe8f9435c827ba891658d060df8b5228e723ecb40 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.00931125150
0x1eaff7df174b937cb8ab2102691c4baaf27069b6934c127e8890b1eede7ddd4bCommit113337202020-11-26 11:26:23732 days 7 hrs ago0xe8f9435c827ba891658d060df8b5228e723ecb40 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0075150
0x897b6538e78a7e33d6ceb7ff3d959c8cb74ded44256821456fb379550f989628Commit113337072020-11-26 11:24:08732 days 7 hrs ago0x7ac2d86c57df2feed88d90658298f2afd9617848 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0089388144
0x3cafcda0e4486c9c52a1e2fbfbee7f12639cd57cd48e668f81d2003c6259c04bReveal113336072020-11-26 11:02:40732 days 8 hrs ago0xfbd61ca0144e889350d0904f21aee6786c3d4fa3 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0025159100
0xfb42ee40858467ad3e3b3dbca2497f9a73f3aff63dd24a562544dcc50ea115adCommit113335852020-11-26 10:58:31732 days 8 hrs ago0xfbd61ca0144e889350d0904f21aee6786c3d4fa3 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.01008718162.5
0xc3d8c881cf985e846313fef1af087dcaddc0a33c04a1d4206200017e0c720b10Commit113335852020-11-26 10:58:31732 days 8 hrs ago0xfbd61ca0144e889350d0904f21aee6786c3d4fa3 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.002550
0x42b1dcf16bf44911b6369d55bd55bd2ac3861e265f0174c5230919a3c1e06326Commit113334062020-11-26 10:19:13732 days 8 hrs ago0x58dd1804818beb025d2f8d84299c855ad119d8c6 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0086905140
0xd6f08de9cff34c94596da966616f64ff03ec00598c0e67f9b3c444bf5a28471dCommit113333722020-11-26 10:13:12732 days 9 hrs ago0x7f1a3a9692f33dfab59bc1983e60c7e1fbb3fd17 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.00562963201.96000148
0x45a5476c8dd6c490938762a94034c3b685a81fdef9ae8405123615ea45806aafReveal113333722020-11-26 10:13:12732 days 9 hrs ago0x7f1a3a9692f33dfab59bc1983e60c7e1fbb3fd17 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.00405059161.00000156
0xc312d1044b7f2edd97a965e756b37ec15faea3a5d88ca6298d76a6a5369410f3Commit113333722020-11-26 10:13:12732 days 9 hrs ago0x7f1a3a9692f33dfab59bc1983e60c7e1fbb3fd17 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.00516407161.00000156
0x8042921f2fb122c71eaa0e800f3decc7175727703f0be8482f414948f586b872Commit113332862020-11-26 9:52:44732 days 9 hrs ago0x0cae16835c9e4e85df54863335fea99a7596b441 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.01253666201.96000148
0x8d83f24792e470acfeeb0acc82b914d84584d8d274c64025aee88f9651399cf2Commit113331562020-11-26 9:21:50732 days 9 hrs ago0xc311a208343cd8db85200a6d7f7a7570890aad9b IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0305409492
0x9a71e5599824b79da6b3ae28951af6b14b3cdda00737ef4dadfd9db7085758edReveal113331502020-11-26 9:20:25732 days 9 hrs ago0x456a88e64b1c9a1da38aff64b164767d05e92092 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.0125795500
0xfd976b592448e36d10362850d10f9de2b6d19b7d6b1a459ba8a36276e9727077Commit113330322020-11-26 8:54:17732 days 10 hrs ago0xcf0eb2da4f8ee55666e5cfec04084e1236e7af7c IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.02203662355
0x30da280465e7972afbf45287608a7bd15ccec53a1832f138b468c39d46a95de5Reveal113329222020-11-26 8:27:06732 days 10 hrs ago0x90cf79f90aeca1e5a7652a9fdc4c2dc98e995a17 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.00976417201
0xf9fb51e6f9fe3e2440804c85fcf9abfb394b19d5730dbf7515a59334ea723848Commit113329072020-11-26 8:24:09732 days 10 hrs ago0x90cf79f90aeca1e5a7652a9fdc4c2dc98e995a17 IN  0x46ca2bf8188303887d6af76ddd316afa233b2ec90 Ether0.01247466201
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x9ae7559ae995f11475c958745e37614061b8d3af9c1e3c0adc5440206fd221be113341992020-11-26 13:11:40732 days 6 hrs ago 0x46ca2bf8188303887d6af76ddd316afa233b2ec90x90cf79f90aeca1e5a7652a9fdc4c2dc98e995a177.01288575 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Puzzle

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2020-11-05
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.10;

interface ERC20 {
    function balanceOf(address account) external returns (uint256);

    function transfer(address recipient, uint256 amount) external returns (bool);
}

// Adventure Awaits: find all 4 clues, solve the puzzle and claim the reward
// #0xPoland #0xPolandHeist
contract Puzzle {
    uint256 constant BLOCKS_TO_WAIT = 10;

    bytes32 public hash;
    address public winner;
    mapping(address => bytes32) public commits;
    mapping(address => uint256) public commitBlock;

    constructor(bytes32 _hash) public payable {
        hash = _hash;
    }

    function commit(bytes32 _hash) public {
        commits[msg.sender] = _hash;
        commitBlock[msg.sender] = block.number;
    }

    function reveal(string memory _solution) public {
        bytes32 solutionHash = keccak256(abi.encodePacked(_solution));
        bytes32 solutionDoubleHash = keccak256(abi.encodePacked(solutionHash));
        bytes32 commitHash = keccak256(abi.encodePacked(msg.sender, solutionHash));
        require(winner == address(0), 'Already won');
        require(block.number > commitBlock[msg.sender] + BLOCKS_TO_WAIT, 'No front-running');
        require(solutionDoubleHash == hash, 'Invalid solution');
        require(commitHash == commits[msg.sender], 'Did not commit');
        winner = msg.sender;
    }

    function withdraw() public {
        require(msg.sender == winner, 'Not a winner');
        msg.sender.transfer(address(this).balance);
    }

    function withdrawToken(ERC20 token) public {
        require(msg.sender == winner, 'Not a winner');
        token.transfer(msg.sender, token.balanceOf(address(this)));
    }

    receive() external payable {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"commit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"commitBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"commits","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_solution","type":"string"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"winner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"token","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052604051610b93380380610b938339818101604052602081101561002657600080fd5b81019080805190602001909291905050508060008190555050610b458061004e6000396000f3fe60806040526004361061007f5760003560e01c80637b43a8e61161004e5780637b43a8e6146101fa578063894760691461025f578063dfbf53ae146102b0578063f14fcbc8146102f157610086565b806309bd5a601461008b57806323dd7f39146100b65780633ccfd60b1461011b5780634c2612471461013257610086565b3661008657005b600080fd5b34801561009757600080fd5b506100a061032c565b6040518082815260200191505060405180910390f35b3480156100c257600080fd5b50610105600480360360208110156100d957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610332565b6040518082815260200191505060405180910390f35b34801561012757600080fd5b5061013061034a565b005b34801561013e57600080fd5b506101f86004803603602081101561015557600080fd5b810190808035906020019064010000000081111561017257600080fd5b82018360208201111561018457600080fd5b803590602001918460018302840111640100000000831117156101a657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610456565b005b34801561020657600080fd5b506102496004803603602081101561021d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610830565b6040518082815260200191505060405180910390f35b34801561026b57600080fd5b506102ae6004803603602081101561028257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610848565b005b3480156102bc57600080fd5b506102c5610a5e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102fd57600080fd5b5061032a6004803603602081101561031457600080fd5b8101908080359060200190929190505050610a84565b005b60005481565b60036020528060005260406000206000915090505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4e6f7420612077696e6e6572000000000000000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610453573d6000803e3d6000fd5b50565b6000816040516020018082805190602001908083835b6020831061048f578051825260208201915060208101905060208303925061046c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012090506000816040516020018082815260200191505060405160208183030381529060405280519060200120905060003383604051602001808373ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200192505050604051602081830303815290604052805190602001209050600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610607576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f416c726561647920776f6e00000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540143116106be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4e6f2066726f6e742d72756e6e696e670000000000000000000000000000000081525060200191505060405180910390fd5b6000548214610735576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f496e76616c696420736f6c7574696f6e0000000000000000000000000000000081525060200191505060405180910390fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481146107e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f446964206e6f7420636f6d6d697400000000000000000000000000000000000081525060200191505060405180910390fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b60026020528060005260406000206000915090505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461090b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f4e6f7420612077696e6e6572000000000000000000000000000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561099157600080fd5b505af11580156109a5573d6000803e3d6000fd5b505050506040513d60208110156109bb57600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610a1f57600080fd5b505af1158015610a33573d6000803e3d6000fd5b505050506040513d6020811015610a4957600080fd5b81019080805190602001909291905050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b80600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555043600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505056fea2646970667358221220a5891634f1b84e48cb5f0cddbc81b9fb01a8fbc18c24f3099d1f4cdf4384160d64736f6c634300060c00335746fe8ae2bf9fb24bcdf4972ea78c0211211e23c376461956d46d8d8a6519ba

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

5746fe8ae2bf9fb24bcdf4972ea78c0211211e23c376461956d46d8d8a6519ba

-----Decoded View---------------
Arg [0] : _hash (bytes32): 0x5746fe8ae2bf9fb24bcdf4972ea78c0211211e23c376461956d46d8d8a6519ba

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 5746fe8ae2bf9fb24bcdf4972ea78c0211211e23c376461956d46d8d8a6519ba


Deployed ByteCode Sourcemap

346:1435:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;414:19;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;517:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1413:144;;;;;;;;;;;;;:::i;:::-;;794:611;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;468:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1565:176;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;440:21;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;653:133;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;414:19;;;;:::o;517:46::-;;;;;;;;;;;;;;;;;:::o;1413:144::-;1473:6;;;;;;;;;;;1459:20;;:10;:20;;;1451:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1507:10;:19;;:42;1527:21;1507:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1413:144::o;794:611::-;853:20;903:9;886:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;876:38;;;;;;853:61;;925:26;981:12;964:30;;;;;;;;;;;;;;;;;;;;;;;;;954:41;;;;;;925:70;;1006:18;1054:10;1066:12;1037:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1027:53;;;;;;1006:74;;1117:1;1099:20;;:6;;;;;;;;;;;:20;;;1091:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;403:2;1169:11;:23;1181:10;1169:23;;;;;;;;;;;;;;;;:40;1154:12;:55;1146:84;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1271:4;;1249:18;:26;1241:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1329:7;:19;1337:10;1329:19;;;;;;;;;;;;;;;;1315:10;:33;1307:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1387:10;1378:6;;:19;;;;;;;;;;;;;;;;;;794:611;;;;:::o;468:42::-;;;;;;;;;;;;;;;;;:::o;1565:176::-;1641:6;;;;;;;;;;;1627:20;;:10;:20;;;1619:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1675:5;:14;;;1690:10;1702:5;:15;;;1726:4;1702:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1675:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1565:176;:::o;440:21::-;;;;;;;;;;;;;:::o;653:133::-;724:5;702:7;:19;710:10;702:19;;;;;;;;;;;;;;;:27;;;;766:12;740:11;:23;752:10;740:23;;;;;;;;;;;;;;;:38;;;;653:133;:::o

Swarm Source

ipfs://a5891634f1b84e48cb5f0cddbc81b9fb01a8fbc18c24f3099d1f4cdf4384160d
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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.