Ad
  • Custom User Avatar
  • Custom User Avatar

    Approved

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    Because of the suggestions below, here is the translation which should upgrade this kata to the newest version and remove restrictions of the older versions: https://www.codewars.com/kumite/6308dcade5ae64004ac017b6?sel=6308dcade5ae64004ac017b6

  • Custom User Avatar

    Really needs to be able to use a much newer compiler. That being said, I got major dopamine release when I solved it.

  • Default User Avatar

    Would be nice to update to a newer sol version, was quite a challenge to make it.
    That being said, thanks for the challenge ;)

  • Custom User Avatar

    I'm surprised to see that kind of katas which are close to real-life are still created now, especially if they are about economics and store politics.

    Of course I like it and hope this will get out of beta, now time to upgrade this with v.0.8.16 :)

    P.S. As far as I understand, contracts are like classes in other languages, am I right?

  • Custom User Avatar

    Can confirm that as of now Kata is fully working. However use of old version of Solidity along with rather poor tests make it not very enjoyable as it was hard to understand whether the tests were broken or the code.

    I also feel like both assert and require should work here. And since only assert works it needs to be specified in description

  • Custom User Avatar

    The buyItem tests are broken. The code related to checking the owner's balance fails (it seems web3.eth.getBalance(owner) is the culprit) and leads to the following error message:

    Error: Invalid JSON RPC response: undefined
        at Object.InvalidResponse (node_modules/web3/lib/web3/errors.js:35:16)
        at HttpProvider.send (node_modules/web3/lib/web3/httpprovider.js:91:22)
        at RequestManager.send (node_modules/web3/lib/web3/requestmanager.js:58:32)
        at Eth.send [as getBalance] (node_modules/web3/lib/web3/method.js:145:58)
        at test/fixture.js:104:52
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
    

    I have commented it out to make the kata completable but either this test should be fixed (unless this is actually a problem with the platform which only the admins might be able to deal with), or the requirement about transfering the money should be removed.

  • Default User Avatar

    If anyone else has the same issues let me know.

  • Custom User Avatar

    The test doesn't check for ''
    If you set the greeting back to '', should it return 'Hello world!' or ''?

  • Default User Avatar
  • Default User Avatar

    Are you switching to solidity ^0.4.13 when moving the contract from local environment to online environment?

  • Default User Avatar

    Can I get some specifics? I'm having trouble understanding the issue. Can you send me more info, like which one of the tests is broken and the error you are getting.

  • Default User Avatar

    The getItem function should not ONLY be accessible by the owner. This function IF used in the real world (Do your own testing on your real world dapp's) would be hypothetically used to send all available items for sale to a potential buyer in a dapp. But really, this function was mainly made for testing purposes. So I don't think there is a need to throw errors or use event handlers. If you feel differently or if I totally misunderstood what you were saying, let me know.

  • Loading more items...