private static ContractTransaction prepareDeployObject(string bindingID, Order orderObject) { var accomodation = orderObject.Consignments[0].AccommodationData; var activity = orderObject.Consignments[0].ActivityData; SampleDTO _dto = new SampleDTO() { ContractID = bindingID, TransactionID = bindingID, TransactedTime = DateTime.Now, Description = "Transacted", AdminDetail = new AdminDetails() { OrderCode = orderObject.OrderCode, ConsignmentCode = orderObject.Consignments[0].Code, ConsignmentStatus = orderObject.Consignments[0].Status, BookingDate = orderObject.BookingDate.ToString(), CheckinDate = accomodation == null ? null : accomodation.CheckIn.ToString(), CheckoutDate = accomodation == null ? null : accomodation.CheckOut.ToString(), Currency = orderObject.Currency, Quantity = "1", Price = orderObject.OrderPrice.ToString(), ServiceDate = DateTime.Now.ToString(), ServiceType = orderObject.Consignments[0].Type, Supplier = orderObject.Supplier } }; ConstructorConfirmation _deployConfirmation = new ConstructorConfirmation() { BindingId = bindingID, Name = "New Enterprise Smart Contract instance", TransactionConfirmation = new TransactionConfirmation() { BlockHash = "0xfa4e2a31506c1f930efc7701ff6ddc1451d08a38a7a9267fe263766b4c7ea2d0", BlockNumber = "1", ContractAddress = "0xed9d02e382b34818e88b88a309c7fe71e65f419d", TransactionHash = "", ContractName = "", ProxyId = "", TransactionIndex = "1" } }; ContractTransaction _txInformation = new ContractTransaction(_dto, _deployConfirmation); _txInformation.OrderDetails = orderObject; return(_txInformation); }
private ContractTransaction prepareDeployObject(BC.Offchain.Repository.Models.Profile citizenProfile) { ConstructorConfirmation _deployConfirmation = new ConstructorConfirmation() { NewContractOrTokenId = Guid.NewGuid().ToString(), Name = "Smart Contract instance by ESC Template", TransactionConfirmation = new TransactionConfirmation() { BlockHash = "0xfa4e2a31506c1f930efc7701ff6ddc1451d08a38a7a9267fe263766b4c7ea2d0", BlockNumber = "1", LedgerAddress = "", TransactionHash = "", Name = "Fake Contract", ProxyId = "Fake Contract_Proxy ID", TransactionIndex = "1" } }; ContractTransaction _txInformation = new ContractTransaction(citizenProfile, _deployConfirmation); return(_txInformation); }