Giter VIP home page Giter VIP logo

fweb3.xyz's People

Contributors

archae0pteryx avatar bernardlim avatar brianismeta avatar dependabot[bot] avatar epan avatar jester7 avatar marcbacodes avatar richychn avatar samwb63 avatar sharang-d avatar shubham-singh avatar slavingia avatar slinlee avatar sumitjadhwani 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fweb3.xyz's Issues

Verify smart contract

Smart contract address: 0x95cd50f9d591630db85d95c932bbc704dc0ae92a

Smart contract code:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol";
import "@openzeppelin/[email protected]/token/ERC20/extensions/ERC20Burnable.sol";

contract Fweb3 is ERC20, ERC20Burnable {
    constructor() ERC20("Fweb3", "FWEB3") {
        _mint(msg.sender, 10000000 * 10 ** decimals());
    }
}

Have #finish-line show events from Game

  • #finish-line lists out people's verification requests (by listening to events emitted ^).

For now, judges would manually verify and then reply on Discord, telling them to call win() themselves.

Fix background color of diamond NFT

Our BG color function is:

  function getBackgroundColor(uint256 tokenId) public pure returns (string memory) {
    uint256 rand = random(string(abi.encodePacked(toString(tokenId))));
    bytes32 val = bytes32(rand);
    bytes memory hx = "0123456789ABCDEF";
    bytes memory str = new bytes(51);

    for (uint i = 17; i < 20; i++) {
      str[i*2] = hx[uint(uint8(val[i + 12] >> 4))];
      str[1+i*2] = hx[uint(uint8(val[i + 12] & 0x0f))];
    }

    return string(str);
  }

Currently spitting out:

<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 512 512"><rect width="100%" height="100%" fill="#����������������������������������000001�����������"><polygon style="fill:hsl(6,26%,79%);" points="256,499.47 512,146.167 414.217,12.53 97.784,12.53 0.001,146.167 "/><g><polygon style="fill:hsl(6,26%,82%);" points="97.786,12.53 170.663,146.172 0,146.172"/><polygon style="fill:hsl(6,26%,82%);" points="414.217,12.53 341.327,146.172 255.995,12.53"/><polygon style="fill:hsl(6,26%,82%);" points="341.327,146.172 255.995,499.467 170.663,146.172"/></g><g><polygon style="fill:hsl(6,26%,94%);" points="414.217,12.53 511.99,146.172 341.327,146.172"/><polygon style="fill:hsl(6,26%,94%);" points="255.995,12.53 341.327,146.172 170.663,146.172"/><polygon style="fill:hsl(6,26%,94%);" points="170.663,146.172 255.995,499.467 0,146.172"/></g></svg>
  • Deploy new smart contract and update code

Create issues for 3 remaining dots

  1. Ship your own ERC-20 token to Polygon
  2. Swap tokens for another ($USDC or $MATIC?) on Uniswap on Polygon
  3. Vote in a on-chain governance thing with your tokens.

Fix auto tests for walkthrough

The locators need to be updated, preferably using data attributes.

To run the tests:

  • run npm run dev
  • in a separate terminal run npm run e2e
  • click 'run all tests`

cc @epan

Profile pages

It could include:

Add message to explain what connecting the wallet does on main site

From Vinyl, Mecha Penguin creator after using the website:

I'd like to see how the contract interacts with my wallet, taking in consideration all the phishing and things that have been going on

Is there a way we can give a notice to folks to let them know why we’re asking for a connection? Or maybe make it optional if you are okay giving your own address.

5th dot: Mint NFT

  • Design of NFT
  • Write smart contract: #38
  • Deploy smart contract
  • Light up 5th dot upon minting of diamond NFT
  • Fix SVG background color

Add a dev/offline debug mode

This would mock the responses from polygonscan. The simpler the better.

Simple idea:

  • add var in .env.local mock_data, default to false
  • when true, replace the requests in polygon.ts with a hardcoded object with realistic data.

This could be used for testing and dev without needing to hit the real polygonscan api.

Optimize Polygonscan API calls to avoid rate limit

Rewrite code so that this stops happening:

Our internal polygon.js API appears to be invoked twice on page load - the first time without a wallet address defined, and a second time once the address is defined. Perhaps there is a way to invoke only once the wallet address is defined, sparing the first (wasted) calls.

If this isn't good enough, we can reach out to see if we can get a much higher rate limit. Their current plans don't really align with what we need IMO.

Hitting rate limit on polygonscan

The calls are made from pages/api/polygon.ts

For the 9 dots, there are multiple calls made: (in the order they are in the source code right now)

  1. tokenBalance - token balance
  2. txList - used faucet, deployed contract, voted
  3. txListInternal - has used faucet (whoops, this is in here twice?), swapped token
  4. tokentx (for erc20 token transactions) - has sent tokens, has burned tokens
  5. tokennfttx (for nft transactions) - has minted nft

This often results in the page not loading all the dots correctly. The fifth dot (minted an nft) is the usual symptom.

Wallet permalink pages

E.g. fweb3.xyz/?wallet=asdifasdf98as9df9sdf

For easy sharing and (to be honest, mostly) testing

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.