Commit ed10607
authored
V3 adoption scripts (#44)
* docs: update agreement.pdf and summary.pdf to reflect recent contract changes and enhancements
* feat: add AddChains script and corresponding unit tests
- Introduced the AddChains script for adding chains to an existing Agreement contract, including JSON parsing and validation.
- Implemented unit tests for the AddChains script to ensure functionality for adding single and multiple chains, as well as handling edge cases like duplicate chains.
- Added a sample JSON file for testing chain addition scenarios.
* feat: add example JSON files for chains and agreement details
- Introduced addChains.json and agreementDetails.json to provide sample data for chain addition and agreement specifications.
- Updated paths in AddChains and AdoptSafeHarbor scripts to reference the new example JSON files.
* fix: ensure consistent environment variable setup in AddChainsTest
- Updated the test_addChains_multipleTimes function to reset the PROTOCOL_PRIVATE_KEY environment variable before each batch addition.
- This change ensures that the correct owner key is used consistently, preventing potential test failures due to environment changes.
* refactor: simplify key management in AddChains and AdoptSafeHarbor scripts
BAD AI. NO PK IN .ENV. DON'T ENBARRASS ME IN FRONT OF PATRICK
- Updated AddChains and AdoptSafeHarbor scripts to use msg.sender for ownership validation instead of relying on the PROTOCOL_PRIVATE_KEY environment variable.
- Adjusted documentation to reflect changes in environment variable usage and default JSON paths.
- Modified unit tests to remove unnecessary environment variable setups, ensuring cleaner test cases and consistent ownership handling.
* refactor: improve code readability in AddChains and AdoptSafeHarbor scripts
- Simplified function signatures in AddChains and AdoptSafeHarbor scripts for better clarity.
- Consolidated console log statements for consistent formatting.
- Removed unnecessary blank lines to enhance code cleanliness in unit tests.
* refactor: format JSON test data for improved readability
- Reformatted envTest.json and parseTest.json files to enhance readability by structuring the JSON data with proper indentation and line breaks.
- This change improves clarity and maintainability of test data used in unit tests.
* refactor: streamline AddChains script and unit tests for clarity
- Simplified function signatures and reduced unnecessary code in the AddChains script for improved readability.
- Updated JSON file reading methods to use vm.readFile for consistency.
- Enhanced unit tests by removing redundant environment variable setups and improving test data structure.
- Consolidated console log statements for better output formatting.
* refactor: update AdoptSafeHarbor script to use provided salt for agreement creation
- Modified the AdoptSafeHarbor script to directly use the provided salt from the config instead of generating a new one based on the protocol name and timestamp.
- This change enhances the clarity and predictability of the agreement creation process.
* refactor: update JSON test data and paths for agreement parsing
- Replaced the previous test JSON file with a new agreement.json file containing updated protocol details.
- Adjusted test cases in AdoptSafeHarborTest to reference the new agreement.json path, ensuring consistency in JSON parsing.
- Removed outdated identity and invalid agreement JSON files to streamline test data.
* refactor: update JSON key checking in AddChains and AdoptSafeHarbor scripts
- Changed the method for checking JSON keys from vm.keyExists to vm.keyExistsJson for improved clarity and consistency in JSON handling.
- Adjusted the _parseBountyTerms function in AdoptSafeHarbor to be pure, enhancing its performance and clarity.1 parent 3b71ed8 commit ed10607
File tree
8 files changed
+918
-0
lines changed- registry-contracts
- examples
- script
- test/unit
- testdata
8 files changed
+918
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
0 commit comments