Git Product home page Git Product logo

wearenewt / nonfungibletime Goto Github PK

View Code? Open in Web Editor NEW
43.0 43.0 9.0 7.03 MB

Mint and purchase NFTs representing time for performing freelance services and other use cases. Time NFTs can represent an on-chain attestation of contributions, and a way for organizations to recruit talent for specialized needs.

Home Page: https://aika.market

License: Other

Shell 0.26% JavaScript 0.40% Solidity 18.30% TypeScript 80.33% HTML 0.59% CSS 0.13%
newt nft time web3

nonfungibletime's People

Contributors

0xjim avatar absis avatar defispartan avatar donosonaumczuk avatar foodaka avatar hanahem avatar joaquinbattilana avatar josepbove avatar jsur avatar kevinfields avatar lnmunhoz avatar mrkevinoconnell avatar nemani avatar olzn avatar rootulp avatar roru avatar uleeeeee avatar ybsat 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

Watchers

 avatar  avatar  avatar

nonfungibletime's Issues

Errors renamings

Motivation: Avoid using contractions in names

  • CantBuyYourOwnToken --> CanNotBuyYourOwnToken
  • TokenDoesntExist --> TokenDoesNotExist

setSvgGenerator Event

We'll need an event for the setSvgGenerator function to keep the nft uris up-to-date on the subgraph. Otherwise the new generator will only take affect if a Redeem event triggers a uri refresh.

Add explainer for royalties

When minting a new NFT, the royalty field might be confusing to people. We should add a tooltip to let people know that this a percentage of secondary sales which will be sent to the creator

Display and select availability

Optional date selector for setting the availability window

Update the mint validation logic

Should also handle one sided cases

Mint modal pop up doesn't disappear

telegram-cloud-photo-size-4-6051027338998692851-y

Bug
the popup view does not go away after successful minting and does not reload to the profile page or to the newly minted nft page (on Brave)

Expected behavior
[P0] Modal disappears after user approves transaction on Metamask
[P1] Loading animation then a 'confirmed' animation when the transaction is complete

NonFungibleTime RPC Mode

The subgraph provides a lot of advantages to directly calling smart contracts, especially for the public marketplace, but can be unreliable at times especially on low block-time networks.

It would be a good idea to have a fallback mode which relies only on contract queries. Currently the only way to fetch details for a single NFT is calling the tokens(tokenId) function. To support an RPC mode, view functions would need to be added to fetch aggregated data:

Profile: Return array of token info for all nfts owned or created by a user.

Marketplace: Return array of token info for all tokens. Maybe this should just be disabled in RPC mode and link to Opensea + block explorer link instead? An RPC mode marketplace would be very inefficient because it would be need to be updated in intervals (not real-time) and this view function doesn't scale well with number of NFTs.

Add TRM Labs

What we did at aave(before we moved to ipfs) was a little overkill i guess as you only need to check an api: https://gitlab.com/aave-tech/aave-protocol-v2/aave-api/-/merge_requests/121/diffs#cfc52d8c1aa3a8090df907edcef08d50e385637d_58_56 this was the pr for when i removed it - not sure if that's any help as it's embeded in pretty convoluted code.

Essentially how it works:

you do a call to the trm api https://gitlab.com/aave-tech/aave-protocol-v2/aave-api/-/merge_requests/121/diffs#ce4c406461c08272bb32bd2f12ac68ec5ffbef85_101_0 with an address which will return this type of response

export type TRMScreeningType = {
  address: string; // '149w62rY42aZBox8fGcmqNsXUzSStKeq8C';
  blockchain: string; // 'bitcoin';
  asset: string; // 'BTC';
  riskScore: string; // 'HIGH';
  riskIndicators: RiskIndicatorType[];
  entities: TRMEntityType[];
};

on aave-ui we only checked the "riskScore" which contains values from LOW to SEVERE. When the riskScore was SEVERE we blocked the ui.

as this api wasn't very quick we added a caching on top to only check an address every 24h or so

Method ranaming for the sake of consistency

Motivation: methods in the ERC-721 standard are named as refering to the token itself. For example, mint instead of mintToken, transfer instead of transferToken, etc. Even when some of our custom methods follow that rule, like redeem instead of redeemToken, we have some others that not.

  • buyToken --> buy
  • changeTokenBuyingConditions --> changeBuyingConditions
  • changeTokenRoyaltyReceiver --> changeRoyaltyReceiver

Duration in seconds

For minting contract input and parsing contract data, duration is measured in seconds, not hours

Loading placeholders

Add loading effects to components which fetch subgraph data

Temporarily added in most places where loading is required

Fix Minting Bugs

Certain inputs will lead to a gas estimation error and not let you mint the NFT. Need to figure out what the error cases are and add error messages to the frontend.

NFT Details Page

Inidividual NFT view, from Figma design

Route from Profile or Marketplace

Improve Tx Flow

Use TxResponse object to show submitted, confirmed, etc. when submitting transactions

Wallet Dropdown

After wallet is connected, clicking on the top right icon should bring a dropdown menu with options to disconnect wallet or go to profile page ("/profile")

NFT metadata refresh on subgraph

Refresh metadata in the following events:

  • TokenBuyingConditionsChanged (as it could change the rotation of the newt depending on forSale value)
  • TokenRedeemed (as it should close newt eyes)

Add minter field and trait

  • Minter field in order to be accessible on-chain to build things on top
  • Minter trait in the tokenURI in order to being able to filter by it in third party martketplaces

Support ERC20 Payment Currencies

Currently only base tokens are supported as payment currencies. The contract helper is setup to generate an approval tx, the tx logic on the NftDetails just needs to be updated to trigger the approval before the buy transaction

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.