MCPcopy Create free account
hub / github.com/chain/Core / code

Method code

core/txbuilder/constraint.go:90–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88}
89
90func (p payConstraint) code() []byte {
91 builder := vmutil.NewBuilder()
92 builder.AddInt64(int64(p.Index))
93 if p.RefDataHash == nil {
94 builder.AddData([]byte{})
95 } else {
96 builder.AddData(p.RefDataHash.Bytes())
97 }
98 builder.AddInt64(int64(p.Amount)).AddData(p.AssetId.Bytes()).AddInt64(1).AddData(p.Program)
99 builder.AddOp(vm.OP_CHECKOUTPUT)
100 return builder.Program
101}

Callers 1

buildSigProgramFunction · 0.95

Calls 4

AddInt64Method · 0.95
AddDataMethod · 0.95
AddOpMethod · 0.95
BytesMethod · 0.45

Tested by

no test coverage detected