上下文:我们最近在同一个CorDapp中对合同代码进行了更改,然后我们才意识到,如果在transactionstate上放置附件约束,您不能仅使用新的CorDapp插件来淘汰旧的CorDapp。因为这样的旧状态对象引用了旧的附件哈希,当新的CorDapp JAR放入旧的时,会抛出''ContractConstraintRejection''的错误。
解决方案:按以下步骤升级合同 -
需要指导:
答案 0 :(得分:1)
以下是您如何升级州合同的示例:
Private Sub cmdSubmit_Click()
Dim ws As Worksheet
Dim addme As Long
Set ws = Sheet1
addme = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws
ws.Cells(addme, 1).Value = Me.txtNeedsAnalysSum 'the number 1 here represents the Column A
ws.Cells(addme, 2).Value = Me.txtSummaryOfTask 'the number 2 represents Column B
ws.Cells(addme, 3).Value = Me.txtIntroduction
ws.Cells(addme, 4).Value = Me.chkInRes
ws.Cells(addme, 5).Value = Me.chkOnline
ws.Cells(addme, 6).Value = Me.chk24Hr
ws.Cells(addme, 7).Value = Me.chk3days
ws.Cells(addme, 8).Value = Me.chkDurOther
ws.Cells(addme, 9).Value = Me.cmbPrereqReq
ws.Cells(addme, 10).Value = Me.cmbPrereqRec
End With
Me.txtNeedsAnalysSum = vbNullString 're-set your textboxes
Me.txtSummaryOfTask = vbNullString
Me.txtIntroduction = vbNullString
Me.chkInRes = False
Me.chkOnline = False
Me.chk24Hr = False
Me.chk3days = False
Me.chkDurOther = False
Me.cmbPrereqReq = ""
Me.cmbPrereqRec = ""
End Sub
有关完整示例,请参阅合同升级示例here。