Skip to content

Instantly share code, notes, and snippets.

View furusiyya's full-sized avatar

Bilal furusiyya

View GitHub Profile
bonuses[0x017ABCC1012A7FfA811bBe4a26804f9DDac1Af4D] = true;
bonuses[0x1156ABCBA63ACC64162b0bbf67726a3E5eA1E157] = true;
bonuses[0xEAC8483261078517528DE64956dBD405f631265c] = true;
bonuses[0xB0b0D639b612937D50dd26eA6dc668e7AE51642A] = true;
bonuses[0x417535DEF791d7BBFBC97b0f743a4Da67fD9eC3B] = true;
bonuses[0x6723f81CDc9a5D5ef2Fe1bFbEdb4f83Bd017D3dC] = true;
bonuses[0xb9Bd4f154Bb5F2BE5E7Db0357C54720c7f35405d] = true;
bonuses[0x21CA5617f0cd02f13075C7c22f7231D061F09189] = true;
bonuses[0x0a6Cd7e558c69baF7388bb0B3432E29Ecc29ac55] = true;
bonuses[0x6a7f63709422A986A953904c64F10D945c8AfBA1] = true;
pragma solidity ^0.4.16;
contract ReentrancyGuard {
event ReentrancyAttemp(address senderAddress);
/**
* @dev We use a single lock for the whole contract.
*/
bool private rentrancy_lock = false;
/**
* NotaryPlatformToken.sol v1.0.0
*
* Bilal Arif - https://twitter.com/furusiyya_
* Notary Platform
*/
pragma solidity ^0.4.16;
@furusiyya
furusiyya / BlockChainHacking.md
Created September 17, 2017 23:59
Getting started with blockchain hacking :)
@furusiyya
furusiyya / Submission.md
Created August 28, 2017 17:04
Project: Glutton (https://github.com/mushorg/glutton) - Google Summer of Code 2017 final submission report

Merged Pull Requests

Issues Resolved: #72, #59
Description Glutton support number of services (protocol handlers) so each service mean number of connection on that service. So It crash after some time with error: [user.tcp] accept tcp [::]:5000: accept4: too many open files, and this error was due to the allowance of limited number of open file descriptors by the operating system. There was no deadline set for opened connections so most of the connections never get closed. In result, the number of opened connections gradually cross the maximum open file descriptors limit and cause panic. So I added connection timeout = 72 second, number of opened connection will never reach the open file descriptor limit. Another reason was Freki; Glutton useses freki as a networking core so frek

Setup should be followed one section after another.

For example you may need to set up 2 miners and 2 non-miners. You follow once through, (assuming it's tabula rasa state) Starting new Network, then Adding mining/signing node to existing network, then twice Adding non mining/signing node to existing network, after you've done it you should manually (for the purpose of testing) run: firstly run bootnode, then all other nodes. If you see that everyone is in sync (block mining appears on every one of them) you can prepare services for each of them.

Starting new network

Creating workplace

We will create a folder /home/cryptodaemon/poaGethNode and folder for blockchain database /home/cryptodaemon/poaGethNode/node mkdir -p /home/cryptodaemon/poaGethNode/node
Download PoA Geth binary and put it into /home/cryptodaemon/poaGethNode

Rename binary to geth

(warning) If you doing adding just another node, you do should skip this.

@furusiyya
furusiyya / ecverify.sol
Created July 27, 2017 21:11 — forked from axic/ecverify.sol
Ethereum ECVerify
//
// The new assembly support in Solidity makes writing helpers easy.
// Many have complained how complex it is to use `ecrecover`, especially in conjunction
// with the `eth_sign` RPC call. Here is a helper, which makes that a matter of a single call.
//
// Sample input parameters:
// (with v=0)
// "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
// "0xaca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf200",
// "0x0e5cb767cce09a7f3ca594df118aa519be5e2b5a"
/**
* Asset Token contract, ERC20 compliant (see https://github.com/ethereum/EIPs/issues/20)
*
* Code is based on multiple sources:
* https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts
* https://github.com/TokenMarketNet/ico/blob/master/contracts
* https://github.com/ConsenSys/Tokens/blob/master/Token_Contracts/contracts
*/
pragma solidity ^0.4.13;
@furusiyya
furusiyya / AuditReview.md
Last active July 17, 2017 12:39
ForecasterReward audit review

Note: No critical issue found that can cause loss of funds or locking of funds.

Section 5 - Audit findings

5.1 Note Issues

5.1.1 Event parameters not indexed

Type: Enhancement
Status: fixed
Comment: Indexed parameters are used for searching logs. Contract was no relying on logs but store records explicitly in