Questions tagged [msg.sender]
51 questions
2
votes
1 answer
What does msg.sender == tx.origin actually do? Why?
A lot of contracts use require(msg.sender == tx.origin)
What is the purpose of it?
When should you add this code?
What difference does it make if the msg.sender is not a tx.origin? And in which cases are msg.sender and tx.origin not the same…
smenir443
- 125
- 1
- 10
2
votes
1 answer
Who is msg.sender when function calls a function within the same contract?
So yeah, who is the msg.sender if a function calls another function within the same contract?
contract A {
function doSomething() {
do2();
//msg.sender == the user
}
function do2() {
//is msg.sender the user,…
smenir443
- 125
- 1
- 10