diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 1a3c854..963b296 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -109,6 +109,19 @@ impl module_evm::Config for Config { const CONFIDENTIAL: bool = true; } +#[allow(clippy::declare_interior_mutable_const)] +impl modules::access::Config for Config { + const METHOD_AUTHORIZATIONS: Lazy = Lazy::new(|| { + modules::access::types::Authorization::with_filtered_methods([( + "evm.Create", + modules::access::types::MethodAuthorization::allow_from([Address::from_bech32( + "oasis1qryqqccycvckcxp453tflalujvlf78xymcdqw4vz", + ) + .unwrap()]), + )]) + }); +} + /// The EVM ParaTime. pub struct Runtime; @@ -142,6 +155,8 @@ impl sdk::Runtime for Runtime { modules::consensus_accounts::Module, // EVM. module_evm::Module, + // Access control module. + modules::access::Module, ); fn trusted_signers() -> Option { @@ -284,6 +299,7 @@ impl sdk::Runtime for Runtime { gas_costs: module_evm::GasCosts {}, }, }, + (), // Access module. ) }