Skip to content

Commit 3695eba

Browse files
authored
Merge 1d4cc31 into 40062bb
2 parents 40062bb + 1d4cc31 commit 3695eba

File tree

125 files changed

+7248
-1130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+7248
-1130
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "davi",
3-
"version": "2.0.1",
3+
"version": "2.1.1",
44
"description": "Decentralized Autonomous Voting Interface",
55
"scripts": {
66
"dev": "./scripts/dev.sh",
@@ -203,3 +203,4 @@
203203
]
204204
}
205205
}
206+

richContracts.json

Lines changed: 197 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"tags": ["DXgov", "Guilds", "permissions"],
6060
"networks": {
6161
"5": "0x885b28d6b93087623483af5e5f7362bd6d8a0a6b",
62-
"1337": "0x0000000000000000000000000000000000000000"
62+
"1337": "0x885b28d6b93087623483af5e5f7362bd6d8a0a6b"
6363
},
6464
"functions": [
6565
{
@@ -97,32 +97,31 @@
9797
"1": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84",
9898
"5": "0xC284e9F6aBc7c65C277244895CAae401e643E4b6",
9999
"100": "0xDA309aDF1c84242Bb446F7CDBa96B570E901D4CF",
100-
"1337": "0x0000000000000000000000000000000000000000"
100+
"1337": "0x332B8C9734b4097dE50f302F7D9F273FFdB45B84"
101101
},
102102
"functions": [
103103
{
104-
"title": "Vote on a proposal",
104+
"title": "Vote For proposal",
105105
"functionName": "vote",
106106
"params": [
107107
{
108108
"type": "bytes32",
109-
"component": "address",
109+
"component": "string",
110110
"name": "proposalId",
111111
"title": "Proposal ID",
112-
"defaultValue": "",
113112
"description": "Proposal ID - found from the URL of proposal"
114113
},
115114
{
116115
"type": "uint256",
117116
"component": "integer",
118117
"name": "vote",
119118
"title": "Vote decision",
120-
"defaultValue": "",
119+
"defaultValue": "1",
121120
"description": "Vote decision (NO(2) or YES(1))"
122121
},
123122
{
124123
"type": "uint256",
125-
"component": "integer",
124+
"component": "tokenAmount",
126125
"name": "amount",
127126
"title": "Amount to vote with",
128127
"defaultValue": "",
@@ -133,15 +132,205 @@
133132
"component": "address",
134133
"name": "voter",
135134
"title": "Voter",
135+
"defaultValue": "0x99Fa013188d5f1dB6836Ee8805Ef37BE70ff10BE",
136+
"description": "The guild's address"
137+
}
138+
],
139+
"shortDescription": "Votes on a proposal with the guild's power",
140+
"longDescription": "Creates a mirror proposal to use this guild's power to vote on a DXdao proposal. Care needs to be taken to finish this proposal before the DXdao proposal finishes.",
141+
"templateLiteral": "Vote ${vote} with ${amount} REP on ${proposalId}",
142+
"spendsTokens": false
143+
},
144+
{
145+
"title": "Vote Against proposal",
146+
"functionName": "vote",
147+
"params": [
148+
{
149+
"type": "bytes32",
150+
"component": "string",
151+
"name": "proposalId",
152+
"title": "Proposal ID",
153+
"description": "Proposal ID - found from the URL of proposal"
154+
},
155+
{
156+
"type": "uint256",
157+
"component": "integer",
158+
"name": "vote",
159+
"title": "Vote decision",
160+
"defaultValue": "2",
161+
"description": "Vote decision (NO(2) or YES(1))"
162+
},
163+
{
164+
"type": "uint256",
165+
"component": "tokenAmount",
166+
"name": "amount",
167+
"title": "Amount of REP to vote with",
136168
"defaultValue": "",
169+
"description": "Amount to vote with"
170+
},
171+
{
172+
"type": "address",
173+
"component": "address",
174+
"name": "voter",
175+
"title": "Voter",
176+
"defaultValue": "0x99Fa013188d5f1dB6836Ee8805Ef37BE70ff10BE",
137177
"description": "The guild's address"
138178
}
139179
],
140180
"shortDescription": "Votes on a proposal with the guild's power",
141181
"longDescription": "Creates a mirror proposal to use this guild's power to vote on a DXdao proposal. Care needs to be taken to finish this proposal before the DXdao proposal finishes.",
142-
"templateLiteral": "Vote {proposalId}",
182+
"templateLiteral": "Vote ${vote} with ${amount} REP on ${proposalId}",
183+
"spendsTokens": false
184+
}
185+
]
186+
},
187+
{
188+
"title": "ENS Reverse resolver",
189+
"tags": ["ens"],
190+
"networks": {
191+
"1": "0x084b1c3c81545d370f3634392de611caabff8148"
192+
},
193+
"functions": [
194+
{
195+
"title": "Set main ENS name for address",
196+
"functionName": "setName",
197+
"params": [
198+
{
199+
"type": "string",
200+
"component": "text",
201+
202+
"name": "name",
203+
"title": "ENS name",
204+
205+
"defaultValue": "",
206+
"description": "Name of ENS name to set (e.g. davi.eth)"
207+
}
208+
],
209+
"shortDescription": "Sets the main ENS name for an account",
210+
"longDescription": "Sets the main ENS name of an account that is what users see when viewing this address",
211+
"templateLiteral": "Set main ENS to ${name}",
212+
"spendsTokens": false
213+
}
214+
]
215+
},
216+
{
217+
"title": "ENS Registry",
218+
"tags": ["ens"],
219+
"networks": {
220+
"1": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
221+
},
222+
"functions": [
223+
{
224+
"title": "Create subdomain",
225+
"functionName": "setSubnodeRecord",
226+
"params": [
227+
{
228+
"type": "bytes32",
229+
"component": "text",
230+
"name": "node",
231+
"title": "Subdomain node",
232+
"defaultValue": "",
233+
"description": "Name of parent ENS to set (e.g. projectdavi.eth)"
234+
},
235+
{
236+
"type": "bytes32",
237+
"component": "text",
238+
"name": "label",
239+
"title": "Subdomain label",
240+
"defaultValue": "",
241+
"description": "Name of new subdomain label"
242+
},
243+
{
244+
"type": "address",
245+
"component": "address",
246+
"name": "owner",
247+
"title": "ENS owner (the guild)",
248+
"defaultValue": "",
249+
"description": "Address of ENS owner"
250+
},
251+
{
252+
"type": "address",
253+
"component": "address",
254+
"name": "resolver",
255+
"title": "ENS Resolver",
256+
"defaultValue": "0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41",
257+
"description": "Address of ENS resolver"
258+
},
259+
{
260+
"type": "uint64",
261+
"component": "integer",
262+
"name": "ttl",
263+
"title": "Time to live",
264+
"defaultValue": "0",
265+
"description": "Time to live"
266+
}
267+
],
268+
"shortDescription": "Creates a subdomain",
269+
"longDescription": "Creates a subdomain from an ENS name the guild is controller of",
270+
"templateLiteral": "Create an ENS subdomain",
271+
"spendsTokens": false
272+
},
273+
{
274+
"title": "Transfer subdomain",
275+
"functionName": "setSubnodeOwner",
276+
"params": [
277+
{
278+
"type": "bytes32",
279+
"component": "text",
280+
"name": "node",
281+
"title": "Subdomain node",
282+
"defaultValue": "",
283+
"description": "Name of parent ENS to set (e.g. projectdavi.eth)"
284+
},
285+
{
286+
"type": "bytes32",
287+
"component": "text",
288+
"name": "label",
289+
"title": "Subdomain label",
290+
"defaultValue": "",
291+
"description": "Name of subdomain label"
292+
},
293+
{
294+
"type": "address",
295+
"component": "address",
296+
"name": "owner",
297+
"title": "ENS owner (the guild)",
298+
"defaultValue": "",
299+
"description": "Address of new ENS owner"
300+
}
301+
],
302+
"shortDescription": "Transfers ENS subdomain",
303+
"longDescription": "Transfers ENS subdomain",
304+
"templateLiteral": "Transfer ENS subdomain to ${owner}",
305+
"spendsTokens": false
306+
},
307+
{
308+
"title": "Transfer ENS",
309+
"functionName": "setOwner",
310+
"params": [
311+
{
312+
"type": "bytes32",
313+
"component": "text",
314+
"name": "node",
315+
"title": "Subdomain node",
316+
"defaultValue": "",
317+
"description": "Name of parent ENS to set (e.g. projectdavi.eth)"
318+
},
319+
{
320+
"type": "address",
321+
"component": "address",
322+
"name": "owner",
323+
"title": "ENS owner (the guild)",
324+
"defaultValue": "",
325+
"description": "Address of new ENS owner"
326+
}
327+
],
328+
"shortDescription": "Transfers a root ENS domain",
329+
"longDescription": "Transfers a root ENS domain",
330+
"templateLiteral": "Transfer ENS to ${owner}",
143331
"spendsTokens": false
144332
}
145333
]
146334
}
147335
]
336+

scripts/dev.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@ async function main() {
178178
distribution: [
179179
{
180180
address: accounts[0],
181-
amount: web3.utils.toWei('320'),
181+
amount: web3.utils.toWei('3200000'),
182182
},
183183
{
184184
address: accounts[1],
185-
amount: web3.utils.toWei('50'),
185+
amount: web3.utils.toWei('500000'),
186186
},
187187
{
188188
address: accounts[2],
189-
amount: web3.utils.toWei('10'),
189+
amount: web3.utils.toWei('100000'),
190190
},
191191
],
192192
},
@@ -198,15 +198,15 @@ async function main() {
198198
distribution: [
199199
{
200200
address: accounts[0],
201-
amount: web3.utils.toWei('100'),
201+
amount: web3.utils.toWei('100000'),
202202
},
203203
{
204204
address: accounts[1],
205-
amount: web3.utils.toWei('50'),
205+
amount: web3.utils.toWei('50000'),
206206
},
207207
{
208208
address: accounts[2],
209-
amount: web3.utils.toWei('10'),
209+
amount: web3.utils.toWei('10000'),
210210
},
211211
],
212212
},
@@ -218,15 +218,15 @@ async function main() {
218218
distribution: [
219219
{
220220
address: accounts[0],
221-
amount: web3.utils.toWei('200'),
221+
amount: web3.utils.toWei('200000'),
222222
},
223223
{
224224
address: accounts[1],
225-
amount: web3.utils.toWei('40'),
225+
amount: web3.utils.toWei('40000'),
226226
},
227227
{
228228
address: accounts[2],
229-
amount: web3.utils.toWei('100'),
229+
amount: web3.utils.toWei('100000'),
230230
},
231231
],
232232
},
@@ -244,8 +244,8 @@ async function main() {
244244
name: 'DXDGuild',
245245
proposalTime: moment.duration(10, 'minutes').asSeconds(),
246246
timeForExecution: moment.duration(50, 'minutes').asSeconds(),
247-
votingPowerPercentageForProposalExecution: '30',
248-
votingPowerPercentageForProposalCreation: '1',
247+
votingPowerPercentageForProposalExecution: '3000',
248+
votingPowerPercentageForProposalCreation: '100',
249249
voteGas: '0',
250250
maxGasPrice: '0',
251251
maxActiveProposals: '9999',
@@ -257,8 +257,8 @@ async function main() {
257257
name: 'REPGuild',
258258
proposalTime: moment.duration(5, 'minutes').asSeconds(),
259259
timeForExecution: moment.duration(2, 'minutes').asSeconds(),
260-
votingPowerPercentageForProposalExecution: '50',
261-
votingPowerPercentageForProposalCreation: '5',
260+
votingPowerPercentageForProposalExecution: '5000',
261+
votingPowerPercentageForProposalCreation: '500',
262262
voteGas: '0',
263263
maxGasPrice: '0',
264264
maxActiveProposals: '5',
@@ -270,8 +270,8 @@ async function main() {
270270
name: 'SWPRGuild',
271271
proposalTime: moment.duration(5, 'minutes').asSeconds(),
272272
timeForExecution: moment.duration(60, 'minutes').asSeconds(),
273-
votingPowerPercentageForProposalExecution: '30',
274-
votingPowerPercentageForProposalCreation: '5',
273+
votingPowerPercentageForProposalExecution: '3000',
274+
votingPowerPercentageForProposalCreation: '500',
275275
voteGas: '0',
276276
maxGasPrice: '0',
277277
maxActiveProposals: '999',

0 commit comments

Comments
 (0)