useDApp
useDApp copied to clipboard
Ability to request a signer for a useCall function
I know this may sound a bit weird, but given we can't specify the signer when initializing a new contract as a param to the useCall func (unless i am miss understanding something), having an optional param would be useful for my use case whereby the signer is required
const result = useCall({
contract,
method: 'getUserInfo',
args: [user]
}, {refresh: 'everyBlock', useSigner: true})
@VinHylme Why do you need it? Do you use msg.sender in your view functions?
@rzadp working with a company and that's what the solidity dev did and as a result im having to find ways to get around it :/
@VinHylme Sure, just wanted to clarify the use case.
I'm afraid that might not be possible, because all our calls go through a Multicall contract - so effectively the Multicall contract address is the sender. But we will brainstorm if it's possible to work around this and make your use case possible.
@rzadp thank you sir