示例#1
0
        protected virtual Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            // Check if we need to pay founder fees
            if (coin.HasFounderFee)
            {
                rewardToPool = CreateFounderOutputs(tx, rewardToPool);
            }

            // Check if we need to pay treasury reward
            if (coin.HasTreasuryReward)
            {
                rewardToPool = CreateTreasuryOutputs(tx, rewardToPool);
            }

            tx.Outputs.Add(rewardToPool, poolAddressDestination);

            // CoinbaseDevReward check for Freecash
            if (coin.HasCoinbaseDevReward)
            {
                CreateCoinbaseDevRewardOutputs(tx);
            }

            return(tx);
        }
示例#2
0
        protected virtual Transaction CreateMasternodeOutputTransaction()
        {
            var blockReward = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);
            var tx = Transaction.Create(network);

            // outputs
            rewardToPool = CreateMasternodeOutputs(tx, blockReward);

            // Check if we need to pay founder fees
            if (coin.HasFounderFee)
            {
                rewardToPool = CreateFounderOutputs(tx, rewardToPool);
            }

            // Check if we need to pay treasury reward
            if (coin.HasTreasuryReward)
            {
                rewardToPool = CreateTreasuryOutputs(tx, rewardToPool);
            }

            // Finally distribute remaining funds to pool
            tx.Outputs.Insert(0, new TxOut(rewardToPool, poolAddressDestination));

            return(tx);
        }
示例#3
0
        protected virtual Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            tx.Outputs.Add(rewardToPool, poolAddressDestination);

            return(tx);
        }
示例#4
0
        protected override Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue * blockRewardMultiplier, MoneyUnit.Satoshi);

            var tx = Transaction.Create(NBitcoinNetworkType);

            // pool reward (t-addr)
            tx.AddOutput(rewardToPool, poolAddressDestination);

            return(tx);
        }
示例#5
0
        protected virtual Transaction CreatePayloadOutputTransaction()
        {
            var blockReward = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);
            var tx          = Transaction.Create(network);

            // Firstly pay coins to pool addr
            tx.Outputs.Insert(0, new TxOut(blockReward, poolAddressDestination));
            // then create payloads incase there is any coinbase_payload in gbt
            CreatePayloadOutputs(tx, rewardToPool);
            return(tx);
        }
示例#6
0
    protected override Transaction CreateOutputTransaction()
    {
        rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

        var tx = Transaction.Create(network);

        // pool reward (t-addr)
        tx.Outputs.Add(rewardToPool, poolAddressDestination);

        tx.Inputs.Add(TxIn.CreateCoinbase((int)BlockTemplate.Height));

        return(tx);
    }
示例#7
0
        protected virtual Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue * coin.BlockrewardMultiplier, MoneyUnit.Satoshi);

            var tx = Transaction.Create(NBitcoinNetworkType);

            tx.Outputs.Insert(0, new TxOut(rewardToPool, poolAddressDestination)
            {
                Value = rewardToPool
            });

            return(tx);
        }
示例#8
0
        protected virtual Transaction CreateMasternodeOutputTransaction()
        {
            var blockReward = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            // outputs
            rewardToPool = CreateMasternodeOutputs(tx, blockReward);

            // Finally distribute remaining funds to pool
            tx.Outputs.Insert(0, new TxOut(rewardToPool, poolAddressDestination));

            return(tx);
        }
示例#9
0
        protected virtual Transaction CreateOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            //Now check if we need to pay founder fees Re PGN pre-dash fork
            if (coin.HasFounderFee)
            {
                rewardToPool = CreateFounderOutputs(tx, rewardToPool);
            }

            tx.Outputs.Add(rewardToPool, poolAddressDestination);

            return(tx);
        }
示例#10
0
        protected virtual Transaction CreatePayeeOutputTransaction()
        {
            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);

            var tx = Transaction.Create(network);

            if (payeeParameters?.PayeeAmount > 0)
            {
                var payeeReward = new Money(payeeParameters.PayeeAmount.Value, MoneyUnit.Satoshi);
                rewardToPool -= payeeReward;

                tx.Outputs.Add(payeeReward, BitcoinUtils.AddressToDestination(payeeParameters.Payee, network));
            }

            tx.Outputs.Insert(0, new TxOut(rewardToPool, poolAddressDestination));

            return(tx);
        }
示例#11
0
        protected override Transaction CreateOutputTransaction()
        {
            var txNetwork = Network.GetNetwork(networkParams.CoinbaseTxNetwork);
            var tx1       = Transaction.Create(txNetwork);
            var tx        = new ZcashTransaction(tx1.ToHex());

            // set versions
            tx.Version = txVersion;

            overwinterField.SetValue(tx, true);
            versionGroupField.SetValue(tx, txVersionGroupId);

            // pool reward (t-addr)
            rewardToPool = new Money(blockReward + rewardFees, MoneyUnit.Satoshi);
            tx.Outputs.Add(rewardToPool, poolAddressDestination);


            return(tx);
        }
示例#12
0
        private const decimal BlockReward         = 250000000m; // Minexcoin has a static block reward

        protected override Transaction CreateOutputTransaction()
        {
            var txFees = BlockTemplate.Transactions.Sum(x => x.Fee);

            rewardToPool = new Money(BlockReward + txFees, MoneyUnit.Satoshi);

            var bankReward = ComputeBankReward(BlockTemplate.Height, rewardToPool);

            rewardToPool -= bankReward;

            var tx = Transaction.Create(network);

            // pool reward
            tx.AddOutput(rewardToPool, poolAddressDestination);

            // bank reward
            tx.AddOutput(bankReward, bankScript);

            return(tx);
        }