Skip to content

Why is "msg_sender()" a Result? #3430

Answered by otrho
PaulRBerg asked this question in Q&A
Discussion options

You must be logged in to vote

You can see here in the standard libarary where msg_sender() is implemented: https://github.com/FuelLabs/sway/blob/master/sway-lib-std/src/auth.sw#L34-L89

It can return AuthError::InputsNotAllOwnedBySameAddress if the caller is external. I'm not an application dev so I can't elaborate more on the full semantics there, but it should make sense?

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@PaulRBerg
Comment options

Answer selected by PaulRBerg
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants