Skip to content
Merged
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0a7eff8
First draft ccip-metadata
jefflau Sep 22, 2022
61d470f
Add more functions
jefflau Sep 22, 2022
d973f53
Add Record Keys
jefflau Sep 22, 2022
a43d393
Remove ccip vocab
jefflau Sep 22, 2022
350321b
Update ens-improvement-proposals/ensip-14-ccip-metadata.md
jefflau Mar 14, 2023
e52200e
Merge branch 'master' of github.com:ensdomains/docs into ensip-14
jefflau Mar 27, 2023
2ca5e18
Add return types, expand on MUST statement
jefflau Mar 27, 2023
ecc5ffe
Switch to graphql data type
jefflau Mar 27, 2023
beb8f9d
Merge
jefflau Mar 27, 2023
a979c83
Create graphurl endpoint and support for owned node
makoto Apr 3, 2023
67aa91c
Add comments on schema
makoto Apr 3, 2023
c697ad7
Add Open Items
makoto Apr 3, 2023
90fa9d4
Fix typo
makoto Apr 3, 2023
d27f5db
Fix typo
makoto Apr 3, 2023
d8eac7e
Merge pull request #136 from ensdomains/metadata-ensip-withowned-node
jefflau Apr 5, 2023
92c0097
Merge branch 'master' into ensip-14
makoto Aug 15, 2023
acbfbe5
Add Context (#142)
makoto Aug 15, 2023
3181488
Remove xx
makoto Aug 15, 2023
c7abdad
Modify the graph structure
makoto Aug 15, 2023
751b5ce
Changed the order of address and context
makoto Aug 15, 2023
4b3365f
Shuffle the order of context and dynamic metadata
makoto Aug 15, 2023
16299de
Revert changes
makoto Aug 15, 2023
7c1dae5
Add an explanation of context
makoto Aug 15, 2023
2d7a184
Remove implementation specific requirement for owner
makoto Aug 15, 2023
c0aafd9
Address feedbacks
makoto Aug 16, 2023
a730620
Apply suggestions from code review
makoto Aug 21, 2023
e83d4ad
Address feedback
makoto Aug 21, 2023
a388a9c
ADD isApprovedFor to both l1 and l2 contracts
makoto Aug 21, 2023
be1bbc1
Add comment
makoto Aug 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions ens-improvement-proposals/ensip-14-ccip-metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
description: Allows metadata to be queried on CCIP enabled names
---

# ENSIP-14: CCIP-read metadata

| **Author** | Jeff Lau \<[email protected]> |
| ------------- | ---------------------------- |
| **Status** | Draft |
| **Submitted** | 2022-09-22 |

### Abstract

This ENSIP allows metadata to be queried directly on the resolver for CCIP-read enabled names. CCIP-read will power many of the domains in the future, however since the retrieval mechanism uses wildcard + offchain resolver, there is no standardised way to retrieve important metadata information such as the owner (who can change the records), or L2/offchain database the records are stored on.

### Motivation

With CCIP-read subdomains already starting to get used by larger partners in the ENS ecosystem, it is important that there is a way of frontend interfaces to get important metadata to allow a smooth user interface. For instance the owner of a CCIP enabled name would need to be known, for a UI to show whether or not the currently connected account has the rights to edit the records. If the owner was not known, the only way to know would be to make the edit and wait for failure.

This ENSIP addresses this by adding a way of important metadata to be gathered on the offchain resolver, which would likely revert and be also resolved offchain, however there is an option for it to be also left onchain if there value was static and wouldn't need to be changed often.

### Specification

Add metadata functions to the resolver. The first argument MUST have the node if it is specific to a node.

```solidity


interface OffChainResolver {
owner(bytes32 node);

isApprovedForAll(address account, address operator)

dataLocation(bytes32 node) returns (string);

allRecords(bytes32 node) returns (Records);

recordKeys(bytes32 node) returns (RecordsKeys)

}
```


#### Example

```javascript
const node = namehash('ccipreadsub.example.eth')
const resolver = await ens.resolver(node)
const owner = await resolver.owner(node)
// 0x123...
const dataLocation = await.resolver.dataLocation(node)
// {
// name: "Optimism",
// type: "Layer 2",
// chainId: 5
// }

const recordKeys = await.resolver.recordKeys(node)
// {
// addr: [60, 1]
// textRecords: ['url', 'avatar']
// contentHash: true
// }

```

#### Backwards Compatibility

None

### Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).