Skip to content

Commit 187f0e9

Browse files
feat(sui-lazer): add admin-gated entry to update trusted signer via AdminCapability
Co-Authored-By: Tejas Badadare <[email protected]>
1 parent e64eb21 commit 187f0e9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lazer/contracts/sui/sources/pyth_lazer.move

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ const PAYLOAD_MAGIC: u32 = 2479346549;
2222
/// Initializes the module. Called at publish time.
2323
/// Creates and shares the singular State object.
2424
/// Creates the singular AdminCapability and transfers it to the deployer.
25+
public entry fun admin_update_trusted_signer(
26+
cap: admin::AdminCapability,
27+
s: &mut state::State,
28+
pubkey: vector<u8>,
29+
expires_at: u64,
30+
ctx: &mut TxContext,
31+
) {
32+
state::update_trusted_signer(&cap, s, pubkey, expires_at);
33+
transfer::public_transfer(cap, tx_context::sender(ctx));
34+
}
35+
2536
fun init(ctx: &mut TxContext) {
2637
let s = state::new(ctx);
2738
transfer::public_share_object(s);

0 commit comments

Comments
 (0)