HomeEIPs
EIPsERC-6944
ERC-6944

ERC-5219 Resolve Mode

Adds an ERC-4804 resolveMode to support ERC-5219 requests
DraftStandards Track: ERC
Created: 2023-04-27
Requires: EIP-4804, EIP-5219
Gavin John (@Pandapip1), Qi Zhou (@qizhou)
DiscussionsOriginal linkEdit
1 min read

The ERC-6944 proposal adds a new ERC-4804 resolveMode to resolve ERC-5219 contract resource requests. This means that contracts wishing to use ERC-5219 as their ERC-4804 resolve mode must implement the IERC5219Resolver interface, which includes a function called resolveMode that returns "5219" for ERC-5219 resolution. The proposal also includes security considerations and a reference implementation. The rationale for not using ERC-165 is that interoperability can be checked by calling resolveMode. There are no backward compatibility issues found.

Video
Anyone may contribute to propose contents.
Go propose
Original

Abstract

This EIP adds a new ERC-4804 resolveMode to resolve ERC-5219 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:

/// @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 was not used because interoperability can be checked by calling resolveMode.

Backwards Compatibility

No backward compatibility issues found.

Reference Implementation

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

Security Considerations

The security considerations of ERC-4804 and ERC-5219 apply.

Copyright and related rights waived via CC0.

Further reading
Anyone may contribute to propose contents.
Go propose
Adopted by projects
Anyone may contribute to propose contents.
Go propose

Not miss a beat of EIPs' update?

Subscribe EIPs Fun to receive the latest updates of EIPs Good for Buidlers to follow up.

View all
Serve Ethereum Builders, Scale the Community.
Resources
GitHub
Supported by