Перейти к содержимому
Проверенный контрактТочноеMIT

SvzchfChaletWeb3

Адрес0x4ddcc96dadfca5b52bbebda59dc81c2915fa329e
Баланс

0 ETH

 

Транзакций

1

 

Компилятор

solc 0.8.24

 

Тот же код

Только этот контракт

 

Подробности

Компилятор
solc 0.8.24+commit.e11b9ed9
Язык
solidity
Оптимизация
Нет
Версия EVM
cancun
Лицензия
MIT
Совпадение
Точноекод создания: да, код в сети: да
Проверен на Sourcify
Создан в блоке
25 775 500
Транзакция создания
0x86d69236c5…b2dabb7ad2

contracts/SvzchfChaletWeb3.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

interface IHtmlRoot {
    function html() external view returns (string memory);
}

/// @title SvzchfChaletWeb3 — ERC-5219 resource-request adapter for the svZCHF
/// Chalet onchain dapp.
/// @notice gwei.domains and other ERC-6860 resource-request gateways don't do
/// "auto mode" (calling html() directly); they call request(). This immutable
/// adapter serves the existing root contract's html() over ERC-5219. No owner,
/// no upgrade path — the underlying root is immutable too.
contract SvzchfChaletWeb3 {
    struct KeyValue {
        string key;
        string value;
    }

    IHtmlRoot public immutable ROOT;

    constructor(address root) {
        ROOT = IHtmlRoot(root);
    }

    /// @dev ERC-6860 resolve-mode announcement: ERC-5219 resource request.
    function resolveMode() external pure returns (bytes32) {
        return "5219";
    }

    /// @dev ERC-5219: every path serves the single-file dapp.
    function request(
        string[] memory, /* resource */
        KeyValue[] memory /* params */
    )
        external
        view
        returns (uint statusCode, string memory body, KeyValue[] memory headers)
    {
        headers = new KeyValue[](1);
        headers[0] = KeyValue("Content-Type", "text/html; charset=utf-8");
        return (200, ROOT.html(), headers);
    }

    /// @dev ERC-165, including the ERC-5219 interface id (single-function
    /// interface: the request() selector).
    function supportsInterface(bytes4 interfaceId) external pure returns (bool) {
        return interfaceId == 0x01ffc9a7 || interfaceId == 0x1374c460;
    }
}
Настройки компилятораПоказать
{
  "viaIR": false,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "evmVersion": "cancun"
}

Исходный код и метаданные: Sourcify.

Исходный код принадлежит авторам контракта.