additional trait for the evm governance
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
parent
3b8030527b
commit
c7637d8ce6
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-exodus"
|
name = "ghost-exodus"
|
||||||
version = "0.0.2"
|
version = "0.0.3"
|
||||||
description = "Threshold signature generation with DKG included"
|
description = "Threshold signature generation with DKG included"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
@ -56,53 +56,53 @@ rand = { workspace = true }
|
|||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
"frame-benchmarking?/std",
|
"frame-benchmarking?/std",
|
||||||
"scale-info/std",
|
"scale-info/std",
|
||||||
"strum/std",
|
"strum/std",
|
||||||
"log/std",
|
"log/std",
|
||||||
"hex/std",
|
"hex/std",
|
||||||
"k256/std",
|
"k256/std",
|
||||||
"num-traits/std",
|
"num-traits/std",
|
||||||
"frame-support/std",
|
"frame-support/std",
|
||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
"sha2/std",
|
"sha2/std",
|
||||||
"hkdf/std",
|
"hkdf/std",
|
||||||
"chacha20poly1305/std",
|
"chacha20poly1305/std",
|
||||||
"rand_chacha/std",
|
"rand_chacha/std",
|
||||||
"sp-arithmetic/std",
|
"sp-arithmetic/std",
|
||||||
"sp-application-crypto/std",
|
"sp-application-crypto/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
"sp-staking/std",
|
"sp-staking/std",
|
||||||
"sp-core/std",
|
"sp-core/std",
|
||||||
"sp-std/std",
|
"sp-std/std",
|
||||||
"sp-io/std",
|
"sp-io/std",
|
||||||
"frost-secp256k1/std",
|
"frost-secp256k1/std",
|
||||||
"frost-ed25519/std",
|
"frost-ed25519/std",
|
||||||
"frost-core/std",
|
"frost-core/std",
|
||||||
"ghost-traits/std",
|
"ghost-traits/std",
|
||||||
"ghost-helpers/std",
|
"ghost-helpers/std",
|
||||||
"pallet-balances/std",
|
"pallet-balances/std",
|
||||||
"pallet-session/std",
|
"pallet-session/std",
|
||||||
"pallet-staking/std",
|
"pallet-staking/std",
|
||||||
"ghost-networks/std",
|
"ghost-networks/std",
|
||||||
"frame-executive/std",
|
"frame-executive/std",
|
||||||
"sp-keystore/std",
|
"sp-keystore/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"frame-benchmarking/runtime-benchmarks",
|
"frame-benchmarking/runtime-benchmarks",
|
||||||
"frame-support/runtime-benchmarks",
|
"frame-support/runtime-benchmarks",
|
||||||
"frame-system/runtime-benchmarks",
|
"frame-system/runtime-benchmarks",
|
||||||
"sp-runtime/runtime-benchmarks",
|
"sp-runtime/runtime-benchmarks",
|
||||||
"sp-staking/runtime-benchmarks",
|
"sp-staking/runtime-benchmarks",
|
||||||
"pallet-balances/runtime-benchmarks",
|
"pallet-balances/runtime-benchmarks",
|
||||||
"pallet-staking/runtime-benchmarks",
|
"pallet-staking/runtime-benchmarks",
|
||||||
"ghost-networks/runtime-benchmarks",
|
"ghost-networks/runtime-benchmarks",
|
||||||
]
|
]
|
||||||
try-runtime = [
|
try-runtime = [
|
||||||
"frame-support/try-runtime",
|
"frame-support/try-runtime",
|
||||||
"frame-system/try-runtime",
|
"frame-system/try-runtime",
|
||||||
"sp-runtime/try-runtime",
|
"sp-runtime/try-runtime",
|
||||||
"pallet-balances/try-runtime",
|
"pallet-balances/try-runtime",
|
||||||
"pallet-session/try-runtime",
|
"pallet-session/try-runtime",
|
||||||
"frame-executive/try-runtime",
|
"frame-executive/try-runtime",
|
||||||
"ghost-networks/try-runtime",
|
"ghost-networks/try-runtime",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -4875,6 +4875,20 @@ impl<T: Config> BlockNumberProvider for Pallet<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T: Config> EvmGovernanceRegistrar<NetworkIdOf<T>, EvmAddress, GovernanceAction> for Pallet<T> {
|
||||||
|
fn register_evm_governance_action(
|
||||||
|
network_id: NetworkIdOf<T>,
|
||||||
|
target_address: EvmAddress,
|
||||||
|
governance_action: GovernanceAction,
|
||||||
|
) -> DispatchResult {
|
||||||
|
Self::do_register_evm_governance(
|
||||||
|
network_id,
|
||||||
|
target_address,
|
||||||
|
governance_action,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<T: Config> OneSessionHandler<T::AccountId> for Pallet<T> {
|
impl<T: Config> OneSessionHandler<T::AccountId> for Pallet<T> {
|
||||||
type Key = T::AuthorityId;
|
type Key = T::AuthorityId;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-traits"
|
name = "ghost-traits"
|
||||||
version = "0.4.3"
|
version = "0.4.4"
|
||||||
description = "Shared traits including `GhostHasher`, `NetworkDataBasicHandler`, `BoundedBTreeMap`, `MerkleTree` and more."
|
description = "Shared traits including `GhostHasher`, `NetworkDataBasicHandler`, `BoundedBTreeMap`, `MerkleTree` and more."
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
|
|||||||
@ -118,3 +118,11 @@ pub trait MerkleTreeBuilder<A, E>: IdentifierConverter<A, E> {
|
|||||||
authority_index: A,
|
authority_index: A,
|
||||||
) -> Result<(), E>;
|
) -> Result<(), E>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub trait EvmGovernanceRegistrar<NetworkId, EvmAddress, GovernanceAction> {
|
||||||
|
fn register_evm_governance_action(
|
||||||
|
network_id: NetworkId,
|
||||||
|
target_address: EvmAddress,
|
||||||
|
governance_action: GovernanceAction
|
||||||
|
) -> frame_support::dispatch::DispatchResult;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user