generated from zeroknots/femplate
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
2,795 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: Slither Analysis | ||
on: [push] | ||
jobs: | ||
analyze: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: crytic/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
book/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
table { | ||
margin: 0 auto; | ||
border-collapse: collapse; | ||
width: 100%; | ||
} | ||
|
||
table td:first-child { | ||
width: 15%; | ||
} | ||
|
||
table td:nth-child(2) { | ||
width: 25%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[book] | ||
src = "src" | ||
title = "Rhinestone Registry" | ||
|
||
[output.html] | ||
no-section-label = true | ||
additional-js = ["solidity.min.js"] | ||
additional-css = ["book.css"] | ||
git-repository-url = "https://github.com/rhinestonewtf/registry" | ||
|
||
[output.html.fold] | ||
enable = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
hljs.registerLanguage("solidity",(()=>{"use strict";function e(){try{return!0 | ||
}catch(e){return!1}} | ||
var a=/-?(\b0[xX]([a-fA-F0-9]_?)*[a-fA-F0-9]|(\b[1-9](_?\d)*(\.((\d_?)*\d)?)?|\.\d(_?\d)*)([eE][-+]?\d(_?\d)*)?|\b0)(?!\w|\$)/ | ||
;e()&&(a=a.source.replace(/\\b/g,"(?<!\\$)\\b"));var s={className:"number", | ||
begin:a,relevance:0},n={ | ||
keyword:"assembly let function if switch case default for leave break continue u256 jump jumpi stop return revert selfdestruct invalid", | ||
built_in:"add sub mul div sdiv mod smod exp not lt gt slt sgt eq iszero and or xor byte shl shr sar addmod mulmod signextend keccak256 pc pop dup1 dup2 dup3 dup4 dup5 dup6 dup7 dup8 dup9 dup10 dup11 dup12 dup13 dup14 dup15 dup16 swap1 swap2 swap3 swap4 swap5 swap6 swap7 swap8 swap9 swap10 swap11 swap12 swap13 swap14 swap15 swap16 mload mstore mstore8 sload sstore msize gas address balance selfbalance caller callvalue calldataload calldatasize calldatacopy codesize codecopy extcodesize extcodecopy returndatasize returndatacopy extcodehash create create2 call callcode delegatecall staticcall log0 log1 log2 log3 log4 chainid origin gasprice basefee blockhash coinbase timestamp number difficulty gaslimit", | ||
literal:"true false"},i={className:"string", | ||
begin:/\bhex'(([0-9a-fA-F]{2}_?)*[0-9a-fA-F]{2})?'/},t={className:"string", | ||
begin:/\bhex"(([0-9a-fA-F]{2}_?)*[0-9a-fA-F]{2})?"/};function r(e){ | ||
return e.inherit(e.APOS_STRING_MODE,{begin:/(\bunicode)?'/})}function l(e){ | ||
return e.inherit(e.QUOTE_STRING_MODE,{begin:/(\bunicode)?"/})}var o={ | ||
SOL_ASSEMBLY_KEYWORDS:n,baseAssembly:e=>{ | ||
var a=r(e),o=l(e),c=/[A-Za-z_$][A-Za-z_$0-9.]*/,d=e.inherit(e.TITLE_MODE,{ | ||
begin:/[A-Za-z$_][0-9A-Za-z$_]*/,lexemes:c,keywords:n}),u={className:"params", | ||
begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,lexemes:c,keywords:n, | ||
contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,o,s]},_={ | ||
className:"operator",begin:/:=|->/};return{keywords:n,lexemes:c, | ||
contains:[a,o,i,t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,_,{ | ||
className:"function",lexemes:c,beginKeywords:"function",end:"{",excludeEnd:!0, | ||
contains:[d,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,_]}]}}, | ||
solAposStringMode:r,solQuoteStringMode:l,HEX_APOS_STRING_MODE:i, | ||
HEX_QUOTE_STRING_MODE:t,SOL_NUMBER:s,isNegativeLookbehindAvailable:e} | ||
;const{baseAssembly:c,solAposStringMode:d,solQuoteStringMode:u,HEX_APOS_STRING_MODE:_,HEX_QUOTE_STRING_MODE:m,SOL_NUMBER:b,isNegativeLookbehindAvailable:E}=o | ||
;return e=>{for(var a=d(e),s=u(e),n=[],i=0;i<32;i++)n[i]=i+1 | ||
;var t=n.map((e=>8*e)),r=[];for(i=0;i<=80;i++)r[i]=i | ||
;var l=n.map((e=>"bytes"+e)).join(" ")+" ",o=t.map((e=>"uint"+e)).join(" ")+" ",g=t.map((e=>"int"+e)).join(" ")+" ",M=[].concat.apply([],t.map((e=>r.map((a=>e+"x"+a))))),p={ | ||
keyword:"var bool string int uint "+g+o+"byte bytes "+l+"fixed ufixed "+M.map((e=>"fixed"+e)).join(" ")+" "+M.map((e=>"ufixed"+e)).join(" ")+" enum struct mapping address new delete if else for while continue break return throw emit try catch revert unchecked _ function modifier event constructor fallback receive error virtual override constant immutable anonymous indexed storage memory calldata external public internal payable pure view private returns import from as using pragma contract interface library is abstract type assembly", | ||
literal:"true false wei gwei szabo finney ether seconds minutes hours days weeks years", | ||
built_in:"self this super selfdestruct suicide now msg block tx abi blockhash gasleft assert require Error Panic sha3 sha256 keccak256 ripemd160 ecrecover addmod mulmod log0 log1 log2 log3 log4" | ||
},O={className:"operator",begin:/[+\-!~*\/%<>&^|=]/ | ||
},C=/[A-Za-z_$][A-Za-z_$0-9]*/,N={className:"params",begin:/\(/,end:/\)/, | ||
excludeBegin:!0,excludeEnd:!0,lexemes:C,keywords:p, | ||
contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,s,b,"self"]},f={ | ||
begin:/\.\s*/,end:/[^A-Za-z0-9$_\.]/,excludeBegin:!0,excludeEnd:!0,keywords:{ | ||
built_in:"gas value selector address length push pop send transfer call callcode delegatecall staticcall balance code codehash wrap unwrap name creationCode runtimeCode interfaceId min max" | ||
},relevance:2},y=e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/, | ||
lexemes:C,keywords:p}),w={className:"built_in", | ||
begin:(E()?"(?<!\\$)\\b":"\\b")+"(gas|value|salt)(?=:)"};function x(e,a){return{ | ||
begin:(E()?"(?<!\\$)\\b":"\\b")+e+"\\.\\s*",end:/[^A-Za-z0-9$_\.]/, | ||
excludeBegin:!1,excludeEnd:!0,lexemes:C,keywords:{built_in:e+" "+a}, | ||
contains:[f],relevance:10}}var h=c(e),v=e.inherit(h,{ | ||
contains:h.contains.concat([{begin:/\./,end:/[^A-Za-z0-9$.]/,excludeBegin:!0, | ||
excludeEnd:!0,keywords:{built_in:"slot offset length address selector"}, | ||
relevance:2},{begin:/_/,end:/[^A-Za-z0-9$.]/,excludeBegin:!0,excludeEnd:!0, | ||
keywords:{built_in:"slot offset"},relevance:2}])});return{aliases:["sol"], | ||
keywords:p,lexemes:C, | ||
contains:[a,s,_,m,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,b,w,O,{ | ||
className:"function",lexemes:C, | ||
beginKeywords:"function modifier event constructor fallback receive error", | ||
end:/[{;]/,excludeEnd:!0, | ||
contains:[y,N,w,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/%/ | ||
},x("msg","gas value data sender sig"),x("block","blockhash coinbase difficulty gaslimit basefee number timestamp chainid"),x("tx","gasprice origin"),x("abi","decode encode encodePacked encodeWithSelector encodeWithSignature encodeCall"),x("bytes","concat"),f,{ | ||
className:"class",lexemes:C,beginKeywords:"contract interface library",end:"{", | ||
excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"is",lexemes:C | ||
},y,N,w,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{lexemes:C, | ||
beginKeywords:"struct enum",end:"{",excludeEnd:!0,illegal:/[:"\[\]]/, | ||
contains:[y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ | ||
beginKeywords:"import",end:";",lexemes:C,keywords:"import from as", | ||
contains:[y,a,s,_,m,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,O]},{ | ||
beginKeywords:"using",end:";",lexemes:C,keywords:"using for", | ||
contains:[y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,O]},{className:"meta", | ||
beginKeywords:"pragma",end:";",lexemes:C,keywords:{ | ||
keyword:"pragma solidity experimental abicoder", | ||
built_in:"ABIEncoderV2 SMTChecker v1 v2"}, | ||
contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(a,{ | ||
className:"meta-string"}),e.inherit(s,{className:"meta-string"})]},{ | ||
beginKeywords:"assembly",end:/\b\B/, | ||
contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(v,{begin:"{", | ||
end:"}",endsParent:!0,contains:v.contains.concat([e.inherit(v,{begin:"{", | ||
end:"}",contains:v.contains.concat(["self"])})])})]}],illegal:/#/}}})()); | ||
|
||
// Ugly hack to reload HLJS | ||
hljs.initHighlightingOnLoad(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<img align="right" width="150" height="150" top="100" src="./public/logo.png"> | ||
|
||
# Registry [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![solidity](https://img.shields.io/badge/solidity-^0.8.22-lightgrey) [![Foundry][foundry-badge]][foundry] | ||
|
||
[foundry]: https://getfoundry.sh | ||
[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg | ||
|
||
This Contract is in active development. Do not use this in Prod! | ||
|
||
## Overview | ||
|
||
Account abstraction (or smart accounts) will deliver three key enhancements for the Ethereum ecosystem: | ||
improved UX, enhanced user security and greater wallet extensibility. Modular smart accounts are the next | ||
frontier for achieving these goals. However, it also opens up a number of new challenges that | ||
could drastically undermine the objective by opening up a plethora of new attack vectors and security concerns for accounts. | ||
|
||
The Registry aims to solve this concern by providing a means of verifying the legitimacy and | ||
security of independently built smart account modules for installation and use across any integrated | ||
smart account. It allows entities to attest to statements about modules and smart accounts to query these at module nstallation and/or execution time. The Registry is a Singleton that is free, open and permissionless. It also serves as the reference implementation for [ERC-7484](https://eips.ethereum.org/EIPS/eip-7484). | ||
|
||
## Core Concepts | ||
|
||
### Attestations | ||
|
||
Attestations on the Registry represent statements about Modules. An Attestation is made using a particular [Schema](./Schemas.md) that is used to encode and decode the Attestation data. The most important usecase for Attestations is to make statements about the security of a Module. | ||
|
||
An attestation consists of two primary elements: the Schema and the | ||
Attestation data. The Schema acts as a standardized structure for | ||
creating and validating Attestations, defining how the Attestation data is encoded and decoded. | ||
|
||
### Schemas | ||
|
||
[Schemas](./docs/Schema.md) represent predefined structures utilized for the formation and | ||
verification of Attestation data. Using flexible Schemas rather than a single, fixed Schema allows Attesters to encode their data in a custom way, providing flexibility when creating Attestations. For example, the data of an Attestation about the outcome of the formal verification on a Module will have a very format than the data of an Attestation about what interfaces a Module supports. | ||
|
||
### Resolvers | ||
|
||
Resolvers are external contracts that are tied to Modules and called when specific Registry actions are executed. These actions are: | ||
|
||
- attestation | ||
- revocation | ||
- module registration / deployment | ||
|
||
This architectural design aims to provide entities like Smart Account vendors or DAOs, with the | ||
flexibility to incorporate custom business logic while maintaining the | ||
robustness and security of the core functionalities implemented by the Registry | ||
|
||
### Attesters | ||
|
||
Attesters are individuals or organizations responsible for | ||
creating and signing Attestations. They add the Attestation to the | ||
Registry, making it available for verification. | ||
|
||
### Modules | ||
|
||
Modules are smart contracts that act as modular components that can be added to Smart Accounts. | ||
The registry is agnostic towards Smart Account or Module implementations. Only Module addresses and | ||
deployment metadata are stored on the registry. | ||
|
||
Modules are registered on the Registry either during, using `CREATE2`, `CREATE3` or a custom deployment factory, or after deployment. | ||
|
||
## Architecture | ||
|
||
![Sequence Diagram](./public/docs/all.svg) | ||
|
||
## Gas comparison | ||
|
||
The following is a table of the gas differences between the Registry and a minimal [ERC-7484](https://eips.ethereum.org/EIPS/eip-7484) registry that only has one attester. As you can see, the gas difference is negligible for 1 or 2 attesters, but the Registry scales much better than using multiple single attester registries. | ||
|
||
To run the tests yourself, run `forge test --mc RegistryGasComparisonTest -vv`. | ||
|
||
_Note:_ The gas calculation numbers include the gas cost for `CALL` | ||
|
||
| # of Attesters | Registry | Minimal7484Registry | Difference | | ||
| ----------------- | ------------ | ------------------- | ---------- | | ||
| 1 | 7983 | 7706 | +277 | | ||
| 2 | 15472 | 15418 | +54 | | ||
| 3 | 20823 | 23124 | -2301 | | ||
| n (approximation) | 5299n + 4901 | 7709n | | | ||
|
||
## Deployments | ||
|
||
Current address: [0x500684cBaa280aDf80d5ACf7A32Daebb23162e63](https://blockscan.com/address/0x500684cBaa280aDf80d5ACf7A32Daebb23162e63) | ||
|
||
## Contribute | ||
|
||
For feature or change requests, feel free to open a PR or get in touch with us. | ||
|
||
## Credits & Special Thanks | ||
|
||
For the continious support and constructive feedback, we would like to thank: | ||
|
||
- [Ethereum Foundation](https://erc4337.mirror.xyz/hRn_41cef8oKn44ZncN9pXvY3VID6LZOtpLlktXYtmA) | ||
- ERC-4337 Team | ||
- Richard Meissner (Safe) @rimeissner | ||
- Taek @taek.eth | ||
- Biconomy | ||
- Heavily inspired by EAS | ||
|
||
## Authors ✨ | ||
|
||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
<!-- prettier-ignore-start --> | ||
<!-- markdownlint-disable --> | ||
<table> | ||
<tr> | ||
<td align="center"><a href="http://twitter.com/zeroknotsETH/"><img src="https://pbs.twimg.com/profile_images/1639062011387715590/bNmZ5Gpf_400x400.jpg" width="100px;" alt=""/><br /><sub><b>zeroknots</b></sub></a><br /><a href="https://github.com/rhinestonewtf/registry/commits?author=zeroknots" title="Code">💻</a></td> | ||
<td align="center"><a href="https://twitter.com/abstractooor"><img src="https://avatars.githubusercontent.com/u/26718079" width="100px;" alt=""/><br /><sub><b>Konrad</b></sub></a><br /><a href="https://github.com/rhinestonewtf/registry/commits?author=kopy-kat" title="Code">💻</a> </td> | ||
|
||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Summary | ||
- [Home](README.md) | ||
# src | ||
- [❱ core](src/core/README.md) | ||
- [Attestation](src/core/Attestation.sol/abstract.Attestation.md) | ||
- [AttestationManager](src/core/AttestationManager.sol/abstract.AttestationManager.md) | ||
- [ModuleManager](src/core/ModuleManager.sol/abstract.ModuleManager.md) | ||
- [ResolverManager](src/core/ResolverManager.sol/abstract.ResolverManager.md) | ||
- [SchemaManager](src/core/SchemaManager.sol/abstract.SchemaManager.md) | ||
- [SignedAttestation](src/core/SignedAttestation.sol/contract.SignedAttestation.md) | ||
- [TrustManager](src/core/TrustManager.sol/abstract.TrustManager.md) | ||
- [TrustManagerExternalAttesterList](src/core/TrustManagerExternalAttesterList.sol/abstract.TrustManagerExternalAttesterList.md) | ||
- [❱ external](src/external/README.md) | ||
- [❱ examples](src/external/examples/README.md) | ||
- [ERC7512](src/external/examples/ERC7512Schema.sol/interface.ERC7512.md) | ||
- [ERC7512SchemaValidator](src/external/examples/ERC7512Schema.sol/contract.ERC7512SchemaValidator.md) | ||
- [ResolverBase](src/external/examples/ResolverBase.sol/abstract.ResolverBase.md) | ||
- [TokenizedResolver](src/external/examples/TokenizedResolver.sol/contract.TokenizedResolver.md) | ||
- [IExternalResolver](src/external/IExternalResolver.sol/interface.IExternalResolver.md) | ||
- [IExternalSchemaValidator](src/external/IExternalSchemaValidator.sol/interface.IExternalSchemaValidator.md) | ||
- [❱ lib](src/lib/README.md) | ||
- [AttestationLib](src/lib/AttestationLib.sol/library.AttestationLib.md) | ||
- [UIDLib](src/lib/Helpers.sol/library.UIDLib.md) | ||
- [ModuleDeploymentLib](src/lib/ModuleDeploymentLib.sol/library.ModuleDeploymentLib.md) | ||
- [ModuleTypeLib](src/lib/ModuleTypeLib.sol/library.ModuleTypeLib.md) | ||
- [StubLib](src/lib/StubLib.sol/library.StubLib.md) | ||
- [_isContract](src/Common.sol/function._isContract.md) | ||
- [_time](src/Common.sol/function._time.md) | ||
- [Common constants](src/Common.sol/constants.Common.md) | ||
- [AttestationRecord](src/DataTypes.sol/struct.AttestationRecord.md) | ||
- [ModuleRecord](src/DataTypes.sol/struct.ModuleRecord.md) | ||
- [SchemaRecord](src/DataTypes.sol/struct.SchemaRecord.md) | ||
- [ResolverRecord](src/DataTypes.sol/struct.ResolverRecord.md) | ||
- [TrustedAttesterRecord](src/DataTypes.sol/struct.TrustedAttesterRecord.md) | ||
- [AttestationRequest](src/DataTypes.sol/struct.AttestationRequest.md) | ||
- [RevocationRequest](src/DataTypes.sol/struct.RevocationRequest.md) | ||
- [SchemaUID](src/DataTypes.sol/type.SchemaUID.md) | ||
- [ResolverUID](src/DataTypes.sol/type.ResolverUID.md) | ||
- [AttestationDataRef](src/DataTypes.sol/type.AttestationDataRef.md) | ||
- [PackedModuleTypes](src/DataTypes.sol/type.PackedModuleTypes.md) | ||
- [ModuleType](src/DataTypes.sol/type.ModuleType.md) | ||
- [attestationDataRefEq](src/DataTypes.sol/function.attestationDataRefEq.md) | ||
- [resolverEq](src/DataTypes.sol/function.resolverEq.md) | ||
- [schemaEq](src/DataTypes.sol/function.schemaEq.md) | ||
- [moduleTypeEq](src/DataTypes.sol/function.moduleTypeEq.md) | ||
- [resolverNotEq](src/DataTypes.sol/function.resolverNotEq.md) | ||
- [moduleTypeNeq](src/DataTypes.sol/function.moduleTypeNeq.md) | ||
- [schemaNotEq](src/DataTypes.sol/function.schemaNotEq.md) | ||
- [IERC7484](src/IRegistry.sol/interface.IERC7484.md) | ||
- [IRegistry](src/IRegistry.sol/interface.IRegistry.md) | ||
- [Registry](src/Registry.sol/contract.Registry.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Constants | ||
[Git Source](https://github.com/rhinestonewtf/registry/blob/350cdd9001705a91cd42a82c8ee3e0cd055714e5/src/Common.sol) | ||
|
||
### EMPTY_UID | ||
|
||
```solidity | ||
bytes32 constant EMPTY_UID = 0; | ||
``` | ||
|
||
### EMPTY_RESOLVER_UID | ||
|
||
```solidity | ||
ResolverUID constant EMPTY_RESOLVER_UID = ResolverUID.wrap(EMPTY_UID); | ||
``` | ||
|
||
### EMPTY_SCHEMA_UID | ||
|
||
```solidity | ||
SchemaUID constant EMPTY_SCHEMA_UID = SchemaUID.wrap(EMPTY_UID); | ||
``` | ||
|
||
### ZERO_TIMESTAMP | ||
|
||
```solidity | ||
uint256 constant ZERO_TIMESTAMP = 0; | ||
``` | ||
|
||
### ZERO_ADDRESS | ||
|
||
```solidity | ||
address constant ZERO_ADDRESS = address(0); | ||
``` | ||
|
||
### ZERO_MODULE_TYPE | ||
|
||
```solidity | ||
ModuleType constant ZERO_MODULE_TYPE = ModuleType.wrap(0); | ||
``` | ||
|
||
### EMPTY_ATTESTATION_REF | ||
|
||
```solidity | ||
AttestationDataRef constant EMPTY_ATTESTATION_REF = AttestationDataRef.wrap(address(0)); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# _isContract | ||
[Git Source](https://github.com/rhinestonewtf/registry/blob/350cdd9001705a91cd42a82c8ee3e0cd055714e5/src/Common.sol) | ||
|
||
*Returns whether an address is a contract.* | ||
|
||
|
||
```solidity | ||
function _isContract(address addr) view returns (bool); | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`addr`|`address`|The address to check.| | ||
|
||
**Returns** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`<none>`|`bool`|true if `account` is a contract, false otherwise.| | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# _time | ||
[Git Source](https://github.com/rhinestonewtf/registry/blob/350cdd9001705a91cd42a82c8ee3e0cd055714e5/src/Common.sol) | ||
|
||
*Returns the current's block timestamp. This method is overridden during tests and used to simulate the | ||
current block time.* | ||
|
||
|
||
```solidity | ||
function _time() view returns (uint48); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# attestationDataRefEq | ||
[Git Source](https://github.com/rhinestonewtf/registry/blob/350cdd9001705a91cd42a82c8ee3e0cd055714e5/src/DataTypes.sol) | ||
|
||
|
||
```solidity | ||
function attestationDataRefEq(AttestationDataRef uid1, AttestationDataRef uid2) pure returns (bool); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# moduleTypeEq | ||
[Git Source](https://github.com/rhinestonewtf/registry/blob/350cdd9001705a91cd42a82c8ee3e0cd055714e5/src/DataTypes.sol) | ||
|
||
|
||
```solidity | ||
function moduleTypeEq(ModuleType uid1, ModuleType uid2) pure returns (bool); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# moduleTypeNeq | ||
[Git Source](https://github.com/rhinestonewtf/registry/blob/350cdd9001705a91cd42a82c8ee3e0cd055714e5/src/DataTypes.sol) | ||
|
||
|
||
```solidity | ||
function moduleTypeNeq(ModuleType uid1, ModuleType uid2) pure returns (bool); | ||
``` | ||
|
Oops, something went wrong.