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 CrowdFund { | |
address public beneficiary; | |
uint256 public goal; | |
uint256 public deadline; | |
mapping (address => uint256) funders; | |
address[] funderAddresses; | |
function CrowdFund(address _beneficiary, uint256 _goal, uint256 _duration) { | |
beneficiary = _beneficiary; |
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 CrowdFund { | |
address public beneficiary; | |
uint256 public goal; | |
uint256 public deadline; | |
struct Funder { | |
address addr; | |
uint256 contribution; | |
} |
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
// Config | |
global.config = { | |
rpc: { | |
host: "localhost", | |
port: "8545" | |
} | |
} | |
// Load Libraries | |
global.solc = require("solc") |
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;//please import oraclizeAPI_pre0.4.sol when solidity < 0.4.0 | |
contract OraclizeI { | |
address public cbAddress; | |
function query(uint _timestamp, string _datasource, string _arg) payable returns (bytes32 _id); | |
function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) payable returns (bytes32 _id); | |
function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) payable returns (bytes32 _id); | |
function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) payable returns (bytes32 _id); | |
function getPrice(string _datasource) returns (uint _dsprice); | |
function getPrice(string _datasource, uint gaslimit) returns (uint _dsprice); |
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
// Config | |
global.config = { | |
rpc: { | |
host: "localhost", | |
port: "8545" | |
} | |
} | |
// Load Libraries | |
global.solc = require("solc") |
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
// Config | |
global.config = { | |
rpc: { | |
host: "localhost", | |
port: "8545" | |
} | |
} | |
// Load Libraries | |
global.solc = require("solc") |
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
// Config | |
global.config = { | |
rpc: { | |
host: "localhost", | |
port: "8545" | |
} | |
} | |
// Load Libraries | |
global.solc = require("solc") |
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
// package.json | |
{ | |
"dependencies": { | |
"web3": "0.17.0-alpha", | |
"solc": "^0.4.4" | |
} | |
} | |
// Escrow.sol | |
contract Escrow { |
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
// package.json | |
{ | |
"dependencies": { | |
"web3": "0.17.0-alpha", | |
"solc": "^0.4.4" | |
} | |
} | |
// HelloWorld.sol | |
contract HelloWorld { |
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
// Infura | |
http://infura.io | |
// BlockCypher | |
http://blockcypher.com |