Alert Source Discuss
⚠️ Draft Standards Track: SRC

SRC-6944: SRC-5219 Resolve Mode

Adds an SRC-4804 resolveMode to support SRC-5219 requests

Authors Gavin John (@Pandapip1), Qi Zhou (@qizhou)
Created 2023-04-27
Discussion Link https://sila-magicians.org/t/src-5219-resolve-mode/14088
Requires SIP-4804, SIP-5219

Abstract

This SIP adds a new SRC-4804 resolveMode to resolve SRC-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 SRC-5219 as their SRC-4804 resolve mode must implement the following interface:

/// @dev IDecentralizedApp is the SRC-5219 interface
interface ISRC5219Resolver is IDecentralizedApp {
    // @notice The SRC-4804 resolve mode
    // @dev    This MUST return "5219" (0x3532313900000000000000000000000000000000000000000000000000000000) for SRC-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

SRC-165 was not used because interoperability can be checked by calling resolveMode.

Backwards Compatibility

No backward compatibility issues found.

Reference Implementation

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

Security Considerations

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

Copyright and related rights waived via CC0.

Citation

Please cite this document as:

Gavin John (@Pandapip1), Qi Zhou (@qizhou), "SRC-6944: SRC-5219 Resolve Mode [DRAFT]," Sila Improvement Proposals, no. 6944, April 2023. Available: https://sips.sila.org/SIPS/sip-6944.