-
Notifications
You must be signed in to change notification settings - Fork 40
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
chore: forge fmt #272
chore: forge fmt #272
Conversation
WalkthroughThe changes across the files are primarily cosmetic, involving minor adjustments to formatting such as adding spaces around operators for better readability. There are no alterations that affect the logic or functionality of the code. The updates seem to be a part of a code clean-up process to adhere to a coding style guideline. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (5)
- src/lib/tree/binary/BinaryMerkleTree.sol (1 hunks)
- src/lib/tree/binary/test/BinaryMerkleTree.t.sol (1 hunks)
- src/lib/tree/namespace/test/NamespaceMerkleMultiproof.t.sol (1 hunks)
- src/lib/tree/namespace/test/NamespaceMerkleTree.t.sol (1 hunks)
- src/lib/verifier/DAVerifier.sol (1 hunks)
Files skipped from review due to trivial changes (4)
- src/lib/tree/binary/BinaryMerkleTree.sol
- src/lib/tree/binary/test/BinaryMerkleTree.t.sol
- src/lib/tree/namespace/test/NamespaceMerkleMultiproof.t.sol
- src/lib/tree/namespace/test/NamespaceMerkleTree.t.sol
Additional comments: 1
src/lib/verifier/DAVerifier.sol (1)
- 254-254: The formatting change to add spaces around the subtraction operator in the array size calculation improves readability and adheres to the new formatting rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- wrappers/Blobstream.sol/wrapper.go (1 hunks)
- wrappers/ERC1967Proxy.sol/wrapper.go (1 hunks)
Files not summarized due to errors (1)
- wrappers/Blobstream.sol/wrapper.go: Error: Message exceeds token limit
Additional comments: 9
wrappers/ERC1967Proxy.sol/wrapper.go (1)
- 34-34: The ABI string in
WrappersMetaData
has been reformatted. Verify that the new ABI string correctly represents the contract's interface and that the reordering of elements does not affect any dependent code or tools that may rely on the order of elements in the ABI.Verification successful
The previous script contained an error as it did not use the actual ABI string for validation. Let's correct this and run a new script to verify the JSON structure of the ABI string.
The script failed due to a parse error in the JSON string, likely caused by the unnecessary escape characters. I will correct the script and run it again to validate the JSON structure of the ABI string.
The absence of output from the
jq
command, in this case, indicates that the JSON string is valid, asjq empty
would produce an error message if the input were not valid JSON. Therefore, the ABI string in theWrappersMetaData
is correctly formatted as valid JSON.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that the ABI string is valid JSON echo 'WrappersMetaData ABI' | jq emptyLength of output: 98
Script:
#!/bin/bash # Verify that the ABI string is valid JSON echo '[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_logic\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"payable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"AdminChanged\",\"inputs\":[{\"name\":\"previousAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconUpgraded\",\"inputs\":[{\"name\":\"beacon\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]' | jq emptyLength of output: 1013
Script:
#!/bin/bash # Verify that the ABI string is valid JSON echo '[{"type":"constructor","inputs":[{"name":"_logic","type":"address","internalType":"address"},{"name":"_data","type":"bytes","internalType":"bytes"}],"stateMutability":"payable"},{"type":"fallback","stateMutability":"payable"},{"type":"receive","stateMutability":"payable"},{"type":"event","name":"AdminChanged","inputs":[{"name":"previousAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"newAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"BeaconUpgraded","inputs":[{"name":"beacon","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Upgraded","inputs":[{"name":"implementation","type":"address","indexed":true,"internalType":"address"}],"anonymous":false}]' | jq emptyLength of output: 814
wrappers/Blobstream.sol/wrapper.go (8)
60-61: The ABI and binary strings for the smart contract are embedded directly into the Go source code. This is a common practice for generated bindings, but it's important to ensure that the ABI and binary are up-to-date with the latest contract deployed on the blockchain. If the contract has been updated, these strings should be regenerated to match the current contract.
64-64: The
WrappersABI
andWrappersBin
variables are marked as deprecated and now reference theWrappersMetaData
struct. Ensure that this deprecation is intentional and that any developers using these variables are informed of the change to avoid potential issues.64-64: The
DeployWrappers
function correctly handles errors and returns them to the caller. It also checks for a nil ABI which is good practice to avoid nil pointer dereferences. This function appears to be implemented correctly.64-64: The
Wrappers
struct and its embedded types (WrappersCaller
,WrappersTransactor
,WrappersFilterer
) follow Go's naming conventions and struct embedding practices for representing different contract interaction patterns. This is a standard approach for Go Ethereum contract bindings.64-64: The
bindWrappers
function correctly handles errors by returning them to the caller. It also ensures that the ABI is not nil before creating a new bound contract, which is a good practice to prevent runtime errors.64-64: The
Call
,Transfer
, andTransact
methods onWrappersRaw
andWrappersCallerRaw
/WrappersTransactorRaw
are standard methods generated for raw contract interactions in Go Ethereum bindings. They correctly propagate errors and follow the established patterns for such operations.64-64: The generated code for contract method bindings such as
UPGRADEINTERFACEVERSION
,Owner
,ProxiableUUID
, etc., follows the Go Ethereum binding standards. Each method correctly handles the conversion of the output to the expected Go type and returns any errors encountered during the call.64-64: The generated code for contract event bindings such as
FilterDataRootTupleRootEvent
,WatchDataRootTupleRootEvent
, etc., adheres to the Go Ethereum binding standards. The methods use the correct event signatures and provide the necessary functionality to filter and watch for events emitted by the contract.
Overview
CI is failing in PRs because foundry added new rules to their formatter. This PR fixes those
Checklist
Summary by CodeRabbit