Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
olga24912 committed Dec 22, 2023
1 parent adf5257 commit 787583d
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions res/mock_eth_connector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ use near_contract_standards::fungible_token::resolver::FungibleTokenResolver;
use near_contract_standards::storage_management::{
StorageBalance, StorageBalanceBounds, StorageManagement,
};
use near_plugins::{
access_control, AccessControlRole, AccessControllable, Pausable,
Upgradable,
};
use near_plugins::{access_control, AccessControlRole, AccessControllable, Pausable, Upgradable};
use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize};
use near_sdk::json_types::U128;
use near_sdk::serde::{Deserialize, Serialize};
use near_sdk::{
assert_one_yocto, env, near_bindgen, AccountId, Balance, PanicOnDefault, Promise, PromiseOrValue,
assert_one_yocto, env, near_bindgen, AccountId, Balance, PanicOnDefault, Promise,
PromiseOrValue,
};
use near_sdk::serde::{Serialize, Deserialize};
use std::str::FromStr;

mod connector;
Expand All @@ -39,19 +37,19 @@ pub enum Role {
UpgradableCodeDeployer,
Owner,
Engine,
DAO
DAO,
}

#[near_bindgen]
#[derive(BorshDeserialize, BorshSerialize, PanicOnDefault, Pausable, Upgradable)]
#[access_control(role_type(Role))]
#[pausable(manager_roles(Role::PauseManager, Role::DAO, Role::Owner))]
#[upgradable(access_control_roles(
code_stagers(Role::UpgradableCodeStager, Role::DAO),
code_deployers(Role::UpgradableCodeDeployer, Role::DAO),
duration_initializers(Role::DAO),
duration_update_stagers(Role::DAO),
duration_update_appliers(Role::DAO),
code_stagers(Role::UpgradableCodeStager, Role::DAO),
code_deployers(Role::UpgradableCodeDeployer, Role::DAO),
duration_initializers(Role::DAO),
duration_update_stagers(Role::DAO),
duration_update_appliers(Role::DAO),
))]
pub struct EthConnectorContract;

Expand All @@ -65,7 +63,7 @@ impl EthConnectorContract {
account_with_access_right: AccountId,
owner_id: AccountId,
) -> Self {
let mut this = Self{};
let mut this = Self {};

this.acl_init_super_admin(env::predecessor_account_id());
this.acl_grant_role("PauseManager".to_string(), env::predecessor_account_id());
Expand All @@ -84,7 +82,9 @@ impl EthConnectorContract {

pub fn set_aurora_engine_account_id(&mut self, new_aurora_engine_account_id: AccountId) {}

pub fn get_aurora_engine_account_id(&self) -> AccountId { env::current_account_id() }
pub fn get_aurora_engine_account_id(&self) -> AccountId {
env::current_account_id()
}
}

#[near_bindgen]
Expand Down

0 comments on commit 787583d

Please sign in to comment.