mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 01:38:32 +00:00
## Add Conviction Voting Precompile This PR introduces a new EVM precompile for conviction voting functionality, enabling smart contracts to interact with the Substrate conviction voting pallet. ### Key Changes - **New Precompile**: Added `ConvictionVotingPrecompile` at address `0x0000000000000000000000000000000000000812` (2066) - **Solidity Interface**: Complete Solidity interface (`ConvictionVoting.sol`) with all conviction voting operations - **Runtime Integration**: Integrated precompile across all runtime configurations (mainnet, testnet, stagenet) - **Comprehensive Testing**: Inherits test suite from Moonbeam ### Features - Vote casting with different conviction levels (None, Locked1x-6x) - Vote delegation and undelegation - Poll management and tallying - Support for all conviction voting pallet operations --------- Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com> Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
53 lines
1.4 KiB
TOML
53 lines
1.4 KiB
TOML
[package]
|
|
name = "pallet-evm-precompile-conviction-voting"
|
|
authors = { workspace = true }
|
|
description = "A Precompile to make pallet-conviction-voting calls encoding accessible to pallet-evm"
|
|
edition = "2021"
|
|
version = "0.1.0"
|
|
|
|
[dependencies]
|
|
log = { workspace = true }
|
|
|
|
# Substrate
|
|
frame-support = { workspace = true }
|
|
frame-system = { workspace = true }
|
|
pallet-conviction-voting = { workspace = true }
|
|
parity-scale-codec = { workspace = true, features = ["derive"] }
|
|
sp-core = { workspace = true }
|
|
sp-runtime = { workspace = true }
|
|
sp-std = { workspace = true }
|
|
|
|
# Frontier
|
|
fp-evm = { workspace = true }
|
|
pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] }
|
|
precompile-utils = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
|
|
# Frontier
|
|
precompile-utils = { workspace = true, features = ["testing"] }
|
|
|
|
# Substrate
|
|
pallet-balances = { workspace = true, features = ["insecure_zero_ed", "std"] }
|
|
pallet-timestamp = { workspace = true, features = ["std"] }
|
|
scale-info = { workspace = true, features = ["derive", "std"] }
|
|
sp-io = { workspace = true }
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = [
|
|
"fp-evm/std",
|
|
"frame-support/std",
|
|
"frame-system/std",
|
|
"pallet-conviction-voting/std",
|
|
"pallet-evm/std",
|
|
"parity-scale-codec/std",
|
|
"precompile-utils/std",
|
|
"sp-runtime/std",
|
|
"sp-std/std",
|
|
]
|
|
runtime-benchmarks = [
|
|
"frame-support/runtime-benchmarks",
|
|
"frame-system/runtime-benchmarks",
|
|
"sp-runtime/runtime-benchmarks",
|
|
]
|