diff --git a/pallets/exodus/Cargo.toml b/pallets/exodus/Cargo.toml index e5ba579..dc952f6 100644 --- a/pallets/exodus/Cargo.toml +++ b/pallets/exodus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ghost-exodus" -version = "0.0.2" +version = "0.0.3" description = "Threshold signature generation with DKG included" license.workspace = true authors.workspace = true @@ -56,53 +56,53 @@ rand = { workspace = true } default = ["std"] std = [ "frame-benchmarking?/std", - "scale-info/std", - "strum/std", - "log/std", - "hex/std", - "k256/std", - "num-traits/std", - "frame-support/std", - "frame-system/std", + "scale-info/std", + "strum/std", + "log/std", + "hex/std", + "k256/std", + "num-traits/std", + "frame-support/std", + "frame-system/std", "sha2/std", "hkdf/std", - "chacha20poly1305/std", - "rand_chacha/std", - "sp-arithmetic/std", - "sp-application-crypto/std", - "sp-runtime/std", - "sp-staking/std", - "sp-core/std", - "sp-std/std", - "sp-io/std", - "frost-secp256k1/std", - "frost-ed25519/std", - "frost-core/std", - "ghost-traits/std", - "ghost-helpers/std", - "pallet-balances/std", - "pallet-session/std", - "pallet-staking/std", - "ghost-networks/std", - "frame-executive/std", - "sp-keystore/std", + "chacha20poly1305/std", + "rand_chacha/std", + "sp-arithmetic/std", + "sp-application-crypto/std", + "sp-runtime/std", + "sp-staking/std", + "sp-core/std", + "sp-std/std", + "sp-io/std", + "frost-secp256k1/std", + "frost-ed25519/std", + "frost-core/std", + "ghost-traits/std", + "ghost-helpers/std", + "pallet-balances/std", + "pallet-session/std", + "pallet-staking/std", + "ghost-networks/std", + "frame-executive/std", + "sp-keystore/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "sp-staking/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-staking/runtime-benchmarks", - "ghost-networks/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "sp-staking/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-staking/runtime-benchmarks", + "ghost-networks/runtime-benchmarks", ] try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "sp-runtime/try-runtime", - "pallet-balances/try-runtime", - "pallet-session/try-runtime", - "frame-executive/try-runtime", - "ghost-networks/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime", + "pallet-balances/try-runtime", + "pallet-session/try-runtime", + "frame-executive/try-runtime", + "ghost-networks/try-runtime", ] diff --git a/pallets/exodus/src/lib.rs b/pallets/exodus/src/lib.rs index 0452d55..1c6029d 100644 --- a/pallets/exodus/src/lib.rs +++ b/pallets/exodus/src/lib.rs @@ -4875,6 +4875,20 @@ impl BlockNumberProvider for Pallet { } } +impl EvmGovernanceRegistrar, EvmAddress, GovernanceAction> for Pallet { + fn register_evm_governance_action( + network_id: NetworkIdOf, + target_address: EvmAddress, + governance_action: GovernanceAction, + ) -> DispatchResult { + Self::do_register_evm_governance( + network_id, + target_address, + governance_action, + ) + } +} + impl OneSessionHandler for Pallet { type Key = T::AuthorityId; diff --git a/pallets/traits/Cargo.toml b/pallets/traits/Cargo.toml index 3b70db4..1702cf1 100644 --- a/pallets/traits/Cargo.toml +++ b/pallets/traits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ghost-traits" -version = "0.4.3" +version = "0.4.4" description = "Shared traits including `GhostHasher`, `NetworkDataBasicHandler`, `BoundedBTreeMap`, `MerkleTree` and more." license.workspace = true authors.workspace = true diff --git a/pallets/traits/src/exodus.rs b/pallets/traits/src/exodus.rs index 804fb52..b8fb9d6 100644 --- a/pallets/traits/src/exodus.rs +++ b/pallets/traits/src/exodus.rs @@ -118,3 +118,11 @@ pub trait MerkleTreeBuilder: IdentifierConverter { authority_index: A, ) -> Result<(), E>; } + +pub trait EvmGovernanceRegistrar { + fn register_evm_governance_action( + network_id: NetworkId, + target_address: EvmAddress, + governance_action: GovernanceAction + ) -> frame_support::dispatch::DispatchResult; +}