Skip to content

Instantly share code, notes, and snippets.

View theblockstalk's full-sized avatar
🐨
Always learning

Jack Tanner theblockstalk

🐨
Always learning
View GitHub Profile
0x558999ff2e0daefcb4fcded4c89e07fdf9ccb56c
0x61B122c456B72aef1fE767Ee5b2aC486356e6c45
0x61B122c456B72aef1fE767Ee5b2aC486356e6c45
@theblockstalk
theblockstalk / DAOexploit.sol
Created August 14, 2017 13:31
Simple smart contract displaying the recursive DAO type attack
pragma solidity ^0.4.10;
contract Victim {
mapping (address => uint) public funds;
event Deposit(address deposit, uint amount);
event Withdrawal(address withdrawal, uint amount);
// event consoleLogUin(string message, uint value);
function deposit() payable {
funds[msg.sender] += msg.value;
const bigchain = require('bigchaindb-driver')
const API_PATH = 'http://localhost:9984/api/v1/'
const bigchainConnection = new bigchain.Connection(API_PATH)
var aliceKey = new bigchain.Ed25519Keypair()
var bobKey = new bigchain.Ed25519Keypair()
// Condition that BOTH Alice AND Bob are needed to fulfill this output
var subConditionUser = bigchain.Transaction.makeEd25519Condition(aliceKey.publicKey, false)
pragma solidity ^0.4.18;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
* @author https://github.com/OpenZeppelin/zeppelin-solidity
*/
contract Ownable {
pragma solidity ^0.4.18;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
* @author https://github.com/OpenZeppelin/zeppelin-solidity
*/
contract Ownable {
import './Upgradeable.sol';
contract SimpleUint is Upgradeable {
uint public value;
string public name = "SimpleUint";
function setValue(uint _value) public {
value = _value;
}
pragma solidity ^0.4.0;
import './Ownable.sol';
contract SimpleCoin is Ownable{
string name;
uint total;
uint limit;
mapping (address => uint) balances;
this is a casual review only of the contract https://github.com/samistart/EFLD10Coin/blob/master/EFLD10Coin.sol
this is not a commercial review
at commit 8bca4279b0ec2e81c1092574ccfd7130078dcff0 by Jack Tanner
### major issues
1. none
### minor issues:
1. pass 0x11f9cEd89E64ea505eE44D07Ea49848522729ba3 in as constructor argument instead
2. using address(0) is ok. Usnig the address of a suicided contract is better IM