예제 #1
0
파일: Program.cs 프로젝트: OguzhanE/NepLend
        static async Task MainAsync(string[] args)
        {
            var seedUrl       = "http://127.0.0.1:30333";//http://seed5.neo.org:10332;
            var scHash        = "23c5ab74cc4bbed00da03ca4c347b83f8db67b35";
            var client        = new RpcClient(new Uri(seedUrl));
            var contractState = new NeoGetStorage(client);

            string[] keys = new string[] { "42796a4c673973764d" + 'A', "42796a4c673973764dB", "42796a4c673973764dC", "42796a4c673973764dD", "42796a4c673973764dE" };
            foreach (var key in keys)
            {
                //var hexKey = Helper.ToHexString(Encoding.Default.GetBytes(key));
                //var val = await contractState.SendRequestAsync(scHash, hexKey);
                try
                {
                    var val = await contractState.SendRequestAsync(scHash, key);

                    Console.WriteLine($"->{key}:{(val == null ? "null" : Helper.HextoString(val))}");
                }
                catch (Exception)
                {
                }
            }
        }
        public override async Task <string> ExecuteAsync(IClient client)
        {
            var contractState = new NeoGetStorage(client);

            return(await contractState.SendRequestAsync("03febccf81ac85e3d795bc5cbd4e84e907812aa3", "5065746572"));
        }
예제 #3
0
        public override async Task <string> ExecuteAsync(IClient client)
        {
            var contractState = new NeoGetStorage(client);

            return(await contractState.SendRequestAsync("todo", "todo"));
        }