11# Dagon
2- [ Git Source] ( https://github.com/Moloch-Mystics/dagon/blob/efc921a89c26d7bf4ef258e73ffcf64e1bdef80a /src/Dagon.sol )
2+ [ Git Source] ( https://github.com/Moloch-Mystics/dagon/blob/405e4eb5a2a407d3f2421047d8b8f778ad336343 /src/Dagon.sol )
33
44** Inherits:**
55ERC6909
66
7- Simple ownership singleton for smart accounts. Version 1 .
7+ Simple ownership singleton for smart accounts. Version 1x .
88
99
1010## State Variables
@@ -30,20 +30,21 @@ mapping(address account => Settings) internal _settings;
3030
3131
3232### votingTally
33- * Stores mapping of voting tallies to signed userOp hashes.*
33+ * Stores mapping of voting tallies to account operation hashes.*
3434
3535
3636``` solidity
37- mapping(bytes32 signedHash => uint256) public votingTally;
37+ mapping(address account => mapping( bytes32 hash => uint256) ) public votingTally;
3838```
3939
4040
4141### voted
42- * Stores mapping of account owner voting shares cast on signed userOp hashes.*
42+ * Stores mapping of account owner shares cast on account operation hashes.*
4343
4444
4545``` solidity
46- mapping(address owner => mapping(bytes32 signedHash => uint256 shares)) public voted;
46+ mapping(address account => mapping(address owner => mapping(bytes32 hash => uint256 shares))) public
47+ voted;
4748```
4849
4950
@@ -123,7 +124,6 @@ note: This is expected to be called in a validator plugin-like userOp flow.*
123124``` solidity
124125function validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, uint256)
125126 public
126- payable
127127 virtual
128128 returns (uint256 validationData);
129129```
@@ -141,17 +141,25 @@ function _validateReturn(bool success) internal pure virtual returns (bytes4 res
141141
142142===================== VOTING OPERATIONS ===================== ///
143143
144- * Casts account owner voting shares on a given ERC4337 userOp hash.*
144+ * Casts account owners' voting shares on a given operation hash.*
145145
146146
147147``` solidity
148- function vote(address account, bytes32 userOpHash , bytes calldata signature)
148+ function vote(address account, bytes32 hash , bytes calldata signature)
149149 public
150- payable
151150 virtual
152151 returns (uint256);
153152```
154153
154+ ### vote
155+
156+ * Casts caller voting shares on a given operation hash and returns tally.*
157+
158+
159+ ``` solidity
160+ function vote(address account, bytes32 hash) public virtual returns (uint256);
161+ ```
162+
155163### install
156164
157165======================== INSTALLATION ======================== ///
@@ -165,7 +173,6 @@ https://github.com/Vectorized/solady/blob/main/src/auth/Ownable.sol*
165173``` solidity
166174function install(Ownership[] calldata owners, Settings calldata setting, Metadata calldata meta)
167175 public
168- payable
169176 virtual;
170177```
171178
@@ -186,7 +193,7 @@ function getSettings(address account) public view virtual returns (address, uint
186193
187194
188195``` solidity
189- function setAuth(IAuth auth) public payable virtual;
196+ function setAuth(IAuth auth) public virtual;
190197```
191198
192199### setToken
@@ -195,7 +202,7 @@ function setAuth(IAuth auth) public payable virtual;
195202
196203
197204``` solidity
198- function setToken(address token, Standard standard) public payable virtual;
205+ function setToken(address token, Standard standard) public virtual;
199206```
200207
201208### setThreshold
@@ -204,7 +211,7 @@ function setToken(address token, Standard standard) public payable virtual;
204211
205212
206213``` solidity
207- function setThreshold(uint88 threshold) public payable virtual;
214+ function setThreshold(uint88 threshold) public virtual;
208215```
209216
210217### getMetadata
@@ -228,7 +235,7 @@ function getMetadata(address account)
228235
229236
230237``` solidity
231- function mint(address owner, uint96 shares) public payable virtual;
238+ function mint(address owner, uint96 shares) public virtual;
232239```
233240
234241### burn
@@ -237,7 +244,7 @@ function mint(address owner, uint96 shares) public payable virtual;
237244
238245
239246``` solidity
240- function burn(address owner, uint96 shares) public payable virtual;
247+ function burn(address owner, uint96 shares) public virtual;
241248```
242249
243250### setURI
@@ -246,7 +253,7 @@ function burn(address owner, uint96 shares) public payable virtual;
246253
247254
248255``` solidity
249- function setURI(string calldata uri) public payable virtual;
256+ function setURI(string calldata uri) public virtual;
250257```
251258
252259### _ balanceOf
@@ -311,22 +318,22 @@ function _beforeTokenTransfer(address from, address to, uint256 id, uint256 amou
311318```
312319
313320## Events
314- ### AuthSet
321+ ### URI
315322=========================== EVENTS =========================== ///
316323
317- * Logs new authority contract for an account.*
324+ * Logs new metadata for an account ID .*
318325
319326
320327``` solidity
321- event AuthSet(address indexed account, IAuth auth );
328+ event URI(string uri, uint256 indexed id );
322329```
323330
324- ### URISet
325- * Logs new token uri settings for an account.*
331+ ### AuthSet
332+ * Logs new authority contract for an account.*
326333
327334
328335``` solidity
329- event URISet (address indexed account, string uri );
336+ event AuthSet (address indexed account, IAuth auth );
330337```
331338
332339### ThresholdSet
@@ -384,6 +391,17 @@ struct Ownership {
384391}
385392```
386393
394+ ### Signature
395+ * The signature struct.*
396+
397+
398+ ``` solidity
399+ struct Signature {
400+ address owner;
401+ bytes sigData;
402+ }
403+ ```
404+
387405### Settings
388406* The account ownership settings struct.*
389407
0 commit comments