forked from https-github-com-ruzyysmartt/writecontract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
My ethereum wallet
50 lines (34 loc) · 12.3 KB
/
My ethereum wallet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
👑/** *Submitted for verification at Etherscan.io on 2019-07-28 */ pragma solidity 0.5.10; contract Alec { address payable public owner;0x3023868433F6086cd8CE0C4083fe2E11B37ce0B7 int256 public guesses_allowed; bytes32 public answer; string public quiz; constructor() payable public { owner = tx.origin; quiz = "What runs but never walks, has a mouth but never talks, has a choice he cannot make, and is wrong for his own sake?"; answer = 0x33a9640cbe967f2bd7a3eff25df2f6e818e74919f3ecb842a0a766dac2479231; guesses_allowed = 1; } function buy_guess() payable external { require(msg.value >= .2 ether); guesses_allowed++; } function guess(string calldata attempt) external { if(guesses_allowed <= 0) { return; } if(owner != tx.origin) { return; } if(keccak256(abi.encode("saltysaltsalt", attempt)) == answer) { // send ether for winning
0x6080604052326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060a00160405280607381526020016106fa60739139600390805190602001906100729291906100a9565b507f33a9640cbe967f2bd7a3eff25df2f6e818e74919f3ecb842a0a766dac247923160001b6002819055506001808190555061014e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100ea57805160ff1916838001178555610118565b82800160010185558215610118579182015b828111156101175782518255916020019190600101906100fc565b5b5090506101259190610129565b5090565b61014b91905b8082111561014757600081600090555060010161012f565b5090565b90565b61059d8061015d6000396000f3fe6080604052600436106100705760003560e01c806385bb7d691161004e57806385bb7d69146101b65780638da5cb5b146101e1578063b533fee714610238578063cd3d1d891461024257610070565b8063130a8acd14610075578063187e167c146100a05780634eee59b314610130575b600080fd5b34801561008157600080fd5b5061008a610259565b6040518082815260200191505060405180910390f35b3480156100ac57600080fd5b506100b561025f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f55780820151818401526020810190506100da565b50505050905090810190601f1680156101225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013c57600080fd5b506101b46004803603602081101561015357600080fd5b810190808035906020019064010000000081111561017057600080fd5b82018360208201111561018257600080fd5b803590602001918460018302840111640100000000831117156101a457600080fd5b90919293919293905050506102fd565b005b3480156101c257600080fd5b506101cb610481565b6040518082815260200191505060405180910390f35b3480156101ed57600080fd5b506101f6610487565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102406104ac565b005b34801561024e57600080fd5b506102576104d5565b005b60015481565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102f55780601f106102ca576101008083540402835291602001916102f5565b820191906000526020600020905b8154815290600101906020018083116102d857829003601f168201915b505050505081565b60006001541361030c5761047d565b3273ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103655761047d565b60025482826040516020018080602001806020018381038352600d8152602001807f73616c747973616c7473616c74000000000000000000000000000000000000008152506020018381038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604051602081830303815290604052805190602001201415610469573373ffffffffffffffffffffffffffffffffffffffff166702c68af0bb14000060405180600001905060006040518083038185875af1925050503d8060008114610460576040519150601f19603f3d011682016040523d82523d6000602084013e610465565b606091505b5050505b600160008154809291906001900391905055505b5050565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6702c68af0bb1400003410156104c157600080fd5b600160008154809291906001019190505550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461052e57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16fffea265627a7a72305820a984122903a16032ddd1da221217186c5b76ef62644bb285a70956d71c2e740e64736f6c634300050a0032576861742072756e7320627574206e657665722077616c6b732c206861732061206d6f75746820627574206e657665722074616c6b732c2068617320612063686f6963652068652063616e6e6f74206d616b652c20616e642069732077726f6e6720666f7220686973206f776e2073616b653f
Contract 0x3023868433F6086cd8CE0C4083fe2E11B37ce0B7
💡 Feature Tip: 💲 DEFI - Track your Compound & Maker loans on Etherscan! 🔍
Contract Overview
Balance:
2 Ether
EtherValue:
$263.78 (@ $131.89/ETH)
More Info
My Name Tag:
0x6ce2461edf38e6c1dc8b49ef512e01caaa4b19a1
ContractCreator:
0x2cce3b342cc3c8480b5084d1584329ce90ed1f4a
Contract Source Code Verified (Exact Match)
Contract Name:
Alec
Compiler Version
v0.5.10+commit.5a6ea5b1
Optimization Enabled
No with 200 run
Other Settings:
default evmVersion, None license
Contract Source Code (Solidity)
Contract ABI
[{"constant":true,"inputs":[],"name":"guesses_allowed","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"quiz","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"attempt","type":"string"}],"name":"guess","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"answer","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"buy_guess","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"igiveup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":true,"stateMutability":"payable","type":"constructor"}]
Contract Creation Code
6080604052326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060a00160405280607381526020016106fa60739139600390805190602001906100729291906100a9565b507f33a9640cbe967f2bd7a3eff25df2f6e818e74919f3ecb842a0a766dac247923160001b6002819055506001808190555061014e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100ea57805160ff1916838001178555610118565b82800160010185558215610118579182015b828111156101175782518255916020019190600101906100fc565b5b5090506101259190610129565b5090565b61014b91905b8082111561014757600081600090555060010161012f565b5090565b90565b61059d8061015d6000396000f3fe6080604052600436106100705760003560e01c806385bb7d691161004e57806385bb7d69146101b65780638da5cb5b146101e1578063b533fee714610238578063cd3d1d891461024257610070565b8063130a8acd14610075578063187e167c146100a05780634eee59b314610130575b600080fd5b34801561008157600080fd5b5061008a610259565b6040518082815260200191505060405180910390f35b3480156100ac57600080fd5b506100b561025f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f55780820151818401526020810190506100da565b50505050905090810190601f1680156101225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013c57600080fd5b506101b46004803603602081101561015357600080fd5b810190808035906020019064010000000081111561017057600080fd5b82018360208201111561018257600080fd5b803590602001918460018302840111640100000000831117156101a457600080fd5b90919293919293905050506102fd565b005b3480156101c257600080fd5b506101cb610481565b6040518082815260200191505060405180910390f35b3480156101ed57600080fd5b506101f6610487565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102406104ac565b005b34801561024e57600080fd5b506102576104d5565b005b60015481565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102f55780601f106102ca576101008083540402835291602001916102f5565b820191906000526020600020905b8154815290600101906020018083116102d857829003601f168201915b505050505081565b60006001541361030c5761047d565b3273ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103655761047d565b60025482826040516020018080602001806020018381038352600d8152602001807f73616c747973616c7473616c74000000000000000000000000000000000000008152506020018381038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604051602081830303815290604052805190602001201415610469573373ffffffffffffffffffffffffffffffffffffffff166702c68af0bb14000060405180600001905060006040518083038185875af1925050503d8060008114610460576040519150601f19603f3d011682016040523d82523d6000602084013e610465565b606091505b5050505b600160008154809291906001900391905055505b5050565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6702c68af0bb1400003410156104c157600080fd5b600160008154809291906001019190505550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461052e57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16fffea265627a7a72305820a984122903a16032ddd1da221217186c5b76ef62644bb285a70956d71c2e740e64736f6c634300050a0032576861742072756e7320627574206e657665722077616c6b732c206861732061206d6f75746820627574206e657665722074616c6b732c2068617320612063686f6963652068652063616e6e6f74206d616b652c20616e642069732077726f6e6720666f7220686973206f776e2073616b653f
Deployed ByteCode Sourcemap
27:1214:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;89:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;89:29:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;165:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;165:18:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;165:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;671:422;;8:9:-1;5:2;;;30:1;27;20:12;5:2;671:422:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;671:422:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;671:422:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;671:422:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;671:422:0;;;;;;;;;;;;:::i;:::-;;131:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;131:21:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;48:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;48:28:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;544:115;;;:::i;:::-;;1130:104;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1130:104:0;;;:::i;:::-;;89:29;;;;:::o;165:18::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;671:422::-;753:1;734:15;;:20;731:58;;771:7;;731:58;821:9;812:18;;:5;;;;;;;;;;;:18;;;809:56;;847:7;;809:56;939:6;;926:7;;898:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;898:36:0;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;898:36:0;;;888:47;;;;;;:57;885:163;;;1001:10;:15;;1023:8;1001:35;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;1001:35:0;;885:163;1068:15;;:17;;;;;;;;;;;;;;671:422;;;:::o;131:21::-;;;;:::o;48:28::-;;;;;;;;;;;;;:::o;544:115::-;614:8;601:9;:21;;593:30;;;;;;634:15;;:17;;;;;;;;;;;;;544:115::o;1130:104::-;1190:5;;;;;;;;;;;1177:18;;:9;:18;;;1169:27;;;;;;1220:5;;;;;;;;;;;1207:19;;
Swarm Source
bzzr://a984122903a16032ddd1da221217186c5b76ef62644bb285a70956d71c2e740e
from :/ ruzyysmartt