Giter VIP home page Giter VIP logo

aavegotchi-contracts's People

Contributors

0xceza avatar aarvay avatar cinnabarhorse avatar cleanunicorn avatar colinplatt avatar ernanirst avatar froid1911 avatar hotspurhn avatar infinirekt avatar invokermaster avatar karacurt avatar marcoruggeri avatar mjwatson10 avatar mudgen avatar olahfemi avatar orionstardust avatar pakim249 avatar pakim249cal avatar timidan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aavegotchi-contracts's Issues

Bridging NFTs

Withdrawing Aavegotchis & Portals from Matic

Here is information needed for user interfaces for bridging Aavegotchis and portals:

This is the function to call on the AavegotchiDiamond to lock and withdraw Aavegotchis and portals on Matic Network:
function withdrawAavegotchiBatch(uint256[] calldata _tokenIds) external. Call that contract function on Matic Network.

Get the transaction hash for that transaction.

Call the exitBatchERC721(txHash: string, options?: SendOptions) from maticjs, from their MaticPOSClient class. Note that this function is not in their documentation but it is in their source code. This function gets called on Ethereum on Matic's standard RootChainManger contract.

Withdrawing Aavegotchi Items from Matic

This is the function to call on the AavegotchiDiamond to withdraw Aavegotchis items on Matic Network:
function withdrawItemsBatch(uint256[] calldata _ids, uint256[] calldata _values) external. Call that contract function on Matic Network.

Call the exitBatchERC1155(txHash: string, options?: SendOptions) from maticjs, from their MaticPOSClient class. Note that this function is not in their documentation but it is in their source code. This function gets called on Ethereum on Matic's standard RootChainManger contract.

Add hands class to target all hands

Right now the hand classes do not have a single SVG class to target them all, just individual ones. It's necessary to have a single class that targets all hand positions together so they can be animated up/down alongside the body.

[UPGRADE] useConsumable should take multiple IDs and quantities

Initially I believe we decided to restrict useConsumable to only one item, but to help users save gas it makes more sense to allow multiple items. So let's change it back to taking an array of IDs and quantities.

Let's make this change as an upgrade to the currently deployed AavegotchiDiamond contract: 0xDdC64462aEBA340cBE52E2B64eef20D0B23B5126.

Should we add ghstPrice to raffle wearables?

All of the shop wearables have a ghstPrice field that shows their price in the store. Since raffle wearables were not sold in the store, their price is 0. However, it may be beneficial to assign an estimated GHST price to the raffle wearables, so we can help estimate how much an Aavegotchi is worthy (based on how many wearable it is holding)

Return "locked" status in getAavegotchi

Currently we are not returning whether or not an Aavegotchi is locked in getAavegotchi(). This is necessary information for the frontend UI so we can restrict certain functions while the Aavegotchi is locked.

To do: Return locked as a bool, and if locked=true then return the unlockTime. If not locked, can just return 0 for unlockTime.

Implement ERC721Metadata for Aavegotchi

I think we need to implement the following interface from the ERC721 standard so that services like OpenSea can interact with the Aavegotchi's metadata:

/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
///  Note: the ERC-165 identifier for this interface is 0x5b5e139f.
interface ERC721Metadata /* is ERC721 */ {
    /// @notice A descriptive name for a collection of NFTs in this contract
    function name() external view returns (string _name);

    /// @notice An abbreviated name for NFTs in this contract
    function symbol() external view returns (string _symbol);

    /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
    /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC
    ///  3986. The URI may point to a JSON file that conforms to the "ERC721
    ///  Metadata JSON Schema".
    function tokenURI(uint256 _tokenId) external view returns (string);
}

@cinnabarhorse What should be the baseUri value used by tokenURI? Could be https://aavegotchi.com/metadata/aavegotchis/

The value of name could be Aavegotchi. What should the abbreviated name symbol be? "Gotchi" or "AGotchi" or "AGI"

Lock Aavegotchis when listing

We discussed locking Aavegotchis when they are listed for sale, and unlocking when the listing is removed. This should be implemented before launch.

Change rarity score formula to use 0-99

Currently rarity score is calculated from 0-100. It should actually only be from 0-99.

To fix this, we need to update the traits to only range from 0-99, and then update how BRS is calculated, using the following formula:

x < 50 : 100 - x
x >= 50: x+1

Improve return of numericTraits in portalAavegotchiTraits()

Currently the value of numericTraits is unconverted int256, not an easily-readable array. Perhaps vit would be easier for developers if numericTraits were returned as a uint8 array, not an int256 number (but it can still be stored in memory as the int256)

Handle handLeft and handRight in itemTypes.js

Most hand wearables look fine in both hands, but some (like the REKT sign) only looks good in the left hand. So we should handle left and right hands separately when adding the items.

New DAO function: updateItemType

Some items like XP potions have a fixed quantity to begin with, but could be periodically "refilled" by increasing the maxAmount. This could be a good DAO function.

Possible bug with randomNumber in getAavegotchi()

getAavegotchi() returns the Aavegotchi's randomNumber using

aavegotchiInfo_.randomNumber = s.aavegotchis[_tokenId].randomNumber

but it should probably be:
LibVrf.getBatchRandomNumber(s.aavegotchis[tokenId].batchId) because the random number comes from the batch number now.

Listing not updated after being executed

The quantity in the ERC1155 listing is not being updated after it has been executed. The seller's balance is lowered and the buyer's balanced is increased, but the listing is not updated.

[UPGRADE] Allow interact() to be batched

Currently we can only call interact() for one gotchi at a time. This prevents us from creating "gotchi walker" roles. It would be great if interact() took an array of tokenIds instead of just one.

This can be done as an upgrade on the current deployed Aavegotchi Diamond 0xDdC64462aEBA340cBE52E2B64eef20D0B23B5126 , if possible.

Change Mumbai VRF to 0.001 LINK / call

Right now the portal opening is set to use 1 LINK per call. It would be better if it were set to 0.001 so we would not need to constantly use the faucet.

Move nested hand styles up

In the SvgFacet we are adding some additional styles to show hands down and open. This breaks the styles at the top of the svg tag.

We should render all of the styles before the rest of the SVG is rendered.
image

Add description to itemType

It's worth considering to add a description field to itemType so we can have all of the descriptions of items onchain. This would allow developers to easily replicate a marketplace later. Many NFTs have short onchain metadata.

Allow batch transfer of items from parent in ItemsFacet

Currently the erc1155 method transferFromParent() only implements a single token ID to transfer. Would be nice if it could be extended to implement a batchTransferFromParent() function similar to below. Not urgent though.

  function batchTransferFromParent(
        address _fromContract,
        uint256 _fromTokenId,
        address _to,
        uint256[] _ids,
        uint256[] _values
    ) external

Remove ritual and batching

Since VRF is much cheaper on Matic we can strip out the Ritual and go back to one portal one VRF call. I've already made good progress. Please check the changes.

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.