Coder Social home page Coder Social logo

strategy-game's Issues

AURToken - Method to add new planets

We should have a function that can add new Planet contract addresses to the minters array.

I believe this could be something that AURGov could handle, but I'm not sure how that would be structured. At a minimum, the AURToken contract should have a method to add new Planets.

AvatarAUR - Need event for Mint

We need an event in the Avatar contract for Mint so the client knows if the user has minted a new Avatar.

    event Minted(address _userAddress, uint256 dna, uint256 aid);
    ...


    function _birthAvatar(
        string memory _name,
        uint256 _id,
        uint256 _userDNA
    ) private {
        uint256 dna = _mkDNA(_name, _userDNA);
        uint256 aid = storeAvatar(_name, dna);
        TokenIDtoAvID[_id] = aid;
        //return dna; could return DNA to put in description, but parsing numbers to string is a little dumb i think


       // please emit the event within the birthing method as to pass the DNA and Aid
        emit Minted(msg.sender, dna, aid);
    }

AURGov / Planet - Planets do not have a name

There is no way to determine which Planets are wich with a simple array of addresses and there is no planetName on the planet contract.

Calling the getPlanets method does not provide the planet name which makes it very difficult if not impossible to use because you cannot know the name of the planet address you received.

  1. required in Planet.sol:
    Allow the Planet to have a name.

string planetName;
constructor(string _planetName ...)

  1. Required in AURGov.sol
    Need to map the Planet name to planet Contract address.
    mapping(string => address ) Planets

{ 'VENUS': '0xad0d3bea877d25d766ADdB1cE2da3256A3D3fD65' }
setPlanet(string _planetName, address contractAddress) returns (Planet)
getPlanet(string _planetName) returns (Planet)

AURToken - Owner can Mint Tokens

I was just looking over the AURToken contract and the deployment owner address is able to mint or burn tokens. This seems to be problematic.

Source
mintInternal

Perhaps minting and burning can only happen via AURGov according to vote, or only Planets can mint new tokens during gameplay. [owners must not be able to call the mint function from the planet contracts, too]

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.