Skip to content

Conversation

@Vectorized
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Oct 10, 2024

Changes to gas cost

Generated at commit: 6ea6499004b6c56c736aada4d0c7344226792522, compared to commit: 77466801ed2d7fa46045d6c105fb12e541e17bec

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Endpoint 3,712,769 (-79,614)
ClustersInitiatorBeta 1,162,202 (-95,869)
PricingHarbergerHarness 1,434,461 (+1,938)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the bash script approach instead of standard forge script?

Copy link
Contributor Author

@Vectorized Vectorized Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually do the left curved way of manually generating the stuff so that I can deploy and verify in the browser. Cuz it always works with Etherscan and I don’t need to copy private keys. Also for the initcodehash.

Let me know if you have a better way.

/*-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»-»*/

/// @dev Transient storage slot to denote if the context is in the middle of a `_lzReceive`.
uint256 internal constant _IN_LZ_RECEIVE_TRANSIENT_SLOT = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With solidity 0.8.27 I think we can explicitly declare transient variables now, maybe that turns this cleaner?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have the same thought. Let’s do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dang, it doesn’t reduce the SLOC in this case, cuz everything that touches the transient stuff are already in the middle of an assembly block.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be good if it reduced SLOC but we're already doing everything in an assembly block so can leave as-is

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this file should be a Solady primitive instead of copy-pasted into our project

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lemme think how to refactor Solady’s tests to allow this.

Copy link
Contributor

@0xfoobar 0xfoobar Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solady only copies the relevant parts of forge-std to save on compilation/installation times. sometimes solady mocks don't inherit from test base and so use brutalizer to fuzz in that case


/// @dev Places multiple bids.
/// If any token is `address(0)`, it is treated as the native token.
function placeBids(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert these to one array of structs instead of four arrays, per convo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants