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

API

clock

Module0x0000…0002
Move path
0x0000…0002::clock
Functions
31 public, 0 entry
Structs
1
Friend modules
None
clock

Bytecode67 lines

The on-chain disassembly. Offsets are bytecode positions within each function.

// Move bytecode v7
module 2.clock {
use 0000000000000000000000000000000000000000000000000000000000000002::object;
use 0000000000000000000000000000000000000000000000000000000000000002::transfer;
use 0000000000000000000000000000000000000000000000000000000000000002::tx_context;
 
struct Clock has key {
id: UID,
timestamp_ms: u64
}
 
public timestamp_ms(Arg0: &Clock): u64 {
B0:
0MoveLoc[0](Arg0: &Clock)
1ImmBorrowField[0](Clock.timestamp_ms: u64)
2ReadRef
3Ret
}
 
create(Arg0: &TxContext) {
B0:
0MoveLoc[0](Arg0: &TxContext)
1Call tx_context::sender(&TxContext): address
2LdConst[1](address: 0x00..)
3Eq
4BrFalse(6)
B1:
5Branch(8)
B2:
6LdConst[0](u64: 0)
7Abort
B3:
8Call object::clock(): UID
9LdU64(0)
10Pack[0](Clock)
11Call transfer::share_object<Clock>(Clock)
12Ret
}
 
consensus_commit_prologue(Arg0: &mut Clock, Arg1: u64, Arg2: &TxContext) {
B0:
0MoveLoc[2](Arg2: &TxContext)
1Call tx_context::sender(&TxContext): address
2LdConst[1](address: 0x00..)
3Eq
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &mut Clock)
7Pop
8LdConst[0](u64: 0)
9Abort
B3:
10MoveLoc[1](Arg1: u64)
11MoveLoc[0](Arg0: &mut Clock)
12MutBorrowField[0](Clock.timestamp_ms: u64)
13WriteRef
14Ret
}
 
Constants [
0 => u64: 0
1 => address: 0x0000000000000000000000000000000000000000000000000000000000000000
]
}