Giter Site home page Giter Site logo

cryptowizards-smartcontract's Introduction

CryptoWizards smart-contract

Cryptowizards are digital characters. Different and colorful they can be bought, collected, and auctioned. But ultimately they exist to compete in tournaments for real and virtual prizes. To read more please visit https://wizards.one

Cryptowizards are built on top of EOS blackchain. Current version of smart-contract deplyed at wizardstoken is available here.

Building instruction

eosiocpp -o build/wizards.wast wizContract.cpp
eosiocpp -g build/wizards.abi wizContract.cpp

Your wast file may differ based on parameters set in eosiocpp.

cryptowizards-smartcontract's People

Contributors

opcheese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cryptowizards-smartcontract's Issues

difference from textual battle rules

round.max_attack = getWizOffenceAt(fighter1, genoIndex) * powerCoef;
round.cur_attack = next_rand(round.max_attack + 1);
round.max_defense_opp = getWizDeffenceAt(fighter2, genoIndex);
round.cur_defense_opp = next_rand(round.max_defense_opp + 1);

Here, the actual attack and defense can be 0.
But the DNA battles description said they are both at least 1.
So, which one is the intended behavior, the code or the document?

outdated contract published?

runFightRoundGenotype(fighter1, fighter2, damageGot1, damageGot2, attrIndex1, attrIndex2, curLog);

This does not seem to be the latest version of the contract.
In the published version, the default value for the powerCoef of runFightRoundGenotype is commented out, so this call would not compile.

market should disallow 0.0000 EOS sales

eosio_assert( price.amount >= 0, "must bet positive quantity" );

That >= should be > instead.

When trying to buy, a deal created for 0.0000 EOS fails with the following message:

Error Buying Wizard

Error details:
eosio_assert_message_exception
eosio_assert_message assertion failure
assertion failure with message: must transfer positive quantity

So it would be better to disallow to create such deals in the first place.

buffer size seems wrong

sha256((char *)mixedChar, sizeof(mixedChar), &result);

Why is the size equal to sizeof(mixedChar)?
To me, it looks like the size argument should be the size of uint32_t ar where we point to.
By coincidence, both seem to be 4 bytes, but if I'm right, it's still a dormant bug if something has to change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.