Browse Source

Merge branch 'duke' of https://git.hush.is/hush/hush3 into duke

duke
Duke 4 months ago
parent
commit
c56a9e31a0
  1. 21
      src/cc/CCPegs.h
  2. 4
      src/cc/CCcustom.cpp
  3. 1186
      src/cc/pegs.cpp

21
src/cc/CCPegs.h

@ -16,24 +16,3 @@
* *
******************************************************************************/
#ifndef CC_PEGS_H
#define CC_PEGS_H
#include "CCinclude.h"
bool PegsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn);
// CCcustom
UniValue PegsCreate(const CPubKey& pk,uint64_t txfee,int64_t amount,std::vector<uint256> bindtxids);
UniValue PegsFund(const CPubKey& pk,uint64_t txfee,uint256 pegstxid, uint256 tokenid, int64_t amount);
UniValue PegsGet(const CPubKey& pk,uint64_t txfee,uint256 pegstxid, uint256 tokenid, int64_t amount);
UniValue PegsRedeem(const CPubKey& pk,uint64_t txfee,uint256 pegstxid, uint256 tokenid);
UniValue PegsLiquidate(const CPubKey& pk,uint64_t txfee,uint256 pegstxid, uint256 tokenid, uint256 liquidatetxid);
UniValue PegsExchange(const CPubKey& pk,uint64_t txfee,uint256 pegstxid, uint256 tokenid, int64_t amount);
UniValue PegsAccountHistory(const CPubKey& pk,uint256 pegstxid);
UniValue PegsAccountInfo(const CPubKey& pk,uint256 pegstxid);
UniValue PegsWorstAccounts(uint256 pegstxid);
UniValue PegsInfo(uint256 pegstxid);
#endif

4
src/cc/CCcustom.cpp

@ -390,8 +390,8 @@ struct CCcontract_info *CCinit(struct CCcontract_info *cp, uint8_t evalcode)
strcpy(cp->normaladdr,PegsNormaladdr);
strcpy(cp->CChexstr,PegsCChexstr);
memcpy(cp->CCpriv,PegsCCpriv,32);
cp->validate = PegsValidate;
cp->ismyvin = IsPegsInput;
//cp->validate = PegsValidate;
//cp->ismyvin = IsPegsInput;
break;
case EVAL_PAYMENTS:
strcpy(cp->unspendableCCaddr,PaymentsCCaddr);

1186
src/cc/pegs.cpp

File diff suppressed because it is too large
Loading…
Cancel
Save