web3swift icon indicating copy to clipboard operation
web3swift copied to clipboard

ReadOperation handle FIXME

Open albertopeam opened this issue 3 years ago • 6 comments

What context is your feature request related to?

Handle this fixme in ReadOperation. // FIXME: Rewrite this to CodableTransaction

What solution would you like?

Remove the FIXME and provide a long term solution

Any additional context?

  1. Ask @yaroslavyaroslav as he left the FIXME, we need some context about what is his original idea
  2. Then we need some time to provide a solution

albertopeam avatar Jan 22 '23 10:01 albertopeam

@yaroslavyaroslav I would like to understand what is your idea about this FIXME. I will be reading the code and figure out what can I purpose as a solution from my point of view

albertopeam avatar Jan 22 '23 10:01 albertopeam

I have checking and WriteOperation inherits ReadOperation and has a FIXME FIXME: Rewrite this to CodableTransaction. We should apply same/similar strategy

albertopeam avatar Jan 23 '23 21:01 albertopeam

To be honest I don't get the point of moving ReadOperation to CodableTransaction. This Read/Write is highly coupled with the contract itself not a transaction(If I am wrong let me know)

What I can see right now is that it could be nice to:

  1. protocolize ReadOperation and make the implementation internal
  2. protocolize WriteOperation, make the implementation internal and remove inheritance from ReadOperation

Please, provide some insights from your point of view @yaroslavyaroslav :)

albertopeam avatar Jan 23 '23 21:01 albertopeam

@albertopeam it was a self notes that I've made in sake of convenience while developing 3.0.0 so it's all deprecated for now and should be deleted from code.

yaroslavyaroslav avatar Jan 29 '23 07:01 yaroslavyaroslav

ok, then it should be enough to do points 1 and 2? @yaroslavyaroslav

albertopeam avatar Feb 02 '23 07:02 albertopeam

@albertopeam not sure if I've got your last message, but anyway, my point was that the desired solution for those fixme is just to delete them from the code 💁🏻‍♂️. Like it's all done priori 3.0.0 release and was addressed to merging different types of transaction types that library had has back there.

yaroslavyaroslav avatar Feb 02 '23 20:02 yaroslavyaroslav