public async Task TransactionReadOnlyExecutionServiceExtensions_Test()
        {
            var chain = await BlockchainService.GetChainAsync();

            var context = new ChainContext
            {
                BlockHash   = chain.BestChainHash,
                BlockHeight = chain.BestChainHeight
            };
            var transaction = OsTestHelper.GenerateTransaction(SampleAddress.AddressList[0],
                                                               SmartContractAddressService.GetAddressByContractName(TokenSmartContractAddressNameProvider.Name),
                                                               "GetBalance", new GetBalanceInput
            {
                Owner  = SampleAddress.AddressList[0],
                Symbol = "ELF"
            });

            var result = await TransactionReadOnlyExecutionService.ExecuteAsync <GetBalanceOutput>(context, transaction,
                                                                                                   TimestampHelper.GetUtcNow(),
                                                                                                   true);

            result.Balance.ShouldBe(0);
            result.Symbol.ShouldBe("ELF");

            //without such method and call
            transaction.MethodName = "NotExist";
            await Should.ThrowAsync <SmartContractExecutingException>(async() =>
            {
                await TransactionReadOnlyExecutionService.ExecuteAsync <GetBalanceOutput>(context, transaction,
                                                                                          TimestampHelper.GetUtcNow(),
                                                                                          true);
            });
        }
        public async Task IsViewTransactionAsync_Test()
        {
            var chain = await BlockchainService.GetChainAsync();

            var context = new ChainContext
            {
                BlockHash   = chain.BestChainHash,
                BlockHeight = chain.BestChainHeight
            };
            var transaction = OsTestHelper.GenerateTransaction(SampleAddress.AddressList[0],
                                                               await SmartContractAddressService.GetAddressByContractNameAsync(context, TokenSmartContractAddressNameProvider.StringName),
                                                               "GetBalance", new GetBalanceInput
            {
                Owner  = SampleAddress.AddressList[0],
                Symbol = "ELF"
            });

            var result = await TransactionReadOnlyExecutionService.IsViewTransactionAsync(context, transaction);

            result.ShouldBeTrue();

            transaction = OsTestHelper.GenerateTransaction(SampleAddress.AddressList[0],
                                                           await SmartContractAddressService.GetAddressByContractNameAsync(context,
                                                                                                                           TokenSmartContractAddressNameProvider.StringName),
                                                           "Transfer", new TransferInput
            {
                To     = SampleAddress.AddressList[1],
                Symbol = "ELF",
                Amount = 10
            });
            result = await TransactionReadOnlyExecutionService.IsViewTransactionAsync(context, transaction);

            result.ShouldBeFalse();
        }