Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP: ERC-5219 Resolve Mode #6944

Merged
merged 15 commits into from
May 30, 2023
Merged
Changes from all commits
Commits
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
59 changes: 59 additions & 0 deletions EIPS/eip-6944.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
eip: 6944
title: ERC-5219 Resolve Mode
description: Adds an ERC-4804 resolveMode to support ERC-5219 requests
author: Gavin John (@Pandapip1), Qi Zhou (@qizhou)
discussions-to: https://ethereum-magicians.org/t/erc-5219-resolve-mode/14088
status: Draft
type: Standards Track
category: ERC
created: 2023-04-27
requires: 4804, 5219
---

## Abstract

This EIP adds a new [ERC-4804](./eip-4804.md) `resolveMode` to resolve [ERC-5219](./eip-5219.md) contract resource requests.

## Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

Contracts wishing to use ERC-5219 as their ERC-4804 resolve mode must implement the following interface:

```solidity
/// @dev IDecentralizedApp is the ERC-5219 interface
interface IERC5219Resolver is IDecentralizedApp {
// @notice The ERC-4804 resolve mode
// @dev This MUST return "5219" (0x3532313900000000000000000000000000000000000000000000000000000000) for ERC-5219 resolution (case-insensitive). The other options, as of writing this, are "auto" for automatic resolution, or "manual" for manual resolution.
function resolveMode() external pure returns (bytes32 mode);
}
```

## Rationale

[ERC-165](./eip-165.md) was not used because interoperability can be checked by calling `resolveMode`.

## Backwards Compatibility

No backward compatibility issues found.


## Reference Implementation

```solidity
abstract contract ERC5219Resolver is IDecentralizedApp {
function resolveMode() public pure returns (bytes32 mode) {
return "5219";
}
}
```


## Security Considerations

The security considerations of [ERC-4804](./eip-4804.md#security-considerations) and [ERC-5219](./eip-5219.md#security-considerations) apply.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).
Loading