public static async Task <string[]> PublishTransactionsAsync(this ChainControllerRpcService s,
                                                                     string[] rawTransactions)
        {
            var txIds        = new string[rawTransactions.Length];
            var transactions = new List <Transaction>();

            for (int i = 0; i < rawTransactions.Length; i++)
            {
                Transaction transaction;
                try
                {
                    var hexString = ByteArrayHelpers.FromHexString(rawTransactions[i]);
                    transaction = Transaction.Parser.ParseFrom(hexString);
                }
                catch
                {
                    throw new JsonRpcServiceException(Error.InvalidTransaction,
                                                      Error.Message[Error.InvalidTransaction]);
                }

                if (!transaction.VerifySignature())
                {
                    throw new JsonRpcServiceException(Error.InvalidTransaction,
                                                      Error.Message[Error.InvalidTransaction]);
                }

                transactions.Add(transaction);
                txIds[i] = transaction.GetHash().ToHex();
            }

            await s.LocalEventBus.PublishAsync(new TransactionsReceivedEvent()
            {
                Transactions = transactions
            });

            return(txIds);
        }
 GetRpcMethodContracts(this ChainControllerRpcService s)
 {
     var methods = s.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public);
     IDictionary <string, (JsonRpcRequestContract, MethodInfo, ParameterInfo[], string[])> contracts =