Skip to content

Instantly share code, notes, and snippets.

View JachinShen's full-sized avatar

JachinShen JachinShen

  • Shanghai JiaoTong University
View GitHub Profile
@JachinShen
JachinShen / DAO.sol
Created April 6, 2019 12:50
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.7;
contract simpleDAO {
event PaymentCalled(address payee, uint amount);
event TokensBought(address buyer, uint amount);
event TokensTransfered(address from, address to, uint amount);
event InsufficientFunds(uint bal, uint amount);
mapping (address => uint) public balances;
@JachinShen
JachinShen / DAO.sol
Created March 25, 2019 08:01
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.1;
contract simpleDAO {
event PaymentCalled(address payee, uint amount);
event TokensBought(address buyer, uint amount);
event TokensTransfered(address from, address to, uint amount);
event InsufficientFunds(uint bal, uint amount);
mapping (address => uint) public balances;
@JachinShen
JachinShen / DAO.sol
Created March 25, 2019 08:00
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.1;
contract simpleDAO {
event PaymentCalled(address payee, uint amount);
event TokensBought(address buyer, uint amount);
event TokensTransfered(address from, address to, uint amount);
event InsufficientFunds(uint bal, uint amount);
mapping (address => uint) public balances;