MCPcopy Create free account
hub / github.com/ElementsProject/elements / newIssuanceContract

Function newIssuanceContract

src/simplicity/elements/elementsJets.c:101–107  ·  view source on GitHub ↗

Write an optional 'contractHash' from an 'assetIssuance' to the 'dst' frame, advancing the cursor 257 cells. * * Precondition: '*dst' is a valid write frame for 257 more cells; * NULL != issuance; */

Source from the content-addressed store, hash-verified

99 * NULL != issuance;
100 */
101static void newIssuanceContract(frameItem* dst, const assetIssuance* issuance) {
102 if (writeBit(dst, NEW_ISSUANCE == issuance->type)) {
103 writeHash(dst, &issuance->contractHash);
104 } else {
105 skipBits(dst, 256);
106 }
107}
108
109/* Write an optional 'entropy' from an 'assetIssuance' to the 'dst' frame, advancing the cursor 257 cells.
110 *

Calls 3

writeBitFunction · 0.85
skipBitsFunction · 0.85
writeHashFunction · 0.70

Tested by

no test coverage detected