You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
628 B
24 lines
628 B
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8.20;
|
|
|
|
/**
|
|
* @dev Helper library for manipulating objects in calldata.
|
|
*/
|
|
library Calldata {
|
|
// slither-disable-next-line write-after-write
|
|
function emptyBytes() internal pure returns (bytes calldata result) {
|
|
assembly ("memory-safe") {
|
|
result.offset := 0
|
|
result.length := 0
|
|
}
|
|
}
|
|
|
|
// slither-disable-next-line write-after-write
|
|
function emptyString() internal pure returns (string calldata result) {
|
|
assembly ("memory-safe") {
|
|
result.offset := 0
|
|
result.length := 0
|
|
}
|
|
}
|
|
}
|
|
|