{
  "address": "0xb091c4f6fac16edda5ee1e0f4738f80011905878",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "key",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        },
        {
          "internalType": "bytes",
          "name": "signature",
          "type": "bytes"
        }
      ],
      "name": "verify",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "contractName": "P256SHA256Algorithm",
  "sourceName": "contracts/dnssec-oracle/algorithms/P256SHA256Algorithm.sol",
  "bytecode": "0x6080604052348015600f57600080fd5b5061040f8061001f6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063de8f50a114610030575b600080fd5b61004361003e3660046102db565b610057565b604051901515815260200160405180910390f35b6000604082146100c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f496e76616c69642070323536207369676e6174757265206c656e67746800000060448201526064015b60405180910390fd5b60448614610132576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f496e76616c69642070323536206b6579206c656e67746800000000000000000060448201526064016100bf565b60405183359060208501359060048a01359060248b0135906101a79060029061015e908c908c90610381565b602060405180830381855afa15801561017b573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061019e9190610391565b858585856101b6565b9b9a5050505050505050505050565b604080516020808201889052818301879052606082018690526080820185905260a08083018590528351808403909101815260c083018281526101008401909452600093909284929060e001818036833701905050905060208082018351602085016101005afa925082156102875780517f0100000000000000000000000000000000000000000000000000000000000000908290601f90811061025c5761025c6103aa565b01602001517fff00000000000000000000000000000000000000000000000000000000000000161492505b505095945050505050565b60008083601f8401126102a457600080fd5b50813567ffffffffffffffff8111156102bc57600080fd5b6020830191508360208285010111156102d457600080fd5b9250929050565b600080600080600080606087890312156102f457600080fd5b863567ffffffffffffffff81111561030b57600080fd5b61031789828a01610292565b909750955050602087013567ffffffffffffffff81111561033757600080fd5b61034389828a01610292565b909550935050604087013567ffffffffffffffff81111561036357600080fd5b61036f89828a01610292565b979a9699509497509295939492505050565b8183823760009101908152919050565b6000602082840312156103a357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea26469706673582212206a9a1972102f1fd2de37e61dcce15b6329edc418622ab7ccd8ac51852a1c48b864736f6c634300081a0033",
  "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063de8f50a114610030575b600080fd5b61004361003e3660046102db565b610057565b604051901515815260200160405180910390f35b6000604082146100c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f496e76616c69642070323536207369676e6174757265206c656e67746800000060448201526064015b60405180910390fd5b60448614610132576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f496e76616c69642070323536206b6579206c656e67746800000000000000000060448201526064016100bf565b60405183359060208501359060048a01359060248b0135906101a79060029061015e908c908c90610381565b602060405180830381855afa15801561017b573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061019e9190610391565b858585856101b6565b9b9a5050505050505050505050565b604080516020808201889052818301879052606082018690526080820185905260a08083018590528351808403909101815260c083018281526101008401909452600093909284929060e001818036833701905050905060208082018351602085016101005afa925082156102875780517f0100000000000000000000000000000000000000000000000000000000000000908290601f90811061025c5761025c6103aa565b01602001517fff00000000000000000000000000000000000000000000000000000000000000161492505b505095945050505050565b60008083601f8401126102a457600080fd5b50813567ffffffffffffffff8111156102bc57600080fd5b6020830191508360208285010111156102d457600080fd5b9250929050565b600080600080600080606087890312156102f457600080fd5b863567ffffffffffffffff81111561030b57600080fd5b61031789828a01610292565b909750955050602087013567ffffffffffffffff81111561033757600080fd5b61034389828a01610292565b909550935050604087013567ffffffffffffffff81111561036357600080fd5b61036f89828a01610292565b979a9699509497509295939492505050565b8183823760009101908152919050565b6000602082840312156103a357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea26469706673582212206a9a1972102f1fd2de37e61dcce15b6329edc418622ab7ccd8ac51852a1c48b864736f6c634300081a0033",
  "linkReferences": {},
  "deployedLinkReferences": {},
  "immutableReferences": {},
  "inputSourceName": "project/contracts/dnssec-oracle/algorithms/P256SHA256Algorithm.sol",
  "devdoc": {
    "details": "Replaces the Solidity-based EllipticCurve implementation with native P-256 verification",
    "kind": "dev",
    "methods": {
      "verify(bytes,bytes,bytes)": {
        "details": "Verifies a DNSSEC signature.",
        "params": {
          "data": "The signed data to verify.",
          "key": "The DNSKEY RDATA (68 bytes: 4-byte header + 64-byte public key).",
          "signature": "The signature to verify (64 bytes: r + s)."
        },
        "returns": {
          "_0": "True iff the signature is valid."
        }
      }
    },
    "title": "P256SHA256Algorithm",
    "version": 1
  },
  "evm": {
    "gasEstimates": {
      "creation": {
        "codeDepositCost": "207800",
        "executionCost": "251",
        "totalCost": "208051"
      },
      "external": {
        "verify(bytes,bytes,bytes)": "infinite"
      }
    }
  },
  "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"key\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Replaces the Solidity-based EllipticCurve implementation with native P-256 verification\",\"kind\":\"dev\",\"methods\":{\"verify(bytes,bytes,bytes)\":{\"details\":\"Verifies a DNSSEC signature.\",\"params\":{\"data\":\"The signed data to verify.\",\"key\":\"The DNSKEY RDATA (68 bytes: 4-byte header + 64-byte public key).\",\"signature\":\"The signature to verify (64 bytes: r + s).\"},\"returns\":{\"_0\":\"True iff the signature is valid.\"}}},\"title\":\"P256SHA256Algorithm\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"DNSSEC Algorithm 13 (ECDSAP256SHA256) implementation using EIP-7951 precompile\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"project/contracts/dnssec-oracle/algorithms/P256SHA256Algorithm.sol\":\"P256SHA256Algorithm\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[\"project/:@ensdomains/solsha1/=npm/@ensdomains/solsha1@0.0.3/\"]},\"sources\":{\"project/contracts/dnssec-oracle/algorithms/Algorithm.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\n/// @dev An interface for contracts implementing a DNSSEC (signing) algorithm.\\ninterface Algorithm {\\n    /// @dev Verifies a signature.\\n    /// @param key The public key to verify with.\\n    /// @param data The signed data to verify.\\n    /// @param signature The signature to verify.\\n    /// @return True iff the signature is valid.\\n    function verify(\\n        bytes calldata key,\\n        bytes calldata data,\\n        bytes calldata signature\\n    ) external view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xbcbdc06d72b64903e733e7ddfbf59c35c984c3eb0022baacab12c97292cc13df\"},\"project/contracts/dnssec-oracle/algorithms/P256Precompile.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\nlibrary P256Precompile {\\n    /// @dev Verifies a P-256 ECDSA signature using EIP-7951 precompile.\\n    /// @param messageHash The SHA-256 hash of the message being verified.\\n    /// @param r The r component of the signature (32 bytes).\\n    /// @param s The s component of the signature (32 bytes).\\n    /// @param qx The x-coordinate of the public key (32 bytes).\\n    /// @param qy The y-coordinate of the public key (32 bytes).\\n    /// @return success True if the signature is valid, false otherwise.\\n    function verify(\\n        bytes32 messageHash,\\n        bytes32 r,\\n        bytes32 s,\\n        bytes32 qx,\\n        bytes32 qy\\n    ) internal view returns (bool success) {\\n        // EIP-7951 precompile input: hash(32) + r(32) + s(32) + x(32) + y(32) = 160 bytes\\n        bytes memory input = abi.encodePacked(messageHash, r, s, qx, qy);\\n\\n        bytes memory output = new bytes(32);\\n\\n        assembly {\\n            success := staticcall(\\n                gas(),\\n                0x100, // EIP-7951 P-256 precompile address\\n                add(input, 32),\\n                mload(input), // 160 bytes\\n                add(output, 32),\\n                32 // Output is 32 bytes\\n            )\\n        }\\n\\n        // Precompile returns 32 bytes: 0x00...01 for valid, 0x00...00 for invalid\\n        if (success) {\\n            success = (output[31] == bytes1(0x01));\\n        }\\n    }\\n}\\n\\n\",\"keccak256\":\"0x88601b4d6eca961bade47e553477b634a7652827ecb00c488f020c1c86bfccb1\"},\"project/contracts/dnssec-oracle/algorithms/P256SHA256Algorithm.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"./Algorithm.sol\\\";\\nimport \\\"./P256Precompile.sol\\\";\\n\\n/// @title P256SHA256Algorithm\\n/// @notice DNSSEC Algorithm 13 (ECDSAP256SHA256) implementation using EIP-7951 precompile\\n/// @dev Replaces the Solidity-based EllipticCurve implementation with native P-256 verification\\ncontract P256SHA256Algorithm is Algorithm {\\n    /// @dev Verifies a DNSSEC signature.\\n    /// @param key The DNSKEY RDATA (68 bytes: 4-byte header + 64-byte public key).\\n    /// @param data The signed data to verify.\\n    /// @param signature The signature to verify (64 bytes: r + s).\\n    /// @return True iff the signature is valid.\\n    function verify(\\n        bytes calldata key,\\n        bytes calldata data,\\n        bytes calldata signature\\n    ) external view override returns (bool) {\\n        require(signature.length == 64, \\\"Invalid p256 signature length\\\");\\n        require(key.length == 68, \\\"Invalid p256 key length\\\");\\n\\n        // Extract signature components (r, s) and public key (qx, qy)\\n        // Key format: 4-byte DNSKEY header (flags, protocol, algorithm) + 64-byte public key\\n        bytes32 r;\\n        bytes32 s;\\n        bytes32 qx;\\n        bytes32 qy;\\n\\n        assembly {\\n            // signature.offset points to start of signature in calldata\\n            r := calldataload(signature.offset)\\n            s := calldataload(add(signature.offset, 32))\\n            // key.offset + 4 skips the DNSKEY header\\n            qx := calldataload(add(key.offset, 4))\\n            qy := calldataload(add(key.offset, 36))\\n        }\\n\\n        return P256Precompile.verify(sha256(data), r, s, qx, qy);\\n    }\\n}\\n\",\"keccak256\":\"0xd204330d635252f9e87d35920d1934c160a45007482916c207fc9dc51549dc81\",\"license\":\"MIT\"}},\"version\":1}",
  "storageLayout": {
    "storage": [],
    "types": null
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "notice": "DNSSEC Algorithm 13 (ECDSAP256SHA256) implementation using EIP-7951 precompile",
    "version": 1
  },
  "argsData": "0x",
  "transaction": {
    "hash": "0x8f6ed545325f825ebaa4979959ffae821c8f802711e8a0c214d83037e2d04180",
    "nonce": "0x2",
    "origin": "0x4e472d50f3d735e76a143afcadae7f03db6995de"
  },
  "receipt": {
    "blockHash": "0x463c1f0d969c7724d90ff50f5d50047430ab614c925371b403e20fba371c3f1c",
    "blockNumber": "0x1763f19",
    "transactionIndex": "0x10"
  }
}