Skip to content

Commit

Permalink
ð’€­ 1x
Browse files Browse the repository at this point in the history
  • Loading branch information
z0r0z committed Jul 4, 2024
1 parent 405e4eb commit d39dde7
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 37 deletions.
Binary file modified Dagon.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

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

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

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

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.

Expand Down
7 changes: 2 additions & 5 deletions docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@

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

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

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

> Summoner: [0x0000000000008de57636b43B33b2d6007Df5576e](https://etherscan.io/address/0x0000000000008de57636b43B33b2d6007Df5576e#code)
Ethereum, Arbitrum, Optimism, Base, Blast, Zora, Gnosis, Polygon, Avalanche and BNB (& testnets) | [0x000000000000FEb893BB5D63bA33323EdCC237cE](https://etherscan.io/address/0x000000000000FEb893BB5D63bA33323EdCC237cE#code) |

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.

Expand Down
2 changes: 0 additions & 2 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
- [Dagon](src/Dagon.sol/contract.Dagon.md)
- [IAuth](src/Dagon.sol/interface.IAuth.md)
- [IOwnable](src/Dagon.sol/interface.IOwnable.md)
- [Summoner](src/Summoner.sol/contract.Summoner.md)
- [IAccounts](src/Summoner.sol/interface.IAccounts.md)
64 changes: 41 additions & 23 deletions docs/src/src/Dagon.sol/contract.Dagon.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Dagon
[Git Source](https://github.com/Moloch-Mystics/dagon/blob/efc921a89c26d7bf4ef258e73ffcf64e1bdef80a/src/Dagon.sol)
[Git Source](https://github.com/Moloch-Mystics/dagon/blob/405e4eb5a2a407d3f2421047d8b8f778ad336343/src/Dagon.sol)

**Inherits:**
ERC6909

Simple ownership singleton for smart accounts. Version 1.
Simple ownership singleton for smart accounts. Version 1x.


## State Variables
Expand All @@ -30,20 +30,21 @@ mapping(address account => Settings) internal _settings;


### votingTally
*Stores mapping of voting tallies to signed userOp hashes.*
*Stores mapping of voting tallies to account operation hashes.*


```solidity
mapping(bytes32 signedHash => uint256) public votingTally;
mapping(address account => mapping(bytes32 hash => uint256)) public votingTally;
```


### voted
*Stores mapping of account owner voting shares cast on signed userOp hashes.*
*Stores mapping of account owner shares cast on account operation hashes.*


```solidity
mapping(address owner => mapping(bytes32 signedHash => uint256 shares)) public voted;
mapping(address account => mapping(address owner => mapping(bytes32 hash => uint256 shares))) public
voted;
```


Expand Down Expand Up @@ -123,7 +124,6 @@ note: This is expected to be called in a validator plugin-like userOp flow.*
```solidity
function validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, uint256)
public
payable
virtual
returns (uint256 validationData);
```
Expand All @@ -141,17 +141,25 @@ function _validateReturn(bool success) internal pure virtual returns (bytes4 res

===================== VOTING OPERATIONS ===================== ///

*Casts account owner voting shares on a given ERC4337 userOp hash.*
*Casts account owners' voting shares on a given operation hash.*


```solidity
function vote(address account, bytes32 userOpHash, bytes calldata signature)
function vote(address account, bytes32 hash, bytes calldata signature)
public
payable
virtual
returns (uint256);
```

### vote

*Casts caller voting shares on a given operation hash and returns tally.*


```solidity
function vote(address account, bytes32 hash) public virtual returns (uint256);
```

### install

======================== INSTALLATION ======================== ///
Expand All @@ -165,7 +173,6 @@ https://github.com/Vectorized/solady/blob/main/src/auth/Ownable.sol*
```solidity
function install(Ownership[] calldata owners, Settings calldata setting, Metadata calldata meta)
public
payable
virtual;
```

Expand All @@ -186,7 +193,7 @@ function getSettings(address account) public view virtual returns (address, uint


```solidity
function setAuth(IAuth auth) public payable virtual;
function setAuth(IAuth auth) public virtual;
```

### setToken
Expand All @@ -195,7 +202,7 @@ function setAuth(IAuth auth) public payable virtual;


```solidity
function setToken(address token, Standard standard) public payable virtual;
function setToken(address token, Standard standard) public virtual;
```

### setThreshold
Expand All @@ -204,7 +211,7 @@ function setToken(address token, Standard standard) public payable virtual;


```solidity
function setThreshold(uint88 threshold) public payable virtual;
function setThreshold(uint88 threshold) public virtual;
```

### getMetadata
Expand All @@ -228,7 +235,7 @@ function getMetadata(address account)


```solidity
function mint(address owner, uint96 shares) public payable virtual;
function mint(address owner, uint96 shares) public virtual;
```

### burn
Expand All @@ -237,7 +244,7 @@ function mint(address owner, uint96 shares) public payable virtual;


```solidity
function burn(address owner, uint96 shares) public payable virtual;
function burn(address owner, uint96 shares) public virtual;
```

### setURI
Expand All @@ -246,7 +253,7 @@ function burn(address owner, uint96 shares) public payable virtual;


```solidity
function setURI(string calldata uri) public payable virtual;
function setURI(string calldata uri) public virtual;
```

### _balanceOf
Expand Down Expand Up @@ -311,22 +318,22 @@ function _beforeTokenTransfer(address from, address to, uint256 id, uint256 amou
```

## Events
### AuthSet
### URI
=========================== EVENTS =========================== ///

*Logs new authority contract for an account.*
*Logs new metadata for an account ID.*


```solidity
event AuthSet(address indexed account, IAuth auth);
event URI(string uri, uint256 indexed id);
```

### URISet
*Logs new token uri settings for an account.*
### AuthSet
*Logs new authority contract for an account.*


```solidity
event URISet(address indexed account, string uri);
event AuthSet(address indexed account, IAuth auth);
```

### ThresholdSet
Expand Down Expand Up @@ -384,6 +391,17 @@ struct Ownership {
}
```

### Signature
*The signature struct.*


```solidity
struct Signature {
address owner;
bytes sigData;
}
```

### Settings
*The account ownership settings struct.*

Expand Down
2 changes: 1 addition & 1 deletion docs/src/src/Dagon.sol/interface.IAuth.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# IAuth
[Git Source](https://github.com/Moloch-Mystics/dagon/blob/efc921a89c26d7bf4ef258e73ffcf64e1bdef80a/src/Dagon.sol)
[Git Source](https://github.com/Moloch-Mystics/dagon/blob/405e4eb5a2a407d3f2421047d8b8f778ad336343/src/Dagon.sol)

Simple authority interface for contracts.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/src/Dagon.sol/interface.IOwnable.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# IOwnable
[Git Source](https://github.com/Moloch-Mystics/dagon/blob/efc921a89c26d7bf4ef258e73ffcf64e1bdef80a/src/Dagon.sol)
[Git Source](https://github.com/Moloch-Mystics/dagon/blob/405e4eb5a2a407d3f2421047d8b8f778ad336343/src/Dagon.sol)

Simple ownership interface for handover requests.

Expand Down
2 changes: 0 additions & 2 deletions docs/src/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
- [Dagon](Dagon.sol/contract.Dagon.md)
- [IAuth](Dagon.sol/interface.IAuth.md)
- [IOwnable](Dagon.sol/interface.IOwnable.md)
- [Summoner](Summoner.sol/contract.Summoner.md)
- [IAccounts](Summoner.sol/interface.IAccounts.md)
2 changes: 1 addition & 1 deletion etherscan.json

Large diffs are not rendered by default.

0 comments on commit d39dde7

Please sign in to comment.