1

I think it would be helpful to be able to add views after deploying a contract. There are many cases where another contract could use storage information that is not originally viewable in the deployed code. Is it feasible or realistic to add this feature?

2 Answers 2

0

There is a possibility of a VIEW_EXEC on all contract in a futur protocol upgrade.

It's not exactly your request: it's not about adding any view, but it would add a default view to all contracts.

You can find discussion about it on Tezos Agora : https://forum.tezosagora.org/t/on-chain-view-patch/4717/10

And ongoing work on it https://gitlab.com/tezos/tezos/-/merge_requests/6597

Ongoing work doesn't tell if and when it would be land but feel free to join discussions and share your use case

1
  • This is what I wanted. Better than what I asked for. Can't wait! My use case is accessing storage on all kinds of contracts. If I understand correctly, this is basically an oracle for all contract storage on chain! This seems like a huge leap forward for composability
    – Chas Smith
    Commented Feb 8, 2023 at 17:54
0

The protocol can be upgraded to do this but I see two drawbacks:

  • the protocol does not remember who originated which contract; usually who originates a given contract should not matter and in some cases the applications are even meant to be decentralized so the originator does not want to be granted any special rights,
  • when a contract is called, its views are fetched from the disk too so a malicious user could increase the gas cost of interacting with a given contract by adding some large views to it.

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.