Beispiel #1
0
        public async Task TestInvoke()
        {
            byte[] testScript = NativeContract.GAS.Hash.MakeScript("balanceOf", UInt160.Zero);
            UT_TransactionManager.MockInvokeScript(rpcClientMock, testScript, new ContractParameter {
                Type = ContractParameterType.ByteArray, Value = "00e057eb481b".HexToBytes()
            });

            ContractClient contractClient = new ContractClient(rpcClientMock.Object);
            var            result         = await contractClient.TestInvokeAsync(NativeContract.GAS.Hash, "balanceOf", UInt160.Zero);

            Assert.AreEqual(30000000000000L, (long)result.Stack[0].GetInteger());
        }