When i am going to deploy this code its give error:The contract code couldn't be stored, please check your gas amount.
Solidity CODE:
pragma solidity ^0.4.0;
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";
contract OraclizeFetch is usingOraclize{
string public ETHXBT;
event newOraclizeQuery(string description);
event price(string price);
function OraclizeFetch() payable{
oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS);
update();
}
function __callback(bytes32 myid, string result, bytes proof) {
if (msg.sender != oraclize_cbAddress()) throw;
ETHXBT = result;
price(ETHXBT);
update();
}
function update() payable {
if (oraclize.getPrice("URL") > this.balance) {
newOraclizeQuery("Oraclize query was NOT sent, please add some ETH to cover for the query fee");
} else {
newOraclizeQuery("Oraclize query was sent, standing by for the answer..");
oraclize_query(60, "URL", "json(https://api.kraken.com/0/public/Ticker?pair=ETHXBT).result.XETHXXBT.c.0");
}
}
}
My genesis.json file:
{ "nonce": "0xdeadbeefdeadbeef", "timestamp": "0x0", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x0", "gasLimit": "0x8000000", "difficulty": "0x400", "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", "coinbase": "0x3333333333333333333333333333333333333333", "alloc": {
}
}