Beispiel #1
0
        public void TestCodeConvertion()
        {
            var smart = CreateSimpleSmartcontract();

            var flat = smart.Code.ToFlatString();

            var code = SmartcontractUtils.StringToCode(flat);

            code.Should().Be(smart.Code);
        }
 public static Smartcontract ToSmartcontract(this SQLiteDataReader reader)
 {
     return(new Smartcontract()
     {
         Name = (string)reader[1],
         Hash = (string)reader[2],
         Code = SmartcontractUtils.StringToCode((string)reader[3]),
         From = (string)reader[4],
         Signature = (string)reader[5],
         TransactionFee = (int)reader[6],
         SendTo = (string)reader[7],
         ReceivingAddress = (string)reader[8]
     });
 }