I need to understand how is it possible to access the calling contract storage from library code. From Solidity manual:
This means that if library functions are called, their code is executed in the context of the calling contract, i.e. this points to the calling contract, and especially the storage from the calling contract can be accessed.
So I'm trying to compile this simple test library:
library Test_Lib {
function test_function()
public
returns (bool)
{
return (this.owner.send(this.balance));
}
}
But I get the following error:
Error: Member "owner" not found or not visible after argument-dependent lookup in library Test_Lib
Where am I wrong?
Thanks!