pytezos icon indicating copy to clipboard operation
pytezos copied to clipboard

View name collision token_metadata

Open ziwot opened this issue 3 years ago • 2 comments

This is really an edge case, but

having a view named "token_metadata" make a contract unreadable, crashing with a View name collision token_metadata error

made a simple reproduction there: https://github.com/der-alter/exp-collision

ziwot avatar Jul 24 '22 10:07 ziwot

I'm running into this issue as well with https://packages.ligolang.org/package/ligo-generic-fa2.1 where the collision happens on balance_of, with latest release of PyTezos.

I think a fix would be to not make views accessible from the ContractInterface itself, since they're already available from the .views dict. I can give it a try if that works for you?

aguillon avatar Jun 27 '23 15:06 aguillon

My bad, .views has objects of the ViewSection class. I'll change the name in the Ligo library, but changing the behaviour from PyTezos might be nice as well.

aguillon avatar Jul 02 '23 17:07 aguillon