Skip to content

Commit

Permalink
Update engine/src/contract_methods/admin.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Birch <michael.birch@aurora.dev>
  • Loading branch information
aleksuss and birchmd authored Oct 11, 2023
1 parent e0a6e78 commit 227efc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engine/src/contract_methods/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,9 @@ pub fn attach_full_access_key<I: IO + Copy, E: Env, H: PromiseHandler>(
target_account_id: current_account_id,
actions: vec![action],
};
// SAFETY: This action is dangerous because it adds a new full access key (FAK) to the Engine account.
// However, it is safe to do so here because of the `require_owner_only` check above; only the
// (trusted) owner account can add a new FAK.
let promise_id = unsafe { handler.promise_create_batch(&promise) };

handler.promise_return(promise_id);
Expand Down

0 comments on commit 227efc1

Please sign in to comment.