Produce an sfEmitDetails suitable for a soon-to-be emitted transaction

Concepts

Behaviour

  • Generate and write a 105 byte sfEmitDetails object into the write_ptr

Definition

int64_t etxn_details (
    uint32_t write_ptr,
    uint32_t write_len
);

Example

uint8_t emitdet[105];
int64_t result =
    etxn_details(emitdet, 105);
if (result != 105)
    rollback("Etxndetails failed.", 19, 1);

Parameters

NameTypeDescription
write_ptruint32_tPointer to the buffer receiving the sfEmitDetails record
write_lenuint32_tLength of the buffer

Return Code

TypeDescription
int64_tThe number of bytes written.

If negative, an error:
OUT_OF_BOUNDS
- pointers/lengths specified outside of hook memory.

TOO_SMALL
- Buffer isn't large enough to receive record

PREREQUISITE_NOT_MET
- The hook failed to call etxn_reserve(n) first

FEE_TOO_LARGE
- The burden would be too high for the network to allow.

INTERNAL_ERROR
- A generic error in which rippled had trouble generating the required field.