Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@dorgtech/daocomponents
Advanced tools
Componentizing [DAOstack's client library](https://github.com/daostack/client), enabling easier React application integration. The hope is to be able to turn any app into a DAO enabled dApp by adding ~2 components.
Componentizing DAOstack's client library, enabling easier React application integration. The hope is to be able to turn any app into a DAO enabled dApp by adding ~2 components.
npm i
npm run start
App.tsx
<Arc config={new ArcConfig("web3", "graphql", "graphql-ws")}>
<DAO address="0x...">
<ExampleDAOView />
</DAO>
</Arc>
Now that the DAO component has been added to the root of our application, any component rendered within its tree will have access to this DAO's contexts.
ExampleDAOView.tsx
ExampleDAOView() => (
<DAO.Data>
{(data: DAOData) => (
<>
<div>{"DAO: " + data.name}</div>
<div>{"Token: " + data.tokenName}</div>
</>
)}
</DAO.Data>
)
You can also interact with the Code context (NOTE: not implemented yet):
<DAO.Code>
{(code: DAOCode) => (
<button onClick={async (e) => {
await code.createProposal(...)
}} />
)}
</DAO.Code>
<DAO address="0xMy_DAO">
...
<Member address="0xMy_Address">
...
</Member>
...
</DAO>
VS
<Member address="0xMy_Address" daoAddress="0xMy_DAO">
</Member>
NOTE: Both of these examples work, but one is easier to maintain and reuse throughout your app.
<DAOs>
<div>DAO Details:</div>
<DAO.Data>
{(dao: DAOData) => (
<>
<div>{"Name: " + dao.name}</div>
<div>{"Token: " + dao.tokenName}</div>
</>
)}
</DAO.Data>
</DAOs>
<DAO.Data>
<Member.Data>
{(dao: DAOData, member: MemberData) => (
<>
<div>{dao.address}</div>
<div>{member.address}</div>
</>
)}
</Memeber.Data>
</DAO.Data>
The below example will:
<DAOs>
<DAO.Data>
{(dao: DAOData) => (
<div>{dao.name}</div>
)}
</DAO.Data>
<Members>
<DAO.Code>
<Member.Data>
{(daoCode: DAOCode, member: MemberData) => (
<>
<div>{member.name}<div>
<div>{member.reputation}</div>
<button onClick={async (e) => {
await daoCode.createProposal(..., member.address, ...)
}}>
Propose Reward
</button>
</>
)}
</Member.Data>
</DAO.Code>
</Members>
</DAOs>
TODO: examples of the different supported child types (fn & components)
DAOstack's client library defines an object model where each class instance represents a semantic object within the protocol (ex: DAO, Proposal, Member). These class instances have access to the various contracts they interact with, and the semantic data model stored in a GraphQL server. Going forward, we will call these class instances "Entities".
Each DAOcomponent creates an entity internally, and then exposes it to other components through React Contexts.
For Example: The component <DAO address="0x...">
contains an instance of class DAO
.
Note: ComponentLists break this rule, but will be covered further down.
Each component has 3 core contexts:
In addition to these core contexts, you can also access:
Each part of the component is exposed through a React Contexts. This allows you to use different parts of the component throughout your application, while only defining it once farther up the DOM. See "Example 1" in this document.
For each component type, you can add an s
after its name and it'll become a list of that entity type. For example: DAOs
, Proposals
, Members
. See "Example 3" in this document.
This library aims to:
FAQs
Componentizing [DAOstack's client library](https://github.com/daostack/client), enabling easier React application integration. The hope is to be able to turn any app into a DAO enabled dApp by adding ~2 components.
The npm package @dorgtech/daocomponents receives a total of 9 weekly downloads. As such, @dorgtech/daocomponents popularity was classified as not popular.
We found that @dorgtech/daocomponents demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.