From c40323828b1f95a3193d754eab3a8fd78ed47096 Mon Sep 17 00:00:00 2001 From: Jeff Schroeder Date: Thu, 12 Oct 2023 18:20:11 +0000 Subject: [PATCH] ethereum: limit deps in the QueryDemo contract - Context is generally a worthless import - Ownable is totally unused and a worthless import --- ethereum/contracts/query/QueryDemo.sol | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ethereum/contracts/query/QueryDemo.sol b/ethereum/contracts/query/QueryDemo.sol index f2396f5a5..3d0280e48 100644 --- a/ethereum/contracts/query/QueryDemo.sol +++ b/ethereum/contracts/query/QueryDemo.sol @@ -5,12 +5,10 @@ pragma solidity ^0.8.0; import "../libraries/external/BytesLib.sol"; import "../interfaces/IWormhole.sol"; -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@openzeppelin/contracts/utils/Context.sol"; import "./QueryResponse.sol"; /// @dev QueryDemo is a library that implements the parsing and verification of Cross Chain Query (CCQ) responses. -contract QueryDemo is Context, QueryResponse { +contract QueryDemo is QueryResponse { using BytesLib for bytes; struct ChainEntry { @@ -97,7 +95,7 @@ contract QueryDemo is Context, QueryResponse { } modifier onlyOwner() { - require(owner == _msgSender(), "caller is not the owner"); + require(owner == msg.sender, "caller is not the owner"); _; } }