Skip to content

How to embed logging in a library? #1408

Answered by onbjerg
aathan asked this question in Help
Discussion options

You must be logged in to vote

Somewhat surprising, since the docs would imply msg.sender for calls from the test functions is 0xb4c79daB8f259C7Aee6E5b2Aa729821864227e84

This is not the case, I think you might have confused the sender and the test address. The docs state that the test is at address 0xb4c79daB8f259C7Aee6E5b2Aa729821864227e84, and 0x00a329c0648769a73afac7f9381e08fb43dbea72 is the address that calls the test.

When you call a library function it is usually a delegatecall. I'm not sure what it is for an internal function, maybe a normal call? Anyway, the reason you see a different msg.sender when you mark the function external is because the function is now called via delegatecall, so msg.sender is preser…

Replies: 3 comments 4 replies

Comment options

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

Answer selected by aathan
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@aathan
Comment options

@onbjerg
Comment options

@aathan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants