This file contains 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
<?php | |
function getSslPage($url) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); | |
curl_setopt($ch, CURLOPT_HEADER, false); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_REFERER, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
$result = curl_exec($ch); |
This file contains 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.7; | |
contract SimpleStorage { | |
uint public storedData; | |
function SimpleStorage(uint initialValue) { | |
storedData = initialValue; | |
} | |
function set(uint x) { | |
storedData = x; |
This file contains 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.7; | |
contract SimpleStorage { | |
uint public storedData; | |
event TestEvent(address from, uint value); | |
function SimpleStorage(uint initialValue) { | |
storedData = initialValue; | |
} |
This file contains 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
SimpleStorage.TestEvent().then(function(e) { | |
alert(e.args.from + " - " + e.args.value); | |
}); |
This file contains 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
$(document).ready(function() { | |
$("#blockchain button.set").click(function() { | |
var value = parseInt($("#blockchain input.text").val(), 10); | |
SimpleStorage.set(value); | |
addToLog("#blockchain", "SimpleStorage.set(" + value + ")"); | |
}); | |
$("#blockchain button.get").click(function() { | |
SimpleStorage.get().then(function(value) { |
This file contains 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 ERC20 { | |
function totalSupply() constant returns (uint totalSupply); | |
function balanceOf(address _owner) constant returns (uint balance); | |
function transfer(address _to, uint _value) returns (bool success); | |
function transferFrom(address _from, address _to, uint _value) returns (bool success); | |
function approve(address _spender, uint _value) returns (bool success); | |
function allowance(address _owner, address _spender) constant returns (uint remaining); | |
event Transfer(address indexed _from, address indexed _to, uint _value); | |
event Approval(address indexed _owner, address indexed _spender, uint _value); |
This file contains 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 { | |
string public constant symbol = "TST"; | |
string public constant name = "Test token"; | |
uint8 public constant decimals = 18; | |
event Transfer(address indexed from, address indexed to, uint value); | |
event Approval( address indexed owner, address indexed spender, uint value); |
This file contains 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; | |
import "token.sol"; | |
contract Crowdsale { | |
address public owner; | |
Token public rewardToken; | |
bool started = false; |
This file contains 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
0xF373bAA50d9cB0D3a5b0A486098a3710eaE4C030 |
This file contains 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
<?php | |
// logging the requests for DEBUG | |
/* | |
ob_start(); | |
echo $_SERVER['REQUEST_URI']; | |
$post_data = file_get_contents("php://input"); | |
print_r($post_data); | |
$data = json_decode($post_data); | |
var_dump($data); | |
echo "\n"; |
OlderNewer