This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.2; | |
contract CBContract { | |
/* Constructor */ | |
struct Option { | |
address oa; | |
uint op; | |
} | |
struct Bond { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.2; | |
contract MemberStruct { | |
/* Constructor */ | |
struct Member { | |
address a; | |
uint u; | |
} | |
Member[] public m; | |
uint public x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.2; | |
contract owned { | |
address public owner; | |
function owned() { | |
owner = msg.sender; | |
} | |
modifier onlyOwner { | |
if (msg.sender != owner) throw; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.2; | |
contract StructTest{ | |
struct Account{ | |
string username; | |
uint userid; | |
} | |
Account public x; | |
function StructTest(string name, uint id){ |
NewerOlder