Skip to content
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

Feat/phase 3 #61

Merged
merged 232 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
232 commits
Select commit Hold shift + click to select a range
f7d4d18
feat: Added access control contract to make guardian granular
sendra Dec 20, 2023
d4b671e
fix: updated with oz (modified) enumerable access control
sendra Dec 20, 2023
98fad05
fix: added natspec
sendra Dec 20, 2023
ac89c0e
fix: Add test
sendra Dec 20, 2023
e114d27
fix: added method to change guardian
sendra Dec 20, 2023
5612b26
fix: added deployment script. Updated address book lib
sendra Dec 20, 2023
4c73aaf
fix: save granular guardian in deployment jsons
sendra Dec 21, 2023
c78f581
fix: add integration tests
sendra Dec 21, 2023
b18fb13
fix: added more integration tests
sendra Dec 22, 2023
8044f4d
fix: fixed retry envelope int test
sendra Dec 22, 2023
2497233
fix: updated libs and remappings
sendra Mar 18, 2024
3ea8071
fix: removed not needed libs
sendra Mar 18, 2024
f9ffe42
feat: Add bridge adapter shuffleing
sendra Apr 16, 2024
02fb222
Merge branch 'feat/phase-3' of github.com:bgd-labs/aave-delivery-infr…
sendra Apr 16, 2024
3bf7826
Merge branch 'main' of github.com:bgd-labs/aave-delivery-infrastructu…
sendra Apr 16, 2024
b67e3df
fix: remove unused import
sendra Apr 16, 2024
c1ff698
fix: solved conflicts
sendra Apr 17, 2024
804717f
fix: fixed fuzzing on tests
sendra Apr 17, 2024
30365f3
fix: ci
sakulstra Apr 17, 2024
c064a3d
fix: removed fork environment for tests
sendra Apr 17, 2024
641a1bc
fix: added extra tests
sendra Apr 17, 2024
5ddbae8
fix: add readme
sendra Apr 18, 2024
1b4455f
Update scripts/access_control/Deploy_Granular_CCC_Guardian.s.sol
sendra Apr 19, 2024
7a8e35f
Update scripts/access_control/Deploy_Granular_CCC_Guardian.s.sol
sendra Apr 19, 2024
8b79676
fix: WIP: integration tests still not working
sendra Apr 19, 2024
66e4ea2
fix: all tests working
sendra Apr 19, 2024
54770fb
fix: removed unused mock
sendra Apr 19, 2024
ad1399e
fix: add required confirmations info on forwarder
sendra Apr 22, 2024
7395aea
fix: added method to get adapters from a random initial point
sendra Apr 22, 2024
6e2f8d7
fix: use the rand method
sendra Apr 24, 2024
d104463
fix: moved errors to interface. Fixed test
sendra Apr 24, 2024
9766a8b
fix: removed req config from initializers. Added comments on what to do
sendra Apr 24, 2024
9425dc6
fix: use full shuffle
sendra Apr 26, 2024
f24266c
Update src/contracts/CrossChainForwarder.sol
sendra Apr 29, 2024
eb37ed5
fix: WIP tests
sendra Apr 29, 2024
76a02bc
fix: fixed tests
sendra Apr 30, 2024
7578bdd
fix: added getter and missing tests
sendra Apr 30, 2024
f35d458
fix: add reqConf to constructor
sendra May 2, 2024
59b8314
fix: add reqConf to constructor
sendra May 2, 2024
35aec93
Merge pull request #49 from bgd-labs/feat/bridge-shuffle-constructor
sendra May 2, 2024
d8f324a
Merge pull request #43 from bgd-labs/fix/create2-adapter-deployments
sendra May 2, 2024
f0d4202
fix: remove addresses. Adapt script to only deploy contract
sendra May 2, 2024
673da59
fix: removed abstract
sendra May 2, 2024
5773218
fix: updated all adapter scripts
sendra May 3, 2024
8b81688
Merge branch 'feat/phase-3' of github.com:bgd-labs/aave-delivery-infr…
sendra May 3, 2024
b3b7535
fix: Updated readme with shuffle mechanic explained. Updated properties
sendra May 3, 2024
61baae5
Merge branch 'feat/bridge-shuffle' of github.com:bgd-labs/aave-delive…
sendra May 3, 2024
3d46e1b
fix: update aave helpers
sendra May 6, 2024
6b0370e
fix: added correct check
sendra May 6, 2024
e1c8195
fix: use lib to generate bytecode instead of deploying
sendra May 6, 2024
569df84
fix: updated aave helpers
sendra May 7, 2024
286b995
fix: refactor to lib
sendra May 7, 2024
538f0ff
fix: use full struct as args
sendra May 7, 2024
9bb8ce1
add report for Granular-Guardian-Access-Control
nisnislevi May 7, 2024
c5c104b
fix: updated aave-helpers
sendra May 8, 2024
ebffeef
fix: removed salt
sendra May 8, 2024
387b449
fix: new aave helpers version
sendra May 13, 2024
583d77c
fix: added required confirmations for forwarder base initialization
sendra May 14, 2024
32df032
fix: fixed payload tests
sendra May 14, 2024
4da9d64
fix: added missing natspec
sendra May 15, 2024
92fec2e
Merge pull request #54 from bgd-labs/fix/add-reqConf-to-basic-conf
kyzia551 May 15, 2024
6a07551
fix: 0 req conf mean that no message is sent
sendra May 15, 2024
89b915d
Merge branch 'feat/bridge-shuffle' of github.com:bgd-labs/aave-delive…
sendra May 15, 2024
23a3dc4
fix: added new shuffle method
sendra May 15, 2024
6c1aa94
fix: added tests
sendra May 16, 2024
25fe389
fix: revert 0 means 0
sendra May 16, 2024
58942fc
fix: updated docs
sendra May 16, 2024
74dbc6e
Update src/contracts/CrossChainForwarder.sol
sendra May 16, 2024
5be91c7
fix: Refactor to use optimalBandwidth
sendra May 16, 2024
aff96fd
_getShuffledBridgeAdaptersByChain3
kyzia551 May 16, 2024
89995cc
fix: added algo 3
sendra May 16, 2024
193ef11
Merge branch 'fix/update-shuffling-algo' of github.com:bgd-labs/aave-…
sendra May 16, 2024
5716e7c
fix: commented original algo 3
sendra May 16, 2024
f84b33c
fix: refactored shuffle algorithm
sendra May 16, 2024
c2a1453
fix: removed uneeded catching
sendra May 16, 2024
6352774
fix: fixed typo
sendra May 16, 2024
6197b19
Merge pull request #52 from Certora/certora-for-granular-access-control
sendra May 17, 2024
df417af
Merge branch 'feat/phase-3' of github.com:bgd-labs/aave-delivery-infr…
sendra May 17, 2024
043c9d1
small refactoring of the shuffle
kyzia551 May 17, 2024
8a1909d
fix: removed unneeded math call
sendra May 17, 2024
17a20d0
Merge branch 'fix/update-shuffling-algo' of github.com:bgd-labs/aave-…
sendra May 17, 2024
166eeec
small refactoring of the shuffle - 2
kyzia551 May 17, 2024
c0029da
small refactoring of the shuffle - 3
kyzia551 May 17, 2024
d7bab6e
fix: fixed tests
sendra May 17, 2024
114560f
Merge branch 'fix/update-shuffling-algo' of github.com:bgd-labs/aave-…
sendra May 17, 2024
0542da4
fix: added link to audit report
sendra May 17, 2024
3940558
Merge pull request #56 from bgd-labs/fix/update-shuffling-algo
sendra May 17, 2024
0962733
fix: fixed conflicts
sendra May 17, 2024
8610c66
Merge pull request #55 from bgd-labs/fix/0-req-confirmations
kyzia551 May 17, 2024
98a6bc8
fix: optimalBandwidth expanded documentation
sendra May 17, 2024
470c682
Merge pull request #57 from bgd-labs/fix/expand-optimal-bandwidth-doc…
sendra May 17, 2024
b5fa914
Merge pull request #20 from bgd-labs/feat/granular-access-control
kyzia551 May 17, 2024
95afa73
Merge branch 'feat/phase-3' of github.com:bgd-labs/aave-delivery-infr…
sendra May 17, 2024
625e24e
Merge branch 'feat/bridge-shuffle' of github.com:bgd-labs/aave-delive…
sendra May 17, 2024
b32f77f
fix: added missing events
sendra May 17, 2024
8e230fa
fix: Added optimizedBandwidth to granular guardian. Fixed tests
sendra May 17, 2024
d2f6ec5
fix: added natspec
sendra May 17, 2024
5fc3303
fix: fixed natspec
sendra May 17, 2024
7fd6d23
fix: removal of timestamp from pseudo random generation
sendra May 27, 2024
e27f02c
Merge pull request #59 from bgd-labs/fix/remove-timestamp-from-pseudo…
sendra May 27, 2024
c3580d2
Update scripts/Adapters/DeployArbAdapter.sol
sendra May 30, 2024
0a5d263
fix: Added base scripts
sendra May 31, 2024
2e9097d
fix: removed no longer needed lib
sendra May 31, 2024
834dd7f
fix: removed usage of helper lib
sendra May 31, 2024
a13d29b
fix: helpers updated
sendra May 31, 2024
ecfcca2
fix: updated aave helpers
sendra May 31, 2024
5c0302b
fix: Index array using full lenght
sendra Jun 3, 2024
d22d22c
fix: use algo2
sendra Jun 4, 2024
5005484
fix: cleanup
sendra Jun 4, 2024
e64377e
Merge pull request #60 from bgd-labs/fix/shuffling-algo
sendra Jun 4, 2024
83f8c07
fix: added logs
sendra Jun 4, 2024
f456eae
fix: fixed retry transaction
sendra Jun 4, 2024
90e705b
fix: all tests working
sendra Jun 4, 2024
4464eee
fix: updated remappings on certora
sendra Jun 4, 2024
fd4dbd4
fix: some change to retrigger ci
sendra Jun 4, 2024
53af573
fix: updated missing certora confs
sendra Jun 4, 2024
ada4093
fix: updated missing remapping
sendra Jun 4, 2024
e6af4cc
fix: remove comment
sendra Jun 4, 2024
61347c7
Merge pull request #62 from bgd-labs/fix/fix-failing-tests
sendra Jun 5, 2024
183cc45
fix: fixed conflicts
sendra Jun 5, 2024
a875de6
Merge branch 'feat/bridge-shuffle' of github.com:bgd-labs/aave-delive…
sendra Jun 5, 2024
19c7fa8
fix: solved conflicts
sendra Jun 5, 2024
9d82108
fix: removed Addresses from scripts
sendra Jun 5, 2024
3d2ace1
fix: revert back not yet needed adapter scripts
sendra Jun 5, 2024
be4805c
fix: missing rollback
sendra Jun 5, 2024
a9edcba
fix: remove Script inheritance
sendra Jun 5, 2024
b0d34f4
WIP: cb adapter
sendra Jun 5, 2024
a5f1cca
fix: removed incorrect use of remotes
sendra Jun 5, 2024
f1a3bc5
fix: abstracted get adapter bytecode
sendra Jun 5, 2024
95cc638
Merge branches 'fix/propagate-script-changes-to-all-adapters' and 'fi…
sendra Jun 5, 2024
21eb62c
feat: added CB and CCIP adapters
sendra Jun 5, 2024
39d42ae
feat: all scripts updated
sendra Jun 5, 2024
23dc78c
fix: correct file termination
sendra Jun 6, 2024
44a65a8
fix: made all methods internal
sendra Jun 6, 2024
26cc2ff
fix: added missing visibility
sendra Jun 6, 2024
0aa2414
fix: added missing abstract
sendra Jun 6, 2024
be2d427
fix: corrected arg name
sendra Jun 6, 2024
0544132
fix: removed view
sendra Jun 6, 2024
8ed477e
for PR
nisnislevi Jun 6, 2024
9edd02b
fix: base ccc deploy
sendra Jun 6, 2024
7aad2da
Merge pull request #65 from Certora/certora-squashed
sendra Jun 6, 2024
300e27f
fix: changed visibility to internal
sendra Jun 6, 2024
ced3b58
fix: removed helper ccc scripts
sendra Jun 6, 2024
805ae82
fix: granular guardian script
sendra Jun 6, 2024
3110764
fix: removed unneeded brackets
sendra Jun 6, 2024
ce3a81f
fix: added emergency registry script
sendra Jun 6, 2024
427672c
fix: fixed path
sendra Jun 6, 2024
e6f8962
fix: fixed path
sendra Jun 6, 2024
25a9e7a
fix: updated visibility to internal
sendra Jun 6, 2024
3599741
fix: removed no longer needed scripts
sendra Jun 6, 2024
73cf41e
fix: removed script helpers
sendra Jun 6, 2024
aab6147
fix: removed helper scripts
sendra Jun 7, 2024
1e88067
fix: Removed local impl of chain ids. Removed no longer suported netw…
sendra Jun 7, 2024
7ae931c
fix: removed nitro lib dependency
sendra Jun 7, 2024
7ba1807
fix: removed fxtunnel
sendra Jun 7, 2024
b982986
fix: fixed paths
sendra Jun 7, 2024
d1f5bdc
for PR
nisnislevi Jun 9, 2024
cb7c559
Merge pull request #74 from Certora/certora-squashed
sendra Jun 10, 2024
313907f
fix: added changelog section
sendra Jun 10, 2024
eb69a83
Replace input params at _getAdapterByteCode with BaseAdapterArgs
kyzia551 Jun 10, 2024
13665f0
Update scripts/Adapters/DeployPolygon.sol
sendra Jun 10, 2024
46f249c
Merge branch 'fix/propagate-script-changes-to-all-adapters' into fix/…
kyzia551 Jun 10, 2024
8c8e980
move crossChainController zero check to the base
kyzia551 Jun 10, 2024
ec59cf5
Merge pull request #76 from bgd-labs/fix/base-args
sendra Jun 10, 2024
383ad75
fix: added sub sections
sendra Jun 10, 2024
807b2f2
fix: move trusted remotes to base adapter script. Fix lz params order
sendra Jun 10, 2024
eacfdb6
Merge pull request #75 from bgd-labs/fix/changelog
sendra Jun 10, 2024
7ccb377
fix: use ccc from args
sendra Jun 10, 2024
cfa77e8
Update scripts/contract_extensions/LayerZeroAdapter.sol
sendra Jun 10, 2024
a68c0bb
Update scripts/contract_extensions/LayerZeroAdapter.sol
sendra Jun 10, 2024
b28f1c5
Update scripts/contract_extensions/CCIPAdapter.sol
sendra Jun 10, 2024
2f69161
Update scripts/contract_extensions/CCIPAdapter.sol
sendra Jun 10, 2024
b1bd0e6
Merge pull request #77 from bgd-labs/fix/move-trustedremotes-to-base-…
sendra Jun 10, 2024
ecee919
Update scripts/Adapters/DeployWormholeAdapter.sol
sendra Jun 10, 2024
6743430
Update scripts/Adapters/DeployWormholeAdapter.sol
sendra Jun 10, 2024
bdb2719
Merge pull request #73 from bgd-labs/fix/remove-fx-tunnel
sendra Jun 10, 2024
c8d08d2
Merge pull request #72 from bgd-labs/fix/remove-adapter-remaining-dep…
sendra Jun 10, 2024
1e4933c
Merge pull request #71 from bgd-labs/fix/remove-testnet-chainid
sendra Jun 10, 2024
f08e709
Merge pull request #70 from bgd-labs/fix/remove-helper-scripts
sendra Jun 10, 2024
81f6a68
Merge pull request #69 from bgd-labs/fix/remove-create-payloads
sendra Jun 10, 2024
b370437
Merge pull request #68 from bgd-labs/fix/emergency-registry-scripts
sendra Jun 10, 2024
a99d860
Merge pull request #67 from bgd-labs/fix/granular-guardian
sendra Jun 10, 2024
8dc619f
fix: solved conflicts
sendra Jun 10, 2024
058ff23
Merge pull request #66 from bgd-labs/fix/ccc-scripts
sendra Jun 10, 2024
2c2a71d
Merge pull request #63 from bgd-labs/fix/propagate-script-changes-to-…
sendra Jun 10, 2024
36e6139
Merge branch 'feat/phase-3' of github.com:bgd-labs/aave-delivery-infr…
sendra Jun 10, 2024
5243ca2
Merge pull request #50 from bgd-labs/fix/deployment-scripts-for-deplo…
sendra Jun 10, 2024
8a4b736
fix: solved conflicts
sendra Jun 10, 2024
fca56cb
fix: added report link
sendra Jun 12, 2024
cb2fd05
fix: fixed layerzero tests
sendra Jun 12, 2024
07bab8f
Merge pull request #78 from bgd-labs/fix/fix-lz-tests
kyzia551 Jun 12, 2024
19f5425
Merge branch 'feat/phase-3' of github.com:bgd-labs/aave-delivery-infr…
sendra Jun 12, 2024
c176c29
Add simple _getAdapterByteCode
kyzia551 Jun 12, 2024
16a66c0
Merge pull request #79 from bgd-labs/feat/simple-get-adapter-code
sendra Jun 12, 2024
ccb2a88
Add _computeAdapterAddress
kyzia551 Jun 12, 2024
c35645e
feat: added payload examples
sendra Jun 12, 2024
a67e911
Merge pull request #80 from bgd-labs/feat/example-payloads
kyzia551 Jun 12, 2024
da301d3
feat: moved deployed addresses to adi-deploy repo
sendra Jun 12, 2024
00efae3
fix: substituted prevrandao for blockhash
sendra Jun 12, 2024
eaec8d5
Merge pull request #82 from bgd-labs/fix/remove-prevrandao
sendra Jun 13, 2024
f5fa1ca
Merge pull request #81 from bgd-labs/feat/remove-deployements
kyzia551 Jun 13, 2024
28f3f24
fix: removed nitro from certora ci
sendra Jun 13, 2024
3db8d83
fix: clean phase 3 pr
sendra Jun 13, 2024
25248d4
Merge pull request #83 from bgd-labs/fix/clean-phase3
kyzia551 Jun 13, 2024
25a8ef7
Update tests/Forwarder.t.sol
kyzia551 Jun 13, 2024
f07f7a6
Update tests/Forwarder.t.sol
kyzia551 Jun 13, 2024
42095b3
fix: moved salt and deploy to base script
sendra Jun 13, 2024
566e3fb
Merge pull request #84 from bgd-labs/fix/base-script
kyzia551 Jun 13, 2024
37f1aac
fix: Fixed tests
sendra Jun 14, 2024
0187d59
Merge pull request #85 from bgd-labs/fix/fix-gg-int-test
kyzia551 Jun 18, 2024
21e4976
fix: updated aave helpers lib, to master branch
sendra Jun 18, 2024
787754d
fix: rollback salt abstraction
sendra Jun 18, 2024
438cf1c
fix: pass salt to deploy method
sendra Jun 18, 2024
73e6be6
Merge pull request #86 from bgd-labs/fix/rollback-salt-abstraction
kyzia551 Jun 18, 2024
a3fe8d2
fix: solved conflicts
sendra Jun 18, 2024
a3de70e
Merge branch 'feat/bridge-shuffle' of github.com:bgd-labs/aave-delive…
sendra Jun 18, 2024
e56c937
fix: Add old solveEmergency interface call to gg
sendra Jun 18, 2024
be3f0b9
fix: Added rev 2 interface
sendra Jun 18, 2024
bc1dd72
fix: updated name to solveEmergencyDeprecated
sendra Jun 19, 2024
09ff7e4
fix: renamed old ccc with emergency interface rev2 to deprecated
sendra Jun 19, 2024
48779d8
Merge pull request #87 from bgd-labs/fix/add-old-interface-gg
kyzia551 Jun 19, 2024
d85e872
fix: fixed tests for new foundry version
sendra Jun 20, 2024
7f212af
fix: updated aave helpers
sendra Jun 20, 2024
88bcc0c
fix: added virtual so that method can be overwriten
sendra Jul 1, 2024
66ee010
fix: updated helpers lib
sendra Jul 1, 2024
99095f1
fix: updated helpers
sendra Jul 3, 2024
f36f856
fix: rollback
sendra Jul 9, 2024
ddda817
fix: updated helpers lib
sendra Jul 10, 2024
118e1ea
Merge pull request #88 from bgd-labs/fix/aave-helpers-deploy-ccc
sendra Jul 10, 2024
3c842f4
Merge pull request #48 from bgd-labs/feat/bridge-shuffle
sendra Jul 10, 2024
3ff981b
fix: removed unused path
sendra Jul 17, 2024
38688f0
fix: removed packages from certora confs
sendra Jul 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/certora-review-controller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: certora-review-controller

on:
push:
branches:
- main
pull_request:
branches:
- main

workflow_dispatch:

jobs:
verify:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Install python
uses: actions/setup-python@v2
with: { python-version: 3.9 }

- name: Install java
uses: actions/setup-java@v1
with: { java-version: "11", java-package: jre }

- name: Install certora cli
run: pip3 install certora-cli==4.13.1

- name: Install solc
run: |
wget https://github.com/ethereum/solidity/releases/download/v0.8.19/solc-static-linux
chmod +x solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc8.19

- name: Verify rule ${{ matrix.rule }}
run: |
cd security/certora
touch applyHarness.patch
make munged
cd ../..
certoraRun security/certora/confs/${{ matrix.rule }}
env:
CERTORAKEY: ${{ secrets.CERTORAKEY }}

strategy:
fail-fast: false
max-parallel: 16
matrix:
rule:
- verifyCrossChainControllerWithEmergency.conf #to move to the new prover version, wait for ticket 6284


6 changes: 4 additions & 2 deletions .github/workflows/certora-review-forwarder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with: { java-version: "11", java-package: jre }

- name: Install certora cli
run: pip3 install certora-cli==4.13.1
run: pip3 install certora-cli==7.6.3

- name: Install solc
run: |
Expand All @@ -55,4 +55,6 @@ jobs:
- verifyCrossChainForwarder-invariants.conf
- verifyCrossChainForwarder-newEnvelope.conf
- verifyCrossChainForwarder-sanity.conf
- verifyCrossChainForwarder-simpleRules.conf
- verifyCrossChainForwarder-simpleRules.conf
- verifyCrossChainForwarder-encode-decode-correct.conf --rule encode_decode_well_formed_TX
- verifyCrossChainForwarder-shuffle.conf
20 changes: 4 additions & 16 deletions .github/workflows/certora-review-receiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with: { java-version: "11", java-package: jre }

- name: Install certora cli
run: pip3 install certora-cli==4.13.1
run: pip3 install certora-cli==7.6.3

- name: Install solc
run: |
Expand All @@ -51,18 +51,6 @@ jobs:
max-parallel: 16
matrix:
rule:
- verifyCrossChainControllerWithEmergency.conf
#- verifyCrossChainReceiver.conf --rule receive_more_than__requiredConfirmations_diff_2 # TODO: uncomment when moving to cli 5.0.2 or higher
#- verifyCrossChainReceiver.conf --rule receive_more_than__requiredConfirmations_diff_3 # TODO: uncomment when moving to cli 5.0.2 or higher
- verifyCrossChainReceiver.conf --rule transaction_received_only_from_authorized_bridge_adapter only_owner_can_change_bridge_adapters only_owner_can_change_bridge_adapters_witness_consequent only_owner_can_change_required_confirmations only_owner_can_change_required_confirmations_witness_consequent cannot_call_IBaseReceiverPortal_receiveCrossChainMessage_twice cannot_call_IBaseReceiverPortal_receiveCrossChainMessage_twice_witness_tight_bound state_transition_to_deliver_iff_IBaseReceiverPortal_receiveCrossChainMessage_called
- verifyCrossChainReceiver.conf --rule state_transition_to_deliver_iff_IBaseReceiverPortal_receiveCrossChainMessage_called_witness_antecedent call_deliverEnvelope_once_witness_antecedent anyone_can_call_deliverEnvelope invalidate_previous_unconfirmed_envelopes_after_updateMessagesValidityTimestamp_witness_antecedent receiveCrossChainMessage_cannot_change_state_if_requiredConfirmation_is_zero envelope_state envelope_state_witness_none_to_delivered only_single_bridge_adapter_added only_single_bridge_adapter_removed
- verifyCrossChainReceiver.conf --rule envelope_state_witness_confirmed_to_delivered envelope_state_witness_none_to_confirmed envelope_state_witness_none_none_confirmed envelope_state_witness_none_confirmed_confirmed envelope_state_witness_confirmed_confirmed_confirmed confirmations_increments_if_received_from_msg_sender confirmations_increments_if_received_from_msg_sender_witness allowReceiverBridgeAdapters_cannot_disallow allowReceiverBridgeAdapters_cannot_disallow_witness
- verifyCrossChainReceiver.conf --rule disallowReceiverBridgeAdapters_cannot_allow disallowReceiverBridgeAdapters_cannot_allow_witness_antecedent disallowReceiverBridgeAdapters_cannot_allow_witness_consequent requiredConfirmation_is_positive_after_updateConfirmations receive_increments_confirmations
- verifyCrossChainReceiver.conf --rule reachability encodeDecodeWorks encodeDecodeWorks_witness encodeDecodeWorks_witness_2
- verifyCrossChainReceiver.conf --rule firstBridgedAt_happened_in_the_past
- verifyCrossChainReceiver.conf --rule no_deliverEnvelope_after_receiveCrossChainMessage
#- verifyCrossChainReceiver.conf --rule call_deliverEnvelope_once # TODO: uncomment when moving to cli 5.0.2 or higher
#- verifyCrossChainReceiver.conf --rule invalidate_previous_unconfirmed_envelopes_after_updateMessagesValidityTimestamp # TODO: uncomment when moving to cli 5.0.2 or higher
#- verifyCrossChainReceiver.conf --rule addressSetInvariant # TODO: uncomment when moving to cli 5.0.2 or higher
#- verifyCrossChainReceiver.conf --rule cannot_call_BaseReceiverPortal_receiveCrossChainMessage_twice # TODO: uncomment when moving to cli 5.0.2 or higher
- verifyCrossChainReceiver.conf --rule zero_firstBridgedAt_iff_not_received_from_msg_sender
- verifyCrossChainReceiver.conf


1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ on:
jobs:
test:
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@main
secrets: inherit
18 changes: 3 additions & 15 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
[submodule "lib/solidity-utils"]
path = lib/solidity-utils
url = https://github.com/bgd-labs/solidity-utils
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
branch = release-v4.9
[submodule "lib/aave-address-book"]
path = lib/aave-address-book
url = https://github.com/bgd-labs/aave-address-book
[submodule "lib/nitro-contracts"]
path = lib/nitro-contracts
url = https://github.com/OffchainLabs/nitro-contracts
[submodule "lib/fx-portal"]
path = lib/fx-portal
url = https://github.com/0xPolygon/fx-portal
[submodule "lib/aave-helpers"]
path = lib/aave-helpers
url = https://github.com/bgd-labs/aave-helpers
220 changes: 0 additions & 220 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,226 +40,6 @@ forge script \

endef

# catapulta
#define deploy_single_fn
#npx catapulta@0.3.14 script \
# scripts/$(1).s.sol:$(if $(3),$(3),$(shell UP=$(if $(PROD),$(2),$(2)_testnet); echo $${UP} | perl -nE 'say ucfirst')) \
# --network $(2) --slow --skip-git \
# $(if $(LEDGER),$(BASE_LEDGER),$(BASE_KEY)) \
# $(custom_$(if $(PROD),$(2),$(2)-testnet))
#
#endef

define deploy_fn
$(foreach network,$(2),$(call deploy_single_fn,$(1),$(network),$(3)))
endef

# ----------------------------------------------------------------------------------------------------------------------
# ----------------------------------------- PRODUCTION DEPLOYMENT SCRIPTS ---------------------------------------------------------

# deploy emergency registry
deploy-emergency-registry:
$(call deploy_fn,Deploy_EmergencyRegistry,ethereum)

# Deploy Proxy Factories on all networks
deploy-proxy-factory:
$(call deploy_fn,InitialDeployments,ethereum avalanche polygon optimism arbitrum metis base binance gnosis zkevm)

# Deploy Cross Chain Infra on all networks
deploy-cross-chain-infra:
$(call deploy_fn,CCC/Deploy_CCC,ethereum avalanche polygon optimism arbitrum metis base binance gnosis zkevm)

## Deploy CCIP bridge adapters on all networks
deploy-ccip-bridge-adapters:
$(call deploy_fn,Adapters/DeployCCIP,ethereum avalanche binance polygon binance gnosis)

## Deploy LayerZero bridge adapters on all networks
deploy-lz-bridge-adapters:
$(call deploy_fn,Adapters/DeployLZ,ethereum avalanche binance polygon binance gnosis)

## Deploy HyperLane bridge adapters on all networks
deploy-hl-bridge-adapters:
$(call deploy_fn,Adapters/DeployHL,ethereum avalanche binance polygon binance gnosis)

## Deploy SameChain adapters on ethereum
deploy-same-chain-adapters:
$(call deploy_fn,Adapters/DeploySameChainAdapter,ethereum)

deploy-optimism-adapters:
$(call deploy_fn,Adapters/DeployOpAdapter,ethereum optimism)

deploy-arbitrum-adapters:
$(call deploy_fn,Adapters/DeployArbAdapter,ethereum arbitrum)

deploy-metis-adapters:
$(call deploy_fn,Adapters/DeployMetisAdapter,ethereum metis)

deploy-polygon-adapters:
$(call deploy_fn,Adapters/DeployPolygon,ethereum polygon)

deploy-base-adapters:
$(call deploy_fn,Adapters/DeployCBaseAdapter,ethereum base)

deploy-gnosis-adapters:
$(call deploy_fn,Adapters/DeployGnosisChain,ethereum gnosis)

deploy-scroll-adapters:
$(call deploy_fn,Adapters/DeployScrollAdapter,ethereum scroll)

deploy-zkevm-adapters:
$(call deploy_fn,Adapters/DeployZkEVMAdapter,ethereum zkevm)

deploy-wormhole-adapters:
$(call deploy_fn,Adapters/DeployWormholeAdapter,ethereum celo)

## Set sender bridge dapters. Only eth pol avax are needed as other networks will only receive
set-ccf-sender-adapters:
$(call deploy_fn,CCC/Set_CCF_Sender_Adapters,ethereum)

# Set the bridge adapters allowed to receive messages
set-ccr-receiver-adapters:
$(call deploy_fn,CCC/Set_CCR_Receivers_Adapters,ethereum polygon avalanche binance arbitrum optimism base metis gnosis zkevm)

# Sets the required confirmations
set-ccr-confirmations:
$(call deploy_fn,CCC/Set_CCR_Confirmations,ethereum polygon avalanche optimism arbitrum metis base binance gnosis zkevm)

# Generate Addresses Json
write-json-addresses :; forge script scripts/WriteAddresses.s.sol:WriteDeployedAddresses -vvvv

# Funds CCC
fund-crosschain:
$(call deploy_fn,CCC/FundCCC,ethereum polygon avalanche arbitrum)

## Deploy and configure all contracts
deploy-full:
make deploy-proxy-factory
make deploy-cross-chain-infra
make deploy-ccip-bridge-adapters
make deploy-lz-bridge-adapters
make deploy-hl-bridge-adapters
make deploy-same-chain-adapters
make deploy-optimism-adapters
make deploy-arbitrum-adapters
make deploy-metis-adapters
make deploy-polygon-adapters
make set-ccf-approved-senders
make set-ccf-sender-adapters
make set-ccr-receiver-adapters
make set-ccr-confirmations
make fund-crosschain
make write-json-addresses



# ----------------------------------------------------------------------------------------------------------------------
# ----------------------------------------- TESTNET DEPLOYMENT SCRIPTS ---------------------------------------------------------

# Deploy Proxy Factories on all networks
deploy-proxy-factory-test:
$(call deploy_fn,InitialDeployments,base)

# Deploy Cross Chain Infra on all networks
deploy-cross-chain-infra-test:
$(call deploy_fn,CCC/Deploy_CCC,ethereum)

## Deploy CCIP bridge adapters on all networks
deploy-ccip-bridge-adapters-test:
$(call deploy_fn,Adapters/DeployCCIP,ethereum)

## Deploy LayerZero bridge adapters on all networks
deploy-lz-bridge-adapters-test:
$(call deploy_fn,Adapters/DeployLZ,ethereum)

## Deploy HyperLane bridge adapters on all networks
deploy-hl-bridge-adapters-test:
$(call deploy_fn,Adapters/DeployHL,ethereum)

## Deploy SameChain adapters on ethereum
deploy-same-chain-adapters-test:
$(call deploy_fn,Adapters/DeploySameChainAdapter,ethereum)

deploy-scroll-adapters-test:
$(call deploy_fn,Adapters/DeployScrollAdapter,ethereum)

deploy-wormhole-adapters-test:
$(call deploy_fn,Adapters/DeployWormholeAdapter,ethereum)

deploy-polygon-adapters-test:
$(call deploy_fn,Adapters/DeployPolygon,ethereum)

deploy-gnosis-adapters-test:
$(call deploy_fn,Adapters/DeployGnosisChain,ethereum)

deploy-arbitrum-adapters-test:
$(call deploy_fn,Adapters/DeployArbAdapter,ethereum)

deploy-optimism-adapters-test:
$(call deploy_fn,Adapters/DeployOpAdapter,ethereum)

deploy-metis-adapters-test:
$(call deploy_fn,Adapters/DeployMetisAdapter,ethereum)

deploy-base-adapters-test:
$(call deploy_fn,Adapters/DeployCBaseAdapter,ethereum)

## Set sender bridge dapters. Only eth pol avax are needed as other networks will only receive
set-ccf-sender-adapters-test:
$(call deploy_fn,CCC/Set_CCF_Sender_Adapters,avalanche)

# Set the bridge adapters allowed to receive messages
set-ccr-receiver-adapters-test:
$(call deploy_fn,CCC/Set_CCR_Receivers_Adapters,celo)

# Sets the required confirmations
set-ccr-confirmations-test:
$(call deploy_fn,CCC/Set_CCR_Confirmations,ethereum)

# Funds CCC
fund-crosschain-test:
$(call deploy_fn,CCC/FundCCC,ethereum)

## Deploy and configure all contracts
deploy-full-test:
#make deploy-proxy-factory-test
make deploy-cross-chain-infra-test
make deploy-ccip-bridge-adapters-test
make deploy-lz-bridge-adapters-test
make deploy-hl-bridge-adapters-test
make deploy-same-chain-adapters-test
make set-ccf-sender-adapters-test
make set-ccr-receiver-adapters-test
make set-ccr-confirmations-test
make fund-crosschain-test
make write-json-addresses



# ----------------------------------------------------------------------------------------------------------------------
# ----------------------------------------- HELPER SCRIPTS ---------------------------------------------------------
remove-bridge-adapters:
$(call deploy_fn,helpers/RemoveBridgeAdapters,celo)

send-direct-message:
$(call deploy_fn,helpers/Send_Direct_CCMessage,avalanche)

deploy_mock_destination:
$(call deploy_fn,helpers/Deploy_Mock_destination,ethereum)

set-approved-ccf-senders:
$(call deploy_fn,helpers/Set_Approved_Senders,ethereum)

send-message:
@$(call deploy_fn,helpers/Testnet_ForwardMessage,ethereum,Testnet_ForwardMessage)

deploy_mock_ccc:
$(call deploy_fn,helpers/mocks/Deploy_Mock_CCC,zkevm)

send-message-via-adapter:
$(call deploy_fn,helpers/Send_Message_Via_Adapter,ethereum)

deploy-ccc-revision-and-update:
$(call deploy_fn,CCC/UpdateCCC,ethereum)

deploy-ccc-update-payload:
$(call deploy_fn,helpers/UpdateCCCImpl_Payload,celo)
Loading
Loading