commitd5b67d3499Author: Hadrien Croubois <hadrien.croubois@gmail.com> Date: Sat Jul 8 15:40:04 2023 +0200 Update strong-poems-thank.md commit909af00946Author: Hadrien Croubois <hadrien.croubois@gmail.com> Date: Sat Jul 8 15:39:09 2023 +0200 add changeset commit2201f657b9Author: Hadrien Croubois <hadrien.croubois@gmail.com> Date: Fri Jul 7 16:08:48 2023 +0200 remove declaration of max_uint48 with is not available by default in CVL2 commit0b3da8c14cAuthor: Hadrien Croubois <hadrien.croubois@gmail.com> Date: Fri Jul 7 15:19:30 2023 +0200 update DoubleEndedQueue specs to run with certora 4.3.1 commit734bf8e85aMerge:1294d4bc7ccea54dAuthor: Hadrien Croubois <hadrien.croubois@gmail.com> Date: Fri Jul 7 14:28:11 2023 +0200 Merge branch 'master' into refactor/DoubleEndedQueue commit1294d4bc10Author: Hadrien Croubois <hadrien.croubois@gmail.com> Date: Fri Jul 7 14:27:41 2023 +0200 Update DoubleEndedQueue.sol commit1199e602d1Merge:fd880a59f29307cfAuthor: Hadrien Croubois <hadrien.croubois@gmail.com> Date: Wed Jun 28 14:01:21 2023 +0200 Merge branch 'master' into refactor/DoubleEndedQueue commitfd880a598eAuthor: Hadrien Croubois <hadrien.croubois@gmail.com> Date: Fri Mar 31 20:43:11 2023 +0200 remove signed integers from DoubleEndedQueue
60 lines
1.3 KiB
Solidity
60 lines
1.3 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8.19;
|
|
|
|
import "../patched/utils/structs/DoubleEndedQueue.sol";
|
|
|
|
contract DoubleEndedQueueHarness {
|
|
using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque;
|
|
|
|
DoubleEndedQueue.Bytes32Deque private _deque;
|
|
|
|
function pushFront(bytes32 value) external {
|
|
_deque.pushFront(value);
|
|
}
|
|
|
|
function pushBack(bytes32 value) external {
|
|
_deque.pushBack(value);
|
|
}
|
|
|
|
function popFront() external returns (bytes32 value) {
|
|
return _deque.popFront();
|
|
}
|
|
|
|
function popBack() external returns (bytes32 value) {
|
|
return _deque.popBack();
|
|
}
|
|
|
|
function clear() external {
|
|
_deque.clear();
|
|
}
|
|
|
|
function begin() external view returns (uint128) {
|
|
return _deque._begin;
|
|
}
|
|
|
|
function end() external view returns (uint128) {
|
|
return _deque._end;
|
|
}
|
|
|
|
function length() external view returns (uint256) {
|
|
return _deque.length();
|
|
}
|
|
|
|
function empty() external view returns (bool) {
|
|
return _deque.empty();
|
|
}
|
|
|
|
function front() external view returns (bytes32 value) {
|
|
return _deque.front();
|
|
}
|
|
|
|
function back() external view returns (bytes32 value) {
|
|
return _deque.back();
|
|
}
|
|
|
|
function at_(uint256 index) external view returns (bytes32 value) {
|
|
return _deque.at(index);
|
|
}
|
|
}
|