Duke
3 months ago
10 changed files with 0 additions and 317 deletions
@ -1,39 +0,0 @@ |
|||
// Copyright (c) 2016-2023 The Hush developers
|
|||
// Distributed under the GPLv3 software license, see the accompanying
|
|||
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|||
/******************************************************************************
|
|||
* Copyright © 2014-2019 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
#ifndef CC_HEIR_H |
|||
#define CC_HEIR_H |
|||
|
|||
#include "CCinclude.h" |
|||
#include "CCtokens.h" |
|||
|
|||
//#define EVAL_HEIR 0xea
|
|||
|
|||
bool HeirValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn); |
|||
|
|||
class CoinHelper; |
|||
class TokenHelper; |
|||
|
|||
UniValue HeirFundCoinCaller(int64_t txfee, int64_t coins, std::string heirName, CPubKey heirPubkey, int64_t inactivityTimeSec, std::string memo); |
|||
UniValue HeirFundTokenCaller(int64_t txfee, int64_t satoshis, std::string heirName, CPubKey heirPubkey, int64_t inactivityTimeSec, std::string memo, uint256 tokenid); |
|||
UniValue HeirClaimCaller(uint256 fundingtxid, int64_t txfee, std::string amount); |
|||
UniValue HeirAddCaller(uint256 fundingtxid, int64_t txfee, std::string amount); |
|||
UniValue HeirInfo(uint256 fundingtxid); |
|||
UniValue HeirList(); |
|||
|
|||
#endif |
@ -1,37 +0,0 @@ |
|||
// Copyright (c) 2016-2023 The Hush developers
|
|||
// Distributed under the GPLv3 software license, see the accompanying
|
|||
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|||
/******************************************************************************
|
|||
* Copyright © 2014-2019 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
|
|||
#ifndef CC_ORACLES_H |
|||
#define CC_ORACLES_H |
|||
|
|||
#include "CCinclude.h" |
|||
|
|||
bool OraclesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn); |
|||
UniValue OracleCreate(const CPubKey& pk, int64_t txfee,std::string name,std::string description,std::string format); |
|||
UniValue OracleFund(const CPubKey& pk, int64_t txfee,uint256 oracletxid); |
|||
UniValue OracleRegister(const CPubKey& pk, int64_t txfee,uint256 oracletxid,int64_t datafee); |
|||
UniValue OracleSubscribe(const CPubKey& pk, int64_t txfee,uint256 oracletxid,CPubKey publisher,int64_t amount); |
|||
UniValue OracleData(const CPubKey& pk, int64_t txfee,uint256 oracletxid,std::vector <uint8_t> data); |
|||
// CCcustom
|
|||
UniValue OracleDataSample(uint256 reforacletxid,uint256 txid); |
|||
UniValue OracleDataSamples(uint256 reforacletxid,char* batonaddr,int32_t num); |
|||
UniValue OracleInfo(uint256 origtxid); |
|||
UniValue OraclesList(); |
|||
|
|||
#endif |
@ -1,18 +0,0 @@ |
|||
// Copyright (c) 2016-2023 The Hush developers
|
|||
// Distributed under the GPLv3 software license, see the accompanying
|
|||
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|||
/******************************************************************************
|
|||
* Copyright © 2014-2019 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
@ -1,66 +0,0 @@ |
|||
// Copyright (c) 2016-2023 The Hush developers
|
|||
// Distributed under the GPLv3 software license, see the accompanying
|
|||
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|||
/******************************************************************************
|
|||
* Copyright © 2014-2019 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
|
|||
#ifndef CC_PRICES_H |
|||
#define CC_PRICES_H |
|||
|
|||
#include "hush_defs.h" |
|||
#include "CCinclude.h" |
|||
|
|||
int32_t hush_priceget(int64_t *buf64,int32_t ind,int32_t height,int32_t numblocks); |
|||
extern void GetHushEarlytxidScriptPub(); |
|||
extern CScript HUSH_EARLYTXID_SCRIPTPUB; |
|||
|
|||
// #define PRICES_DAYWINDOW ((3600*24/ASSETCHAINS_BLOCKTIME) + 1) // defined in hush_defs.h
|
|||
#define PRICES_TXFEE 10000 |
|||
#define PRICES_MAXLEVERAGE 777 |
|||
#define PRICES_SMOOTHWIDTH 1 |
|||
#define HUSH_MAXPRICES 2048 // must be power of 2 and less than 8192
|
|||
#define HUSH_PRICEMASK (~(HUSH_MAXPRICES - 1)) // actually 1111 1000 0000 0000
|
|||
#define PRICES_WEIGHT (HUSH_MAXPRICES * 1) // 0000 1000 0000 0000
|
|||
#define PRICES_MULT (HUSH_MAXPRICES * 2) // 0001 0000 0000 0000
|
|||
#define PRICES_DIV (HUSH_MAXPRICES * 3) // 0001 1000 0000 0000
|
|||
#define PRICES_INV (HUSH_MAXPRICES * 4) // 0010 0000 0000 0000
|
|||
#define PRICES_MDD (HUSH_MAXPRICES * 5) // 0010 1000 0000 0000
|
|||
#define PRICES_MMD (HUSH_MAXPRICES * 6) // 0011 0000 0000 0000
|
|||
#define PRICES_MMM (HUSH_MAXPRICES * 7) // 0011 1000 0000 0000
|
|||
#define PRICES_DDD (HUSH_MAXPRICES * 8) // 0100 0000 0000 0000
|
|||
|
|||
//#define PRICES_NORMFACTOR (int64_t)(SATOSHIDEN)
|
|||
//#define PRICES_POINTFACTOR (int64_t)10000
|
|||
|
|||
#define PRICES_REVSHAREDUST 10000 |
|||
#define PRICES_SUBREVSHAREFEE(amount) ((amount) * 199 / 200) // revshare fee percentage == 0.005
|
|||
#define PRICES_MINAVAILFUNDFRACTION 0.1 // leveraged bet limit < fund fraction
|
|||
|
|||
bool PricesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn); |
|||
|
|||
// CCcustom
|
|||
UniValue PricesBet(int64_t txfee,int64_t amount,int16_t leverage,std::vector<std::string> synthetic); |
|||
UniValue PricesAddFunding(int64_t txfee,uint256 bettxid,int64_t amount); |
|||
UniValue PricesSetcostbasis(int64_t txfee,uint256 bettxid); |
|||
UniValue PricesRekt(int64_t txfee,uint256 bettxid,int32_t rektheight); |
|||
UniValue PricesCashout(int64_t txfee,uint256 bettxid); |
|||
UniValue PricesInfo(uint256 bettxid,int32_t refheight); |
|||
UniValue PricesList(uint32_t filter, CPubKey mypk); |
|||
UniValue PricesGetOrderbook(); |
|||
UniValue PricesRefillFund(int64_t amount); |
|||
|
|||
|
|||
#endif |
@ -1,50 +0,0 @@ |
|||
// Copyright (c) 2016-2023 The Hush developers
|
|||
// Distributed under the GPLv3 software license, see the accompanying
|
|||
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|||
/******************************************************************************
|
|||
* Copyright © 2014-2019 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
|
|||
/*
|
|||
CCassetstx has the functions that create the EVAL_ASSETS transactions. It is expected that rpc calls would call these functions. For EVAL_ASSETS, the rpc functions are in rpcwallet.cpp |
|||
|
|||
CCassetsCore has functions that are used in two contexts, both during rpc transaction create time and also during the blockchain validation. Using the identical functions is a good way to prevent them from being mismatched. The must match or the transaction will get rejected. |
|||
*/ |
|||
|
|||
#ifndef CC_ASSETS_H |
|||
#define CC_ASSETS_H |
|||
|
|||
#include "CCinclude.h" |
|||
|
|||
// CCcustom
|
|||
bool AssetsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn); |
|||
|
|||
// CCassetsCore
|
|||
vscript_t EncodeAssetOpRet(uint8_t assetFuncId, uint256 assetid2, int64_t price, std::vector<uint8_t> origpubkey); |
|||
uint8_t DecodeAssetTokenOpRet(const CScript &scriptPubKey, uint8_t &assetsEvalCode, uint256 &tokenid, uint256 &assetid2, int64_t &price, std::vector<uint8_t> &origpubkey); |
|||
bool SetAssetOrigpubkey(std::vector<uint8_t> &origpubkey,int64_t &price,const CTransaction &tx); |
|||
int64_t IsAssetvout(struct CCcontract_info *cp, int64_t &price, std::vector<uint8_t> &origpubkey, const CTransaction& tx, int32_t v, uint256 refassetid); |
|||
bool ValidateBidRemainder(int64_t remaining_price,int64_t remaining_nValue,int64_t orig_nValue,int64_t received_nValue,int64_t paidprice,int64_t totalprice); |
|||
bool ValidateAskRemainder(int64_t remaining_price,int64_t remaining_nValue,int64_t orig_nValue,int64_t received_nValue,int64_t paidprice,int64_t totalprice); |
|||
bool ValidateSwapRemainder(int64_t remaining_price,int64_t remaining_nValue,int64_t orig_nValue,int64_t received_nValue,int64_t paidprice,int64_t totalprice); |
|||
bool SetBidFillamounts(int64_t &paid,int64_t &remaining_price,int64_t orig_nValue,int64_t &received,int64_t totalprice); |
|||
bool SetAskFillamounts(int64_t &paid,int64_t &remaining_price,int64_t orig_nValue,int64_t &received,int64_t totalprice); |
|||
bool SetSwapFillamounts(int64_t &paid,int64_t &remaining_price,int64_t orig_nValue,int64_t &received,int64_t totalprice); |
|||
int64_t AssetValidateBuyvin(struct CCcontract_info *cp,Eval* eval,int64_t &tmpprice,std::vector<uint8_t> &tmporigpubkey,char *CCaddr,char *origaddr,const CTransaction &tx,uint256 refassetid); |
|||
int64_t AssetValidateSellvin(struct CCcontract_info *cp,Eval* eval,int64_t &tmpprice,std::vector<uint8_t> &tmporigpubkey,char *CCaddr,char *origaddr,const CTransaction &tx,uint256 assetid); |
|||
bool AssetCalcAmounts(struct CCcontract_info *cpAssets, int64_t &inputs, int64_t &outputs, Eval* eval, const CTransaction &tx, uint256 assetid); |
|||
|
|||
|
|||
#endif |
@ -1,33 +0,0 @@ |
|||
// Copyright (c) 2016-2023 The Hush developers
|
|||
// Distributed under the GPLv3 software license, see the accompanying
|
|||
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|||
/******************************************************************************
|
|||
* Copyright © 2014-2019 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
|
|||
#ifndef CC_AUCTION_H |
|||
#define CC_AUCTION_H |
|||
|
|||
#include "CCinclude.h" |
|||
|
|||
#define EVAL_AUCTION 0xe8 |
|||
|
|||
bool AuctionValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn); |
|||
|
|||
std::string AuctionPost(uint64_t txfee,uint256 itemhash,int64_t minbid,char *title,char *description); |
|||
std::string AuctionBid(uint64_t txfee,uint256 itemhash,int64_t amount); |
|||
std::string AuctionDeliver(uint64_t txfee,uint256 itemhash,uint256 bidtxid); |
|||
|
|||
#endif |
@ -1,31 +0,0 @@ |
|||
// Copyright (c) 2016-2023 The Hush developers
|
|||
// Distributed under the GPLv3 software license, see the accompanying
|
|||
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|||
/******************************************************************************
|
|||
* Copyright © 2014-2019 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
#ifndef CC_FAUCET_H |
|||
#define CC_FAUCET_H |
|||
#include "CCinclude.h" |
|||
#define EVAL_FAUCET 0xe4 |
|||
#define FAUCETSIZE (COIN / 10) |
|||
|
|||
bool FaucetValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn); |
|||
|
|||
// CCcustom
|
|||
UniValue FaucetFund(const CPubKey& mypk,uint64_t txfee,int64_t funds); |
|||
UniValue FaucetGet(const CPubKey& mypk,uint64_t txfee); |
|||
UniValue FaucetInfo(); |
|||
|
|||
#endif |
@ -1,33 +0,0 @@ |
|||
// Copyright (c) 2016-2023 The Hush developers
|
|||
// Distributed under the GPLv3 software license, see the accompanying
|
|||
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
|||
/******************************************************************************
|
|||
* Copyright © 2014-2019 The SuperNET Developers. * |
|||
* * |
|||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * |
|||
* the top-level directory of this distribution for the individual copyright * |
|||
* holder information and the developer policies on copyright and licensing. * |
|||
* * |
|||
* Unless otherwise agreed in a custom licensing agreement, no part of the * |
|||
* SuperNET software, including this file may be copied, modified, propagated * |
|||
* or distributed except according to the terms contained in the LICENSE file * |
|||
* * |
|||
* Removal or modification of this copyright notice is prohibited. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
|
|||
#ifndef CC_FSM_H |
|||
#define CC_FSM_H |
|||
|
|||
#include "CCinclude.h" |
|||
|
|||
#define EVAL_FSM 0xe7 |
|||
|
|||
bool FSMValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn); |
|||
|
|||
std::string FSMList(); |
|||
std::string FSMInfo(uint256 fsmtxid); |
|||
std::string FSMCreate(uint64_t txfee,std::string name,std::string states); |
|||
|
|||
#endif |
Loading…
Reference in new issue