From 6884447180d42a9bcfcce167b016372db9dd282c Mon Sep 17 00:00:00 2001 From: Daniel Bigos Date: Tue, 11 Feb 2025 19:33:33 +0100 Subject: [PATCH] feat: enable export-abi feature --- Cargo.lock | 1 + contracts/Cargo.toml | 2 +- contracts/src/access/control.rs | 5 ++++- lib/crypto/src/merkle.rs | 3 +-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26419f4c8..4fecc0bcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3815,6 +3815,7 @@ dependencies = [ "keccak-const", "lazy_static", "mini-alloc", + "regex", "stylus-proc", ] diff --git a/contracts/Cargo.toml b/contracts/Cargo.toml index c1e219ef6..0ae04fb5d 100644 --- a/contracts/Cargo.toml +++ b/contracts/Cargo.toml @@ -28,7 +28,7 @@ motsu.workspace = true # Currently, the std feature is only used for testing purposes. std = [] reentrant = ["stylus-sdk/reentrant"] -# export-abi = ["stylus-sdk/export-abi"] +export-abi = ["stylus-sdk/export-abi"] [lib] crate-type = ["lib"] diff --git a/contracts/src/access/control.rs b/contracts/src/access/control.rs index abe64a3bd..01197cf65 100644 --- a/contracts/src/access/control.rs +++ b/contracts/src/access/control.rs @@ -252,7 +252,10 @@ impl IAccessControl for AccessControl { self.roles.getter(role).has_role.get(account) } - fn only_role(&self, role: B256) -> Result<(), Self::Error> { + fn only_role( + &self, + role: B256, + ) -> Result<(), ::Error> { self._check_role(role, msg::sender()) } diff --git a/lib/crypto/src/merkle.rs b/lib/crypto/src/merkle.rs index a47cea41c..3c458b8b3 100644 --- a/lib/crypto/src/merkle.rs +++ b/lib/crypto/src/merkle.rs @@ -104,8 +104,7 @@ impl Verifier { /// /// # Panics /// - /// * Will panic with an out-of-bounds error if the proof is malicious. See - /// + /// * Will panic with an out-of-bounds error if the proof is malicious. See /// /// # Examples ///