Great questions! This Secret Auctions post demonstrates how you can write secret auction smart contracts, but in order to assign the callable/callback functions and execute the tasks, there needs to be a JS portion (not presented in this guide at the moment, sorry for any confusion!). I encourage you to look at the recent Getting Started Guide (https://blog.enigma.co/getting-started-with-the-enigma-protocol-a-complete-developers-guide-170b7dfa5c0f) as a precursor to the secret auctions post you are referencing here as it should make things a lot clearer!
Regarding the first question:
Nothing in the secret contract itself assigns these two functions as the
callback functions per se, those are assigned from the front end/JS side. However, I just want to point out some notable features of these functions that make them interesting compared to some of the other functions in the contract. The
callable function is a
pure function, since it never reads or writes to contract state, only from the arguments passed to it. The
callback function has the
onlyEnigma modifier specified and will modify contract state. Take special note of the relationship between the two, where the output arguments of the
callable directly map to the input arguments for the
callback. While the signatures of these functions are unique in the contract, these functions are only “assigned” as the
callback functions from the JS side. The Getting Started Guide, in particular this gist (https://gist.github.com/apalepu23/b6f7623c2136bbb9461c69a4f731e060#file-millionairesproblemwrapper-js), demonstrates how you can actually specify these contract functions as the
callback (lines 9-10).
Regarding the second question:
Once again, the secret contract code itself doesn’t include the submission of the task, but that is achieved via the JS code you write to complement your secret contracts. The Getting Started Guide, or more specifically lines 68-109 of the same gist from above demonstrates how you call the enigma task, using the
callable functions you’ve specified above.
Hope this helps, happy to clarify things any further if need be