Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

Sui Framework

tx_context

Move path
0x0000…0002::tx_context
Functions
198 public, 0 entry
Structs
1
Friend modules
None
tx_context

Bytecode110 lines

The on-chain disassembly. Offsets are instruction numbers within each function.

// Move bytecode v7
module 2.tx_context {
use 0000000000000000000000000000000000000000000000000000000000000001::option;
 
struct TxContext has drop {
sender: address,
tx_hash: vector<u8>,
epoch: u64,
epoch_timestamp_ms: u64,
ids_created: u64
}
 
public sender(Arg0: &TxContext): address {
B0:
0Call native_sender(): address
1Ret
}
 
native native_sender(): address;
 
public digest(Arg0: &TxContext): &vector<u8> {
B0:
0MoveLoc[0](Arg0: &TxContext)
1ImmBorrowField[0](TxContext.tx_hash: vector<u8>)
2Ret
}
 
public epoch(Arg0: &TxContext): u64 {
B0:
0Call native_epoch(): u64
1Ret
}
 
native native_epoch(): u64;
 
public epoch_timestamp_ms(Arg0: &TxContext): u64 {
B0:
0Call native_epoch_timestamp_ms(): u64
1Ret
}
 
native native_epoch_timestamp_ms(): u64;
 
public sponsor(Arg0: &TxContext): Option<address> {
B0:
0Call option_sponsor(): Option<address>
1Ret
}
 
public fresh_object_address(Arg0: &mut TxContext): address {
B0:
0Call fresh_id(): address
1Ret
}
 
native fresh_id(): address;
 
public reference_gas_price(Arg0: &TxContext): u64 {
B0:
0Call native_rgp(): u64
1Ret
}
 
native native_rgp(): u64;
 
public gas_price(Arg0: &TxContext): u64 {
B0:
0Call native_gas_price(): u64
1Ret
}
 
native native_gas_price(): u64;
 
native native_ids_created(): u64;
 
native native_gas_budget(): u64;
 
option_sponsor(): Option<address> {
L0: loc0: Option<address>
L1: loc1: vector<address>
B0:
0Call native_sponsor(): vector<address>
1StLoc[1](loc1: vector<address>)
2ImmBorrowLoc[1](loc1: vector<address>)
3VecLen(1)
4LdU64(0)
5Eq
6BrFalse(10)
B1:
7Call option::none<address>(): Option<address>
8StLoc[0](loc0: Option<address>)
9Branch(16)
B2:
10ImmBorrowLoc[1](loc1: vector<address>)
11LdU64(0)
12VecImmBorrow(1)
13ReadRef
14Call option::some<address>(address): Option<address>
15StLoc[0](loc0: Option<address>)
B3:
16MoveLoc[0](loc0: Option<address>)
17Ret
}
 
native native_sponsor(): vector<address>;
 
native derive_id(Arg0: vector<u8>, Arg1: u64): address;
 
}