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

API

base_proof_checker

Module0xec7b…eec7
Move path
0xd219…f1d7::base_proof_checker
Functions
70 public, 0 entry
Structs
1
base_proof_checker

Bytecode136 lines

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

// Move bytecode v6
module d2197b1ce2096e96e726c29fa2c138c5c6748da169b81d34927c522b7499f1d7.base_proof_checker {
use 0000000000000000000000000000000000000000000000000000000000000001::option;
use 0000000000000000000000000000000000000000000000000000000000000002::ed25519;
use 0000000000000000000000000000000000000000000000000000000000000002::table;
use 0000000000000000000000000000000000000000000000000000000000000002::tx_context;
 
struct ProofChecker has store {
active_signer: Option<vector<u8>>,
used_proofs: Table<vector<u8>, vector<u8>>
}
 
public(friend) new(Arg0: &mut TxContext): ProofChecker {
B0:
0Call option::none<vector<u8>>(): Option<vector<u8>>
1MoveLoc[0](Arg0: &mut TxContext)
2Call table::new<vector<u8>, vector<u8>>(&mut TxContext): Table<vector<u8>, vector<u8>>
3Pack[0](ProofChecker)
4Ret
}
 
public(friend) set_active_signer(Arg0: &mut ProofChecker, Arg1: Option<vector<u8>>) {
B0:
0MoveLoc[1](Arg1: Option<vector<u8>>)
1MoveLoc[0](Arg0: &mut ProofChecker)
2MutBorrowField[0](ProofChecker.active_signer: Option<vector<u8>>)
3WriteRef
4Ret
}
 
public(friend) consume_proof(Arg0: &mut ProofChecker, Arg1: vector<u8>, Arg2: vector<u8>) {
B0:
0CopyLoc[0](Arg0: &mut ProofChecker)
1FreezeRef
2CopyLoc[1](Arg1: vector<u8>)
3Call assert_proof_not_used(&ProofChecker, vector<u8>)
4CopyLoc[0](Arg0: &mut ProofChecker)
5FreezeRef
6ImmBorrowLoc[1](Arg1: vector<u8>)
7ImmBorrowLoc[2](Arg2: vector<u8>)
8Call assert_valid_proof(&ProofChecker, &vector<u8>, &vector<u8>)
9MoveLoc[0](Arg0: &mut ProofChecker)
10MoveLoc[1](Arg1: vector<u8>)
11Call mark_proof_as_used(&mut ProofChecker, vector<u8>)
12Ret
}
 
public(friend) borrow_active_signer(Arg0: &ProofChecker): &vector<u8> {
B0:
0CopyLoc[0](Arg0: &ProofChecker)
1ImmBorrowField[0](ProofChecker.active_signer: Option<vector<u8>>)
2Call option::is_some<vector<u8>>(&Option<vector<u8>>): bool
3BrFalse(5)
B1:
4Branch(9)
B2:
5MoveLoc[0](Arg0: &ProofChecker)
6Pop
7LdConst[0](u64: 0)
8Abort
B3:
9MoveLoc[0](Arg0: &ProofChecker)
10ImmBorrowField[0](ProofChecker.active_signer: Option<vector<u8>>)
11Call option::borrow<vector<u8>>(&Option<vector<u8>>): &vector<u8>
12Ret
}
 
public(friend) assert_proof_not_used(Arg0: &ProofChecker, Arg1: vector<u8>) {
B0:
0MoveLoc[0](Arg0: &ProofChecker)
1ImmBorrowField[1](ProofChecker.used_proofs: Table<vector<u8>, vector<u8>>)
2MoveLoc[1](Arg1: vector<u8>)
3Call table::contains<vector<u8>, vector<u8>>(&Table<vector<u8>, vector<u8>>, vector<u8>): bool
4Not
5BrFalse(7)
B1:
6Branch(9)
B2:
7LdConst[1](u64: 1)
8Abort
B3:
9Ret
}
 
mark_proof_as_used(Arg0: &mut ProofChecker, Arg1: vector<u8>) {
B0:
0CopyLoc[0](Arg0: &mut ProofChecker)
1ImmBorrowField[0](ProofChecker.active_signer: Option<vector<u8>>)
2Call option::is_some<vector<u8>>(&Option<vector<u8>>): bool
3BrFalse(5)
B1:
4Branch(9)
B2:
5MoveLoc[0](Arg0: &mut ProofChecker)
6Pop
7LdConst[0](u64: 0)
8Abort
B3:
9CopyLoc[0](Arg0: &mut ProofChecker)
10MutBorrowField[1](ProofChecker.used_proofs: Table<vector<u8>, vector<u8>>)
11MoveLoc[1](Arg1: vector<u8>)
12MoveLoc[0](Arg0: &mut ProofChecker)
13ImmBorrowField[0](ProofChecker.active_signer: Option<vector<u8>>)
14Call option::borrow<vector<u8>>(&Option<vector<u8>>): &vector<u8>
15ReadRef
16Call table::add<vector<u8>, vector<u8>>(&mut Table<vector<u8>, vector<u8>>, vector<u8>, vector<u8>)
17Ret
}
 
assert_valid_proof(Arg0: &ProofChecker, Arg1: &vector<u8>, Arg2: &vector<u8>) {
L3: loc0: &vector<u8>
B0:
0MoveLoc[0](Arg0: &ProofChecker)
1Call borrow_active_signer(&ProofChecker): &vector<u8>
2StLoc[3](loc0: &vector<u8>)
3MoveLoc[1](Arg1: &vector<u8>)
4MoveLoc[3](loc0: &vector<u8>)
5MoveLoc[2](Arg2: &vector<u8>)
6Call ed25519::ed25519_verify(&vector<u8>, &vector<u8>, &vector<u8>): bool
7BrFalse(9)
B1:
8Branch(11)
B2:
9LdConst[2](u64: 2)
10Abort
B3:
11Ret
}
 
Constants [
0 => u64: 0
1 => u64: 1
2 => u64: 2
]
}