Example #1
0
 internal void Run()
 {
     Console.WriteLine("Get Fee Factor: " + policyAPI.GetExecFeeFactorAsync().Result);
     Console.WriteLine("Get Storage Price: " + policyAPI.GetStoragePriceAsync().Result);
     Console.WriteLine("Get Network Fee Per Byte: " + policyAPI.GetFeePerByteAsync().Result);
     Console.WriteLine("Get Ploicy Blocked Accounts: " + policyAPI.IsBlockedAsync(Neo.SmartContract.Native.NativeContract.GAS.Hash).Result);
 }
        public async Task TestGetFeePerByte()
        {
            byte[] testScript = NativeContract.Policy.Hash.MakeScript("getFeePerByte");
            UT_TransactionManager.MockInvokeScript(rpcClientMock, testScript, new ContractParameter {
                Type = ContractParameterType.Integer, Value = new BigInteger(1000)
            });

            var result = await policyAPI.GetFeePerByteAsync();

            Assert.AreEqual(1000L, result);
        }