Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yield Repurchase Facility #12

Merged
merged 6 commits into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions src/test/lib/solady/DynamicBufferLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ library DynamicBufferLib {
// and another extra word as a safety word (giving a total of 0x40 bytes).
// Without the safety word, the data at the next free memory word can be overwritten,
// because the backwards copying can exceed the buffer space used for storage.
for {

} iszero(lt(newBufferDataLength, capacity)) {

} {
for {} iszero(lt(newBufferDataLength, capacity)) {} {
// Approximately double the memory with a heuristic,
// ensuring more than enough space for the combined data,
// rounding up to the next multiple of 32.
Expand All @@ -67,9 +63,7 @@ library DynamicBufferLib {
// Copy `bufferData` one word at a time, backwards.
for {
let o := and(add(bufferDataLength, 32), w)
} 1 {

} {
} 1 {} {
mstore(add(newBufferData, o), mload(add(bufferData, o)))
o := add(o, w) // `sub(o, 0x20)`.
if iszero(o) {
Expand All @@ -93,9 +87,7 @@ library DynamicBufferLib {
// Copy `data` one word at a time, backwards.
for {
let o := and(add(mload(data), 32), w)
} 1 {

} {
} 1 {} {
mstore(add(output, o), mload(add(data, o)))
o := add(o, w) // `sub(o, 0x20)`.
if iszero(o) {
Expand Down
Loading