Commit 7a2c767
Cross-chain Strategy (#2715)
* some scaffolding
* add basic necessities for unit tests
* checkpoint
* Fix compiling issues
* Add fork test scaffolding
* Fix stuffs
* Prettify and change salt
* Add auto-verification
* Fix checkBalance
* Make CCTPHookWrapper more resilient
* refactor message version and type checks
* add some comments
* add comment
* fix compile errors
* Change addresses
* Cross chain changes (#2718)
* fix deploy files
* minor rename
* add calls to Morpho Vault into a try catch
* refactor hook wrapper
* don't revert if withdraw from underlying fails
* use checkBalance for deposit/withdrawal acknowledgment
* update message in remote strategy
* remove unneeded functions
* Fix compilation issues
* Fix deployment files a bit
* Fix Message relayer
* Clean up master strategy
* Fix deployment file name
* move around stuff
* Fix CCTP Integrator
* clean up fork
* Fix race condition (#2720)
* Fix race condition
* Transfer everything on wtihdrawal
* Move destination domain one step above
* Cleanup code
* decode payloads in fork tests
* Add library for message handling
* More changes
* Add comments and prettify
* WIP Unit test setup (#2722)
* add cross chain unit test basic files
* add basic unit test setup
* add header encoding
* more tests
* Add more fork tests
* Add token transfer tests
* WIP Unit tests for OUSD Simplified strategy (#2724)
* more unit test integration
* more tying up ends
* fix bug
* cleanup
* add full round-trip test
* cleanup
* Fix approve all and prettify
---------
Co-authored-by: Shahul Hameed <10547529+shahthepro@users.noreply.github.com>
* Fix master fork tests
* linter
* add direct withdrawal paths and additional checks
* Fix Remote strategy tests
* Update comments and clean up code
* Fix comment
* Fix failing unit test
* fix: withdraw only if balance is lower than requested amount
* Document crosschain strategy
* Update deployment file numbers
* adjust the charts
* change the function visibility to pure
* fix: create2 proxy without using deployer address
* fix: impersonate a single deployer on fork
* deploy script bug fix
* Store create2 proxy addresses
* fix: await
* more logging
* fix opts
* Fix env for deploy action
* Change writeFileSync to writeFile
* add log
* Add more logs
* fix callback
* Add empty file
* Cleanup logs
* withdraw funds according to the spec
* Address Code Review comments (#2732)
* Address Code Review comments
* Fix initialize method
* Fix initialize method
* fix remote strat initialize method
* Revert 999
* fix comments
* add a test that uncovers a withdrawal error (#2733)
* remove transferType
* correct spelling
* rename baseToken to usdcToken
* improve error message
* simplify code
* fix: min withdraw amount is 1e6
* add validations for config
* fix: require a min deposit amount of 1e6
* fix: withdrawAll caps withdraw amount
* Move around constants
* Move decode message header function
* fix fork tests
* prettify
* adjust some comments
* have consistent event names
* fix: remove redundant check
* simplify stuff
* adjust comment
* fix: variable name
* Add TokensBridged and MessageTransmitted events
* Add finality threshold checks
* add comment regarding fast transfers
* Add analytics info
* Change error message
* Set 1 USDC as min allowed value for deposits
* Change comment
* Change comment
* Update max transfer amount comment
* Set nonce(0) as processed during initialization
* Use Strategizable for strategist functionality (#2740)
* use Strategizable
* Add comment
---------
Co-authored-by: Shahul Hameed <10547529+shahthepro@users.noreply.github.com>
* set vault address to zero (#2742)
* remove unnecessary comments
* Add comment
* Add nonReentrant for deposit and withdraw methods
* Add more checks in constructor
* Fix withdrawAll
* Update deploy numbers
* simplify _withdraw (#2741)
* address verification (#2749)
* add address verification
* remove operator check
* Fix merge issue
* small adjustement
* fix unit test
* Bumped the deploy script numbers
* remove unused parameter (#2754)
* Add unit tests (#2751)
* fix unit test
* add more unit tests
* add more unit tests
* prettier
* add some more unit tests
* add thorough unit test support
* Default to Timelock governance
* lint
* Fix VaultAddress in deployment scripts
* Add events for nonce updates (#2755)
* Sparrow dom/cctp defender action (#2770)
* Add unit tests (#2751)
* fix unit test
* add more unit tests
* add more unit tests
* prettier
* add some more unit tests
* add thorough unit test support
* add comment
* create a defender task and cleanup
* small change
* add the ability for the defender relay action to store already processed transactions
* update gitignore
* prettier
* put into a better place
* ...
* add dry run option, also fix issues with cross chain providers
* read cctp domain ids from config
* make api a constant
* remove finality checks
* add custom per chain block lookback
* readme change
* move all configuration out of cross-chain source file, to more easily support multiple networks and relaying directions
* clear the testing addresses
* prettier
* add test address
* add the option not to initialize the implementation contract
* Prettify
* add comment (#2787)
* ignore messages that are too old (#2786)
* [OUSD-09] Check burnToken in relay method (#2782)
* [OUSD-09] Check burnToken in relay method
* Fix: Check burn token is usdc on remote chain
* Add tests
* Make min transfer amount a constant (#2780)
* [OUSD-15] Emit event when withdrawAll is skipped (#2781)
---------
Co-authored-by: Domen Grabec <grabec@gmail.com>
Co-authored-by: Nicholas Addison <nick@addisonbrown.com.au>1 parent 766c645 commit 7a2c767
File tree
45 files changed
+6466
-9
lines changed- contracts
- abi
- contracts
- governance
- interfaces/cctp
- mocks
- crosschain
- proxies
- create2
- strategies
- crosschain
- utils
- deployments
- base
- mainnet
- deploy
- base
- mainnet
- scripts/defender-actions
- tasks
- test
- strategies/crosschain
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
45 files changed
+6466
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
374 | 379 | | |
375 | 380 | | |
376 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 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 | + | |
26 | 50 | | |
27 | 51 | | |
28 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| 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 | + | |
| 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 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
0 commit comments