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.13; | |
| contract SimpleStore { | |
| uint storedData; | |
| event DataStored(uint data); | |
| function set(uint x) { | |
| storedData = x; | |
| DataStored(storedData); |
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.8; | |
| contract IC3Token { | |
| string public constant symbol = "IC3"; | |
| string public constant name = "IC3 2017 Bootcamp Token"; | |
| uint8 public constant decimals = 18; | |
| uint256 _totalSupply; | |
| // balances for each account | |
| mapping(address => uint256) balances; |
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.0; | |
| contract TestToken { | |
| string constant name = "IC3 2017 Bootcamp Token"; | |
| string constant symbol = "IC3"; | |
| uint8 constant decimals = 18; | |
| uint total; | |
| struct Allowed { | |
| mapping (address => uint256) _allowed; |
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.0; | |
| contract Hackzor { | |
| address public contract_address; | |
| // constructor | |
| function Target(address _addr) { | |
| contract_address = _addr; | |
| } |
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
| contract Conference { | |
| address public organizer; | |
| mapping (address => uint) public registrantsPaid; | |
| uint public numRegistrants; | |
| uint public quota; | |
| // so you can log these events | |
| event Deposit(address _from, uint _amount); | |
| event Refund(address _to, uint _amount); | |
| function Conference() { // Constructor | |
| organizer = msg.sender; |
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.11; | |
| library SafeMath { | |
| function mul(uint a, uint b) internal returns (uint) { | |
| uint c = a * b; | |
| assert(a == 0 || c / a == b); | |
| return c; | |
| } | |
| function div(uint a, uint b) internal returns (uint) { |
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.8; | |
| contract token { function transfer(address receiver, uint amount){ } } | |
| contract Crowdsale { | |
| address public beneficiary; | |
| uint public fundingGoal; uint public amountRaised; uint public deadline; uint public price; | |
| token public tokenReward; | |
| mapping(address => uint256) public balanceOf; | |
| bool fundingGoalReached = false; | |
| event GoalReached(address beneficiary, uint amountRaised); |
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 Migrations { | |
| address public owner; | |
| uint public last_completed_migration; | |
| modifier restricted() { | |
| if (msg.sender == 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
| import UIKit | |
| public extension UIColor { | |
| static func colorFromHex(rgbValue:UInt32, alpha:Double=1.0)->UIColor { | |
| let red = CGFloat((rgbValue & 0xFF0000) >> 16)/256.0 | |
| let green = CGFloat((rgbValue & 0xFF00) >> 8)/256.0 | |
| let blue = CGFloat(rgbValue & 0xFF)/256.0 | |
| return UIColor(red:red, green:green, blue:blue, alpha:CGFloat(alpha)) | |
| } | |
| } |
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
| import UIKit | |
| class Plist { | |
| enum PlistError: Error { | |
| case FileNotWritten | |
| case FileDoesNotExist | |
| } | |
| private let name: String | |
OlderNewer