This is a struct :
`struct FessInfo {
uint256 Amount;
uint256Weight;
uint256 StakedBlock;
uint256 ClaimedBlock;
mapping(uint256 => uint256) epochToUserStakedWeight;
}`
This struct is stored in a mapping:
mapping(address => FessInfo) public userFeesInfo;
Guys is it possible to get the value of epochToUserStakedWeight mapping by querying the userFeesInfo mapping. It's not public, but still, is there any way?
Aug 8, 2023, 12:13 PM
Aug 8, 2023, 12:26 PM
I meant like from outside the contract after the deployment. Using any tool. Sorry for not being clear in the first place.
Aug 8, 2023, 12:32 PM
only with a dedicated function in the contract itself
Aug 8, 2023, 1:18 PM
Yeah, that's what I thought. Thanks 🫡
Aug 8, 2023, 2:06 PM
you can .. by calculating the slot location ,you just need the address and the num values . then you can use cast to read the this slot .
that's how to calculate the slot in your case :
slot = uint(keccak256(abi.encode(,(uint (keccak256(abi.encode(,))) + 4))));
then use cast to read the slot in the contract :
cast storage —rpc-url
slot = uint(keccak256(abi.encode(
then use cast to read the slot in the contract :
cast storage
Aug 8, 2023, 4:24 PM
Hey thanks
yeah my teammate tried the same yesterday, we got it.
yeah my teammate tried the same yesterday, we got it.
Aug 9, 2023, 5:28 AM