Skip to content

Commit

Permalink
fix: minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed May 10, 2024
1 parent f0229da commit ec73845
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"prettier-solidity-check": "yarn --cwd='../' contracts-v01 prettier-solidity-check",
"solhint": "yarn --cwd='../' contracts-v01 solhint",
"lint": "yarn --cwd='../' contracts-v01 lint && yarn --cwd='../' contracts-v02 lint",
"test-non-vrf": "yarn --cwd='../' contracts-v01 test-non-vrf"
"test-non-vrf": "yarn --cwd='../' contracts-v01 test-non-vrf && yarn --cwd='../' contracts-v02 test"
},
"engines": {
"node": ">=20.0.0"
Expand Down
2 changes: 1 addition & 1 deletion contracts/v0.2/src/SubmissionProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ contract SubmissionProxy is Ownable {
continue;
}

if (keccak256(abi.encode(feeds[_feedHashes[i]].description())) != _feedHashes[i]) {
if (keccak256(abi.encodePacked(feeds[_feedHashes[i]].description())) != _feedHashes[i]) {
// feedHash not matching with registered feed -> do not submit!
continue;
}
Expand Down
6 changes: 3 additions & 3 deletions contracts/v0.2/test/SubmissionProxy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ contract SubmissionProxyTest is Test {
int256[] memory submissions_,
bytes[] memory proofs_,
uint256[] memory timestamps_,
address[] memory feeds_

) = prepareFeedsSubmissions(numOracles_, submissionValue_, dummySk_);
bytes32 hash_ = keccak256(abi.encodePacked(submissions_[0], timestamps_[0], feedHashes_[0]));

Expand Down Expand Up @@ -386,14 +386,14 @@ contract SubmissionProxyTest is Test {
) = createSubmitParameters(_numOracles);
address[] memory feeds_ = new address[](_numOracles);
for (uint256 i = 0; i < _numOracles; i++) {
Feed feed_ = new Feed(DECIMALS, DESCRIPTION, address(submissionProxy));
Feed feed_ = new Feed(DECIMALS, SAMPLE_NAMES[i], address(submissionProxy));
feeds_[i] = address(feed_);
feedHashes_[i] = keccak256(abi.encodePacked(SAMPLE_NAMES[i]));
submissions_[i] = _submissionValue;
timestamps_[i] = block.timestamp;
proofs_[i] =
createProof(_oracleSk, keccak256(abi.encodePacked(timestamps_[i], submissions_[i], feedHashes_[i])));
submissionProxy.updateFeed(feedHashes_[i], address(feed_));
submissionProxy.updateFeed(feedHashes_[i], address(feeds_[i]));
}

return (feedHashes_, submissions_, proofs_, timestamps_, feeds_);
Expand Down

0 comments on commit ec73845

Please sign in to comment.