Enhance contract simulations and streamline error handling#84
Merged
mahabubAlahi merged 4 commits intofeat/contract-sdkfrom Mar 31, 2026
Merged
Enhance contract simulations and streamline error handling#84mahabubAlahi merged 4 commits intofeat/contract-sdkfrom
mahabubAlahi merged 4 commits intofeat/contract-sdkfrom
Conversation
- Added new simulation methods for AllOrNothing contract: pauseTreasury, unpauseTreasury, cancelTreasury, addRewards, removeReward, burn, approve, setApprovalForAll, safeTransferFrom, and transferFrom. - Expanded CampaignInfo contract simulations with setImageURI, updateContractURI, unpauseCampaign, setPlatformInfo, transferOwnership, and renounceOwnership methods. - Updated corresponding types to reflect the new simulation methods in AllOrNothing and CampaignInfo contracts. - Introduced similar ownership transfer and renouncement methods in GlobalParams and CampaignInfoFactory contracts.
- Introduced tests for ownership transfer and renouncement in GlobalParams, CampaignInfoFactory, and CampaignInfo contracts. - Added new simulation methods for CampaignInfo: setImageURI, updateContractURI, unpauseCampaign, and setPlatformInfo. - Enhanced AllOrNothing contract tests with pauseTreasury, unpauseTreasury, cancelTreasury, addRewards, removeReward, burn, approve, setApprovalForAll, safeTransferFrom, and transferFrom methods. - Updated existing tests to ensure comprehensive coverage of new functionalities.
- Consolidated import statements in various simulation files to enhance clarity and reduce redundancy. - Updated simulation methods across multiple contracts to utilize `simulateWithErrorDecode` for error handling, replacing `parseContractError`. - Renamed and reorganized methods in the CampaignInfo contract to improve consistency and readability, including updates to `setImageURI`, `updateContractURI`, and `pauseCampaign`. - Adjusted types in the CampaignInfo and KeepWhatsRaised contracts to reflect the new method signatures and ensure type safety.
- Renamed the test description for the GlobalParams entity to clarify that the events object is expected to be empty.
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.
Summary
simulate.*counterpartparseContractErrorandgetRevertDataimportssimulateWithErrorDecodeconsistently across all 8 contract modules