Skip to content

Commit

Permalink
Teleporter registry upgrade (#43)
Browse files Browse the repository at this point in the history
* initial draft example for teleporter/warp registry

* fix msg sender and version variable name

* update version and registry funcs

* registry contracts and erc20bridge using registry

* move addressToVersion to teleporter registry

* update erc20bridge registry checks

* update crossChainApps to use registry

* add docs, license, and event

* registry accepts initial values and v0.5.6 compatible

* lint fixes

* fix erc20bridge tests with registry integration

* init teleporter registry tests

* add registry unit tests

* deploy registry in tests and erc20bridge test working

* use registry for cross chain app tests

* draft teleporterUpgradeable contract

* use TeleporterUpgradeable in cross chain apps

* docs and cleanup

* refactor and test TeleporterUprgradeable

* lint fixes

* Update contracts/src/Teleporter/upgrades/TeleporterUpgradeable.sol

Co-authored-by: Michael Kaplan <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* Update contracts/src/Teleporter/upgrades/TeleporterUpgradeable.sol

Co-authored-by: Michael Kaplan <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* remove extra onlyAllowedTeleporter calls and nits

* remove check for duplicate protocol address and rename funcs

* fix up naming and tests

* fix unit tests

* remove contract address requirement and docs

* change to private variable

* doc about invalid version 0

* move _addressToVersion to WarpProtocolRegistry

* use protocol registry entry struct

* Update contracts/src/WarpProtocolRegistry.sol

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* Update contracts/src/WarpProtocolRegistry.sol

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* Update contracts/src/WarpProtocolRegistry.sol

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* rename blockchainID and add virtuals

* add comment and fix typo

* update abi bindings

* fix integration tests and log

* draft new registry mapping approach

* add unit tests and use require statements

* update documentation and abi bindings

* add additional requirements to doc

* add README for upgrades

* change to upgradeability

* Update contracts/src/Teleporter/upgrades/README.md

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* Update contracts/src/Teleporter/upgrades/README.md

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* Update contracts/src/Teleporter/upgrades/README.md

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* Update contracts/src/Teleporter/upgrades/README.md

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* Update contracts/src/Teleporter/upgrades/README.md

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* update readme to include rollback and remove we

* make zero error consistent and add unit test

* fix function ordering

* update abi bindings

* Update contracts/src/Teleporter/upgrades/README.md

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* Update contracts/src/Teleporter/upgrades/README.md

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* update README with getLatestVersion

* punctuation

* make minTeleporterVersion public

* update tests and event MinTeleporterVersionUpdated

* Update contracts/src/Teleporter/upgrades/README.md

Co-authored-by: Michael Kaplan <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* add index and doc

* fix unit tests and update bindings

* add virtual to TeleporterUpgradeable

* require derived contracts to implement updateMinTeleporterVersion

* readme updates

* update abi bindings

* add test for erc20Bridge updateMinTeleporterVersion

* Update contracts/src/Teleporter/upgrades/README.md

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* * make BlockHashReceiver Ownable
* remove virtual from onlyAllowedTeleporter
* documentation for example cross chain messenger
updateMinTeleporterVersion

* update doc for updateMinTeleporterVersion

* update blockHashReceiver bindings

* Update contracts/src/CrossChainApplications/ERC20Bridge/ERC20Bridge.sol

Co-authored-by: Michael Kaplan <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* Update contracts/src/CrossChainApplications/VerifiedBlockHash/BlockHashReceiver.sol

Co-authored-by: Michael Kaplan <[email protected]>
Signed-off-by: minghinmatthewlam <[email protected]>

* exampleCrossChainMessenger ownable

* update unit test and doc

* extra assert for unit test

* update bindings

* update go work sum

* move --constructor-args to last argument

* update foundry version

---------

Signed-off-by: minghinmatthewlam <[email protected]>
Co-authored-by: Michael Kaplan <[email protected]>
Co-authored-by: cam-schultz <[email protected]>
  • Loading branch information
3 people authored Oct 30, 2023
1 parent 434e30a commit c28310a
Show file tree
Hide file tree
Showing 25 changed files with 3,134 additions and 204 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c28310a

Please sign in to comment.