These docs are for v2.0. Click to read the latest docs for v3.0.

Get the generation of the originating transaction

Behaviour

  • Return the generation of the originating transaction or 1 if no generation field is present.

Definition

int64_t otxn_generation (
    void
);

Example

int64_t generation = 
  otxn_generation();

Parameters

None

Return Code

TypeDescription
int64_tThe generation of the originating transaction, or 1 if no generation was present on the originating transaction.