Skip to content

Commit d39dde7

Browse files
committed
π’€­ 1x
1 parent 405e4eb commit d39dde7

File tree

9 files changed

+48
-37
lines changed

9 files changed

+48
-37
lines changed

β€ŽDagon.pdfβ€Ž

-1.58 KB
Binary file not shown.

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
Built with *[Foundry](https://github.com/foundry-rs/forge-std)* and *[Solady](https://github.com/vectorized/solady)*.
77

8-
## [Beta Deployment](https://contractscan.xyz/contract/0x0000000000001ADDcB933DD5028159dc965b5b7f)
8+
## [Beta Deployment](https://contractscan.xyz/contract/0x000000000000FEb893BB5D63bA33323EdCC237cE)
99

1010
Chains | Address |
1111
----------------|-----------------------------------------|
12-
Ethereum, Arbitrum, Optimism, Base, Blast, Zora, Gnosis, Polygon, Avalanche and BNB (& testnets) | [0x0000000000001ADDcB933DD5028159dc965b5b7f](https://etherscan.io/address/0x0000000000001ADDcB933DD5028159dc965b5b7f#code) |
12+
Ethereum, Arbitrum, Optimism, Base, Blast, Zora, Gnosis, Polygon, Avalanche and BNB (& testnets) | [0x000000000000FEb893BB5D63bA33323EdCC237cE](https://etherscan.io/address/0x000000000000FEb893BB5D63bA33323EdCC237cE#code) |
1313

1414
Dagon deployments are generated as [efficient create2 addresses](https://medium.com/coinmonks/on-efficient-ethereum-addresses-3fef0596e263) through the [canonical create2 factory](https://etherscan.io/address/0x0000000000ffe8b47b3e2130213b802212439497#code). As such they share the same exact address and code on every blockchain.
1515

β€Ždocs/src/README.mdβ€Ž

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55

66
Built with *[Foundry](https://github.com/foundry-rs/forge-std)* and *[Solady](https://github.com/vectorized/solady)*.
77

8-
## [Beta Deployment](https://contractscan.xyz/contract/0x0000000000001ADDcB933DD5028159dc965b5b7f)
9-
> *Signature Validation Limit: ~1774 signatures*
8+
## [Beta Deployment](https://contractscan.xyz/contract/0x000000000000FEb893BB5D63bA33323EdCC237cE)
109

1110
Chains | Address |
1211
----------------|-----------------------------------------|
13-
Ethereum, Arbitrum, Optimism, Base, Blast, Zora, Gnosis, Polygon, Avalanche and BNB (& testnets) | [0x0000000000001ADDcB933DD5028159dc965b5b7f](https://etherscan.io/address/0x0000000000001ADDcB933DD5028159dc965b5b7f#code) |
14-
15-
> Summoner: [0x0000000000008de57636b43B33b2d6007Df5576e](https://etherscan.io/address/0x0000000000008de57636b43B33b2d6007Df5576e#code)
12+
Ethereum, Arbitrum, Optimism, Base, Blast, Zora, Gnosis, Polygon, Avalanche and BNB (& testnets) | [0x000000000000FEb893BB5D63bA33323EdCC237cE](https://etherscan.io/address/0x000000000000FEb893BB5D63bA33323EdCC237cE#code) |
1613

1714
Dagon deployments are generated as [efficient create2 addresses](https://medium.com/coinmonks/on-efficient-ethereum-addresses-3fef0596e263) through the [canonical create2 factory](https://etherscan.io/address/0x0000000000ffe8b47b3e2130213b802212439497#code). As such they share the same exact address and code on every blockchain.
1815

β€Ždocs/src/SUMMARY.mdβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@
44
- [Dagon](src/Dagon.sol/contract.Dagon.md)
55
- [IAuth](src/Dagon.sol/interface.IAuth.md)
66
- [IOwnable](src/Dagon.sol/interface.IOwnable.md)
7-
- [Summoner](src/Summoner.sol/contract.Summoner.md)
8-
- [IAccounts](src/Summoner.sol/interface.IAccounts.md)

β€Ždocs/src/src/Dagon.sol/contract.Dagon.mdβ€Ž

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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:**
55
ERC6909
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
124125
function 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
166174
function 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

β€Ždocs/src/src/Dagon.sol/interface.IAuth.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# IAuth
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
Simple authority interface for contracts.
55

β€Ždocs/src/src/Dagon.sol/interface.IOwnable.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# IOwnable
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
Simple ownership interface for handover requests.
55

β€Ždocs/src/src/README.mdβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@
44
- [Dagon](Dagon.sol/contract.Dagon.md)
55
- [IAuth](Dagon.sol/interface.IAuth.md)
66
- [IOwnable](Dagon.sol/interface.IOwnable.md)
7-
- [Summoner](Summoner.sol/contract.Summoner.md)
8-
- [IAccounts](Summoner.sol/interface.IAccounts.md)

β€Žetherscan.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
Β (0)