Skip to content

Instantly share code, notes, and snippets.

contract PaymentHub {
uint256 public constant CHALLENGE_PERIOD = 7 days;
address public paymentHubOwner;
mapping(address => uint256) public balances;
mapping(address => uint256) public withdrawRequests;
function PaymentHub(address _paymentHubOwner)
public
contract Token {
function transfer(address to, uint value) public returns (bool);
function transferFrom(address from, address to, uint value) public returns (bool);
}
contract DutchExchange {
event SellOrderSubmission(address sender, uint amount, Token sellToken, Token buyToken, uint startDate);
event SellOrderCancellation(address sender, uint amount, Token sellToken, Token buyToken, uint startDate);
pragma solidity 0.4.10;
contract Token {
function transfer(address to, uint256 value) returns (bool success);
function balanceOf(address owner) constant returns (uint256 balance);
}
contract IOU {
pragma solidity ^0.4.10;
/// @title Payroll contract - Allows employees to receive salary payments and to cash checks.
/// @author Stefan George - <stefan@gnosis.pm>
contract Payroll {
event EmployeeAddition(address indexed employee, uint startDate, uint endDate, uint yearlyUSDSalary);
event EmployeeDeletion(address indexed employee);
event PayoutSalary(address indexed employee, uint amount, uint ethPrice);
pragma solidity 0.4.4;
import "StandardToken.sol";
contract ReceiptToken is StandardToken {
address owner;
modifier isOwner() {
if (msg.sender != owner)
pragma solidity 0.4.9;
contract Leaderboard {
mapping (uint => User) leaderboard;
struct User {
address user;
uint score;
}
pragma solidity ^0.4.0;
/// @title Standard token contract - Standard token interface implementation.
contract StandardToken {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping (address => uint256) balances;
pragma solidity ^0.4.0;
import "Tokens/AbstractToken.sol";
/// @title Standard token contract - Standard token interface implementation.
contract StandardToken is Token {
/*
* Data structures
*/
@Georgi87
Georgi87 / MultiSigWallet.sol
Last active September 9, 2016 14:58
Multisignature wallet - Allows multiple parties to agree on transactions before execution.
pragma solidity ^0.4.0;
/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.
/// @author Stefan George - <stefan.george@consensys.net>
contract MultiSigWallet {
event Confirmation(address sender, bytes32 transactionHash);
event Revocation(address sender, bytes32 transactionHash);
event Submission(address sender, bytes32 transactionHash);
event Execution(address sender, bytes32 transactionHash);
@Georgi87
Georgi87 / StateChannel.sol
Last active February 2, 2018 20:49
Generalized settlement for state channels using proxy contracts.
pragma solidity ^0.4.0;
contract Token {
function transfer(address to, uint256 value) returns (bool);
function transferFrom(address from, address to, uint256 value) returns (bool);
}
/// @title State Channel contract - Allows multiple parties to settle off-chain transactions.
/// @author Stefan George - <stefan.george@consensys.net>
contract StateChannelProxy {