Conversation
…nsaction record retrieval This commit updates the RuntimeRBAC test suite to improve error handling for role creation and transaction record retrieval. It introduces a method to detect 'ResourceAlreadyExists' reverts, allowing the tests to continue gracefully when roles already exist. Additionally, the logic for retrieving transaction records has been refined to prioritize expected transaction IDs from meta-transactions, enhancing the robustness of the testing framework.
…ollerDefinitions This commit updates the function signature for the executeWithTimeLock method in the GuardControllerDefinitions library to accurately reflect the parameter types. The change ensures consistency in the function selector and schema definition, enhancing clarity and preventing potential mismatches during contract execution.
This commit adds default Blox initializers to the env.deployment.example file, including addresses for the owner, recovery, and broadcaster, along with a timelock delay setting. Additionally, it updates the Hardhat configuration to include the hardhat-ethers plugin, ensuring compatibility for library linking during deployments. The deployment script is also refined to clarify the use of viem for contract deployment, improving error handling and output clarity for deployed addresses.
…nitions This commit introduces a new function selector for the executeWithPayment method in the GuardControllerDefinitions library. The addition enhances the library's functionality by allowing for payment execution with specified parameters, ensuring consistency and clarity in contract interactions.
This commit enhances the GuardController and RuntimeRBAC implementations by replacing local execution parameter generation with calls to their respective deployed definition contracts. This change ensures a single source of truth for action specifications and improves the accuracy of execution parameters. Additionally, it removes outdated local helper functions and updates related documentation to reflect the new approach.
…cution contracts This commit updates the RuntimeRBAC, GuardController, and SecureOwnable contracts to enforce that all function schemas must be protected. The changes include renaming the parameter for clarity and removing outdated validation logic related to protected schemas. This enhancement ensures stricter security measures and consistency across the contract definitions.
…nction protection This commit adds a new error type, ContractFunctionMustBeProtected, to the ABI definitions across multiple contracts, ensuring that all function schemas are explicitly protected. The change enhances security by providing clear feedback when unprotected function calls are attempted. Additionally, it updates the GuardController and related contracts to enforce this protection consistently, aligning with recent refactoring efforts to strengthen role-based access control and execution parameters.
… consistency This commit updates the README files for both the guard-controller and sanity-sdk to include new environment variable requirements, specifically `NETWORK_NAME` or `GUARDIAN_NETWORK`. Additionally, it refines the test configuration files to standardize RPC port defaults and improve error handling in the encoding functions. These changes aim to enhance the clarity of setup instructions and ensure consistent behavior across different testing environments.
…d contracts This commit updates the Solidity version from 0.8.33 to 0.8.34 in various files, including configuration files (foundry.toml, hardhat.config.ts, truffle-config.cjs) and contract files. The change ensures compatibility with the latest Solidity features and improvements, enhancing overall project stability and security. Additionally, the README and package documentation are updated to reflect the new recommended Solidity version.
…ved error handling This commit updates the guard-controller test suite to include CJS-style pre-checks for function schemas, ensuring that registration is skipped if a schema already exists. It also enhances error handling for transaction results, specifically addressing scenarios where a function may already be registered or whitelisted. Additionally, the gas limit for transaction parameters is increased to match the CJS createGuardConfigBatchMetaTx, improving consistency across test cases. These changes aim to strengthen the robustness and reliability of the testing framework.
…ive coverage This commit significantly improves the fuzz testing framework by expanding the number of test suites to 37, with a total of 309 tests, ensuring all security-critical components are thoroughly evaluated. The README and related documentation are updated to reflect these changes, including the addition of new attack vectors derived from the Protocol Vulnerabilities Index. Key enhancements include detailed coverage metrics for each test suite, improved clarity in the Attack Vectors Codex, and the introduction of new tests for fee-on-transfer handling and nonce consumption in meta-transactions. These updates aim to bolster the security posture of the Bloxchain Protocol and provide clearer guidance for future testing efforts.
…ndling and error reporting This commit updates the guard-controller test suite to include additional checks for function schemas, ensuring that the correct function selector is retrieved from the schema. It also enhances the error handling in the `normalizeMetaTxToHex` function to provide clearer warnings and prevent data corruption due to incorrect message lengths. Furthermore, it removes outdated batch execution methods from the GuardController and RuntimeRBAC classes, streamlining the codebase and improving clarity. These changes aim to strengthen the testing framework and enhance the robustness of the contract interactions.
…d fuzz testing This commit introduces a new error check in the `getFunctionWhitelistTargetsAsOwner` method to ensure that the retry count is positive, preventing potential runtime issues. Additionally, it updates the `contract-errors.ts` file to include `ERROR_DECODE_TYPES`, enhancing error reporting capabilities. The test coverage report is also improved, reflecting increased coverage across multiple attack vector categories, including access control, meta-transactions, and state machine security. These enhancements aim to strengthen the robustness of the testing framework and improve overall contract reliability.
…tation This commit expands the error handling capabilities in the `contract-errors.ts` file by adding new error types and refining existing ones. Notable additions include `NotNewAddress`, `InvalidTimeLockPeriod`, and `DeadlineInPast`, which improve clarity and specificity in error reporting. Additionally, the README documentation is updated for consistency, particularly in the description of protocol vulnerabilities. These enhancements aim to strengthen the robustness of error management and provide clearer guidance for developers interacting with the SDK.
This commit enhances the `contract-errors.ts` file by introducing several new error types, including `NoPermissionForFunction`, `NotSupported`, and `TransactionStatusMismatch`, among others. These additions improve the specificity and clarity of error reporting within the SDK. Additionally, the existing error interfaces have been refined to streamline parameters and enhance overall error management. These updates aim to strengthen the robustness of error handling and provide clearer guidance for developers interacting with the contract.
This commit adds a clarification to the documentation in the `contract-errors.ts` file regarding the `ERROR_DECODE_TYPES` object. It specifies that the `viem/abitype` parseAbiParameters function accepts type-only strings, enhancing the clarity of how to utilize this feature. This update aims to improve developer understanding and usage of the error decoding capabilities within the SDK.
Contributor
|
Important Review skippedToo many files! This PR contains 160 files, which is 10 over the limit of 150. You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.