How to use origin value in substrate pallet

Viewed 310

The ensure_signed function of pallets/template/lib.rs contains a parameter named origin of type OrginFor<>. I have been looking inside various projects and all I see is doing ensure_signed(origin)?.

My question is how actually should I get something like public key or wallet address from that origin value. I believe something must be inside Signed(AccountId) variant. But in test files of several examples and tutorials all i see is they simply pass Origin::Signed(1). What am I supposed to do with that 1?

I am pretty starting out in these blockchain things so any kind of knowledge is highly appreciated

0 Answers
Related