Skip to content

Need a DAO?

Not sure what a DAO is? Let’s dig in to find out

https://github.com/drasticstatic/dao

🖥️ Scroll ⬅️ ➡️through some screenshots: 👇

📱 Mobile Ready: 👇

+video tutorial in the making!

So… What Is a DAO? – Exploring the Future of Digital Collaboration

A DAO, or Decentralized Autonomous Organization, is a new kind of structure for collective decision-making on the internet. Rather than relying on traditional hierarchies or centralized control, DAOs operate through code, community, and consensus.

At a Glance:

  • Rules Are Code: Smart contracts automate how decisions are made and enforced.
  • Power Is Distributed: Stakeholders shape outcomes through proposals and votes.
  • Transparency Is Built-In: Activities and resources are visible to all members.
  • Open by Design: DAOs welcome participants across borders, time zones, and backgrounds.

Why It Matters:

DAOs aren’t just reshaping how we govern projects—they’re reimagining how we come together, build trust, and take shared action in a digital world. For those seeking more democratic, transparent, and resilient ways to collaborate, DAOs offer an evolving framework grounded in openness and accountability.

Whether used to coordinate ideas, fund innovation, or steward shared resources, DAOs invite us to co-create systems that are as inclusive and adaptive as the communities behind them.

They may not be the only path forward—but for those willing to experiment with new models of belonging and governance, DAOs could be an option for how we get there.

Check out this short clip from CEX.IO:

Interested in adding modals to your UI?

Standard alerts and console logs? 😅 Help your user enjoy their experience with Modals!

https://github.com/drasticstatic/crowdsale/blob/main/README_Modals.md

Creating a Token Crowdsale

Check out GitHub notes for details:

https://github.com/drasticstatic/crowdsale

What about darkMode?🌙 😁 + a few other UI changes 👀🤪

Where we started: 😅

Video Demonstration:

(in-progress)

Understanding React Props

For more details see:

https://github.com/drasticstatic/crowdsale/blob/main/README_react-props-guide.md

https://github.com/drasticstatic/crowdsale/blob/main/src/components/_w_notes/Progress_w_notes.js

https://github.com/drasticstatic/crowdsale/blob/main/src/components/_w_notes/Info_w_notes.js

What is a Prop?

In React, a “prop” (short for “property”) is a way to send/pass data/values from a parent component to a child component.

  • Think of props like arguments to a function
  • Props are read-only data that can’t be modified by the receiving component
  • Props can be any JavaScript data type (strings, numbers, objects, functions)

How Props Work:

// Parent component passes values to child
<Progress maxTokens={1000000} tokensSold={250000} />

// Child component receives these values
const Progress = ({ maxTokens, tokensSold }) => {
    // ...component code
}

// The child can then use these values
<p>{tokensSold} / {maxTokens} Tokens sold</p>

Real-World Examples:

===‘PROGRESS’ Component===

     The Progress component is a great example of how props can be used to make components reusable and focused

     In the Progress.js component:

  • maxTokens and tokensSold are props that allow the component to calculate and display the progress percentage without needing to know where that data came from
  • By passing maxTokens and tokensSold as props, the parent component can handle/control the data and where it comes from, while the Progress component can focus solely on its specific job (rendering the progress bar/(showing progress)
// How the Progress component is used
<Progress maxTokens={1000000} tokensSold={250000} />

     Visual Example:

  • The Progress component above would render a progress bar showing 25% completion, with the text “250000 / 1000000 Tokens sold” displayed below it – like this: <div style=“width:100%; background:#eee; border-radius:5px;”> <div style=“width:25%; background:#007bff; height:20px; border-radius:5px;”> <span style=“padding:0 10px; color:white;”>25%</span> </div> </div> <p style=“text-align:center;”>250000 / 1000000 Tokens sold</p>         

This visual example shows correctly in VScode’s .md preview but not on GitHub

Added Emoji-based representation to .md for reference:

    🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦⬜⬜⬜⬜⬜⬜⬜ 25%

===‘INFO’ Component===

     In the Info.js component:

  • account and accountBalance are props that display the user’s Ethereum address and token balance
  • The component simply presents this data without needing to know how to connect to the blockchain
// How the Info component is defined
const Info = ({ account, accountBalance }) => {
    return (
        <div className="my-3">
            <p><strong>Account:</strong> {account}</p>
            <p><strong>Tokens Owned:</strong> {accountBalance}</p>
        </div>
    );
}

// How the Info component is used
<Info account="0x71C7656EC7ab88b098defB751B7401B5f6d8976F" accountBalance={42} />

This pattern of passing data through props allows React components to be:

  1. Reusable – the same component can display different data

    • Note: how the Progress component can be used in different contexts with varying data
  2. Focused – each component handles one specific job

    • Note: how the Progress component only handles the display logic for the progress bar
  3. Maintainable – changes to data handling don’t require changes to display components

    • Note: how changes to the data source don’t require modifications to the Progress component

Adding Notes to .json files

For more details see:

https://github.com/drasticstatic/crowdsale/blob/main/README_config.json.md

https://github.com/drasticstatic/crowdsale/blob/main/src/config.json

JSON (JavaScript Object Notation) doesn’t officially support comments Here are the recommended approaches for adding notes to JSON files:

1. Use Documentation Fields

     Add special fields with underscore prefixes to hold documentation:

{
  "_comment": "Configuration for the crowdsale application",
  "_version": "1.0",
  "tokenAddress": "0x...",
  "crowdsaleAddress": "0x..."
}

2. Create External Documentation (This File)

     Keep a separate markdown file (like this one) that documents your JSON structure

3. Use Description Fields

     Include description fields as part of your data structure:

{
  "tokenAddress": {
    "value": "0x...",
    "description": "The deployed token contract address"
  },
  "crowdsaleAddress": {
    "value": "0x...",
    "description": "The deployed crowdsale contract address"
  }
}

4. JSON Schema

     Create a separate JSON Schema file that documents and validates your configuration:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Crowdsale Configuration",
  "description": "Configuration settings for the crowdsale application",
  "type": "object",
  "properties": {
    "tokenAddress": {
      "type": "string",
      "description": "The deployed token contract address",
      "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "crowdsaleAddress": {
      "type": "string",
      "description": "The deployed crowdsale contract address",
      "pattern": "^0x[a-fA-F0-9]{40}$"
    }
  },
  "required": ["tokenAddress", "crowdsaleAddress"]
}

     Benefits of JSON Schema:

  • Provides documentation for each field
  • Validates that your config file is correctly formatted
  • Many IDEs support JSON Schema for autocompletion and validation
  • Can be used to generate documentation automatically

5. For Development Only: JSON5

     During development, you can use JSON5 format which supports comments:

{
  // This is the token contract address
  "tokenAddress": "0x...",
  
  // This is the crowdsale contract address
  "crowdsaleAddress": "0x..."
}

     Note: JSON5 requires a special parser and isn’t standard JSON

Best Practices

  1. Keep comments concise and relevant
  2. Update documentation when changing the JSON file
  3. For configuration files used by applications, prefer the “_comment” approach
  4. For API responses or data exchange, keep the JSON clean without comment fields
  5. Consider using JSON Schema for complex configuration files that need validation

SolFaucet🚰 – the easiest way to get started building on Solana!

Just got some test $SOL

🚰

from https://solfaucet.com

Hello world!

This is my very first post on WordPress.com!

Happy blogging!

Design a site like this with WordPress.com
Get started