Skip to content

Commit

Permalink
Upgrade admin
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Nov 30, 2024
1 parent 36d5f80 commit 26c173b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion contracts/cep85/src/entry_points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn init() -> EntryPoint {
pub fn upgrade() -> EntryPoint {
EntryPoint::new(
ENTRY_POINT_UPGRADE,
vec![Parameter::new(ARG_PACKAGE_HASH, CLType::Key)],
vec![Parameter::new(ARG_CONTRACT_HASH, CLType::Key)],
CLType::Unit,
EntryPointAccess::Public,
EntryPointType::Contract,
Expand Down
2 changes: 2 additions & 0 deletions contracts/cep85/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,8 @@ pub extern "C" fn set_modalities() {

#[no_mangle]
pub extern "C" fn upgrade() {
sec_check(vec![SecurityBadge::Admin]);

put_key(
ARG_CONTRACT_HASH,
get_named_arg_with_user_errors::<Key>(
Expand Down
10 changes: 5 additions & 5 deletions tests/src/utility/installer_request_builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ use cep85_test_contract::constants::{
use std::collections::HashMap;

#[derive(Clone)]
pub struct TestContext {
pub cep85_token: ContractHash,
pub cep85_test_contract: ContractHash,
pub cep85_test_contract_package: ContractPackageHash,
pub test_accounts: HashMap<[u8; 32], AccountHash>,
pub(crate) struct TestContext {
pub(crate) cep85_token: ContractHash,
pub(crate) cep85_test_contract: ContractHash,
pub(crate) cep85_test_contract_package: ContractPackageHash,
pub(crate) test_accounts: HashMap<[u8; 32], AccountHash>,
}

impl Drop for TestContext {
Expand Down

0 comments on commit 26c173b

Please sign in to comment.