-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #397 from ava-labs/upgradeable-poc-merge
Upgradeability for TeleporterUpgradeable and TeleporterOwnerUpgradeable
- Loading branch information
Showing
64 changed files
with
526 additions
and
347 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
4 changes: 2 additions & 2 deletions
4
abi-bindings/go/governance/ValidatorSetSig/ValidatorSetSig.go
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
abi-bindings/go/teleporter/TeleporterMessenger/TeleporterMessenger.go
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
4 changes: 2 additions & 2 deletions
4
abi-bindings/go/teleporter/registry/TeleporterRegistry/TeleporterRegistry.go
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
169 changes: 136 additions & 33 deletions
169
abi-bindings/go/teleporter/tests/TestMessenger/TestMessenger.go
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Submodule openzeppelin-contracts
updated
733 files
Submodule openzeppelin-contracts-upgradeable
added at
723f8c
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
@avalabs/[email protected]/=lib/subnet-evm/contracts/ | ||
@openzeppelin/[email protected]=lib/openzeppelin-contracts/contracts/ | ||
@openzeppelin/[email protected]=lib/openzeppelin-contracts/contracts/ | ||
@openzeppelin/[email protected]=lib/openzeppelin-contracts-upgradeable/contracts/ | ||
@teleporter/=src/teleporter/ | ||
@mocks/=src/mocks/ | ||
@utilities/=src/utilities/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,35 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"compiler-version": [ | ||
"error", | ||
"0.8.18" | ||
], | ||
"no-unused-vars": "error", | ||
"func-visibility": [ | ||
"error", | ||
{ | ||
"ignoreConstructors": true | ||
} | ||
], | ||
"private-vars-leading-underscore": [ | ||
"warn", | ||
{ | ||
"strict": true | ||
} | ||
], | ||
"reason-string": [ | ||
"warn", | ||
{ | ||
"maxLength": 75 | ||
} | ||
], | ||
"gas-custom-errors": "off", | ||
"ordering": "error", | ||
"immutable-vars-naming": [ | ||
"warn", | ||
{ | ||
"immutablesAsConstants": false | ||
} | ||
], | ||
"func-named-parameters": [ | ||
"error", | ||
5 | ||
], | ||
"one-contract-per-file": "off" | ||
} | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"compiler-version": ["error", "0.8.23"], | ||
"no-unused-vars": "error", | ||
"func-visibility": [ | ||
"error", | ||
{ | ||
"ignoreConstructors": true | ||
} | ||
], | ||
"private-vars-leading-underscore": [ | ||
"warn", | ||
{ | ||
"strict": true | ||
} | ||
], | ||
"reason-string": [ | ||
"warn", | ||
{ | ||
"maxLength": 75 | ||
} | ||
], | ||
"gas-custom-errors": "off", | ||
"ordering": "error", | ||
"immutable-vars-naming": [ | ||
"warn", | ||
{ | ||
"immutablesAsConstants": false | ||
} | ||
], | ||
"func-named-parameters": ["error", 5], | ||
"one-contract-per-file": "off" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,13 @@ | |
|
||
// SPDX-License-Identifier: Ecosystem | ||
|
||
pragma solidity 0.8.18; | ||
pragma solidity 0.8.23; | ||
|
||
import { | ||
WarpMessage, | ||
IWarpMessenger | ||
} from "@avalabs/[email protected]/contracts/interfaces/IWarpMessenger.sol"; | ||
import {ReentrancyGuard} from "@openzeppelin/contracts@4.8.1/security/ReentrancyGuard.sol"; | ||
import {ReentrancyGuard} from "@openzeppelin/contracts@5.0.2/utils/ReentrancyGuard.sol"; | ||
|
||
/** | ||
* THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE. | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,25 +3,31 @@ | |
|
||
// SPDX-License-Identifier: Ecosystem | ||
|
||
pragma solidity 0.8.18; | ||
pragma solidity 0.8.23; | ||
|
||
import {TeleporterUpgradeable} from "./TeleporterUpgradeable.sol"; | ||
import {Ownable} from "@openzeppelin/[email protected]/access/Ownable.sol"; | ||
import {OwnableUpgradeable} from | ||
"@openzeppelin/[email protected]/access/OwnableUpgradeable.sol"; | ||
|
||
/** | ||
* @dev Contract that inherits {TeleporterUpgradeable} and allows | ||
* only owners of the contract to update the minimum Teleporter version. | ||
* | ||
* @custom:security-contact https://github.com/ava-labs/teleporter/blob/main/SECURITY.md | ||
*/ | ||
abstract contract TeleporterOwnerUpgradeable is TeleporterUpgradeable, Ownable { | ||
constructor( | ||
abstract contract TeleporterOwnerUpgradeable is TeleporterUpgradeable, OwnableUpgradeable { | ||
// solhint-disable-next-line func-name-mixedcase | ||
function __TeleporterOwnerUpgradeable_init( | ||
address teleporterRegistryAddress, | ||
address initialOwner | ||
) TeleporterUpgradeable(teleporterRegistryAddress) { | ||
transferOwnership(initialOwner); | ||
) internal onlyInitializing { | ||
__TeleporterUpgradeable_init(teleporterRegistryAddress); | ||
__Ownable_init(initialOwner); | ||
} | ||
|
||
// solhint-disable-next-line func-name-mixedcase, no-empty-blocks, func-name-mixedcase | ||
function _TeleporterOwnerUpgradeable_init_unchained() internal onlyInitializing {} | ||
|
||
/** | ||
* @dev See {TeleporterUpgradeable-_checkTeleporterUpgradeAccess} | ||
* | ||
|
This file contains 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
Oops, something went wrong.