-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thoughts for a generic service #1
Comments
I have not tested it btw ) |
Thanks for this @juanfranblanco!!!! Very nice separation of "proxying" and "purpose" (which in this case is token transfer) - I understand better now the details you were explaining to me via DM. :) I've implemented this and tested it so overall it works fine - Just did some minor adjustments:
Two things I noticed while doing the implementation and would like to know more:
A few more evaluation lines to add in and I'll get the refactored version uploaded later in the morning, then continue producing the sample. Thanks again Juan! Much appreciated. Sorry for taking so long though - Decided to torture myself by hand-converting it to VB. :D |
Great @Enigmatic331 and thanks to you :) On the errors: Did I mention I did not test it ;) ? So I totally agree with GetDelegatedFunctionSignature and AbiEncodedPacked. What a muppet, in both. Hence I love integration testing https://twitter.com/richcampbell/status/1139548144390352897, although unit testing would have helped too on the Abi stuff. On the MapDelegatedFunctionToSignedFunction/MapSignedFunctionToDelegatedSignedFunction: The idea of having an abstract class is to allow for any delegated signature, so you could have any "SignedXXXFunction" or "DelegatedXXXFunction" and reuse the logic. The way I see it working is that users (higher level developers) may only interact with the XXXFunction and have an intermediary service (another one) that can retrieve or have configured, the fees approved, contract address, nonce, etc. |
Sorry about the Vb.Net I am the other way around.. you can use http://converter.telerik.com/ it is very helpful (I think we have already talked about it in the past). I would love to have an F# version although completely different beast. |
Thanks Juan. :) I've pushed the commit at: 6784289 Could I trouble you to have a look please to see if the implementation makes sense (i.e. if I've used the DelegatedSignerService as intended)?
Oh no please don't apologise. Yea we had the conversation before and Telerik did help me on bits and parts of the snippet, very helpful recommendation. :) Next up will be updating the readme with implementation notes. |
@Enigmatic331
These are some thoughts for a generic service, with some small refactoring of your implementation.
The main idea is to:
Parameter attributes cannot be put here (or create a base class) as we don't know how many extra parameters we will have. Another option will be to use a struct matching the message if using Solidity V2 in future versions, which will be far much easier when doing mappings
Then a generic service can be put in place as follows.
The text was updated successfully, but these errors were encountered: