Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add Wrappr #302

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 10 additions & 17 deletions components/deploy-dao/Legal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Stack, FieldSet, Input, Text, Button, IconLink } from '@kalidao/reality'
import { Stack, FieldSet, Input, Text, Button, IconLink, Textarea } from '@kalidao/reality'
import { Select } from '@design/Select'
import { Switch } from '@design/Switch'
import { useForm } from 'react-hook-form'
Expand Down Expand Up @@ -75,12 +75,7 @@ export default function Legal({ setStep }: Props) {
options={selectArray}
onChange={(e: React.ChangeEvent<HTMLSelectElement>) => setValue('docType', e.currentTarget.value)}
/>
<Text>
Resources to help with entity selection:{' '}
<a href="https://a16z.com/2022/05/23/dao-legal-frameworks-entity-features-selection/">a16z</a> or{' '}
<a href="https://daos.paradigm.xyz/"> Paradigm</a>
</Text>

{watchDocs && watchDocs !== 'none' && legalEntities[watchDocs]['isJurisdiction'] === true && <Select label="Choose Jurisdiction" defaultValue={state.jurisdiction} options={legalEntities[watchDocs]['jurisdiction']} onChange={(e: React.ChangeEvent<HTMLSelectElement>) => setValue('jurisdiction', e.currentTarget.value)} />}
{watchDocs && watchDocs !== 'none' && legalEntities[watchDocs]['email'] === true && (
<Input
label="Email"
Expand All @@ -103,21 +98,15 @@ export default function Legal({ setStep }: Props) {
/>
)}
{watchDocs && watchDocs !== 'none' && legalEntities[watchDocs]['mission'] === true && (
<Input
<Textarea
label="Mission"
type="text"
placeholder="http://"
placeholder="This DAO seeks to..."
defaultValue={state.mission}
{...register('mission', {
required: {
value: true,
message: `Mission is required for ${legalEntities[watchDocs]['text']}.`,
},
pattern: {
value:
/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/,
message: 'Please enter a valid URL.',
},
})}
error={errors?.mission?.message}
/>
Expand All @@ -133,13 +122,17 @@ export default function Legal({ setStep }: Props) {
)}
{watchDocs && watchDocs !== 'none' && <Text>{legalEntities[watchDocs]['message']}</Text>}
{watchDocs && watchDocs !== 'none' && legalEntities[watchDocs]['template'] !== null && (
<Button as="a" href={legalEntities[watchDocs]['template'] as string} target="_blank" prefix={<IconLink />}>
<Button size="small" variant="secondary" as="a" href={legalEntities[watchDocs]['template'][state.jurisdiction] as string} target="_blank" prefix={<IconLink />}>
Review Template
</Button>
)}
</>
)}

<Text>
Resources to help with entity selection:{' '}
<a href="https://a16z.com/2022/05/23/dao-legal-frameworks-entity-features-selection/">a16z</a> or{' '}
<a href="https://daos.paradigm.xyz/"> Paradigm</a>
</Text>
<Stack direction={'horizontal'} align="center" justify={'flex-end'}>
<Button variant="transparent" onClick={handleSubmit(onPrevious)}>
Previous
Expand Down
1 change: 1 addition & 0 deletions components/deploy-dao/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ declare module 'little-state-machine' {
email: string
mission: string
existingDocs: string
jurisdiction: string
founders: {
member: string
share: string
Expand Down
1 change: 1 addition & 0 deletions components/deploy-dao/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ createStore({
email: '',
mission: '',
existingDocs: '',
jurisdiction: 'del',
founders: [
{
member: '',
Expand Down
92 changes: 40 additions & 52 deletions constants/legalEntities.ts
Original file line number Diff line number Diff line change
@@ -1,72 +1,60 @@
interface Option {
label: string
value: string
}


interface Entity {
text: string
template: string | null
jurisdiction: Option[]
template: { [key: string]: string }
docs: string
email: Boolean
mission: Boolean
email: boolean
mission: boolean
message: string
input?: Boolean
input?: boolean
isJurisdiction?: boolean
}


export const legalEntities: { [key: string]: Entity } = {
series: {
llc: {
text: 'Series LLC',
template: 'https://gateway.pinata.cloud/ipfs/QmUDZw3ALFXcbHvUseyjLeq8AbXDrQwfrwCdgL6XngiNnt',
jurisdiction: [{
label: 'Delaware',
value: 'del',
}, {
label: 'Wyoming',
value: 'wyo',
}],
template: {
'del': 'https://gateway.pinata.cloud/ipfs/QmUDZw3ALFXcbHvUseyjLeq8AbXDrQwfrwCdgL6XngiNnt',
'wyo' : 'https://gateway.pinata.cloud/ipfs/QmUDZw3ALFXcbHvUseyjLeq8AbXDrQwfrwCdgL6XngiNnt'
},
docs: '',
email: true,
mission: false,
message:
'Your series will be formed instantly, but we will follow up to request information we must keep on file for your series.',
isJurisdiction: true,
},
delawareUNA: {
text: 'Delaware UNA',
template: 'https://gateway.pinata.cloud/ipfs/QmSEEcunxFs8oRQbPaoeV2pYBYJihpZUx6QYUsUqc89Gci',
una: {
text: 'UNA',
jurisdiction: [{
label: 'Delaware',
value: 'del',
}, {
label: 'Wyoming',
value: 'wyo',
}],
template: {
'del': 'https://gateway.pinata.cloud/ipfs/QmUDZw3ALFXcbHvUseyjLeq8AbXDrQwfrwCdgL6XngiNnt',
'wyo' : 'https://gateway.pinata.cloud/ipfs/QmUDZw3ALFXcbHvUseyjLeq8AbXDrQwfrwCdgL6XngiNnt'
},
docs: 'UNA',
email: false,
mission: true,
message: 'Your Delaware UNA will be formed instantly.',
},
verein: {
text: 'Swiss Verein',
template: null,
docs: 'none',
email: true,
mission: false,
message: 'We will contact you to provide options for registering a Swiss Verein and the associated costs.',
},
delawareLLC: {
text: 'Delaware LLC',
template: null,
docs: 'none',
email: true,
mission: false,
message:
'It will take around 1-2 weeks to establish a Delaware LLC. We will contact you to provide options for registering a Delaware LLC and the associated costs.',
},
wyomingLLC: {
text: 'Wyoming LLC',
template: null,
docs: 'none',
email: true,
mission: false,
message:
'It will take around 1-2 weeks to establish a Wyoming LLC. We will contact you to provide options for registering a Wyoming LLC and the associated costs.',
},
custom: {
text: 'Custom Entity Type',
template: null,
docs: 'none',
email: true,
mission: false,
message: 'We will contact you to provide options for your desired entity type and the associated costs.',
},
existing: {
text: 'Existing Entity',
template: null,
docs: 'none',
email: false,
mission: false,
input: true,
message: 'The provided document will be linked to your DAO.',
isJurisdiction: true,
},
}