slavingia / fweb3.xyz Goto Github PK
View Code? Open in Web Editor NEWHome Page: fweb3.vercel.app
Home Page: fweb3.vercel.app
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());
}
}
New NFT sent to winners of Fweb3 2022.
For now, judges would manually verify and then reply on Discord, telling them to call win()
themselves.
Right now it blends the results from querying metamask with the results for different wallet from polygonscan.
Why: so that the lighting is more realistic going upwards
Animation?
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>
Based on initial reports, it's not activating for users who use the faucet website. It works for people who use the contract directly.
One idea is to check for the emitted event.
https://polygonscan.com/address/0x67806adca0fD8825DA9cddc69b9bA8837A64874b#events
So it looks more "official" and so that the tweets are all viewable by the tag.
@slavingia
Add some basic UI tests using the wallet query param feature.
The locators need to be updated, preferably using data attributes.
To run the tests:
npm run dev
npm run e2e
cc @epan
example https://fweb3.xyz/?wallet=0x2A9d8CfD86796E6A68AF9c83FD90F67CcaF1352c
(make sure you're not logged in with your own metamask. the number of fweb on the top right isn't accurate anymore either)
https://fweb3.xyz/?wallet=0x510d1bd177E1f6062317E377F0A9CEBe91BC8FBb
It should be easy to tell in the users page if they are seeking verification, verified or a winner. Something simple near the top would be helpful.
It could include:
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.
Fix by showing a notice to switch to Polygon?
Store state in local storage
Default to first dot/copy, show/hide a specific section per dot that can have more text, buttons, etc
This would mock the responses from polygonscan. The simpler the better.
Simple idea:
mock_data
, default to falseThis could be used for testing and dev without needing to hit the real polygonscan api.
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.
On the right, we can have a couple paragraphs for each. We should allow clicking and persisting that state.
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)
This often results in the page not loading all the dots correctly. The fifth dot (minted an nft) is the usual symptom.
I'm working on a simple fix in the validation logic for dot 4 that will check that the "from" address in the transaction is the user's wallet address.
E.g. fweb3.xyz/?wallet=asdifasdf98as9df9sdf
For easy sharing and (to be honest, mostly) testing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.