Coder Social home page Coder Social logo

tdd-solidity / ethdrop Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 5.0 33.56 MB

Awesome web app & smart contracts for airdropping ether!

Home Page: https://tdd-solidity.github.io/EthDrop/

License: GNU General Public License v3.0

JavaScript 88.07% HTML 0.09% CSS 0.59% Solidity 2.07% TypeScript 6.49% SCSS 2.61% Gherkin 0.08%
blockchain dapp ethereum react solidity tdd tdd-solidity

ethdrop's People

Contributors

ester800 avatar jimlynchcodes 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

Watchers

 avatar  avatar

ethdrop's Issues

Add ci / cd!

It would be awesome if we had automated builds and test runs on pushes and pull requests!

Preferably we could hook into things that are free for over source (such as github actions, circle ci, or travis ci...)

the initial script just needs to run "truffle test" in the root directory and "npm test" in the client directory. ๐Ÿ‘

Add a Footer

The footer can be tricky, talk with Jim on this one.

We want a rectangle that sits at the bottom of the page of the content is smaller than the browser viewport but sits at the bottom of the page content if the content is longer than the viewport height...

In the footer we can just have some centered text that says, "Made with โค๏ธ by EthbuildersNYC devs."

Then aligned right in the footer I think it would be cool to have 3 (5?) image links:

  • a slack icon linking to our slack group
  • a discord icon linking to our discord group
  • a meetup icon linking to our meetup page
  • a twitter icon linking to our twitter page
  • a youtube icon linking to our youtube channel

run tests in ci /cd

I added a blank circleci script file, but it doesn't actually do anything yet...

since we have a "monorepo" (both the smart contracts and javascript in one repo) I guess we just run the "npm test" command for both here!

Bonus: start looking into how to handle deployments from ci pipelines...

Eligible Recipients Icons

In the recipient's table the "Eligible" column has just the word "true" or "false"

Screen Shot 2021-08-14 at 7 13 40 PM

I think it would be fun if these had icons (which maybe display the full word in a tooltip on hover)

  • When a user is eligible and registered: icon: โœ… , tooltip: "Registered"

  • When a user is eligible but not yet registered: icon: ๐ŸŽŸ , tooltip: "Eligible, Not Registered"

  • User has winnings waiting to be claimed: ๐Ÿ’ฐ , tooltip: "Winnings Not Claimed"

  • User has claimed his or her winnings: ๐Ÿ˜Š , tooltip: "Winnings Claimed!"

Possibly also change the column header "Eligible" to something else, maybe "Status"?

Unit Tests For ExecutiveAccessControl

These are arguably the most important-to-be-secured-correctly functions in the whole smart contract!

Have tests that check that functions like "setCOO", "setCFO" work properly and also tests to make sure it reverts when called by not the ceo

Multisig?

Somehow use a multisig wallet for the CEO / doing withdraws from the dev team account?

Make React Stuff TypeScript

It's so nice to explicit see the json shape of input and output data being passed around! ๐Ÿค“

Things to do for this:

  • change .js files to .ts

  • update package.json to build the ts

  • creates files with ts interfaces for things

  • add return types to all functions

  • add return types for all function arguments

NOTE: this could be actually a lot of work to fully complete... feel free to split this into 2 or more PRs of you feel like it. ๐Ÿ‘

Groups Button Should Go To Home Page

With gh-pages, the site is technically not hosted at the root '/' but rather at the 'EthDrop' route after the base domain...

The issue currently is that "Groups" button goes to the 404 page...

Screen Shot 2021-07-31 at 10 58 41 AM

Screen Shot 2021-07-31 at 10 58 49 AM

notice that the url it jumps to is "tdd-solidity.github.io" and not the one it should be, "https://tdd-solidity.github.io/EthDrop/"

Fixing this bug should be as simple as having the button link to "/EthDrop/" rather than "/"

Admins Are Not Recognized As Admins?

Hmm on rinkeby I add myself as an admin, but then it still says "isAdmin" false in the console and doesn't show the admin forms for adding a sponsor and eligible recipients... ๐Ÿค”

Add Test Run Commands For Backend In Package.json

It's nice to be able to just run "npm test" or "npm test:watch" to run the tests and have the project figure out the details.

For this issue, let's add these commands into the package.json file in the project root.

technical notes: probably want to use nodemon for the watch mode aspect...

Find and Correct CVEs!

Bell gave an awesome talk on security. This will probably be an ongoing thing that we need to do rather than a real ticket to be closed, but we definitely should go through some common / high impact vulnerabilities with respect to this dApp!

Small Components!

Look into breaking the two massive page components into smaller components!

Add Name For Admin

Similar to how we have a human readable name for "recipients", it would be awesome to have a human readable name for the admins in the "add admin" form!

Show Loading Spinner for "create group"

Only rinkeby this is slllllllooooooooowwwwwwwww, and the user gets no feedback at all that stuff is happening.

It would be awesome to have some kind of loading spinner (and disable the button) here until there is a response

Redirect to /EthDrop

Because of the way github pages works, we have to deploy at the /EthDrop route.

However, our app default loads up localhost:3000

Let's change this so that whenever users go to the route localhost:3000/ it redirects automatically to localhost:3000/EthDrop

Implement 15k gift limit error

In the USA, you are allowed to gift up to $15k in crypto per year without it being a taxable event.

Source: https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.coinbase.com/learn/tips-and-tutorials/crypto-and-bitcoin-taxes-US&ved=2ahUKEwimnvLI5qfyAhXmQzABHdxID6UQFnoECAQQBQ&usg=AOvVaw1Z_0n4H_dinBwZDYiTjR1j

I think it's safe to assume each address can be considered a "person" (need to get some legal confirmation on this)

So, we need to keep track of how much $USD worth of crypto has been giving from each sender address to each recipient address.

When recipient tries to claim winnings, return a meaningful error message to the user that they have reached the yearly 15k maximum (ain't nobody wants to deal with legal tax headaches, cost basis calcs, etc...).

An error could potentially be shown when the user registers, but this is tricky because the total number of registered recipients in the event, and thus the payout per recipient, is not necessarily known at the time the users registers...

Make things prettier?

What can we do to make things look nicer on the page?

open to any suggestions on design that will make things look prettier, from spacing and padding to sparkle explosions!

Admins x button

Currently it just shows an alert that says "this button does nothing yet..." ๐Ÿ˜…

Screen Shot 2021-07-31 at 12 42 18 PM

Consolidate GET calls

So when I coded out the frontend (and backend) I didn't realize that EVERY call uses up some infura bandwidth, and I ended up hitting the 100k free tier maximum from just myself hitting rinkeby testnet... ๐Ÿ˜…

We can definitely be smarter about having just a single "initial data" call to our smart contract that gives everything for a page (or perhaps "everything this user needs to use the app")

Other things to consider- use "localstorage" to save the state across browser refreshes

                                      - preserve the state as users move between pages rather than making a new call for data each time (possibly integrate redux for this?)

Add Help Button And Add An Empty Help Page

There should be a page where it just explains how everything works...

I'm thinking maybe in white (or blue) navbar area here we could have a button with just a question mark as the text on it.

This would go to a new component, the "HelpPage".

At first this can just be a basic component that renders something like "this is the help page!", and we'll fill it out more later.

Screen Shot 2021-07-31 at 11 41 50 AM

Readable names for admins

I implemented this for eligible recipients- when creating them you add a human readable name and display it in the table... I think this would be nice to have for the list of admins too!

Current admin form (only takes an address)
Screen Shot 2021-07-31 at 12 44 04 PM

Compare this to the nice eligible recipient form with two text inputs:

Screen Shot 2021-07-31 at 12 46 38 PM

Display Nice Error When User Is On The Wrong Network

Currently, when you try to go to EthDrop on some network other than rinkeby it flashes some jarring popups and then seems like it kind of loads and works.

Screen Shot 2021-07-31 at 11 40 37 AM

However, in the console you can see that it can't find the contract.

Notice though if you go to it on mainnet it does actually handle that and show a nice error (although there is still an error in the console...)

Screen Shot 2021-07-31 at 11 39 41 AM

Please take out the alerts too...

Make address hover tooltip show above text, and centered

When hovering over a shortened address in the browser it shows the fully address, but it is positioned pretty wonkily...

Screen Shot 2021-08-01 at 9 21 42 PM

Ideally the tooltip should be above the text, and horizontally centered.

Also, red it kind of a "warning" or "danger" text, to me this doesn't really need to be red. maybe a blue or black would look better?

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.