proposals.rs 535 B

123456789101112131415161718
  1. //! Contains executable proposal extrinsic mocks
  2. use rstd::prelude::*;
  3. use rstd::vec::Vec;
  4. use srml_support::decl_module;
  5. pub trait Trait: system::Trait {}
  6. decl_module! {
  7. pub struct Module<T: Trait> for enum Call where origin: T::Origin {
  8. /// Working extrinsic test
  9. pub fn dummy_proposal(_origin, _title: Vec<u8>, _description: Vec<u8>) {}
  10. /// Broken extrinsic test
  11. pub fn faulty_proposal(_origin, _title: Vec<u8>, _description: Vec<u8>,) {
  12. Err("ExecutionFailed")?
  13. }
  14. }
  15. }