From 73ef9040e430ce0111b7ee6e51aab624bcf19d80 Mon Sep 17 00:00:00 2001 From: Gas <86567384+gas1cent@users.noreply.github.com> Date: Fri, 13 Oct 2023 17:43:37 +0400 Subject: [PATCH] fix: saving response id too early (#222) --- solidity/contracts/Oracle.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solidity/contracts/Oracle.sol b/solidity/contracts/Oracle.sol index 4d12171..11e84ca 100644 --- a/solidity/contracts/Oracle.sol +++ b/solidity/contracts/Oracle.sol @@ -195,8 +195,8 @@ contract Oracle is IOracle { _responseId = keccak256(abi.encodePacked(_proposer, address(this), _requestId, _responseNonce++)); _participants[_requestId].add(_proposer); - _responseIds[_requestId].add(_responseId); _responses[_responseId] = _request.responseModule.propose(_requestId, _proposer, _responseData, msg.sender); + _responseIds[_requestId].add(_responseId); if (_responses[_responseId].proposer != _proposer) { revert Oracle_CannotTamperParticipant();