diff --git a/src/cc/dapps/oraclefeed.c b/src/cc/dapps/oraclefeed.c index 3a8eec1d5..b0b911018 100644 --- a/src/cc/dapps/oraclefeed.c +++ b/src/cc/dapps/oraclefeed.c @@ -310,7 +310,8 @@ uint64_t get_btcusd() } // oraclescreate "BTCUSD" "coindeskpricedata" "L" -> 4895f631316a649e216153aee7a574bd281686265dc4e8d37597f72353facac3 -// oraclesregister 4895f631316a649e216153aee7a574bd281686265dc4e8d37597f72353facac3 1000000 +// oraclesregister 4895f631316a649e216153aee7a574bd281686265dc4e8d37597f72353facac3 1000000 -> 11c54d4ab17293217276396e27d86f714576ff55a3300dac34417047825edf93 +// oraclessubscribe 4895f631316a649e216153aee7a574bd281686265dc4e8d37597f72353facac3 11c54d4ab17293217276396e27d86f714576ff55a3300dac34417047825edf93 1 int32_t main(int32_t argc,char **argv) { diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 27c6d9327..6e2b55e1b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5408,12 +5408,12 @@ UniValue oraclessubscribe(const UniValue& params, bool fHelp) { UniValue result(UniValue::VOBJ); uint256 txid; int64_t amount; std::string hex; std::vector pubkey; if ( fHelp || params.size() != 3 ) - throw runtime_error("oraclessubscribe oracletxid publisher datafee\n"); + throw runtime_error("oraclessubscribe oracletxid publisher amount\n"); if ( ensure_CCrequirements() < 0 ) throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n"); txid = Parseuint256((char *)params[0].get_str().c_str()); pubkey = ParseHex(params[1].get_str().c_str()); - amount = atol((char *)params[2].get_str().c_str()); + amount = atof((char *)params[2].get_str().c_str()) * COIN; hex = OracleSubscribe(0,txid,pubkey2pk(pubkey),amount); if ( hex.size() > 0 ) {