Ad
  • Custom User Avatar

    There is require only for modifier in the comment:

        // TODO: Update this line to require that the owner be the one calling the contract
    

    But there's no require in the comment of sendGift buf only if:

        // TODO: We need to take coins from the account that sent this and gift them to the receiver address
        // only if the account that sent this has sufficient funds
        // If successful we'll broadcast the GiftSent event
    
  • Custom User Avatar
  • Default User Avatar

    Is there some reason I'm missing that constants, reference tables, and the like aren't included in the "Initial Solution" where you can just... see them? At least in go (which is all I've done katas in so far), I've yet to see one do so, and only rarely seen one where the assist data was even correctly identified.

  • Default User Avatar

    eerrrr... x)
    names are short but easy to understand:

    • d = dict
    • i = index
    • r = register
    • v = value
    • cmd = command

    Following blindly indentation/linefeed rules of """best practice""" style is unwise, imo. THIS can make a code completely unreadable while putting inline condition and statements can make the code VERY clear and readable, ands so, easier to follow. I'd even align the first 3 statements with the fourth, to get an even clearer/evident structure ("oh damn, I would use useless whitespaces, this way. That's not recommanded 8o" ).

    This code can be considered BP, yes. Clear, easy to understand, short but not too much. You want to debbug it? Just put a print statement somewhere, you'll have all what you need as variables to follow the state of the code. One letter variables names? yes, not the best way, but honestly, for 9 lines of code, that won't be a problem.

    There are the rules, and there are things on the field that actually makes the code "play nicely".

    Sorry for being so much sarcastic, but... yes, stumbbling from my bed, I almost hurt my head reading this... ;)

    Well, cheers and have a good day. ;)

  • Custom User Avatar

    The user who wrote the Rust translation appears to have deleted their account. I've removed the Rust translation.

  • Default User Avatar
  • Custom User Avatar
  • Custom User Avatar

    This has failed tests and apparently is not published yet. Can you check and see what is wrong?

  • Custom User Avatar

    Hi Keozon. I confess I've been practically absent in the past year :(, but I still read my mails.
    If you decide to translate this kata in Rust, I'll be glad to aprove it. I have no experience in Rust, but I think I'll be able to read it anyway.

  • Default User Avatar

    Ok. Thanks for the explanation.
    Approved. Good job.
    Maybe I will add an hint in the submit tests with that link to the github issue.

  • Default User Avatar

    Thanks for doing the Rust Translation! :-=
    But the random tests are missing.
    Please add them, and then I will check again and approve it.