Skip to content

Instantly share code, notes, and snippets.

pragma solidity ^0.4.2;
contract token { mapping (address => uint) public balanceOf; function transfer(address _from, address _to, uint256 _value) { } }
contract CBContract {
/* Constructor */
struct Cb {
address cbToken;
address cbAddress;
uint cbPrice;
@mwtsai
mwtsai / yarn.lock
Created April 25, 2017 04:17
yarn.lock in mist
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"7zip-bin-linux@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/7zip-bin-linux/-/7zip-bin-linux-1.0.3.tgz#66724d7bb7526381574393888f62566ed537151c"
"7zip-bin-mac@^1.0.1":
version "1.0.1"
pragma solidity ^0.4.2;
contract mortal {
/* Define variable owner of the type address*/
address owner;
/* this function is executed at initialization and sets the owner of the contract */
function mortal() { owner = msg.sender; }
/* Function to recover the funds on the contract */
function kill() { if (msg.sender == owner) suicide(owner); }
pragma solidity ^0.4.2;
contract splitCB {
mapping (uint => mapping (address => uint)) coinBalanceOf;
event CoinTransfer(uint coinType, address sender, address receiver, uint amount);
function splitCB(uint optionSupply, uint bondSupply){
coinBalanceOf[0][msg.sender] = optionSupply;
coinBalanceOf[1][msg.sender] = bondSupply;
}
pragma solidity ^0.4.2;
contract token { mapping (address => uint) public balanceOf; function transfer(address _from, address _to, uint256 _value) { } }
contract CBContract {
/* Constructor */
struct Buy {
address buyerToken;
address buyerAddress;
uint buyerPrice;
pragma solidity ^0.4.2;
contract CBContract {
/* Constructor */
struct Option {
address oa;
uint op;
}
struct Bond {
pragma solidity ^0.4.2;
contract MemberStruct {
/* Constructor */
struct Member {
address a;
uint u;
}
Member[] public m;
uint public x;
pragma solidity ^0.4.2;
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
pragma solidity ^0.4.2;
contract MyToken {
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
string public name;
string public symbol;
uint8 public decimals;
event Transfer(address indexed from, address indexed to, uint256 value);
pragma solidity ^0.4.2;
contract StructTest{
struct Account{
string username;
uint userid;
}
Account public x;
function StructTest(string name, uint id){