diff --git a/abi-bindings/go/staking/ERC20TokenStakingManager/ERC20TokenStakingManager.go b/abi-bindings/go/validator-manager/ERC20TokenStakingManager/ERC20TokenStakingManager.go similarity index 100% rename from abi-bindings/go/staking/ERC20TokenStakingManager/ERC20TokenStakingManager.go rename to abi-bindings/go/validator-manager/ERC20TokenStakingManager/ERC20TokenStakingManager.go diff --git a/abi-bindings/go/staking/ExampleRewardCalculator/ExampleRewardCalculator.go b/abi-bindings/go/validator-manager/ExampleRewardCalculator/ExampleRewardCalculator.go similarity index 100% rename from abi-bindings/go/staking/ExampleRewardCalculator/ExampleRewardCalculator.go rename to abi-bindings/go/validator-manager/ExampleRewardCalculator/ExampleRewardCalculator.go diff --git a/abi-bindings/go/staking/NativeTokenStakingManager/NativeTokenStakingManager.go b/abi-bindings/go/validator-manager/NativeTokenStakingManager/NativeTokenStakingManager.go similarity index 100% rename from abi-bindings/go/staking/NativeTokenStakingManager/NativeTokenStakingManager.go rename to abi-bindings/go/validator-manager/NativeTokenStakingManager/NativeTokenStakingManager.go diff --git a/abi-bindings/go/staking/PoAValidatorManager/PoAValidatorManager.go b/abi-bindings/go/validator-manager/PoAValidatorManager/PoAValidatorManager.go similarity index 100% rename from abi-bindings/go/staking/PoAValidatorManager/PoAValidatorManager.go rename to abi-bindings/go/validator-manager/PoAValidatorManager/PoAValidatorManager.go diff --git a/contracts/mocks/ExampleERC20.sol b/contracts/mocks/ExampleERC20.sol index 0e5987584..d7d348702 100644 --- a/contracts/mocks/ExampleERC20.sol +++ b/contracts/mocks/ExampleERC20.sol @@ -13,7 +13,7 @@ import { ERC20Burnable, ERC20 } from "@openzeppelin/contracts@5.0.2/token/ERC20/extensions/ERC20Burnable.sol"; -import {IERC20Mintable} from "../staking/interfaces/IERC20Mintable.sol"; +import {IERC20Mintable} from "../validator-manager/interfaces/IERC20Mintable.sol"; contract ExampleERC20 is ERC20Burnable, IERC20Mintable { string private constant _TOKEN_NAME = "Mock Token"; diff --git a/contracts/staking/ERC20TokenStakingManager.sol b/contracts/validator-manager/ERC20TokenStakingManager.sol similarity index 100% rename from contracts/staking/ERC20TokenStakingManager.sol rename to contracts/validator-manager/ERC20TokenStakingManager.sol diff --git a/contracts/staking/ExampleRewardCalculator.sol b/contracts/validator-manager/ExampleRewardCalculator.sol similarity index 100% rename from contracts/staking/ExampleRewardCalculator.sol rename to contracts/validator-manager/ExampleRewardCalculator.sol diff --git a/contracts/staking/NativeTokenStakingManager.sol b/contracts/validator-manager/NativeTokenStakingManager.sol similarity index 100% rename from contracts/staking/NativeTokenStakingManager.sol rename to contracts/validator-manager/NativeTokenStakingManager.sol diff --git a/contracts/staking/PoAValidatorManager.sol b/contracts/validator-manager/PoAValidatorManager.sol similarity index 100% rename from contracts/staking/PoAValidatorManager.sol rename to contracts/validator-manager/PoAValidatorManager.sol diff --git a/contracts/staking/PoSValidatorManager.sol b/contracts/validator-manager/PoSValidatorManager.sol similarity index 100% rename from contracts/staking/PoSValidatorManager.sol rename to contracts/validator-manager/PoSValidatorManager.sol diff --git a/contracts/staking/README.md b/contracts/validator-manager/README.md similarity index 100% rename from contracts/staking/README.md rename to contracts/validator-manager/README.md diff --git a/contracts/staking/ValidatorManager.sol b/contracts/validator-manager/ValidatorManager.sol similarity index 100% rename from contracts/staking/ValidatorManager.sol rename to contracts/validator-manager/ValidatorManager.sol diff --git a/contracts/staking/ValidatorMessages.sol b/contracts/validator-manager/ValidatorMessages.sol similarity index 100% rename from contracts/staking/ValidatorMessages.sol rename to contracts/validator-manager/ValidatorMessages.sol diff --git a/contracts/staking/interfaces/IERC20Mintable.sol b/contracts/validator-manager/interfaces/IERC20Mintable.sol similarity index 100% rename from contracts/staking/interfaces/IERC20Mintable.sol rename to contracts/validator-manager/interfaces/IERC20Mintable.sol diff --git a/contracts/staking/interfaces/IERC20TokenStakingManager.sol b/contracts/validator-manager/interfaces/IERC20TokenStakingManager.sol similarity index 100% rename from contracts/staking/interfaces/IERC20TokenStakingManager.sol rename to contracts/validator-manager/interfaces/IERC20TokenStakingManager.sol diff --git a/contracts/staking/interfaces/INativeTokenStakingManager.sol b/contracts/validator-manager/interfaces/INativeTokenStakingManager.sol similarity index 100% rename from contracts/staking/interfaces/INativeTokenStakingManager.sol rename to contracts/validator-manager/interfaces/INativeTokenStakingManager.sol diff --git a/contracts/staking/interfaces/IPoAValidatorManager.sol b/contracts/validator-manager/interfaces/IPoAValidatorManager.sol similarity index 100% rename from contracts/staking/interfaces/IPoAValidatorManager.sol rename to contracts/validator-manager/interfaces/IPoAValidatorManager.sol diff --git a/contracts/staking/interfaces/IPoSValidatorManager.sol b/contracts/validator-manager/interfaces/IPoSValidatorManager.sol similarity index 100% rename from contracts/staking/interfaces/IPoSValidatorManager.sol rename to contracts/validator-manager/interfaces/IPoSValidatorManager.sol diff --git a/contracts/staking/interfaces/IRewardCalculator.sol b/contracts/validator-manager/interfaces/IRewardCalculator.sol similarity index 100% rename from contracts/staking/interfaces/IRewardCalculator.sol rename to contracts/validator-manager/interfaces/IRewardCalculator.sol diff --git a/contracts/staking/interfaces/IValidatorManager.sol b/contracts/validator-manager/interfaces/IValidatorManager.sol similarity index 100% rename from contracts/staking/interfaces/IValidatorManager.sol rename to contracts/validator-manager/interfaces/IValidatorManager.sol diff --git a/contracts/staking/tests/ERC20TokenStakingManagerTests.t.sol b/contracts/validator-manager/tests/ERC20TokenStakingManagerTests.t.sol similarity index 100% rename from contracts/staking/tests/ERC20TokenStakingManagerTests.t.sol rename to contracts/validator-manager/tests/ERC20TokenStakingManagerTests.t.sol diff --git a/contracts/staking/tests/ExamplesRewardCalculatorTests.t.sol b/contracts/validator-manager/tests/ExamplesRewardCalculatorTests.t.sol similarity index 100% rename from contracts/staking/tests/ExamplesRewardCalculatorTests.t.sol rename to contracts/validator-manager/tests/ExamplesRewardCalculatorTests.t.sol diff --git a/contracts/staking/tests/NativeTokenStakingManagerTests.t.sol b/contracts/validator-manager/tests/NativeTokenStakingManagerTests.t.sol similarity index 100% rename from contracts/staking/tests/NativeTokenStakingManagerTests.t.sol rename to contracts/validator-manager/tests/NativeTokenStakingManagerTests.t.sol diff --git a/contracts/staking/tests/PoAValidatorManagerTests.t.sol b/contracts/validator-manager/tests/PoAValidatorManagerTests.t.sol similarity index 100% rename from contracts/staking/tests/PoAValidatorManagerTests.t.sol rename to contracts/validator-manager/tests/PoAValidatorManagerTests.t.sol diff --git a/contracts/staking/tests/PoSValidatorManagerTests.t.sol b/contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol similarity index 100% rename from contracts/staking/tests/PoSValidatorManagerTests.t.sol rename to contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol diff --git a/contracts/staking/tests/ValidatorManagerTests.t.sol b/contracts/validator-manager/tests/ValidatorManagerTests.t.sol similarity index 100% rename from contracts/staking/tests/ValidatorManagerTests.t.sol rename to contracts/validator-manager/tests/ValidatorManagerTests.t.sol diff --git a/contracts/staking/tests/ValidatorMessagesTests.t.sol b/contracts/validator-manager/tests/ValidatorMessagesTests.t.sol similarity index 100% rename from contracts/staking/tests/ValidatorMessagesTests.t.sol rename to contracts/validator-manager/tests/ValidatorMessagesTests.t.sol diff --git a/tests/flows/staking/erc20_delegation.go b/tests/flows/validator-manager/erc20_delegation.go similarity index 100% rename from tests/flows/staking/erc20_delegation.go rename to tests/flows/validator-manager/erc20_delegation.go diff --git a/tests/flows/staking/erc20_token_staking.go b/tests/flows/validator-manager/erc20_token_staking.go similarity index 100% rename from tests/flows/staking/erc20_token_staking.go rename to tests/flows/validator-manager/erc20_token_staking.go diff --git a/tests/flows/staking/native_delegation.go b/tests/flows/validator-manager/native_delegation.go similarity index 100% rename from tests/flows/staking/native_delegation.go rename to tests/flows/validator-manager/native_delegation.go diff --git a/tests/flows/staking/native_token_staking.go b/tests/flows/validator-manager/native_token_staking.go similarity index 100% rename from tests/flows/staking/native_token_staking.go rename to tests/flows/validator-manager/native_token_staking.go diff --git a/tests/flows/staking/poa_to_pos.go b/tests/flows/validator-manager/poa_to_pos.go similarity index 98% rename from tests/flows/staking/poa_to_pos.go rename to tests/flows/validator-manager/poa_to_pos.go index e69b51b7c..918dd3c79 100644 --- a/tests/flows/staking/poa_to_pos.go +++ b/tests/flows/validator-manager/poa_to_pos.go @@ -6,8 +6,8 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/subnet-evm/accounts/abi/bind" - nativetokenstakingmanager "github.com/ava-labs/teleporter/abi-bindings/go/staking/NativeTokenStakingManager" - poavalidatormanager "github.com/ava-labs/teleporter/abi-bindings/go/staking/PoAValidatorManager" + nativetokenstakingmanager "github.com/ava-labs/teleporter/abi-bindings/go/validator-manager/NativeTokenStakingManager" + poavalidatormanager "github.com/ava-labs/teleporter/abi-bindings/go/validator-manager/PoAValidatorManager" "github.com/ava-labs/teleporter/tests/interfaces" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/crypto" diff --git a/tests/flows/staking/poa_validator_manager.go b/tests/flows/validator-manager/poa_validator_manager.go similarity index 98% rename from tests/flows/staking/poa_validator_manager.go rename to tests/flows/validator-manager/poa_validator_manager.go index fd31fa53d..28866d58d 100644 --- a/tests/flows/staking/poa_validator_manager.go +++ b/tests/flows/validator-manager/poa_validator_manager.go @@ -8,7 +8,7 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/crypto/bls" "github.com/ava-labs/subnet-evm/accounts/abi/bind" - poavalidatormanager "github.com/ava-labs/teleporter/abi-bindings/go/staking/PoAValidatorManager" + poavalidatormanager "github.com/ava-labs/teleporter/abi-bindings/go/validator-manager/PoAValidatorManager" "github.com/ava-labs/teleporter/tests/interfaces" "github.com/ava-labs/teleporter/tests/utils" "github.com/ethereum/go-ethereum/crypto" diff --git a/tests/local/e2e_test.go b/tests/local/e2e_test.go index 88011b97b..e1795e69b 100644 --- a/tests/local/e2e_test.go +++ b/tests/local/e2e_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/ava-labs/teleporter/tests/flows/governance" - "github.com/ava-labs/teleporter/tests/flows/staking" "github.com/ava-labs/teleporter/tests/flows/teleporter" "github.com/ava-labs/teleporter/tests/flows/teleporter/registry" + validatorManager "github.com/ava-labs/teleporter/tests/flows/validator-manager" deploymentUtils "github.com/ava-labs/teleporter/utils/deployment-utils" "github.com/ethereum/go-ethereum/log" "github.com/onsi/ginkgo/v2" @@ -200,31 +200,31 @@ var _ = ginkgo.Describe("[Teleporter integration tests]", func() { ginkgo.It("Native token staking manager", ginkgo.Label(validatorManagerLabel), func() { - staking.NativeTokenStakingManager(LocalNetworkInstance) + validatorManager.NativeTokenStakingManager(LocalNetworkInstance) }) ginkgo.It("ERC20 token staking manager", ginkgo.Label(validatorManagerLabel), func() { - staking.ERC20TokenStakingManager(LocalNetworkInstance) + validatorManager.ERC20TokenStakingManager(LocalNetworkInstance) }) ginkgo.It("PoA validator manager", ginkgo.Label(validatorManagerLabel), func() { - staking.PoAValidatorManager(LocalNetworkInstance) + validatorManager.PoAValidatorManager(LocalNetworkInstance) }) ginkgo.It("ERC20 delegation", ginkgo.Label(validatorManagerLabel), func() { - staking.ERC20Delegation(LocalNetworkInstance) + validatorManager.ERC20Delegation(LocalNetworkInstance) }) ginkgo.It("Native token delegation", ginkgo.Label(validatorManagerLabel), func() { - staking.NativeDelegation(LocalNetworkInstance) + validatorManager.NativeDelegation(LocalNetworkInstance) }) ginkgo.It("PoA migration to PoS", ginkgo.Label(validatorManagerLabel), func() { - staking.PoAMigrationToPoS(LocalNetworkInstance) + validatorManager.PoAMigrationToPoS(LocalNetworkInstance) }) }) diff --git a/tests/utils/staking.go b/tests/utils/validator_manager.go similarity index 99% rename from tests/utils/staking.go rename to tests/utils/validator_manager.go index 1c26f63c1..55ebf381b 100644 --- a/tests/utils/staking.go +++ b/tests/utils/validator_manager.go @@ -21,10 +21,10 @@ import ( "github.com/ava-labs/subnet-evm/precompile/contracts/warp" predicateutils "github.com/ava-labs/subnet-evm/predicate" exampleerc20 "github.com/ava-labs/teleporter/abi-bindings/go/mocks/ExampleERC20" - erc20tokenstakingmanager "github.com/ava-labs/teleporter/abi-bindings/go/staking/ERC20TokenStakingManager" - examplerewardcalculator "github.com/ava-labs/teleporter/abi-bindings/go/staking/ExampleRewardCalculator" - nativetokenstakingmanager "github.com/ava-labs/teleporter/abi-bindings/go/staking/NativeTokenStakingManager" - poavalidatormanager "github.com/ava-labs/teleporter/abi-bindings/go/staking/PoAValidatorManager" + erc20tokenstakingmanager "github.com/ava-labs/teleporter/abi-bindings/go/validator-manager/ERC20TokenStakingManager" + examplerewardcalculator "github.com/ava-labs/teleporter/abi-bindings/go/validator-manager/ExampleRewardCalculator" + nativetokenstakingmanager "github.com/ava-labs/teleporter/abi-bindings/go/validator-manager/NativeTokenStakingManager" + poavalidatormanager "github.com/ava-labs/teleporter/abi-bindings/go/validator-manager/PoAValidatorManager" "github.com/ava-labs/teleporter/tests/interfaces" "github.com/ethereum/go-ethereum/common"