I'm trying to execute an ERC721 "ownerOf" function through the Gnosis Safe interfacefunction ownerOf(uint256 tokenId) public view returns (address). When I use the Gnosis interface it works fine and I am returned the address of the owner.

But when I use the "Custom Data (hex encoded)" option, pass in custom data to do the exact same thing and execute the transaction (which costs gas) , I see the transaction in my history and on Etherscan but don't see the result anywhere. Is there anyway to execute a raw transaction and get the results for who the owner of the NFT is?

1 Answer 1


view functions on contract are meant to retrieve information. The Safe interface makes this possible and allows you to see the returned information. Solidity does not allow state changes in view functions (see Solidity docs)

Transactions are meant to perform state changes on the blockchain (e.g. transfer ownership). Additionally transactions do not have a return value (only a success flag).

Therefore invoking a view functions via a transaction does not really make sense and just burns gas.

Consensys has a blog post how to use view functions and events in smart contracts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.