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

Function simplicity_input_amount

src/simplicity/elements/elementsJets.c:243–252  ·  view source on GitHub ↗

input_amount : TWO^32 |- S (Conf TWO^256, Conf TWO^64) */

Source from the content-addressed store, hash-verified

241
242/* input_amount : TWO^32 |- S (Conf TWO^256, Conf TWO^64) */
243bool simplicity_input_amount(frameItem* dst, frameItem src, const txEnv* env) {
244 uint_fast32_t i = simplicity_read32(&src);
245 if (writeBit(dst, i < env->tx->numInputs)) {
246 asset(dst, &env->tx->input[i].txo.asset);
247 amt(dst, &env->tx->input[i].txo.amt);
248 } else {
249 skipBits(dst, 516);
250 }
251 return true;
252}
253
254/* input_script_hash : TWO^32 |- S TWO^256 */
255bool simplicity_input_script_hash(frameItem* dst, frameItem src, const txEnv* env) {

Callers

nothing calls this directly

Calls 4

writeBitFunction · 0.85
assetFunction · 0.85
amtFunction · 0.85
skipBitsFunction · 0.85

Tested by

no test coverage detected