diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 64e08d00030..4487027e63b 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -245,6 +245,7 @@ class CMainParams : public CChainParams { consensus.smartContracts.clear(); consensus.smartContracts[SMART_CONTRACT_DFIP_2201] = GetScriptForDestination(CTxDestination(WitnessV0KeyHash(std::vector{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}))); + consensus.smartContracts[SMART_CONTRACT_DFIP_2203] = GetScriptForDestination(CTxDestination(WitnessV0KeyHash(std::vector{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}))); // owner base58, operator base58 vMasternodes.push_back({"8PuErAcazqccCVzRcc8vJ3wFaZGm4vFbLe", "8J846CKFF83Jcj5m4EReJmxiaJ6Jy1Y6Ea"}); @@ -462,6 +463,7 @@ class CTestNetParams : public CChainParams { consensus.smartContracts.clear(); consensus.smartContracts[SMART_CONTRACT_DFIP_2201] = GetScriptForDestination(CTxDestination(WitnessV0KeyHash(std::vector{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}))); + consensus.smartContracts[SMART_CONTRACT_DFIP_2203] = GetScriptForDestination(CTxDestination(WitnessV0KeyHash(std::vector{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}))); // owner base58, operator base58 vMasternodes.push_back({"7LMorkhKTDjbES6DfRxX2RiNMbeemUkxmp", "7KEu9JMKCx6aJ9wyg138W3p42rjg19DR5D"}); @@ -644,6 +646,7 @@ class CDevNetParams : public CChainParams { consensus.smartContracts.clear(); consensus.smartContracts[SMART_CONTRACT_DFIP_2201] = GetScriptForDestination(CTxDestination(WitnessV0KeyHash(std::vector{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}))); + consensus.smartContracts[SMART_CONTRACT_DFIP_2203] = GetScriptForDestination(CTxDestination(WitnessV0KeyHash(std::vector{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}))); // owner base58, operator base58 vMasternodes.push_back({"7M3g9CSERjLdXisE5pv2qryDbURUj9Vpi1", "7Grgx69MZJ4wDKRx1bBxLqTnU9T3quKW7n"}); @@ -832,6 +835,7 @@ class CRegTestParams : public CChainParams { consensus.smartContracts.clear(); consensus.smartContracts[SMART_CONTRACT_DFIP_2201] = GetScriptForDestination(CTxDestination(WitnessV0KeyHash(std::vector{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}))); + consensus.smartContracts[SMART_CONTRACT_DFIP_2203] = GetScriptForDestination(CTxDestination(WitnessV0KeyHash(std::vector{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}))); // owner base58, operator base58 vMasternodes.push_back({"mwsZw8nF7pKxWH8eoKL9tPxTpaFkz7QeLU", "mswsMVsyGMj1FzDMbbxw2QW3KvQAv2FKiy"}); diff --git a/src/chainparams.h b/src/chainparams.h index 2ec2c0d6625..1e0c243cce3 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -120,6 +120,7 @@ class CChainParams }; const auto SMART_CONTRACT_DFIP_2201 = "DFIP2201"; +const auto SMART_CONTRACT_DFIP_2203 = "DFIP2203"; /** * Creates and returns a std::unique_ptr of the chosen chain. diff --git a/src/masternodes/accounts.cpp b/src/masternodes/accounts.cpp index 1644b9d441f..e8bbcd77ae6 100644 --- a/src/masternodes/accounts.cpp +++ b/src/masternodes/accounts.cpp @@ -98,3 +98,18 @@ uint32_t CAccountsView::GetBalancesHeight(CScript const & owner) bool ok = ReadBy(owner, height); return ok ? height : 0; } + +Res CAccountsView::StoreFuturesUserValues(const CFuturesUserKey& key, const CFuturesUserValue& futures) +{ + if (!WriteBy(key, futures)) { + return Res::Err("Failed to store futures"); + } + + return Res::Ok(); +} + +void CAccountsView::ForEachFuturesUserValues(std::function callback, const CFuturesUserKey& start) +{ + ForEach(callback, start); +} + diff --git a/src/masternodes/accounts.h b/src/masternodes/accounts.h index c9d3a9555e3..a802f26f991 100644 --- a/src/masternodes/accounts.h +++ b/src/masternodes/accounts.h @@ -11,6 +11,44 @@ #include #include