diff --git a/contracts/token/fungible/src/fungible.rs b/contracts/token/fungible/src/fungible.rs index 82c23fe..b522230 100644 --- a/contracts/token/fungible/src/fungible.rs +++ b/contracts/token/fungible/src/fungible.rs @@ -178,6 +178,7 @@ pub trait FungibleToken { // ################## ERRORS ################## #[contracterror] +#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] #[repr(u32)] pub enum FungibleTokenError { /// Indicates an error related to the current balance of account from which diff --git a/contracts/utils/pausable/src/pausable.rs b/contracts/utils/pausable/src/pausable.rs index c918127..2eff63d 100644 --- a/contracts/utils/pausable/src/pausable.rs +++ b/contracts/utils/pausable/src/pausable.rs @@ -61,6 +61,7 @@ pub trait Pausable { // ################## ERRORS ################## #[contracterror] +#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] #[repr(u32)] pub enum PausableError { /// The operation failed because the contract is paused. diff --git a/examples/fungible-pausable/src/contract.rs b/examples/fungible-pausable/src/contract.rs index 240d3d2..22eb9e8 100644 --- a/examples/fungible-pausable/src/contract.rs +++ b/examples/fungible-pausable/src/contract.rs @@ -25,6 +25,8 @@ pub const OWNER: Symbol = symbol_short!("OWNER"); pub struct ExampleContract; #[contracterror] +#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] +#[repr(u32)] pub enum ExampleContractError { Unauthorized = 1, } diff --git a/examples/fungible-pausable/src/contract_token_interface.rs b/examples/fungible-pausable/src/contract_token_interface.rs index 5ba978f..12f6d2d 100644 --- a/examples/fungible-pausable/src/contract_token_interface.rs +++ b/examples/fungible-pausable/src/contract_token_interface.rs @@ -25,6 +25,8 @@ pub const OWNER: Symbol = symbol_short!("OWNER"); pub struct ExampleContract; #[contracterror] +#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] +#[repr(u32)] pub enum ExampleContractError { Unauthorized = 1, } diff --git a/examples/pausable/src/contract.rs b/examples/pausable/src/contract.rs index 2301169..51a39ee 100644 --- a/examples/pausable/src/contract.rs +++ b/examples/pausable/src/contract.rs @@ -20,6 +20,8 @@ pub enum DataKey { } #[contracterror] +#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] +#[repr(u32)] pub enum ExampleContractError { Unauthorized = 1, }