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

API

to_string

Module0x40fc…5bb2
Move path
0xed6c…9f32::to_string
Functions
44 public, 0 entry
Structs
0
Friend modules
None
to_string

Bytecode233 lines

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

// Move bytecode v6
module ed6c6fe0732be937f4379bc0b471f0f6bfbe0e8741968009e0f01e6de3d59f32.to_string {
use 0000000000000000000000000000000000000000000000000000000000000001::ascii;
use 0000000000000000000000000000000000000000000000000000000000000001::vector;
 
public to_string(Arg0: u128): String {
L1: loc0: vector<u8>
B0:
0CopyLoc[0](Arg0: u128)
1LdU128(0)
2Eq
3BrFalse(7)
B1:
4LdConst[2](vector<u8>: "0" ..)
5Call ascii::string(vector<u8>): String
6Ret
B2:
7VecPack(6, 0)
8StLoc[1](loc0: vector<u8>)
B3:
9CopyLoc[0](Arg0: u128)
10LdU128(0)
11Neq
12BrFalse(27)
B4:
13Branch(14)
B5:
14MutBorrowLoc[1](loc0: vector<u8>)
15LdU128(48)
16CopyLoc[0](Arg0: u128)
17LdU128(10)
18Mod
19Add
20CastU8
21VecPushBack(6)
22MoveLoc[0](Arg0: u128)
23LdU128(10)
24Div
25StLoc[0](Arg0: u128)
26Branch(9)
B6:
27MutBorrowLoc[1](loc0: vector<u8>)
28Call vector::reverse<u8>(&mut vector<u8>)
29MoveLoc[1](loc0: vector<u8>)
30Call ascii::string(vector<u8>): String
31Ret
}
 
public to_hex_string(Arg0: u128): String {
L1: loc0: u128
L2: loc1: u128
B0:
0CopyLoc[0](Arg0: u128)
1LdU128(0)
2Eq
3BrFalse(7)
B1:
4LdConst[3](vector<u8>: "0x0..)
5Call ascii::string(vector<u8>): String
6Ret
B2:
7CopyLoc[0](Arg0: u128)
8StLoc[2](loc1: u128)
9LdU128(0)
10StLoc[1](loc0: u128)
B3:
11CopyLoc[2](loc1: u128)
12LdU128(0)
13Neq
14BrFalse(25)
B4:
15Branch(16)
B5:
16MoveLoc[1](loc0: u128)
17LdU128(1)
18Add
19StLoc[1](loc0: u128)
20MoveLoc[2](loc1: u128)
21LdU8(8)
22Shr
23StLoc[2](loc1: u128)
24Branch(11)
B6:
25MoveLoc[0](Arg0: u128)
26MoveLoc[1](loc0: u128)
27Call to_hex_string_fixed_length(u128, u128): String
28Ret
}
 
public to_hex_string_fixed_length(Arg0: u128, Arg1: u128): String {
L2: loc0: vector<u8>
L3: loc1: &mut vector<u8>
L4: loc2: vector<u8>
L5: loc3: u128
B0:
0VecPack(6, 0)
1StLoc[4](loc2: vector<u8>)
2LdU128(0)
3StLoc[5](loc3: u128)
B1:
4CopyLoc[5](loc3: u128)
5CopyLoc[1](Arg1: u128)
6LdU128(2)
7Mul
8Lt
9BrFalse(33)
B2:
10Branch(11)
B3:
11MutBorrowLoc[4](loc2: vector<u8>)
12StLoc[3](loc1: &mut vector<u8>)
13LdConst[0](vector<u8>: "012..)
14StLoc[2](loc0: vector<u8>)
15MoveLoc[3](loc1: &mut vector<u8>)
16ImmBorrowLoc[2](loc0: vector<u8>)
17CopyLoc[0](Arg0: u128)
18LdU128(15)
19BitAnd
20CastU64
21VecImmBorrow(6)
22ReadRef
23VecPushBack(6)
24MoveLoc[0](Arg0: u128)
25LdU8(4)
26Shr
27StLoc[0](Arg0: u128)
28MoveLoc[5](loc3: u128)
29LdU128(1)
30Add
31StLoc[5](loc3: u128)
32Branch(4)
B4:
33MoveLoc[0](Arg0: u128)
34LdU128(0)
35Eq
36BrFalse(38)
B5:
37Branch(40)
B6:
38LdU64(1)
39Abort
B7:
40MutBorrowLoc[4](loc2: vector<u8>)
41LdConst[4](vector<u8>: "x0"..)
42Call vector::append<u8>(&mut vector<u8>, vector<u8>)
43MutBorrowLoc[4](loc2: vector<u8>)
44Call vector::reverse<u8>(&mut vector<u8>)
45MoveLoc[4](loc2: vector<u8>)
46Call ascii::string(vector<u8>): String
47Ret
}
 
public bytes_to_hex_string(Arg0: &vector<u8>): String {
L1: loc0: vector<u8>
L2: loc1: &mut vector<u8>
L3: loc2: vector<u8>
L4: loc3: &mut vector<u8>
L5: loc4: vector<u8>
L6: loc5: u8
L7: loc6: u64
L8: loc7: u64
B0:
0CopyLoc[0](Arg0: &vector<u8>)
1VecLen(6)
2StLoc[8](loc7: u64)
3LdConst[5](vector<u8>: "0x"..)
4StLoc[5](loc4: vector<u8>)
5LdU64(0)
6StLoc[7](loc6: u64)
B1:
7CopyLoc[7](loc6: u64)
8CopyLoc[8](loc7: u64)
9Lt
10BrFalse(50)
B2:
11Branch(12)
B3:
12CopyLoc[0](Arg0: &vector<u8>)
13CopyLoc[7](loc6: u64)
14VecImmBorrow(6)
15ReadRef
16StLoc[6](loc5: u8)
17MutBorrowLoc[5](loc4: vector<u8>)
18StLoc[2](loc1: &mut vector<u8>)
19LdConst[0](vector<u8>: "012..)
20StLoc[1](loc0: vector<u8>)
21MoveLoc[2](loc1: &mut vector<u8>)
22ImmBorrowLoc[1](loc0: vector<u8>)
23CopyLoc[6](loc5: u8)
24LdU8(4)
25Shr
26LdU8(15)
27BitAnd
28CastU64
29VecImmBorrow(6)
30ReadRef
31VecPushBack(6)
32MutBorrowLoc[5](loc4: vector<u8>)
33StLoc[4](loc3: &mut vector<u8>)
34LdConst[0](vector<u8>: "012..)
35StLoc[3](loc2: vector<u8>)
36MoveLoc[4](loc3: &mut vector<u8>)
37ImmBorrowLoc[3](loc2: vector<u8>)
38MoveLoc[6](loc5: u8)
39LdU8(15)
40BitAnd
41CastU64
42VecImmBorrow(6)
43ReadRef
44VecPushBack(6)
45MoveLoc[7](loc6: u64)
46LdU64(1)
47Add
48StLoc[7](loc6: u64)
49Branch(7)
B4:
50MoveLoc[0](Arg0: &vector<u8>)
51Pop
52MoveLoc[5](loc4: vector<u8>)
53Call ascii::string(vector<u8>): String
54Ret
}
 
Constants [
0 => vector<u8>: "0123456789abcdef" // interpreted as UTF8 string
1 => u128: 340282366920938463463374607431768211455
2 => vector<u8>: "0" // interpreted as UTF8 string
3 => vector<u8>: "0x00" // interpreted as UTF8 string
4 => vector<u8>: "x0" // interpreted as UTF8 string
5 => vector<u8>: "0x" // interpreted as UTF8 string
]
}