mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
feat: ✨ Add Polkadot API support to CLI and e2e testing infra (#68)
In this PR: 1. Add [Polkadot API](https://papi.how/) support to `test/` directory (i.e. the e2e CLI and testing framework) to be able to interact with the Substrate chain. 1. This allows typed interactions with transactions, constants, storage, runtime APIs, and non-typed interaction with RPC methods. 2. Types are autogenerated when running `bun i`, from the `datahaven.scale` file that is part of this repo's version control. 2. Add new utilities file to `papi` related functionalities. For the time being, generating a new signer from a private key. 3. ~Add a new step to the CLI that sends a transaction to the DataHaven network. _*THIS SHOULD BE REMOVED SOON, IT'S JUST FOR TESTING PURPOSES*_~ 1. Both steps that send test transactions have been removed from the CLI, for convenience and being error prone. Their scripts remain usable for testing purposes if needed. 4. Removes the `apis.rs` files from the runtime definitions. Having them in a separate file meant that the runtime was not including the Runtime APIs in the metadata blob, preventing `papi` from creating types from it. This change can be reapplied after upgrading to `polkadot-sdk` `stable-2503`. More info [here](https://github.com/paritytech/polkadot-sdk/issues/6659). 5. Add script to re-generate types, and corresponding docs. 6. Makes logger synchronous to avoid prints happening before logs.
This commit is contained in:
parent
6aeece550b
commit
728c320926
26 changed files with 3446 additions and 2297 deletions
|
|
@ -2,7 +2,13 @@
|
|||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
|
||||
"files": {
|
||||
"include": ["*.js", "*.ts", "*.json", "*.yml", "*.md"],
|
||||
"ignore": ["./node_modules/*", "./target/*", "**/tmp/*", "*.spec.json"]
|
||||
"ignore": [
|
||||
"./node_modules/*",
|
||||
"./target/*",
|
||||
"**/tmp/*",
|
||||
"*.spec.json",
|
||||
"**/.papi/descriptors/**/*"
|
||||
]
|
||||
},
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
|
|
|
|||
1165
operator/Cargo.lock
generated
1165
operator/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -58,7 +58,7 @@ macro_rules! construct_async_run {
|
|||
match runner.config().chain_spec {
|
||||
ref spec if spec.is_mainnet() => {
|
||||
runner.async_run(|$config| {
|
||||
let $components = service::new_partial::<datahaven_mainnet_runtime::apis::RuntimeApi>(
|
||||
let $components = service::new_partial::<datahaven_mainnet_runtime::RuntimeApi>(
|
||||
&$config,
|
||||
&mut $cli.eth.clone()
|
||||
)?;
|
||||
|
|
@ -68,7 +68,7 @@ macro_rules! construct_async_run {
|
|||
}
|
||||
ref spec if spec.is_testnet() => {
|
||||
runner.async_run(|$config| {
|
||||
let $components = service::new_partial::<datahaven_testnet_runtime::apis::RuntimeApi>(
|
||||
let $components = service::new_partial::<datahaven_testnet_runtime::RuntimeApi>(
|
||||
&$config,
|
||||
&mut $cli.eth.clone()
|
||||
)?;
|
||||
|
|
@ -78,7 +78,7 @@ macro_rules! construct_async_run {
|
|||
}
|
||||
_ => {
|
||||
runner.async_run(|$config| {
|
||||
let $components = service::new_partial::<datahaven_stagenet_runtime::apis::RuntimeApi>(
|
||||
let $components = service::new_partial::<datahaven_stagenet_runtime::RuntimeApi>(
|
||||
&$config,
|
||||
&mut $cli.eth.clone()
|
||||
)?;
|
||||
|
|
@ -94,18 +94,24 @@ macro_rules! construct_benchmark_partials {
|
|||
($cli:expr, $config:expr, |$partials:ident| $code:expr) => {
|
||||
match $config.chain_spec {
|
||||
ref spec if spec.is_mainnet() => {
|
||||
let $partials =
|
||||
service::new_partial::<datahaven_mainnet_runtime::apis::RuntimeApi>(&$config, &mut $cli.eth.clone())?;
|
||||
let $partials = service::new_partial::<datahaven_mainnet_runtime::RuntimeApi>(
|
||||
&$config,
|
||||
&mut $cli.eth.clone(),
|
||||
)?;
|
||||
$code
|
||||
}
|
||||
ref spec if spec.is_testnet() => {
|
||||
let $partials =
|
||||
service::new_partial::<datahaven_testnet_runtime::apis::RuntimeApi>(&$config, &mut $cli.eth.clone())?;
|
||||
let $partials = service::new_partial::<datahaven_testnet_runtime::RuntimeApi>(
|
||||
&$config,
|
||||
&mut $cli.eth.clone(),
|
||||
)?;
|
||||
$code
|
||||
}
|
||||
_ => {
|
||||
let $partials =
|
||||
service::new_partial::<datahaven_stagenet_runtime::apis::RuntimeApi>(&$config, &mut $cli.eth.clone())?;
|
||||
let $partials = service::new_partial::<datahaven_stagenet_runtime::RuntimeApi>(
|
||||
&$config,
|
||||
&mut $cli.eth.clone(),
|
||||
)?;
|
||||
$code
|
||||
}
|
||||
}
|
||||
|
|
@ -261,21 +267,21 @@ pub fn run() -> sc_cli::Result<()> {
|
|||
sc_network::config::NetworkBackendType::Libp2p => match config.chain_spec {
|
||||
ref spec if spec.is_mainnet() => {
|
||||
service::new_full::<
|
||||
datahaven_mainnet_runtime::apis::RuntimeApi,
|
||||
datahaven_mainnet_runtime::RuntimeApi,
|
||||
sc_network::NetworkWorker<_, _>,
|
||||
>(config, cli.eth)
|
||||
.await
|
||||
}
|
||||
ref spec if spec.is_testnet() => {
|
||||
service::new_full::<
|
||||
datahaven_testnet_runtime::apis::RuntimeApi,
|
||||
datahaven_testnet_runtime::RuntimeApi,
|
||||
sc_network::NetworkWorker<_, _>,
|
||||
>(config, cli.eth)
|
||||
.await
|
||||
}
|
||||
_ => {
|
||||
service::new_full::<
|
||||
datahaven_stagenet_runtime::apis::RuntimeApi,
|
||||
datahaven_stagenet_runtime::RuntimeApi,
|
||||
sc_network::NetworkWorker<_, _>,
|
||||
>(config, cli.eth)
|
||||
.await
|
||||
|
|
@ -285,21 +291,21 @@ pub fn run() -> sc_cli::Result<()> {
|
|||
sc_network::config::NetworkBackendType::Litep2p => match config.chain_spec {
|
||||
ref spec if spec.is_mainnet() => {
|
||||
service::new_full::<
|
||||
datahaven_mainnet_runtime::apis::RuntimeApi,
|
||||
datahaven_mainnet_runtime::RuntimeApi,
|
||||
sc_network::Litep2pNetworkBackend,
|
||||
>(config, cli.eth)
|
||||
.await
|
||||
}
|
||||
ref spec if spec.is_testnet() => {
|
||||
service::new_full::<
|
||||
datahaven_testnet_runtime::apis::RuntimeApi,
|
||||
datahaven_testnet_runtime::RuntimeApi,
|
||||
sc_network::Litep2pNetworkBackend,
|
||||
>(config, cli.eth)
|
||||
.await
|
||||
}
|
||||
_ => {
|
||||
service::new_full::<
|
||||
datahaven_stagenet_runtime::apis::RuntimeApi,
|
||||
datahaven_stagenet_runtime::RuntimeApi,
|
||||
sc_network::Litep2pNetworkBackend,
|
||||
>(config, cli.eth)
|
||||
.await
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ use sp_inherents::InherentData;
|
|||
use sp_runtime::{generic::Digest, traits::Block as BlockT, DigestItem};
|
||||
|
||||
/// Implement pending consensus data provider for BABE.
|
||||
#[derive(Default)]
|
||||
pub struct BabeConsensusDataProvider {}
|
||||
|
||||
impl BabeConsensusDataProvider {
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ where
|
|||
import_queue,
|
||||
keystore_container,
|
||||
select_chain,
|
||||
transaction_pool: transaction_pool.into(),
|
||||
transaction_pool,
|
||||
other: (
|
||||
block_import,
|
||||
grandpa_link,
|
||||
|
|
@ -504,7 +504,7 @@ where
|
|||
frontier_partial_components: FrontierPartialComponents {
|
||||
filter_pool: filter_pool.clone(),
|
||||
fee_history_cache: fee_history_cache.clone(),
|
||||
fee_history_cache_limit: fee_history_cache_limit.clone(),
|
||||
fee_history_cache_limit,
|
||||
},
|
||||
storage_override,
|
||||
sync: sync_service.clone(),
|
||||
|
|
|
|||
|
|
@ -1,800 +0,0 @@
|
|||
// This is free and unencumbered software released into the public domain.
|
||||
//
|
||||
// Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
// distribute this software, either in source code form or as a compiled
|
||||
// binary, for any purpose, commercial or non-commercial, and by any
|
||||
// means.
|
||||
//
|
||||
// In jurisdictions that recognize copyright laws, the author or authors
|
||||
// of this software dedicate any and all copyright interest in the
|
||||
// software to the public domain. We make this dedication for the benefit
|
||||
// of the public at large and to the detriment of our heirs and
|
||||
// successors. We intend this dedication to be an overt act of
|
||||
// relinquishment in perpetuity of all present and future rights to this
|
||||
// software under copyright law.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// For more information, please refer to <http://unlicense.org>
|
||||
|
||||
// Local module imports
|
||||
use super::{
|
||||
AccountId, Babe, Balance, Beefy, BeefyMmrLeaf, Block, BlockNumber, Ethereum, Executive,
|
||||
Grandpa, Historical, InherentDataExt, Mmr, Nonce, Runtime, RuntimeCall, RuntimeGenesisConfig,
|
||||
RuntimeOrigin, SessionKeys, System, TransactionPayment, UncheckedExtrinsic, VERSION,
|
||||
};
|
||||
// External crates imports
|
||||
use crate::configs::BABE_GENESIS_EPOCH_CONFIG;
|
||||
use alloc::vec::Vec;
|
||||
use codec::Encode;
|
||||
use datahaven_runtime_common::time::EpochDurationInBlocks;
|
||||
use fp_rpc::TransactionStatus;
|
||||
use frame_support::traits::OnFinalize;
|
||||
use pallet_ethereum::Transaction as EthereumTransaction;
|
||||
use pallet_evm::GasWeightMapping;
|
||||
|
||||
use frame_support::traits::KeyOwnerProofSystem;
|
||||
use frame_support::{
|
||||
genesis_builder_helper::{build_state, get_preset},
|
||||
weights::Weight,
|
||||
};
|
||||
use pallet_ethereum::Call::transact;
|
||||
use pallet_evm::Account as EVMAccount;
|
||||
use pallet_evm::FeeCalculator;
|
||||
use pallet_evm::Runner;
|
||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||
use polkadot_primitives::Hash;
|
||||
use snowbridge_core::AgentId;
|
||||
use sp_api::impl_runtime_apis;
|
||||
use sp_consensus_beefy::{
|
||||
ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature},
|
||||
AncestryHelper,
|
||||
};
|
||||
use sp_core::{Get, H256, U256};
|
||||
use sp_core::{OpaqueMetadata, H160};
|
||||
use sp_runtime::traits::{DispatchInfoOf, Dispatchable, PostDispatchInfoOf};
|
||||
use sp_runtime::transaction_validity::TransactionValidityError;
|
||||
use sp_runtime::{
|
||||
traits::Block as BlockT,
|
||||
transaction_validity::{TransactionSource, TransactionValidity},
|
||||
ApplyExtrinsicResult, Permill,
|
||||
};
|
||||
use sp_version::RuntimeVersion;
|
||||
use xcm::VersionedLocation;
|
||||
/// MMR helper types.
|
||||
mod mmr {
|
||||
use super::Runtime;
|
||||
pub use pallet_mmr::primitives::*;
|
||||
|
||||
pub type Leaf = <<Runtime as pallet_mmr::Config>::LeafData as LeafDataProvider>::LeafData;
|
||||
pub type Hashing = <Runtime as pallet_mmr::Config>::Hashing;
|
||||
pub type Hash = <Hashing as sp_runtime::traits::Hash>::Output;
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct TransactionConverter;
|
||||
|
||||
impl fp_self_contained::SelfContainedCall for RuntimeCall {
|
||||
type SignedInfo = H160;
|
||||
|
||||
fn is_self_contained(&self) -> bool {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.is_self_contained(),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn check_self_contained(&self) -> Option<Result<Self::SignedInfo, TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.check_self_contained(),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn validate_self_contained(
|
||||
&self,
|
||||
signed_info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<TransactionValidity> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.validate_self_contained(signed_info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn pre_dispatch_self_contained(
|
||||
&self,
|
||||
info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<Result<(), TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.pre_dispatch_self_contained(info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn apply_self_contained(
|
||||
self,
|
||||
info: Self::SignedInfo,
|
||||
) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {
|
||||
match self {
|
||||
call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => {
|
||||
Some(call.dispatch(RuntimeOrigin::from(
|
||||
pallet_ethereum::RawOrigin::EthereumTransaction(info),
|
||||
)))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
|
||||
fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl_runtime_apis! {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> RuntimeVersion {
|
||||
VERSION
|
||||
}
|
||||
|
||||
fn execute_block(block: Block) {
|
||||
Executive::execute_block(block);
|
||||
}
|
||||
|
||||
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
|
||||
Executive::initialize_block(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_api::Metadata<Block> for Runtime {
|
||||
fn metadata() -> OpaqueMetadata {
|
||||
OpaqueMetadata::new(Runtime::metadata().into())
|
||||
}
|
||||
|
||||
fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
|
||||
Runtime::metadata_at_version(version)
|
||||
}
|
||||
|
||||
fn metadata_versions() -> Vec<u32> {
|
||||
Runtime::metadata_versions()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_block_builder::BlockBuilder<Block> for Runtime {
|
||||
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
|
||||
Executive::apply_extrinsic(extrinsic)
|
||||
}
|
||||
|
||||
fn finalize_block() -> <Block as BlockT>::Header {
|
||||
Executive::finalize_block()
|
||||
}
|
||||
|
||||
fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
|
||||
data.create_extrinsics()
|
||||
}
|
||||
|
||||
fn check_inherents(
|
||||
block: Block,
|
||||
data: sp_inherents::InherentData,
|
||||
) -> sp_inherents::CheckInherentsResult {
|
||||
data.check_extrinsics(&block)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
|
||||
fn offchain_worker(header: &<Block as BlockT>::Header) {
|
||||
Executive::offchain_worker(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_session::SessionKeys<Block> for Runtime {
|
||||
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
|
||||
SessionKeys::generate(seed)
|
||||
}
|
||||
|
||||
fn decode_session_keys(
|
||||
encoded: Vec<u8>,
|
||||
) -> Option<Vec<(Vec<u8>, sp_core::crypto::KeyTypeId)>> {
|
||||
SessionKeys::decode_into_raw_public_keys(&encoded)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_babe::BabeApi<Block> for Runtime {
|
||||
fn configuration() -> sp_consensus_babe::BabeConfiguration {
|
||||
let epoch_config = Babe::epoch_config().unwrap_or(BABE_GENESIS_EPOCH_CONFIG);
|
||||
sp_consensus_babe::BabeConfiguration {
|
||||
slot_duration: Babe::slot_duration(),
|
||||
epoch_length: EpochDurationInBlocks::get().into(),
|
||||
c: epoch_config.c,
|
||||
authorities: Babe::authorities().to_vec(),
|
||||
randomness: Babe::randomness(),
|
||||
allowed_slots: epoch_config.allowed_slots,
|
||||
}
|
||||
}
|
||||
|
||||
fn current_epoch_start() -> sp_consensus_babe::Slot {
|
||||
Babe::current_epoch_start()
|
||||
}
|
||||
|
||||
fn current_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::current_epoch()
|
||||
}
|
||||
|
||||
fn next_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::next_epoch()
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_slot: sp_consensus_babe::Slot,
|
||||
authority_id: sp_consensus_babe::AuthorityId,
|
||||
) -> Option<sp_consensus_babe::OpaqueKeyOwnershipProof> {
|
||||
use codec::Encode;
|
||||
|
||||
Historical::prove((sp_consensus_babe::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_babe::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_babe::EquivocationProof<<Block as BlockT>::Header>,
|
||||
key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Babe::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_grandpa::GrandpaApi<Block> for Runtime {
|
||||
fn grandpa_authorities() -> Vec<(GrandpaId, u64)> {
|
||||
Grandpa::grandpa_authorities()
|
||||
}
|
||||
|
||||
fn current_set_id() -> fg_primitives::SetId {
|
||||
Grandpa::current_set_id()
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: fg_primitives::EquivocationProof<
|
||||
<Block as BlockT>::Hash,
|
||||
sp_runtime::traits::NumberFor<Block>,
|
||||
>,
|
||||
key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Grandpa::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: fg_primitives::SetId,
|
||||
authority_id: fg_primitives::AuthorityId,
|
||||
) -> Option<fg_primitives::OpaqueKeyOwnershipProof> {
|
||||
|
||||
Historical::prove((fg_primitives::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(fg_primitives::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(2)]
|
||||
impl mmr::MmrApi<Block, mmr::Hash, BlockNumber> for Runtime {
|
||||
fn mmr_root() -> Result<mmr::Hash, mmr::Error> {
|
||||
Ok(pallet_mmr::RootHash::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn mmr_leaf_count() -> Result<mmr::LeafIndex, mmr::Error> {
|
||||
Ok(pallet_mmr::NumberOfLeaves::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn generate_proof(
|
||||
block_numbers: Vec<BlockNumber>,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::LeafProof<mmr::Hash>), mmr::Error> {
|
||||
Mmr::generate_proof(block_numbers, best_known_block_number).map(
|
||||
|(leaves, proof)| {
|
||||
(
|
||||
leaves
|
||||
.into_iter()
|
||||
.map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf))
|
||||
.collect(),
|
||||
proof,
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fn verify_proof(leaves: Vec<mmr::EncodableOpaqueLeaf>, proof: mmr::LeafProof<mmr::Hash>)
|
||||
-> Result<(), mmr::Error>
|
||||
{
|
||||
let leaves = leaves.into_iter().map(|leaf|
|
||||
leaf.into_opaque_leaf()
|
||||
.try_decode()
|
||||
.ok_or(mmr::Error::Verify)).collect::<Result<Vec<mmr::Leaf>, mmr::Error>>()?;
|
||||
Mmr::verify_leaves(leaves, proof)
|
||||
}
|
||||
|
||||
fn verify_proof_stateless(
|
||||
root: mmr::Hash,
|
||||
leaves: Vec<mmr::EncodableOpaqueLeaf>,
|
||||
proof: mmr::LeafProof<mmr::Hash>
|
||||
) -> Result<(), mmr::Error> {
|
||||
let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect();
|
||||
pallet_mmr::verify_leaves_proof::<mmr::Hashing, _>(root, nodes, proof)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_beefy_mmr::BeefyMmrApi<Block, Hash> for RuntimeApi {
|
||||
fn authority_set_proof() -> sp_consensus_beefy::mmr::BeefyAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::authority_set_proof()
|
||||
}
|
||||
|
||||
fn next_authority_set_proof() -> sp_consensus_beefy::mmr::BeefyNextAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::next_authority_set_proof()
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(5)]
|
||||
impl sp_consensus_beefy::BeefyApi<Block, BeefyId> for Runtime {
|
||||
fn beefy_genesis() -> Option<BlockNumber> {
|
||||
pallet_beefy::GenesisBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn validator_set() -> Option<sp_consensus_beefy::ValidatorSet<BeefyId>> {
|
||||
Beefy::validator_set()
|
||||
}
|
||||
|
||||
fn submit_report_double_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::DoubleVotingProof<
|
||||
BlockNumber,
|
||||
BeefyId,
|
||||
BeefySignature,
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Beefy::submit_unsigned_double_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_fork_voting_unsigned_extrinsic(
|
||||
equivocation_proof:
|
||||
sp_consensus_beefy::ForkVotingProof<
|
||||
<Block as BlockT>::Header,
|
||||
BeefyId,
|
||||
sp_runtime::OpaqueValue
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_fork_voting_report(
|
||||
equivocation_proof.try_into()?,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_future_block_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::FutureBlockVotingProof<BlockNumber, BeefyId>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_future_block_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: sp_consensus_beefy::ValidatorSetId,
|
||||
authority_id: BeefyId,
|
||||
) -> Option<sp_consensus_beefy::OpaqueKeyOwnershipProof> {
|
||||
Historical::prove((sp_consensus_beefy::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_beefy::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn generate_ancestry_proof(
|
||||
prev_block_number: BlockNumber,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Option<sp_runtime::OpaqueValue> {
|
||||
use codec::Encode;
|
||||
|
||||
BeefyMmrLeaf::generate_proof(prev_block_number, best_known_block_number)
|
||||
.map(|p| p.encode())
|
||||
.map(sp_runtime::OpaqueValue::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
|
||||
fn query_info(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_info(uxt, len)
|
||||
}
|
||||
fn query_fee_details(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_fee_details(uxt, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||
for Runtime
|
||||
{
|
||||
fn query_call_info(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_call_info(call, len)
|
||||
}
|
||||
fn query_call_fee_details(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_call_fee_details(call, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_outbound_queue_v2_runtime_api::OutboundQueueV2Api<Block, Balance> for Runtime {
|
||||
fn prove_message(leaf_index: u64) -> Option<snowbridge_merkle_tree::MerkleProof> {
|
||||
snowbridge_pallet_outbound_queue_v2::api::prove_message::<Runtime>(leaf_index)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_system_v2_runtime_api::ControlV2Api<Block> for Runtime {
|
||||
fn agent_id(location: VersionedLocation) -> Option<AgentId> {
|
||||
snowbridge_pallet_system_v2::api::agent_id::<Runtime>(location)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||
fn benchmark_metadata(extra: bool) -> (
|
||||
Vec<frame_benchmarking::BenchmarkList>,
|
||||
Vec<frame_support::traits::StorageInfo>,
|
||||
) {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkList};
|
||||
use frame_support::traits::StorageInfoTrait;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
use super::*;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
list_benchmarks!(list, extra);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
|
||||
(list, storage_info)
|
||||
}
|
||||
|
||||
#[expect(non_local_definitions)]
|
||||
fn dispatch_benchmark(
|
||||
config: frame_benchmarking::BenchmarkConfig
|
||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch};
|
||||
use sp_storage::TrackedStorageKey;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
use super::*;
|
||||
|
||||
impl frame_system_benchmarking::Config for Runtime {}
|
||||
impl baseline::Config for Runtime {}
|
||||
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
add_benchmarks!(params, batches);
|
||||
|
||||
Ok(batches)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> for Runtime {
|
||||
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here. If any of the pre/post migration checks fail, we shall stop
|
||||
// right here and right now.
|
||||
let weight = Executive::try_runtime_upgrade(checks).unwrap();
|
||||
(weight, super::configs::RuntimeBlockWeights::get().max_block)
|
||||
}
|
||||
|
||||
fn execute_block(
|
||||
block: Block,
|
||||
state_root_check: bool,
|
||||
signature_check: bool,
|
||||
select: frame_try_runtime::TryStateSelect
|
||||
) -> Weight {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here.
|
||||
Executive::try_execute_block(block, state_root_check, signature_check, select).expect("execute-block failed")
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
|
||||
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
|
||||
build_state::<RuntimeGenesisConfig>(config)
|
||||
}
|
||||
|
||||
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
|
||||
get_preset::<RuntimeGenesisConfig>(id, crate::genesis_config_presets::get_preset)
|
||||
}
|
||||
|
||||
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
|
||||
crate::genesis_config_presets::preset_names()
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {
|
||||
fn chain_id() -> u64 {
|
||||
<Runtime as pallet_evm::Config>::ChainId::get()
|
||||
}
|
||||
|
||||
fn account_basic(address: H160) -> EVMAccount {
|
||||
let (account, _) = pallet_evm::Pallet::<Runtime>::account_basic(&address);
|
||||
account
|
||||
}
|
||||
|
||||
fn gas_price() -> U256 {
|
||||
let (gas_price, _) = <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price();
|
||||
gas_price
|
||||
}
|
||||
|
||||
fn account_code_at(address: H160) -> Vec<u8> {
|
||||
pallet_evm::AccountCodes::<Runtime>::get(address)
|
||||
}
|
||||
|
||||
fn author() -> H160 {
|
||||
<pallet_evm::Pallet<Runtime>>::find_author()
|
||||
}
|
||||
|
||||
fn storage_at(address: H160, index: U256) -> H256 {
|
||||
let tmp = index.to_big_endian();
|
||||
pallet_evm::AccountStorages::<Runtime>::get(address, H256::from_slice(&tmp[..]))
|
||||
}
|
||||
|
||||
fn call(
|
||||
from: H160,
|
||||
to: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
// Estimated encoded transaction size must be based on the heaviest transaction
|
||||
// type (EIP1559Transaction) to be compatible with all transaction types.
|
||||
let mut estimated_transaction_len = data.len() +
|
||||
// pallet ethereum index: 1
|
||||
// transact call index: 1
|
||||
// Transaction enum variant: 1
|
||||
// chain_id 8 bytes
|
||||
// nonce: 32
|
||||
// max_priority_fee_per_gas: 32
|
||||
// max_fee_per_gas: 32
|
||||
// gas_limit: 32
|
||||
// action: 21 (enum varianrt + call address)
|
||||
// value: 32
|
||||
// access_list: 1 (empty vec size)
|
||||
// 65 bytes signature
|
||||
258;
|
||||
|
||||
if access_list.is_some() {
|
||||
estimated_transaction_len += access_list.encoded_size();
|
||||
}
|
||||
|
||||
let gas_limit = gas_limit.min(u64::MAX.into()).low_u64();
|
||||
let without_base_extrinsic_weight = true;
|
||||
|
||||
let (weight_limit, proof_size_base_cost) =
|
||||
match <Runtime as pallet_evm::Config>::GasWeightMapping::gas_to_weight(
|
||||
gas_limit,
|
||||
without_base_extrinsic_weight
|
||||
) {
|
||||
weight_limit if weight_limit.proof_size() > 0 => {
|
||||
(Some(weight_limit), Some(estimated_transaction_len as u64))
|
||||
}
|
||||
_ => (None, None),
|
||||
};
|
||||
|
||||
<Runtime as pallet_evm::Config>::Runner::call(
|
||||
from,
|
||||
to,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn create(
|
||||
from: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
let gas_limit = if gas_limit > U256::from(u64::MAX) {
|
||||
u64::MAX
|
||||
} else {
|
||||
gas_limit.low_u64()
|
||||
};
|
||||
|
||||
let (weight_limit, proof_size_base_cost) = (None, None);
|
||||
|
||||
#[allow(clippy::or_fun_call)]
|
||||
<Runtime as pallet_evm::Config>::Runner::create(
|
||||
from,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_block() -> Option<pallet_ethereum::Block> {
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_all() -> (
|
||||
Option<pallet_ethereum::Block>,
|
||||
Option<Vec<pallet_ethereum::Receipt>>,
|
||||
Option<Vec<TransactionStatus>>,
|
||||
) {
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn extrinsic_filter(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> Vec<EthereumTransaction> {
|
||||
xts.into_iter().filter_map(|xt| match xt.0.function {
|
||||
RuntimeCall::Ethereum(transact { transaction }) => Some(transaction),
|
||||
_ => None
|
||||
}).collect::<Vec<EthereumTransaction>>()
|
||||
}
|
||||
|
||||
fn elasticity() -> Option<Permill> {
|
||||
None
|
||||
}
|
||||
|
||||
fn gas_limit_multiplier_support() {}
|
||||
|
||||
fn pending_block(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> (Option<pallet_ethereum::Block>, Option<Vec<TransactionStatus>>) {
|
||||
for ext in xts.into_iter() {
|
||||
let _ = Executive::apply_extrinsic(ext);
|
||||
}
|
||||
|
||||
Ethereum::on_finalize(System::block_number() + 1);
|
||||
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn initialize_pending_block(header: &<Block as BlockT>::Header) {
|
||||
Executive::initialize_block(header);
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {
|
||||
fn convert_transaction(transaction: EthereumTransaction) -> <Block as BlockT>::Extrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -629,13 +629,13 @@ impl pallet_evm_chain_id::Config for Runtime {}
|
|||
|
||||
// --- Snowbridge Config Constants & Parameter Types ---
|
||||
parameter_types! {
|
||||
pub UniversalLocation: InteriorLocation = Here.into();
|
||||
pub UniversalLocation: InteriorLocation = Here;
|
||||
pub InboundDeliveryCost: BalanceOf<Runtime> = 0;
|
||||
pub RootLocation: Location = Location::here();
|
||||
pub Parameters: PricingParameters<u128> = PricingParameters {
|
||||
exchange_rate: FixedU128::from_rational(1, 400),
|
||||
fee_per_gas: gwei(20),
|
||||
rewards: Rewards { local: 1 * UNIT, remote: meth(1) },
|
||||
rewards: Rewards { local: UNIT, remote: meth(1) },
|
||||
multiplier: FixedU128::from_rational(1, 1),
|
||||
};
|
||||
pub EthereumLocation: Location = Location::new(1, EthereumNetwork::get());
|
||||
|
|
|
|||
|
|
@ -6,26 +6,48 @@ extern crate alloc;
|
|||
#[cfg(feature = "std")]
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
pub mod apis;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
mod benchmarks;
|
||||
pub mod configs;
|
||||
|
||||
use alloc::{borrow::Cow, vec::Vec};
|
||||
use sp_runtime::{generic, impl_opaque_keys};
|
||||
use codec::Encode;
|
||||
use fp_rpc::TransactionStatus;
|
||||
use frame_support::{
|
||||
genesis_builder_helper::{build_state, get_preset},
|
||||
pallet_prelude::{TransactionValidity, TransactionValidityError},
|
||||
traits::{KeyOwnerProofSystem, OnFinalize},
|
||||
weights::Weight,
|
||||
};
|
||||
pub use frame_system::Call as SystemCall;
|
||||
pub use pallet_balances::Call as BalancesCall;
|
||||
use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};
|
||||
use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping, Runner};
|
||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||
pub use pallet_timestamp::Call as TimestampCall;
|
||||
use snowbridge_core::AgentId;
|
||||
use sp_api::impl_runtime_apis;
|
||||
use sp_consensus_beefy::{
|
||||
ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature},
|
||||
AncestryHelper,
|
||||
};
|
||||
use sp_core::{Get, OpaqueMetadata, H160, H256, U256};
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use sp_runtime::BuildStorage;
|
||||
use sp_runtime::{
|
||||
generic, impl_opaque_keys,
|
||||
traits::{Block as BlockT, DispatchInfoOf, Dispatchable, PostDispatchInfoOf},
|
||||
transaction_validity::TransactionSource,
|
||||
ApplyExtrinsicResult, Permill,
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
use sp_version::NativeVersion;
|
||||
use sp_version::RuntimeVersion;
|
||||
|
||||
pub use frame_system::Call as SystemCall;
|
||||
pub use pallet_balances::Call as BalancesCall;
|
||||
pub use pallet_timestamp::Call as TimestampCall;
|
||||
use sp_core::H160;
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use sp_runtime::BuildStorage;
|
||||
use xcm::VersionedLocation;
|
||||
|
||||
pub use datahaven_runtime_common::{
|
||||
AccountId, Address, Balance, BlockNumber, Hash, Header, Nonce, Signature,
|
||||
time::EpochDurationInBlocks, AccountId, Address, Balance, BlockNumber, Hash, Header, Nonce,
|
||||
Signature,
|
||||
};
|
||||
|
||||
pub mod genesis_config_presets;
|
||||
|
|
@ -76,7 +98,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||
// the compatible custom types.
|
||||
spec_version: 100,
|
||||
impl_version: 1,
|
||||
apis: apis::RUNTIME_API_VERSIONS,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
transaction_version: 1,
|
||||
system_version: 1,
|
||||
};
|
||||
|
|
@ -320,3 +342,733 @@ mod runtime {
|
|||
pub type OutboundCommitmentStore = pallet_outbound_commitment_store;
|
||||
// ╚═══════════════════ DataHaven-specific Pallets ══════════════════╝
|
||||
}
|
||||
|
||||
/// MMR helper types.
|
||||
mod mmr {
|
||||
use super::Runtime;
|
||||
pub use pallet_mmr::primitives::*;
|
||||
|
||||
pub type Leaf = <<Runtime as pallet_mmr::Config>::LeafData as LeafDataProvider>::LeafData;
|
||||
pub type Hashing = <Runtime as pallet_mmr::Config>::Hashing;
|
||||
pub type Hash = <Hashing as sp_runtime::traits::Hash>::Output;
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct TransactionConverter;
|
||||
|
||||
impl fp_self_contained::SelfContainedCall for RuntimeCall {
|
||||
type SignedInfo = H160;
|
||||
|
||||
fn is_self_contained(&self) -> bool {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.is_self_contained(),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn check_self_contained(&self) -> Option<Result<Self::SignedInfo, TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.check_self_contained(),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn validate_self_contained(
|
||||
&self,
|
||||
signed_info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<TransactionValidity> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.validate_self_contained(signed_info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn pre_dispatch_self_contained(
|
||||
&self,
|
||||
info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<Result<(), TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.pre_dispatch_self_contained(info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn apply_self_contained(
|
||||
self,
|
||||
info: Self::SignedInfo,
|
||||
) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {
|
||||
match self {
|
||||
call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => {
|
||||
Some(call.dispatch(RuntimeOrigin::from(
|
||||
pallet_ethereum::RawOrigin::EthereumTransaction(info),
|
||||
)))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
|
||||
fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl_runtime_apis! {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> RuntimeVersion {
|
||||
VERSION
|
||||
}
|
||||
|
||||
fn execute_block(block: Block) {
|
||||
Executive::execute_block(block);
|
||||
}
|
||||
|
||||
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
|
||||
Executive::initialize_block(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_api::Metadata<Block> for Runtime {
|
||||
fn metadata() -> OpaqueMetadata {
|
||||
OpaqueMetadata::new(Runtime::metadata().into())
|
||||
}
|
||||
|
||||
fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
|
||||
Runtime::metadata_at_version(version)
|
||||
}
|
||||
|
||||
fn metadata_versions() -> Vec<u32> {
|
||||
Runtime::metadata_versions()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_block_builder::BlockBuilder<Block> for Runtime {
|
||||
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
|
||||
Executive::apply_extrinsic(extrinsic)
|
||||
}
|
||||
|
||||
fn finalize_block() -> <Block as BlockT>::Header {
|
||||
Executive::finalize_block()
|
||||
}
|
||||
|
||||
fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
|
||||
data.create_extrinsics()
|
||||
}
|
||||
|
||||
fn check_inherents(
|
||||
block: Block,
|
||||
data: sp_inherents::InherentData,
|
||||
) -> sp_inherents::CheckInherentsResult {
|
||||
data.check_extrinsics(&block)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
|
||||
fn offchain_worker(header: &<Block as BlockT>::Header) {
|
||||
Executive::offchain_worker(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_session::SessionKeys<Block> for Runtime {
|
||||
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
|
||||
SessionKeys::generate(seed)
|
||||
}
|
||||
|
||||
fn decode_session_keys(
|
||||
encoded: Vec<u8>,
|
||||
) -> Option<Vec<(Vec<u8>, sp_core::crypto::KeyTypeId)>> {
|
||||
SessionKeys::decode_into_raw_public_keys(&encoded)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_babe::BabeApi<Block> for Runtime {
|
||||
fn configuration() -> sp_consensus_babe::BabeConfiguration {
|
||||
let epoch_config = Babe::epoch_config().unwrap_or(crate::configs::BABE_GENESIS_EPOCH_CONFIG);
|
||||
sp_consensus_babe::BabeConfiguration {
|
||||
slot_duration: Babe::slot_duration(),
|
||||
epoch_length: EpochDurationInBlocks::get().into(),
|
||||
c: epoch_config.c,
|
||||
authorities: Babe::authorities().to_vec(),
|
||||
randomness: Babe::randomness(),
|
||||
allowed_slots: epoch_config.allowed_slots,
|
||||
}
|
||||
}
|
||||
|
||||
fn current_epoch_start() -> sp_consensus_babe::Slot {
|
||||
Babe::current_epoch_start()
|
||||
}
|
||||
|
||||
fn current_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::current_epoch()
|
||||
}
|
||||
|
||||
fn next_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::next_epoch()
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_slot: sp_consensus_babe::Slot,
|
||||
authority_id: sp_consensus_babe::AuthorityId,
|
||||
) -> Option<sp_consensus_babe::OpaqueKeyOwnershipProof> {
|
||||
use codec::Encode;
|
||||
|
||||
Historical::prove((sp_consensus_babe::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_babe::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_babe::EquivocationProof<<Block as BlockT>::Header>,
|
||||
key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Babe::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_grandpa::GrandpaApi<Block> for Runtime {
|
||||
fn grandpa_authorities() -> Vec<(GrandpaId, u64)> {
|
||||
Grandpa::grandpa_authorities()
|
||||
}
|
||||
|
||||
fn current_set_id() -> fg_primitives::SetId {
|
||||
Grandpa::current_set_id()
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: fg_primitives::EquivocationProof<
|
||||
<Block as BlockT>::Hash,
|
||||
sp_runtime::traits::NumberFor<Block>,
|
||||
>,
|
||||
key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Grandpa::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: fg_primitives::SetId,
|
||||
authority_id: fg_primitives::AuthorityId,
|
||||
) -> Option<fg_primitives::OpaqueKeyOwnershipProof> {
|
||||
|
||||
Historical::prove((fg_primitives::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(fg_primitives::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(2)]
|
||||
impl mmr::MmrApi<Block, mmr::Hash, BlockNumber> for Runtime {
|
||||
fn mmr_root() -> Result<mmr::Hash, mmr::Error> {
|
||||
Ok(pallet_mmr::RootHash::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn mmr_leaf_count() -> Result<mmr::LeafIndex, mmr::Error> {
|
||||
Ok(pallet_mmr::NumberOfLeaves::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn generate_proof(
|
||||
block_numbers: Vec<BlockNumber>,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::LeafProof<mmr::Hash>), mmr::Error> {
|
||||
Mmr::generate_proof(block_numbers, best_known_block_number).map(
|
||||
|(leaves, proof)| {
|
||||
(
|
||||
leaves
|
||||
.into_iter()
|
||||
.map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf))
|
||||
.collect(),
|
||||
proof,
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fn verify_proof(leaves: Vec<mmr::EncodableOpaqueLeaf>, proof: mmr::LeafProof<mmr::Hash>)
|
||||
-> Result<(), mmr::Error>
|
||||
{
|
||||
let leaves = leaves.into_iter().map(|leaf|
|
||||
leaf.into_opaque_leaf()
|
||||
.try_decode()
|
||||
.ok_or(mmr::Error::Verify)).collect::<Result<Vec<mmr::Leaf>, mmr::Error>>()?;
|
||||
Mmr::verify_leaves(leaves, proof)
|
||||
}
|
||||
|
||||
fn verify_proof_stateless(
|
||||
root: mmr::Hash,
|
||||
leaves: Vec<mmr::EncodableOpaqueLeaf>,
|
||||
proof: mmr::LeafProof<mmr::Hash>
|
||||
) -> Result<(), mmr::Error> {
|
||||
let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect();
|
||||
pallet_mmr::verify_leaves_proof::<mmr::Hashing, _>(root, nodes, proof)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_beefy_mmr::BeefyMmrApi<Block, Hash> for RuntimeApi {
|
||||
fn authority_set_proof() -> sp_consensus_beefy::mmr::BeefyAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::authority_set_proof()
|
||||
}
|
||||
|
||||
fn next_authority_set_proof() -> sp_consensus_beefy::mmr::BeefyNextAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::next_authority_set_proof()
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(5)]
|
||||
impl sp_consensus_beefy::BeefyApi<Block, BeefyId> for Runtime {
|
||||
fn beefy_genesis() -> Option<BlockNumber> {
|
||||
pallet_beefy::GenesisBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn validator_set() -> Option<sp_consensus_beefy::ValidatorSet<BeefyId>> {
|
||||
Beefy::validator_set()
|
||||
}
|
||||
|
||||
fn submit_report_double_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::DoubleVotingProof<
|
||||
BlockNumber,
|
||||
BeefyId,
|
||||
BeefySignature,
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Beefy::submit_unsigned_double_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_fork_voting_unsigned_extrinsic(
|
||||
equivocation_proof:
|
||||
sp_consensus_beefy::ForkVotingProof<
|
||||
<Block as BlockT>::Header,
|
||||
BeefyId,
|
||||
sp_runtime::OpaqueValue
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_fork_voting_report(
|
||||
equivocation_proof.try_into()?,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_future_block_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::FutureBlockVotingProof<BlockNumber, BeefyId>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_future_block_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: sp_consensus_beefy::ValidatorSetId,
|
||||
authority_id: BeefyId,
|
||||
) -> Option<sp_consensus_beefy::OpaqueKeyOwnershipProof> {
|
||||
Historical::prove((sp_consensus_beefy::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_beefy::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn generate_ancestry_proof(
|
||||
prev_block_number: BlockNumber,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Option<sp_runtime::OpaqueValue> {
|
||||
use codec::Encode;
|
||||
|
||||
BeefyMmrLeaf::generate_proof(prev_block_number, best_known_block_number)
|
||||
.map(|p| p.encode())
|
||||
.map(sp_runtime::OpaqueValue::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
|
||||
fn query_info(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_info(uxt, len)
|
||||
}
|
||||
fn query_fee_details(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_fee_details(uxt, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||
for Runtime
|
||||
{
|
||||
fn query_call_info(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_call_info(call, len)
|
||||
}
|
||||
fn query_call_fee_details(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_call_fee_details(call, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_outbound_queue_v2_runtime_api::OutboundQueueV2Api<Block, Balance> for Runtime {
|
||||
fn prove_message(leaf_index: u64) -> Option<snowbridge_merkle_tree::MerkleProof> {
|
||||
snowbridge_pallet_outbound_queue_v2::api::prove_message::<Runtime>(leaf_index)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_system_v2_runtime_api::ControlV2Api<Block> for Runtime {
|
||||
fn agent_id(location: VersionedLocation) -> Option<AgentId> {
|
||||
snowbridge_pallet_system_v2::api::agent_id::<Runtime>(location)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||
fn benchmark_metadata(extra: bool) -> (
|
||||
Vec<frame_benchmarking::BenchmarkList>,
|
||||
Vec<frame_support::traits::StorageInfo>,
|
||||
) {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkList};
|
||||
use frame_support::traits::StorageInfoTrait;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
list_benchmarks!(list, extra);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
|
||||
(list, storage_info)
|
||||
}
|
||||
|
||||
#[expect(non_local_definitions)]
|
||||
fn dispatch_benchmark(
|
||||
config: frame_benchmarking::BenchmarkConfig
|
||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch};
|
||||
use sp_storage::TrackedStorageKey;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
|
||||
impl frame_system_benchmarking::Config for Runtime {}
|
||||
impl baseline::Config for Runtime {}
|
||||
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
add_benchmarks!(params, batches);
|
||||
|
||||
Ok(batches)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> for Runtime {
|
||||
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here. If any of the pre/post migration checks fail, we shall stop
|
||||
// right here and right now.
|
||||
let weight = Executive::try_runtime_upgrade(checks).unwrap();
|
||||
(weight, crate::configs::RuntimeBlockWeights::get().max_block)
|
||||
}
|
||||
|
||||
fn execute_block(
|
||||
block: Block,
|
||||
state_root_check: bool,
|
||||
signature_check: bool,
|
||||
select: frame_try_runtime::TryStateSelect
|
||||
) -> Weight {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here.
|
||||
Executive::try_execute_block(block, state_root_check, signature_check, select).expect("execute-block failed")
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
|
||||
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
|
||||
build_state::<RuntimeGenesisConfig>(config)
|
||||
}
|
||||
|
||||
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
|
||||
get_preset::<RuntimeGenesisConfig>(id, crate::genesis_config_presets::get_preset)
|
||||
}
|
||||
|
||||
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
|
||||
crate::genesis_config_presets::preset_names()
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {
|
||||
fn chain_id() -> u64 {
|
||||
<Runtime as pallet_evm::Config>::ChainId::get()
|
||||
}
|
||||
|
||||
fn account_basic(address: H160) -> EVMAccount {
|
||||
let (account, _) = pallet_evm::Pallet::<Runtime>::account_basic(&address);
|
||||
account
|
||||
}
|
||||
|
||||
fn gas_price() -> U256 {
|
||||
let (gas_price, _) = <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price();
|
||||
gas_price
|
||||
}
|
||||
|
||||
fn account_code_at(address: H160) -> Vec<u8> {
|
||||
pallet_evm::AccountCodes::<Runtime>::get(address)
|
||||
}
|
||||
|
||||
fn author() -> H160 {
|
||||
<pallet_evm::Pallet<Runtime>>::find_author()
|
||||
}
|
||||
|
||||
fn storage_at(address: H160, index: U256) -> H256 {
|
||||
let tmp = index.to_big_endian();
|
||||
pallet_evm::AccountStorages::<Runtime>::get(address, H256::from_slice(&tmp[..]))
|
||||
}
|
||||
|
||||
fn call(
|
||||
from: H160,
|
||||
to: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
// Estimated encoded transaction size must be based on the heaviest transaction
|
||||
// type (EIP1559Transaction) to be compatible with all transaction types.
|
||||
let mut estimated_transaction_len = data.len() +
|
||||
// pallet ethereum index: 1
|
||||
// transact call index: 1
|
||||
// Transaction enum variant: 1
|
||||
// chain_id 8 bytes
|
||||
// nonce: 32
|
||||
// max_priority_fee_per_gas: 32
|
||||
// max_fee_per_gas: 32
|
||||
// gas_limit: 32
|
||||
// action: 21 (enum varianrt + call address)
|
||||
// value: 32
|
||||
// access_list: 1 (empty vec size)
|
||||
// 65 bytes signature
|
||||
258;
|
||||
|
||||
if access_list.is_some() {
|
||||
estimated_transaction_len += access_list.encoded_size();
|
||||
}
|
||||
|
||||
let gas_limit = gas_limit.min(u64::MAX.into()).low_u64();
|
||||
let without_base_extrinsic_weight = true;
|
||||
|
||||
let (weight_limit, proof_size_base_cost) =
|
||||
match <Runtime as pallet_evm::Config>::GasWeightMapping::gas_to_weight(
|
||||
gas_limit,
|
||||
without_base_extrinsic_weight
|
||||
) {
|
||||
weight_limit if weight_limit.proof_size() > 0 => {
|
||||
(Some(weight_limit), Some(estimated_transaction_len as u64))
|
||||
}
|
||||
_ => (None, None),
|
||||
};
|
||||
|
||||
<Runtime as pallet_evm::Config>::Runner::call(
|
||||
from,
|
||||
to,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn create(
|
||||
from: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
let gas_limit = if gas_limit > U256::from(u64::MAX) {
|
||||
u64::MAX
|
||||
} else {
|
||||
gas_limit.low_u64()
|
||||
};
|
||||
|
||||
let (weight_limit, proof_size_base_cost) = (None, None);
|
||||
|
||||
#[allow(clippy::or_fun_call)]
|
||||
<Runtime as pallet_evm::Config>::Runner::create(
|
||||
from,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_block() -> Option<pallet_ethereum::Block> {
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_all() -> (
|
||||
Option<pallet_ethereum::Block>,
|
||||
Option<Vec<pallet_ethereum::Receipt>>,
|
||||
Option<Vec<TransactionStatus>>,
|
||||
) {
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn extrinsic_filter(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> Vec<EthereumTransaction> {
|
||||
xts.into_iter().filter_map(|xt| match xt.0.function {
|
||||
RuntimeCall::Ethereum(transact { transaction }) => Some(transaction),
|
||||
_ => None
|
||||
}).collect::<Vec<EthereumTransaction>>()
|
||||
}
|
||||
|
||||
fn elasticity() -> Option<Permill> {
|
||||
None
|
||||
}
|
||||
|
||||
fn gas_limit_multiplier_support() {}
|
||||
|
||||
fn pending_block(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> (Option<pallet_ethereum::Block>, Option<Vec<TransactionStatus>>) {
|
||||
for ext in xts.into_iter() {
|
||||
let _ = Executive::apply_extrinsic(ext);
|
||||
}
|
||||
|
||||
Ethereum::on_finalize(System::block_number() + 1);
|
||||
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn initialize_pending_block(header: &<Block as BlockT>::Header) {
|
||||
Executive::initialize_block(header);
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {
|
||||
fn convert_transaction(transaction: EthereumTransaction) -> <Block as BlockT>::Extrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,800 +0,0 @@
|
|||
// This is free and unencumbered software released into the public domain.
|
||||
//
|
||||
// Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
// distribute this software, either in source code form or as a compiled
|
||||
// binary, for any purpose, commercial or non-commercial, and by any
|
||||
// means.
|
||||
//
|
||||
// In jurisdictions that recognize copyright laws, the author or authors
|
||||
// of this software dedicate any and all copyright interest in the
|
||||
// software to the public domain. We make this dedication for the benefit
|
||||
// of the public at large and to the detriment of our heirs and
|
||||
// successors. We intend this dedication to be an overt act of
|
||||
// relinquishment in perpetuity of all present and future rights to this
|
||||
// software under copyright law.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// For more information, please refer to <http://unlicense.org>
|
||||
|
||||
// Local module imports
|
||||
use super::{
|
||||
AccountId, Babe, Balance, Beefy, BeefyMmrLeaf, Block, BlockNumber, Ethereum, Executive,
|
||||
Grandpa, Historical, InherentDataExt, Mmr, Nonce, Runtime, RuntimeCall, RuntimeGenesisConfig,
|
||||
RuntimeOrigin, SessionKeys, System, TransactionPayment, UncheckedExtrinsic, VERSION,
|
||||
};
|
||||
// External crates imports
|
||||
use crate::configs::BABE_GENESIS_EPOCH_CONFIG;
|
||||
use alloc::vec::Vec;
|
||||
use codec::Encode;
|
||||
use datahaven_runtime_common::time::EpochDurationInBlocks;
|
||||
use fp_rpc::TransactionStatus;
|
||||
use frame_support::traits::OnFinalize;
|
||||
use pallet_ethereum::Transaction as EthereumTransaction;
|
||||
use pallet_evm::GasWeightMapping;
|
||||
|
||||
use frame_support::traits::KeyOwnerProofSystem;
|
||||
use frame_support::{
|
||||
genesis_builder_helper::{build_state, get_preset},
|
||||
weights::Weight,
|
||||
};
|
||||
use pallet_ethereum::Call::transact;
|
||||
use pallet_evm::Account as EVMAccount;
|
||||
use pallet_evm::FeeCalculator;
|
||||
use pallet_evm::Runner;
|
||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||
use polkadot_primitives::Hash;
|
||||
use snowbridge_core::AgentId;
|
||||
use sp_api::impl_runtime_apis;
|
||||
use sp_consensus_beefy::{
|
||||
ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature},
|
||||
AncestryHelper,
|
||||
};
|
||||
use sp_core::{Get, H256, U256};
|
||||
use sp_core::{OpaqueMetadata, H160};
|
||||
use sp_runtime::traits::{DispatchInfoOf, Dispatchable, PostDispatchInfoOf};
|
||||
use sp_runtime::transaction_validity::TransactionValidityError;
|
||||
use sp_runtime::{
|
||||
traits::Block as BlockT,
|
||||
transaction_validity::{TransactionSource, TransactionValidity},
|
||||
ApplyExtrinsicResult, Permill,
|
||||
};
|
||||
use sp_version::RuntimeVersion;
|
||||
use xcm::VersionedLocation;
|
||||
/// MMR helper types.
|
||||
mod mmr {
|
||||
use super::Runtime;
|
||||
pub use pallet_mmr::primitives::*;
|
||||
|
||||
pub type Leaf = <<Runtime as pallet_mmr::Config>::LeafData as LeafDataProvider>::LeafData;
|
||||
pub type Hashing = <Runtime as pallet_mmr::Config>::Hashing;
|
||||
pub type Hash = <Hashing as sp_runtime::traits::Hash>::Output;
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct TransactionConverter;
|
||||
|
||||
impl fp_self_contained::SelfContainedCall for RuntimeCall {
|
||||
type SignedInfo = H160;
|
||||
|
||||
fn is_self_contained(&self) -> bool {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.is_self_contained(),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn check_self_contained(&self) -> Option<Result<Self::SignedInfo, TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.check_self_contained(),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn validate_self_contained(
|
||||
&self,
|
||||
signed_info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<TransactionValidity> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.validate_self_contained(signed_info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn pre_dispatch_self_contained(
|
||||
&self,
|
||||
info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<Result<(), TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.pre_dispatch_self_contained(info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn apply_self_contained(
|
||||
self,
|
||||
info: Self::SignedInfo,
|
||||
) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {
|
||||
match self {
|
||||
call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => {
|
||||
Some(call.dispatch(RuntimeOrigin::from(
|
||||
pallet_ethereum::RawOrigin::EthereumTransaction(info),
|
||||
)))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
|
||||
fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl_runtime_apis! {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> RuntimeVersion {
|
||||
VERSION
|
||||
}
|
||||
|
||||
fn execute_block(block: Block) {
|
||||
Executive::execute_block(block);
|
||||
}
|
||||
|
||||
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
|
||||
Executive::initialize_block(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_api::Metadata<Block> for Runtime {
|
||||
fn metadata() -> OpaqueMetadata {
|
||||
OpaqueMetadata::new(Runtime::metadata().into())
|
||||
}
|
||||
|
||||
fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
|
||||
Runtime::metadata_at_version(version)
|
||||
}
|
||||
|
||||
fn metadata_versions() -> Vec<u32> {
|
||||
Runtime::metadata_versions()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_block_builder::BlockBuilder<Block> for Runtime {
|
||||
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
|
||||
Executive::apply_extrinsic(extrinsic)
|
||||
}
|
||||
|
||||
fn finalize_block() -> <Block as BlockT>::Header {
|
||||
Executive::finalize_block()
|
||||
}
|
||||
|
||||
fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
|
||||
data.create_extrinsics()
|
||||
}
|
||||
|
||||
fn check_inherents(
|
||||
block: Block,
|
||||
data: sp_inherents::InherentData,
|
||||
) -> sp_inherents::CheckInherentsResult {
|
||||
data.check_extrinsics(&block)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
|
||||
fn offchain_worker(header: &<Block as BlockT>::Header) {
|
||||
Executive::offchain_worker(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_session::SessionKeys<Block> for Runtime {
|
||||
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
|
||||
SessionKeys::generate(seed)
|
||||
}
|
||||
|
||||
fn decode_session_keys(
|
||||
encoded: Vec<u8>,
|
||||
) -> Option<Vec<(Vec<u8>, sp_core::crypto::KeyTypeId)>> {
|
||||
SessionKeys::decode_into_raw_public_keys(&encoded)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_babe::BabeApi<Block> for Runtime {
|
||||
fn configuration() -> sp_consensus_babe::BabeConfiguration {
|
||||
let epoch_config = Babe::epoch_config().unwrap_or(BABE_GENESIS_EPOCH_CONFIG);
|
||||
sp_consensus_babe::BabeConfiguration {
|
||||
slot_duration: Babe::slot_duration(),
|
||||
epoch_length: EpochDurationInBlocks::get().into(),
|
||||
c: epoch_config.c,
|
||||
authorities: Babe::authorities().to_vec(),
|
||||
randomness: Babe::randomness(),
|
||||
allowed_slots: epoch_config.allowed_slots,
|
||||
}
|
||||
}
|
||||
|
||||
fn current_epoch_start() -> sp_consensus_babe::Slot {
|
||||
Babe::current_epoch_start()
|
||||
}
|
||||
|
||||
fn current_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::current_epoch()
|
||||
}
|
||||
|
||||
fn next_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::next_epoch()
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_slot: sp_consensus_babe::Slot,
|
||||
authority_id: sp_consensus_babe::AuthorityId,
|
||||
) -> Option<sp_consensus_babe::OpaqueKeyOwnershipProof> {
|
||||
use codec::Encode;
|
||||
|
||||
Historical::prove((sp_consensus_babe::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_babe::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_babe::EquivocationProof<<Block as BlockT>::Header>,
|
||||
key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Babe::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_grandpa::GrandpaApi<Block> for Runtime {
|
||||
fn grandpa_authorities() -> Vec<(GrandpaId, u64)> {
|
||||
Grandpa::grandpa_authorities()
|
||||
}
|
||||
|
||||
fn current_set_id() -> fg_primitives::SetId {
|
||||
Grandpa::current_set_id()
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: fg_primitives::EquivocationProof<
|
||||
<Block as BlockT>::Hash,
|
||||
sp_runtime::traits::NumberFor<Block>,
|
||||
>,
|
||||
key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Grandpa::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: fg_primitives::SetId,
|
||||
authority_id: fg_primitives::AuthorityId,
|
||||
) -> Option<fg_primitives::OpaqueKeyOwnershipProof> {
|
||||
|
||||
Historical::prove((fg_primitives::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(fg_primitives::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(2)]
|
||||
impl mmr::MmrApi<Block, mmr::Hash, BlockNumber> for Runtime {
|
||||
fn mmr_root() -> Result<mmr::Hash, mmr::Error> {
|
||||
Ok(pallet_mmr::RootHash::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn mmr_leaf_count() -> Result<mmr::LeafIndex, mmr::Error> {
|
||||
Ok(pallet_mmr::NumberOfLeaves::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn generate_proof(
|
||||
block_numbers: Vec<BlockNumber>,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::LeafProof<mmr::Hash>), mmr::Error> {
|
||||
Mmr::generate_proof(block_numbers, best_known_block_number).map(
|
||||
|(leaves, proof)| {
|
||||
(
|
||||
leaves
|
||||
.into_iter()
|
||||
.map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf))
|
||||
.collect(),
|
||||
proof,
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fn verify_proof(leaves: Vec<mmr::EncodableOpaqueLeaf>, proof: mmr::LeafProof<mmr::Hash>)
|
||||
-> Result<(), mmr::Error>
|
||||
{
|
||||
let leaves = leaves.into_iter().map(|leaf|
|
||||
leaf.into_opaque_leaf()
|
||||
.try_decode()
|
||||
.ok_or(mmr::Error::Verify)).collect::<Result<Vec<mmr::Leaf>, mmr::Error>>()?;
|
||||
Mmr::verify_leaves(leaves, proof)
|
||||
}
|
||||
|
||||
fn verify_proof_stateless(
|
||||
root: mmr::Hash,
|
||||
leaves: Vec<mmr::EncodableOpaqueLeaf>,
|
||||
proof: mmr::LeafProof<mmr::Hash>
|
||||
) -> Result<(), mmr::Error> {
|
||||
let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect();
|
||||
pallet_mmr::verify_leaves_proof::<mmr::Hashing, _>(root, nodes, proof)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_beefy_mmr::BeefyMmrApi<Block, Hash> for RuntimeApi {
|
||||
fn authority_set_proof() -> sp_consensus_beefy::mmr::BeefyAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::authority_set_proof()
|
||||
}
|
||||
|
||||
fn next_authority_set_proof() -> sp_consensus_beefy::mmr::BeefyNextAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::next_authority_set_proof()
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(5)]
|
||||
impl sp_consensus_beefy::BeefyApi<Block, BeefyId> for Runtime {
|
||||
fn beefy_genesis() -> Option<BlockNumber> {
|
||||
pallet_beefy::GenesisBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn validator_set() -> Option<sp_consensus_beefy::ValidatorSet<BeefyId>> {
|
||||
Beefy::validator_set()
|
||||
}
|
||||
|
||||
fn submit_report_double_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::DoubleVotingProof<
|
||||
BlockNumber,
|
||||
BeefyId,
|
||||
BeefySignature,
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Beefy::submit_unsigned_double_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_fork_voting_unsigned_extrinsic(
|
||||
equivocation_proof:
|
||||
sp_consensus_beefy::ForkVotingProof<
|
||||
<Block as BlockT>::Header,
|
||||
BeefyId,
|
||||
sp_runtime::OpaqueValue
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_fork_voting_report(
|
||||
equivocation_proof.try_into()?,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_future_block_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::FutureBlockVotingProof<BlockNumber, BeefyId>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_future_block_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: sp_consensus_beefy::ValidatorSetId,
|
||||
authority_id: BeefyId,
|
||||
) -> Option<sp_consensus_beefy::OpaqueKeyOwnershipProof> {
|
||||
Historical::prove((sp_consensus_beefy::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_beefy::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn generate_ancestry_proof(
|
||||
prev_block_number: BlockNumber,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Option<sp_runtime::OpaqueValue> {
|
||||
use codec::Encode;
|
||||
|
||||
BeefyMmrLeaf::generate_proof(prev_block_number, best_known_block_number)
|
||||
.map(|p| p.encode())
|
||||
.map(sp_runtime::OpaqueValue::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
|
||||
fn query_info(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_info(uxt, len)
|
||||
}
|
||||
fn query_fee_details(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_fee_details(uxt, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||
for Runtime
|
||||
{
|
||||
fn query_call_info(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_call_info(call, len)
|
||||
}
|
||||
fn query_call_fee_details(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_call_fee_details(call, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_outbound_queue_v2_runtime_api::OutboundQueueV2Api<Block, Balance> for Runtime {
|
||||
fn prove_message(leaf_index: u64) -> Option<snowbridge_merkle_tree::MerkleProof> {
|
||||
snowbridge_pallet_outbound_queue_v2::api::prove_message::<Runtime>(leaf_index)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_system_v2_runtime_api::ControlV2Api<Block> for Runtime {
|
||||
fn agent_id(location: VersionedLocation) -> Option<AgentId> {
|
||||
snowbridge_pallet_system_v2::api::agent_id::<Runtime>(location)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||
fn benchmark_metadata(extra: bool) -> (
|
||||
Vec<frame_benchmarking::BenchmarkList>,
|
||||
Vec<frame_support::traits::StorageInfo>,
|
||||
) {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkList};
|
||||
use frame_support::traits::StorageInfoTrait;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
use super::*;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
list_benchmarks!(list, extra);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
|
||||
(list, storage_info)
|
||||
}
|
||||
|
||||
#[expect(non_local_definitions)]
|
||||
fn dispatch_benchmark(
|
||||
config: frame_benchmarking::BenchmarkConfig
|
||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch};
|
||||
use sp_storage::TrackedStorageKey;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
use super::*;
|
||||
|
||||
impl frame_system_benchmarking::Config for Runtime {}
|
||||
impl baseline::Config for Runtime {}
|
||||
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
add_benchmarks!(params, batches);
|
||||
|
||||
Ok(batches)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> for Runtime {
|
||||
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here. If any of the pre/post migration checks fail, we shall stop
|
||||
// right here and right now.
|
||||
let weight = Executive::try_runtime_upgrade(checks).unwrap();
|
||||
(weight, super::configs::RuntimeBlockWeights::get().max_block)
|
||||
}
|
||||
|
||||
fn execute_block(
|
||||
block: Block,
|
||||
state_root_check: bool,
|
||||
signature_check: bool,
|
||||
select: frame_try_runtime::TryStateSelect
|
||||
) -> Weight {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here.
|
||||
Executive::try_execute_block(block, state_root_check, signature_check, select).expect("execute-block failed")
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
|
||||
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
|
||||
build_state::<RuntimeGenesisConfig>(config)
|
||||
}
|
||||
|
||||
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
|
||||
get_preset::<RuntimeGenesisConfig>(id, crate::genesis_config_presets::get_preset)
|
||||
}
|
||||
|
||||
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
|
||||
crate::genesis_config_presets::preset_names()
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {
|
||||
fn chain_id() -> u64 {
|
||||
<Runtime as pallet_evm::Config>::ChainId::get()
|
||||
}
|
||||
|
||||
fn account_basic(address: H160) -> EVMAccount {
|
||||
let (account, _) = pallet_evm::Pallet::<Runtime>::account_basic(&address);
|
||||
account
|
||||
}
|
||||
|
||||
fn gas_price() -> U256 {
|
||||
let (gas_price, _) = <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price();
|
||||
gas_price
|
||||
}
|
||||
|
||||
fn account_code_at(address: H160) -> Vec<u8> {
|
||||
pallet_evm::AccountCodes::<Runtime>::get(address)
|
||||
}
|
||||
|
||||
fn author() -> H160 {
|
||||
<pallet_evm::Pallet<Runtime>>::find_author()
|
||||
}
|
||||
|
||||
fn storage_at(address: H160, index: U256) -> H256 {
|
||||
let tmp = index.to_big_endian();
|
||||
pallet_evm::AccountStorages::<Runtime>::get(address, H256::from_slice(&tmp[..]))
|
||||
}
|
||||
|
||||
fn call(
|
||||
from: H160,
|
||||
to: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
// Estimated encoded transaction size must be based on the heaviest transaction
|
||||
// type (EIP1559Transaction) to be compatible with all transaction types.
|
||||
let mut estimated_transaction_len = data.len() +
|
||||
// pallet ethereum index: 1
|
||||
// transact call index: 1
|
||||
// Transaction enum variant: 1
|
||||
// chain_id 8 bytes
|
||||
// nonce: 32
|
||||
// max_priority_fee_per_gas: 32
|
||||
// max_fee_per_gas: 32
|
||||
// gas_limit: 32
|
||||
// action: 21 (enum varianrt + call address)
|
||||
// value: 32
|
||||
// access_list: 1 (empty vec size)
|
||||
// 65 bytes signature
|
||||
258;
|
||||
|
||||
if access_list.is_some() {
|
||||
estimated_transaction_len += access_list.encoded_size();
|
||||
}
|
||||
|
||||
let gas_limit = gas_limit.min(u64::MAX.into()).low_u64();
|
||||
let without_base_extrinsic_weight = true;
|
||||
|
||||
let (weight_limit, proof_size_base_cost) =
|
||||
match <Runtime as pallet_evm::Config>::GasWeightMapping::gas_to_weight(
|
||||
gas_limit,
|
||||
without_base_extrinsic_weight
|
||||
) {
|
||||
weight_limit if weight_limit.proof_size() > 0 => {
|
||||
(Some(weight_limit), Some(estimated_transaction_len as u64))
|
||||
}
|
||||
_ => (None, None),
|
||||
};
|
||||
|
||||
<Runtime as pallet_evm::Config>::Runner::call(
|
||||
from,
|
||||
to,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn create(
|
||||
from: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
let gas_limit = if gas_limit > U256::from(u64::MAX) {
|
||||
u64::MAX
|
||||
} else {
|
||||
gas_limit.low_u64()
|
||||
};
|
||||
|
||||
let (weight_limit, proof_size_base_cost) = (None, None);
|
||||
|
||||
#[allow(clippy::or_fun_call)]
|
||||
<Runtime as pallet_evm::Config>::Runner::create(
|
||||
from,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_block() -> Option<pallet_ethereum::Block> {
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_all() -> (
|
||||
Option<pallet_ethereum::Block>,
|
||||
Option<Vec<pallet_ethereum::Receipt>>,
|
||||
Option<Vec<TransactionStatus>>,
|
||||
) {
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn extrinsic_filter(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> Vec<EthereumTransaction> {
|
||||
xts.into_iter().filter_map(|xt| match xt.0.function {
|
||||
RuntimeCall::Ethereum(transact { transaction }) => Some(transaction),
|
||||
_ => None
|
||||
}).collect::<Vec<EthereumTransaction>>()
|
||||
}
|
||||
|
||||
fn elasticity() -> Option<Permill> {
|
||||
None
|
||||
}
|
||||
|
||||
fn gas_limit_multiplier_support() {}
|
||||
|
||||
fn pending_block(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> (Option<pallet_ethereum::Block>, Option<Vec<TransactionStatus>>) {
|
||||
for ext in xts.into_iter() {
|
||||
let _ = Executive::apply_extrinsic(ext);
|
||||
}
|
||||
|
||||
Ethereum::on_finalize(System::block_number() + 1);
|
||||
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn initialize_pending_block(header: &<Block as BlockT>::Header) {
|
||||
Executive::initialize_block(header);
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {
|
||||
fn convert_transaction(transaction: EthereumTransaction) -> <Block as BlockT>::Extrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -629,13 +629,13 @@ impl pallet_evm_chain_id::Config for Runtime {}
|
|||
|
||||
// --- Snowbridge Config Constants & Parameter Types ---
|
||||
parameter_types! {
|
||||
pub UniversalLocation: InteriorLocation = Here.into();
|
||||
pub UniversalLocation: InteriorLocation = Here;
|
||||
pub InboundDeliveryCost: BalanceOf<Runtime> = 0;
|
||||
pub RootLocation: Location = Location::here();
|
||||
pub Parameters: PricingParameters<u128> = PricingParameters {
|
||||
exchange_rate: FixedU128::from_rational(1, 400),
|
||||
fee_per_gas: gwei(20),
|
||||
rewards: Rewards { local: 1 * UNIT, remote: meth(1) },
|
||||
rewards: Rewards { local: UNIT, remote: meth(1) },
|
||||
multiplier: FixedU128::from_rational(1, 1),
|
||||
};
|
||||
pub EthereumLocation: Location = Location::new(1, EthereumNetwork::get());
|
||||
|
|
|
|||
|
|
@ -6,26 +6,48 @@ extern crate alloc;
|
|||
#[cfg(feature = "std")]
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
pub mod apis;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
mod benchmarks;
|
||||
pub mod configs;
|
||||
|
||||
use alloc::{borrow::Cow, vec::Vec};
|
||||
use sp_runtime::{generic, impl_opaque_keys};
|
||||
use codec::Encode;
|
||||
use fp_rpc::TransactionStatus;
|
||||
use frame_support::{
|
||||
genesis_builder_helper::{build_state, get_preset},
|
||||
pallet_prelude::{TransactionValidity, TransactionValidityError},
|
||||
traits::{KeyOwnerProofSystem, OnFinalize},
|
||||
weights::Weight,
|
||||
};
|
||||
pub use frame_system::Call as SystemCall;
|
||||
pub use pallet_balances::Call as BalancesCall;
|
||||
use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};
|
||||
use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping, Runner};
|
||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||
pub use pallet_timestamp::Call as TimestampCall;
|
||||
use snowbridge_core::AgentId;
|
||||
use sp_api::impl_runtime_apis;
|
||||
use sp_consensus_beefy::{
|
||||
ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature},
|
||||
AncestryHelper,
|
||||
};
|
||||
use sp_core::{Get, OpaqueMetadata, H160, H256, U256};
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use sp_runtime::BuildStorage;
|
||||
use sp_runtime::{
|
||||
generic, impl_opaque_keys,
|
||||
traits::{Block as BlockT, DispatchInfoOf, Dispatchable, PostDispatchInfoOf},
|
||||
transaction_validity::TransactionSource,
|
||||
ApplyExtrinsicResult, Permill,
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
use sp_version::NativeVersion;
|
||||
use sp_version::RuntimeVersion;
|
||||
|
||||
pub use frame_system::Call as SystemCall;
|
||||
pub use pallet_balances::Call as BalancesCall;
|
||||
pub use pallet_timestamp::Call as TimestampCall;
|
||||
use sp_core::H160;
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use sp_runtime::BuildStorage;
|
||||
use xcm::VersionedLocation;
|
||||
|
||||
pub use datahaven_runtime_common::{
|
||||
AccountId, Address, Balance, BlockNumber, Hash, Header, Nonce, Signature,
|
||||
time::EpochDurationInBlocks, AccountId, Address, Balance, BlockNumber, Hash, Header, Nonce,
|
||||
Signature,
|
||||
};
|
||||
|
||||
pub mod genesis_config_presets;
|
||||
|
|
@ -76,7 +98,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||
// the compatible custom types.
|
||||
spec_version: 100,
|
||||
impl_version: 1,
|
||||
apis: apis::RUNTIME_API_VERSIONS,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
transaction_version: 1,
|
||||
system_version: 1,
|
||||
};
|
||||
|
|
@ -320,3 +342,733 @@ mod runtime {
|
|||
pub type OutboundCommitmentStore = pallet_outbound_commitment_store;
|
||||
// ╚═══════════════════ DataHaven-specific Pallets ══════════════════╝
|
||||
}
|
||||
|
||||
/// MMR helper types.
|
||||
mod mmr {
|
||||
use super::Runtime;
|
||||
pub use pallet_mmr::primitives::*;
|
||||
|
||||
pub type Leaf = <<Runtime as pallet_mmr::Config>::LeafData as LeafDataProvider>::LeafData;
|
||||
pub type Hashing = <Runtime as pallet_mmr::Config>::Hashing;
|
||||
pub type Hash = <Hashing as sp_runtime::traits::Hash>::Output;
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct TransactionConverter;
|
||||
|
||||
impl fp_self_contained::SelfContainedCall for RuntimeCall {
|
||||
type SignedInfo = H160;
|
||||
|
||||
fn is_self_contained(&self) -> bool {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.is_self_contained(),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn check_self_contained(&self) -> Option<Result<Self::SignedInfo, TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.check_self_contained(),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn validate_self_contained(
|
||||
&self,
|
||||
signed_info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<TransactionValidity> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.validate_self_contained(signed_info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn pre_dispatch_self_contained(
|
||||
&self,
|
||||
info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<Result<(), TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.pre_dispatch_self_contained(info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn apply_self_contained(
|
||||
self,
|
||||
info: Self::SignedInfo,
|
||||
) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {
|
||||
match self {
|
||||
call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => {
|
||||
Some(call.dispatch(RuntimeOrigin::from(
|
||||
pallet_ethereum::RawOrigin::EthereumTransaction(info),
|
||||
)))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
|
||||
fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl_runtime_apis! {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> RuntimeVersion {
|
||||
VERSION
|
||||
}
|
||||
|
||||
fn execute_block(block: Block) {
|
||||
Executive::execute_block(block);
|
||||
}
|
||||
|
||||
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
|
||||
Executive::initialize_block(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_api::Metadata<Block> for Runtime {
|
||||
fn metadata() -> OpaqueMetadata {
|
||||
OpaqueMetadata::new(Runtime::metadata().into())
|
||||
}
|
||||
|
||||
fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
|
||||
Runtime::metadata_at_version(version)
|
||||
}
|
||||
|
||||
fn metadata_versions() -> Vec<u32> {
|
||||
Runtime::metadata_versions()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_block_builder::BlockBuilder<Block> for Runtime {
|
||||
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
|
||||
Executive::apply_extrinsic(extrinsic)
|
||||
}
|
||||
|
||||
fn finalize_block() -> <Block as BlockT>::Header {
|
||||
Executive::finalize_block()
|
||||
}
|
||||
|
||||
fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
|
||||
data.create_extrinsics()
|
||||
}
|
||||
|
||||
fn check_inherents(
|
||||
block: Block,
|
||||
data: sp_inherents::InherentData,
|
||||
) -> sp_inherents::CheckInherentsResult {
|
||||
data.check_extrinsics(&block)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
|
||||
fn offchain_worker(header: &<Block as BlockT>::Header) {
|
||||
Executive::offchain_worker(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_session::SessionKeys<Block> for Runtime {
|
||||
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
|
||||
SessionKeys::generate(seed)
|
||||
}
|
||||
|
||||
fn decode_session_keys(
|
||||
encoded: Vec<u8>,
|
||||
) -> Option<Vec<(Vec<u8>, sp_core::crypto::KeyTypeId)>> {
|
||||
SessionKeys::decode_into_raw_public_keys(&encoded)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_babe::BabeApi<Block> for Runtime {
|
||||
fn configuration() -> sp_consensus_babe::BabeConfiguration {
|
||||
let epoch_config = Babe::epoch_config().unwrap_or(crate::configs::BABE_GENESIS_EPOCH_CONFIG);
|
||||
sp_consensus_babe::BabeConfiguration {
|
||||
slot_duration: Babe::slot_duration(),
|
||||
epoch_length: EpochDurationInBlocks::get().into(),
|
||||
c: epoch_config.c,
|
||||
authorities: Babe::authorities().to_vec(),
|
||||
randomness: Babe::randomness(),
|
||||
allowed_slots: epoch_config.allowed_slots,
|
||||
}
|
||||
}
|
||||
|
||||
fn current_epoch_start() -> sp_consensus_babe::Slot {
|
||||
Babe::current_epoch_start()
|
||||
}
|
||||
|
||||
fn current_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::current_epoch()
|
||||
}
|
||||
|
||||
fn next_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::next_epoch()
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_slot: sp_consensus_babe::Slot,
|
||||
authority_id: sp_consensus_babe::AuthorityId,
|
||||
) -> Option<sp_consensus_babe::OpaqueKeyOwnershipProof> {
|
||||
use codec::Encode;
|
||||
|
||||
Historical::prove((sp_consensus_babe::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_babe::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_babe::EquivocationProof<<Block as BlockT>::Header>,
|
||||
key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Babe::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_grandpa::GrandpaApi<Block> for Runtime {
|
||||
fn grandpa_authorities() -> Vec<(GrandpaId, u64)> {
|
||||
Grandpa::grandpa_authorities()
|
||||
}
|
||||
|
||||
fn current_set_id() -> fg_primitives::SetId {
|
||||
Grandpa::current_set_id()
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: fg_primitives::EquivocationProof<
|
||||
<Block as BlockT>::Hash,
|
||||
sp_runtime::traits::NumberFor<Block>,
|
||||
>,
|
||||
key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Grandpa::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: fg_primitives::SetId,
|
||||
authority_id: fg_primitives::AuthorityId,
|
||||
) -> Option<fg_primitives::OpaqueKeyOwnershipProof> {
|
||||
|
||||
Historical::prove((fg_primitives::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(fg_primitives::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(2)]
|
||||
impl mmr::MmrApi<Block, mmr::Hash, BlockNumber> for Runtime {
|
||||
fn mmr_root() -> Result<mmr::Hash, mmr::Error> {
|
||||
Ok(pallet_mmr::RootHash::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn mmr_leaf_count() -> Result<mmr::LeafIndex, mmr::Error> {
|
||||
Ok(pallet_mmr::NumberOfLeaves::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn generate_proof(
|
||||
block_numbers: Vec<BlockNumber>,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::LeafProof<mmr::Hash>), mmr::Error> {
|
||||
Mmr::generate_proof(block_numbers, best_known_block_number).map(
|
||||
|(leaves, proof)| {
|
||||
(
|
||||
leaves
|
||||
.into_iter()
|
||||
.map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf))
|
||||
.collect(),
|
||||
proof,
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fn verify_proof(leaves: Vec<mmr::EncodableOpaqueLeaf>, proof: mmr::LeafProof<mmr::Hash>)
|
||||
-> Result<(), mmr::Error>
|
||||
{
|
||||
let leaves = leaves.into_iter().map(|leaf|
|
||||
leaf.into_opaque_leaf()
|
||||
.try_decode()
|
||||
.ok_or(mmr::Error::Verify)).collect::<Result<Vec<mmr::Leaf>, mmr::Error>>()?;
|
||||
Mmr::verify_leaves(leaves, proof)
|
||||
}
|
||||
|
||||
fn verify_proof_stateless(
|
||||
root: mmr::Hash,
|
||||
leaves: Vec<mmr::EncodableOpaqueLeaf>,
|
||||
proof: mmr::LeafProof<mmr::Hash>
|
||||
) -> Result<(), mmr::Error> {
|
||||
let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect();
|
||||
pallet_mmr::verify_leaves_proof::<mmr::Hashing, _>(root, nodes, proof)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_beefy_mmr::BeefyMmrApi<Block, Hash> for RuntimeApi {
|
||||
fn authority_set_proof() -> sp_consensus_beefy::mmr::BeefyAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::authority_set_proof()
|
||||
}
|
||||
|
||||
fn next_authority_set_proof() -> sp_consensus_beefy::mmr::BeefyNextAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::next_authority_set_proof()
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(5)]
|
||||
impl sp_consensus_beefy::BeefyApi<Block, BeefyId> for Runtime {
|
||||
fn beefy_genesis() -> Option<BlockNumber> {
|
||||
pallet_beefy::GenesisBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn validator_set() -> Option<sp_consensus_beefy::ValidatorSet<BeefyId>> {
|
||||
Beefy::validator_set()
|
||||
}
|
||||
|
||||
fn submit_report_double_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::DoubleVotingProof<
|
||||
BlockNumber,
|
||||
BeefyId,
|
||||
BeefySignature,
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Beefy::submit_unsigned_double_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_fork_voting_unsigned_extrinsic(
|
||||
equivocation_proof:
|
||||
sp_consensus_beefy::ForkVotingProof<
|
||||
<Block as BlockT>::Header,
|
||||
BeefyId,
|
||||
sp_runtime::OpaqueValue
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_fork_voting_report(
|
||||
equivocation_proof.try_into()?,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_future_block_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::FutureBlockVotingProof<BlockNumber, BeefyId>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_future_block_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: sp_consensus_beefy::ValidatorSetId,
|
||||
authority_id: BeefyId,
|
||||
) -> Option<sp_consensus_beefy::OpaqueKeyOwnershipProof> {
|
||||
Historical::prove((sp_consensus_beefy::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_beefy::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn generate_ancestry_proof(
|
||||
prev_block_number: BlockNumber,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Option<sp_runtime::OpaqueValue> {
|
||||
use codec::Encode;
|
||||
|
||||
BeefyMmrLeaf::generate_proof(prev_block_number, best_known_block_number)
|
||||
.map(|p| p.encode())
|
||||
.map(sp_runtime::OpaqueValue::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
|
||||
fn query_info(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_info(uxt, len)
|
||||
}
|
||||
fn query_fee_details(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_fee_details(uxt, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||
for Runtime
|
||||
{
|
||||
fn query_call_info(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_call_info(call, len)
|
||||
}
|
||||
fn query_call_fee_details(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_call_fee_details(call, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_outbound_queue_v2_runtime_api::OutboundQueueV2Api<Block, Balance> for Runtime {
|
||||
fn prove_message(leaf_index: u64) -> Option<snowbridge_merkle_tree::MerkleProof> {
|
||||
snowbridge_pallet_outbound_queue_v2::api::prove_message::<Runtime>(leaf_index)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_system_v2_runtime_api::ControlV2Api<Block> for Runtime {
|
||||
fn agent_id(location: VersionedLocation) -> Option<AgentId> {
|
||||
snowbridge_pallet_system_v2::api::agent_id::<Runtime>(location)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||
fn benchmark_metadata(extra: bool) -> (
|
||||
Vec<frame_benchmarking::BenchmarkList>,
|
||||
Vec<frame_support::traits::StorageInfo>,
|
||||
) {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkList};
|
||||
use frame_support::traits::StorageInfoTrait;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
list_benchmarks!(list, extra);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
|
||||
(list, storage_info)
|
||||
}
|
||||
|
||||
#[expect(non_local_definitions)]
|
||||
fn dispatch_benchmark(
|
||||
config: frame_benchmarking::BenchmarkConfig
|
||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch};
|
||||
use sp_storage::TrackedStorageKey;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
|
||||
impl frame_system_benchmarking::Config for Runtime {}
|
||||
impl baseline::Config for Runtime {}
|
||||
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
add_benchmarks!(params, batches);
|
||||
|
||||
Ok(batches)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> for Runtime {
|
||||
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here. If any of the pre/post migration checks fail, we shall stop
|
||||
// right here and right now.
|
||||
let weight = Executive::try_runtime_upgrade(checks).unwrap();
|
||||
(weight, crate::configs::RuntimeBlockWeights::get().max_block)
|
||||
}
|
||||
|
||||
fn execute_block(
|
||||
block: Block,
|
||||
state_root_check: bool,
|
||||
signature_check: bool,
|
||||
select: frame_try_runtime::TryStateSelect
|
||||
) -> Weight {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here.
|
||||
Executive::try_execute_block(block, state_root_check, signature_check, select).expect("execute-block failed")
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
|
||||
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
|
||||
build_state::<RuntimeGenesisConfig>(config)
|
||||
}
|
||||
|
||||
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
|
||||
get_preset::<RuntimeGenesisConfig>(id, crate::genesis_config_presets::get_preset)
|
||||
}
|
||||
|
||||
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
|
||||
crate::genesis_config_presets::preset_names()
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {
|
||||
fn chain_id() -> u64 {
|
||||
<Runtime as pallet_evm::Config>::ChainId::get()
|
||||
}
|
||||
|
||||
fn account_basic(address: H160) -> EVMAccount {
|
||||
let (account, _) = pallet_evm::Pallet::<Runtime>::account_basic(&address);
|
||||
account
|
||||
}
|
||||
|
||||
fn gas_price() -> U256 {
|
||||
let (gas_price, _) = <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price();
|
||||
gas_price
|
||||
}
|
||||
|
||||
fn account_code_at(address: H160) -> Vec<u8> {
|
||||
pallet_evm::AccountCodes::<Runtime>::get(address)
|
||||
}
|
||||
|
||||
fn author() -> H160 {
|
||||
<pallet_evm::Pallet<Runtime>>::find_author()
|
||||
}
|
||||
|
||||
fn storage_at(address: H160, index: U256) -> H256 {
|
||||
let tmp = index.to_big_endian();
|
||||
pallet_evm::AccountStorages::<Runtime>::get(address, H256::from_slice(&tmp[..]))
|
||||
}
|
||||
|
||||
fn call(
|
||||
from: H160,
|
||||
to: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
// Estimated encoded transaction size must be based on the heaviest transaction
|
||||
// type (EIP1559Transaction) to be compatible with all transaction types.
|
||||
let mut estimated_transaction_len = data.len() +
|
||||
// pallet ethereum index: 1
|
||||
// transact call index: 1
|
||||
// Transaction enum variant: 1
|
||||
// chain_id 8 bytes
|
||||
// nonce: 32
|
||||
// max_priority_fee_per_gas: 32
|
||||
// max_fee_per_gas: 32
|
||||
// gas_limit: 32
|
||||
// action: 21 (enum varianrt + call address)
|
||||
// value: 32
|
||||
// access_list: 1 (empty vec size)
|
||||
// 65 bytes signature
|
||||
258;
|
||||
|
||||
if access_list.is_some() {
|
||||
estimated_transaction_len += access_list.encoded_size();
|
||||
}
|
||||
|
||||
let gas_limit = gas_limit.min(u64::MAX.into()).low_u64();
|
||||
let without_base_extrinsic_weight = true;
|
||||
|
||||
let (weight_limit, proof_size_base_cost) =
|
||||
match <Runtime as pallet_evm::Config>::GasWeightMapping::gas_to_weight(
|
||||
gas_limit,
|
||||
without_base_extrinsic_weight
|
||||
) {
|
||||
weight_limit if weight_limit.proof_size() > 0 => {
|
||||
(Some(weight_limit), Some(estimated_transaction_len as u64))
|
||||
}
|
||||
_ => (None, None),
|
||||
};
|
||||
|
||||
<Runtime as pallet_evm::Config>::Runner::call(
|
||||
from,
|
||||
to,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn create(
|
||||
from: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
let gas_limit = if gas_limit > U256::from(u64::MAX) {
|
||||
u64::MAX
|
||||
} else {
|
||||
gas_limit.low_u64()
|
||||
};
|
||||
|
||||
let (weight_limit, proof_size_base_cost) = (None, None);
|
||||
|
||||
#[allow(clippy::or_fun_call)]
|
||||
<Runtime as pallet_evm::Config>::Runner::create(
|
||||
from,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_block() -> Option<pallet_ethereum::Block> {
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_all() -> (
|
||||
Option<pallet_ethereum::Block>,
|
||||
Option<Vec<pallet_ethereum::Receipt>>,
|
||||
Option<Vec<TransactionStatus>>,
|
||||
) {
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn extrinsic_filter(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> Vec<EthereumTransaction> {
|
||||
xts.into_iter().filter_map(|xt| match xt.0.function {
|
||||
RuntimeCall::Ethereum(transact { transaction }) => Some(transaction),
|
||||
_ => None
|
||||
}).collect::<Vec<EthereumTransaction>>()
|
||||
}
|
||||
|
||||
fn elasticity() -> Option<Permill> {
|
||||
None
|
||||
}
|
||||
|
||||
fn gas_limit_multiplier_support() {}
|
||||
|
||||
fn pending_block(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> (Option<pallet_ethereum::Block>, Option<Vec<TransactionStatus>>) {
|
||||
for ext in xts.into_iter() {
|
||||
let _ = Executive::apply_extrinsic(ext);
|
||||
}
|
||||
|
||||
Ethereum::on_finalize(System::block_number() + 1);
|
||||
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn initialize_pending_block(header: &<Block as BlockT>::Header) {
|
||||
Executive::initialize_block(header);
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {
|
||||
fn convert_transaction(transaction: EthereumTransaction) -> <Block as BlockT>::Extrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -629,13 +629,13 @@ impl pallet_evm_chain_id::Config for Runtime {}
|
|||
|
||||
// --- Snowbridge Config Constants & Parameter Types ---
|
||||
parameter_types! {
|
||||
pub UniversalLocation: InteriorLocation = Here.into();
|
||||
pub UniversalLocation: InteriorLocation = Here;
|
||||
pub InboundDeliveryCost: BalanceOf<Runtime> = 0;
|
||||
pub RootLocation: Location = Location::here();
|
||||
pub Parameters: PricingParameters<u128> = PricingParameters {
|
||||
exchange_rate: FixedU128::from_rational(1, 400),
|
||||
fee_per_gas: gwei(20),
|
||||
rewards: Rewards { local: 1 * UNIT, remote: meth(1) },
|
||||
rewards: Rewards { local: UNIT, remote: meth(1) },
|
||||
multiplier: FixedU128::from_rational(1, 1),
|
||||
};
|
||||
pub EthereumLocation: Location = Location::new(1, EthereumNetwork::get());
|
||||
|
|
|
|||
|
|
@ -6,26 +6,48 @@ extern crate alloc;
|
|||
#[cfg(feature = "std")]
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
pub mod apis;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
mod benchmarks;
|
||||
pub mod configs;
|
||||
|
||||
use alloc::{borrow::Cow, vec::Vec};
|
||||
use sp_runtime::{generic, impl_opaque_keys};
|
||||
use codec::Encode;
|
||||
use fp_rpc::TransactionStatus;
|
||||
use frame_support::{
|
||||
genesis_builder_helper::{build_state, get_preset},
|
||||
pallet_prelude::{TransactionValidity, TransactionValidityError},
|
||||
traits::{KeyOwnerProofSystem, OnFinalize},
|
||||
weights::Weight,
|
||||
};
|
||||
pub use frame_system::Call as SystemCall;
|
||||
pub use pallet_balances::Call as BalancesCall;
|
||||
use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};
|
||||
use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping, Runner};
|
||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||
pub use pallet_timestamp::Call as TimestampCall;
|
||||
use snowbridge_core::AgentId;
|
||||
use sp_api::impl_runtime_apis;
|
||||
use sp_consensus_beefy::{
|
||||
ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature},
|
||||
AncestryHelper,
|
||||
};
|
||||
use sp_core::{Get, OpaqueMetadata, H160, H256, U256};
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use sp_runtime::BuildStorage;
|
||||
use sp_runtime::{
|
||||
generic, impl_opaque_keys,
|
||||
traits::{Block as BlockT, DispatchInfoOf, Dispatchable, PostDispatchInfoOf},
|
||||
transaction_validity::TransactionSource,
|
||||
ApplyExtrinsicResult, Permill,
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
use sp_version::NativeVersion;
|
||||
use sp_version::RuntimeVersion;
|
||||
|
||||
pub use frame_system::Call as SystemCall;
|
||||
pub use pallet_balances::Call as BalancesCall;
|
||||
pub use pallet_timestamp::Call as TimestampCall;
|
||||
use sp_core::H160;
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use sp_runtime::BuildStorage;
|
||||
use xcm::VersionedLocation;
|
||||
|
||||
pub use datahaven_runtime_common::{
|
||||
AccountId, Address, Balance, BlockNumber, Hash, Header, Nonce, Signature,
|
||||
time::EpochDurationInBlocks, AccountId, Address, Balance, BlockNumber, Hash, Header, Nonce,
|
||||
Signature,
|
||||
};
|
||||
|
||||
pub mod genesis_config_presets;
|
||||
|
|
@ -76,7 +98,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||
// the compatible custom types.
|
||||
spec_version: 100,
|
||||
impl_version: 1,
|
||||
apis: apis::RUNTIME_API_VERSIONS,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
transaction_version: 1,
|
||||
system_version: 1,
|
||||
};
|
||||
|
|
@ -320,3 +342,733 @@ mod runtime {
|
|||
pub type OutboundCommitmentStore = pallet_outbound_commitment_store;
|
||||
// ╚═══════════════════ DataHaven-specific Pallets ══════════════════╝
|
||||
}
|
||||
|
||||
/// MMR helper types.
|
||||
mod mmr {
|
||||
use super::Runtime;
|
||||
pub use pallet_mmr::primitives::*;
|
||||
|
||||
pub type Leaf = <<Runtime as pallet_mmr::Config>::LeafData as LeafDataProvider>::LeafData;
|
||||
pub type Hashing = <Runtime as pallet_mmr::Config>::Hashing;
|
||||
pub type Hash = <Hashing as sp_runtime::traits::Hash>::Output;
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct TransactionConverter;
|
||||
|
||||
impl fp_self_contained::SelfContainedCall for RuntimeCall {
|
||||
type SignedInfo = H160;
|
||||
|
||||
fn is_self_contained(&self) -> bool {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.is_self_contained(),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn check_self_contained(&self) -> Option<Result<Self::SignedInfo, TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => call.check_self_contained(),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn validate_self_contained(
|
||||
&self,
|
||||
signed_info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<TransactionValidity> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.validate_self_contained(signed_info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn pre_dispatch_self_contained(
|
||||
&self,
|
||||
info: &Self::SignedInfo,
|
||||
dispatch_info: &DispatchInfoOf<RuntimeCall>,
|
||||
len: usize,
|
||||
) -> Option<Result<(), TransactionValidityError>> {
|
||||
match self {
|
||||
RuntimeCall::Ethereum(call) => {
|
||||
call.pre_dispatch_self_contained(info, dispatch_info, len)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn apply_self_contained(
|
||||
self,
|
||||
info: Self::SignedInfo,
|
||||
) -> Option<sp_runtime::DispatchResultWithInfo<PostDispatchInfoOf<Self>>> {
|
||||
match self {
|
||||
call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => {
|
||||
Some(call.dispatch(RuntimeOrigin::from(
|
||||
pallet_ethereum::RawOrigin::EthereumTransaction(info),
|
||||
)))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransaction<UncheckedExtrinsic> for TransactionConverter {
|
||||
fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl_runtime_apis! {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
fn version() -> RuntimeVersion {
|
||||
VERSION
|
||||
}
|
||||
|
||||
fn execute_block(block: Block) {
|
||||
Executive::execute_block(block);
|
||||
}
|
||||
|
||||
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
|
||||
Executive::initialize_block(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_api::Metadata<Block> for Runtime {
|
||||
fn metadata() -> OpaqueMetadata {
|
||||
OpaqueMetadata::new(Runtime::metadata().into())
|
||||
}
|
||||
|
||||
fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> {
|
||||
Runtime::metadata_at_version(version)
|
||||
}
|
||||
|
||||
fn metadata_versions() -> Vec<u32> {
|
||||
Runtime::metadata_versions()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_block_builder::BlockBuilder<Block> for Runtime {
|
||||
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
|
||||
Executive::apply_extrinsic(extrinsic)
|
||||
}
|
||||
|
||||
fn finalize_block() -> <Block as BlockT>::Header {
|
||||
Executive::finalize_block()
|
||||
}
|
||||
|
||||
fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
|
||||
data.create_extrinsics()
|
||||
}
|
||||
|
||||
fn check_inherents(
|
||||
block: Block,
|
||||
data: sp_inherents::InherentData,
|
||||
) -> sp_inherents::CheckInherentsResult {
|
||||
data.check_extrinsics(&block)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
|
||||
fn offchain_worker(header: &<Block as BlockT>::Header) {
|
||||
Executive::offchain_worker(header)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_session::SessionKeys<Block> for Runtime {
|
||||
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
|
||||
SessionKeys::generate(seed)
|
||||
}
|
||||
|
||||
fn decode_session_keys(
|
||||
encoded: Vec<u8>,
|
||||
) -> Option<Vec<(Vec<u8>, sp_core::crypto::KeyTypeId)>> {
|
||||
SessionKeys::decode_into_raw_public_keys(&encoded)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_babe::BabeApi<Block> for Runtime {
|
||||
fn configuration() -> sp_consensus_babe::BabeConfiguration {
|
||||
let epoch_config = Babe::epoch_config().unwrap_or(crate::configs::BABE_GENESIS_EPOCH_CONFIG);
|
||||
sp_consensus_babe::BabeConfiguration {
|
||||
slot_duration: Babe::slot_duration(),
|
||||
epoch_length: EpochDurationInBlocks::get().into(),
|
||||
c: epoch_config.c,
|
||||
authorities: Babe::authorities().to_vec(),
|
||||
randomness: Babe::randomness(),
|
||||
allowed_slots: epoch_config.allowed_slots,
|
||||
}
|
||||
}
|
||||
|
||||
fn current_epoch_start() -> sp_consensus_babe::Slot {
|
||||
Babe::current_epoch_start()
|
||||
}
|
||||
|
||||
fn current_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::current_epoch()
|
||||
}
|
||||
|
||||
fn next_epoch() -> sp_consensus_babe::Epoch {
|
||||
Babe::next_epoch()
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_slot: sp_consensus_babe::Slot,
|
||||
authority_id: sp_consensus_babe::AuthorityId,
|
||||
) -> Option<sp_consensus_babe::OpaqueKeyOwnershipProof> {
|
||||
use codec::Encode;
|
||||
|
||||
Historical::prove((sp_consensus_babe::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_babe::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_babe::EquivocationProof<<Block as BlockT>::Header>,
|
||||
key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Babe::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_consensus_grandpa::GrandpaApi<Block> for Runtime {
|
||||
fn grandpa_authorities() -> Vec<(GrandpaId, u64)> {
|
||||
Grandpa::grandpa_authorities()
|
||||
}
|
||||
|
||||
fn current_set_id() -> fg_primitives::SetId {
|
||||
Grandpa::current_set_id()
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
equivocation_proof: fg_primitives::EquivocationProof<
|
||||
<Block as BlockT>::Hash,
|
||||
sp_runtime::traits::NumberFor<Block>,
|
||||
>,
|
||||
key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Grandpa::submit_unsigned_equivocation_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: fg_primitives::SetId,
|
||||
authority_id: fg_primitives::AuthorityId,
|
||||
) -> Option<fg_primitives::OpaqueKeyOwnershipProof> {
|
||||
|
||||
Historical::prove((fg_primitives::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(fg_primitives::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(2)]
|
||||
impl mmr::MmrApi<Block, mmr::Hash, BlockNumber> for Runtime {
|
||||
fn mmr_root() -> Result<mmr::Hash, mmr::Error> {
|
||||
Ok(pallet_mmr::RootHash::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn mmr_leaf_count() -> Result<mmr::LeafIndex, mmr::Error> {
|
||||
Ok(pallet_mmr::NumberOfLeaves::<Runtime>::get())
|
||||
}
|
||||
|
||||
fn generate_proof(
|
||||
block_numbers: Vec<BlockNumber>,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::LeafProof<mmr::Hash>), mmr::Error> {
|
||||
Mmr::generate_proof(block_numbers, best_known_block_number).map(
|
||||
|(leaves, proof)| {
|
||||
(
|
||||
leaves
|
||||
.into_iter()
|
||||
.map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf))
|
||||
.collect(),
|
||||
proof,
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fn verify_proof(leaves: Vec<mmr::EncodableOpaqueLeaf>, proof: mmr::LeafProof<mmr::Hash>)
|
||||
-> Result<(), mmr::Error>
|
||||
{
|
||||
let leaves = leaves.into_iter().map(|leaf|
|
||||
leaf.into_opaque_leaf()
|
||||
.try_decode()
|
||||
.ok_or(mmr::Error::Verify)).collect::<Result<Vec<mmr::Leaf>, mmr::Error>>()?;
|
||||
Mmr::verify_leaves(leaves, proof)
|
||||
}
|
||||
|
||||
fn verify_proof_stateless(
|
||||
root: mmr::Hash,
|
||||
leaves: Vec<mmr::EncodableOpaqueLeaf>,
|
||||
proof: mmr::LeafProof<mmr::Hash>
|
||||
) -> Result<(), mmr::Error> {
|
||||
let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect();
|
||||
pallet_mmr::verify_leaves_proof::<mmr::Hashing, _>(root, nodes, proof)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_beefy_mmr::BeefyMmrApi<Block, Hash> for RuntimeApi {
|
||||
fn authority_set_proof() -> sp_consensus_beefy::mmr::BeefyAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::authority_set_proof()
|
||||
}
|
||||
|
||||
fn next_authority_set_proof() -> sp_consensus_beefy::mmr::BeefyNextAuthoritySet<Hash> {
|
||||
BeefyMmrLeaf::next_authority_set_proof()
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(5)]
|
||||
impl sp_consensus_beefy::BeefyApi<Block, BeefyId> for Runtime {
|
||||
fn beefy_genesis() -> Option<BlockNumber> {
|
||||
pallet_beefy::GenesisBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn validator_set() -> Option<sp_consensus_beefy::ValidatorSet<BeefyId>> {
|
||||
Beefy::validator_set()
|
||||
}
|
||||
|
||||
fn submit_report_double_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::DoubleVotingProof<
|
||||
BlockNumber,
|
||||
BeefyId,
|
||||
BeefySignature,
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
let key_owner_proof = key_owner_proof.decode()?;
|
||||
|
||||
Beefy::submit_unsigned_double_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_fork_voting_unsigned_extrinsic(
|
||||
equivocation_proof:
|
||||
sp_consensus_beefy::ForkVotingProof<
|
||||
<Block as BlockT>::Header,
|
||||
BeefyId,
|
||||
sp_runtime::OpaqueValue
|
||||
>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_fork_voting_report(
|
||||
equivocation_proof.try_into()?,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn submit_report_future_block_voting_unsigned_extrinsic(
|
||||
equivocation_proof: sp_consensus_beefy::FutureBlockVotingProof<BlockNumber, BeefyId>,
|
||||
key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
Beefy::submit_unsigned_future_block_voting_report(
|
||||
equivocation_proof,
|
||||
key_owner_proof.decode()?,
|
||||
)
|
||||
}
|
||||
|
||||
fn generate_key_ownership_proof(
|
||||
_set_id: sp_consensus_beefy::ValidatorSetId,
|
||||
authority_id: BeefyId,
|
||||
) -> Option<sp_consensus_beefy::OpaqueKeyOwnershipProof> {
|
||||
Historical::prove((sp_consensus_beefy::KEY_TYPE, authority_id))
|
||||
.map(|p| p.encode())
|
||||
.map(sp_consensus_beefy::OpaqueKeyOwnershipProof::new)
|
||||
}
|
||||
|
||||
fn generate_ancestry_proof(
|
||||
prev_block_number: BlockNumber,
|
||||
best_known_block_number: Option<BlockNumber>,
|
||||
) -> Option<sp_runtime::OpaqueValue> {
|
||||
use codec::Encode;
|
||||
|
||||
BeefyMmrLeaf::generate_proof(prev_block_number, best_known_block_number)
|
||||
.map(|p| p.encode())
|
||||
.map(sp_runtime::OpaqueValue::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
|
||||
fn account_nonce(account: AccountId) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
|
||||
fn query_info(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_info(uxt, len)
|
||||
}
|
||||
fn query_fee_details(
|
||||
uxt: <Block as BlockT>::Extrinsic,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_fee_details(uxt, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
|
||||
for Runtime
|
||||
{
|
||||
fn query_call_info(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
|
||||
TransactionPayment::query_call_info(call, len)
|
||||
}
|
||||
fn query_call_fee_details(
|
||||
call: RuntimeCall,
|
||||
len: u32,
|
||||
) -> pallet_transaction_payment::FeeDetails<Balance> {
|
||||
TransactionPayment::query_call_fee_details(call, len)
|
||||
}
|
||||
fn query_weight_to_fee(weight: Weight) -> Balance {
|
||||
TransactionPayment::weight_to_fee(weight)
|
||||
}
|
||||
fn query_length_to_fee(length: u32) -> Balance {
|
||||
TransactionPayment::length_to_fee(length)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_outbound_queue_v2_runtime_api::OutboundQueueV2Api<Block, Balance> for Runtime {
|
||||
fn prove_message(leaf_index: u64) -> Option<snowbridge_merkle_tree::MerkleProof> {
|
||||
snowbridge_pallet_outbound_queue_v2::api::prove_message::<Runtime>(leaf_index)
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_system_v2_runtime_api::ControlV2Api<Block> for Runtime {
|
||||
fn agent_id(location: VersionedLocation) -> Option<AgentId> {
|
||||
snowbridge_pallet_system_v2::api::agent_id::<Runtime>(location)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||
fn benchmark_metadata(extra: bool) -> (
|
||||
Vec<frame_benchmarking::BenchmarkList>,
|
||||
Vec<frame_support::traits::StorageInfo>,
|
||||
) {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkList};
|
||||
use frame_support::traits::StorageInfoTrait;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
list_benchmarks!(list, extra);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
|
||||
(list, storage_info)
|
||||
}
|
||||
|
||||
#[expect(non_local_definitions)]
|
||||
fn dispatch_benchmark(
|
||||
config: frame_benchmarking::BenchmarkConfig
|
||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
|
||||
use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch};
|
||||
use sp_storage::TrackedStorageKey;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use baseline::Pallet as BaselineBench;
|
||||
|
||||
impl frame_system_benchmarking::Config for Runtime {}
|
||||
impl baseline::Config for Runtime {}
|
||||
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
add_benchmarks!(params, batches);
|
||||
|
||||
Ok(batches)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> for Runtime {
|
||||
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here. If any of the pre/post migration checks fail, we shall stop
|
||||
// right here and right now.
|
||||
let weight = Executive::try_runtime_upgrade(checks).unwrap();
|
||||
(weight, crate::configs::RuntimeBlockWeights::get().max_block)
|
||||
}
|
||||
|
||||
fn execute_block(
|
||||
block: Block,
|
||||
state_root_check: bool,
|
||||
signature_check: bool,
|
||||
select: frame_try_runtime::TryStateSelect
|
||||
) -> Weight {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here.
|
||||
Executive::try_execute_block(block, state_root_check, signature_check, select).expect("execute-block failed")
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
|
||||
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
|
||||
build_state::<RuntimeGenesisConfig>(config)
|
||||
}
|
||||
|
||||
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
|
||||
get_preset::<RuntimeGenesisConfig>(id, crate::genesis_config_presets::get_preset)
|
||||
}
|
||||
|
||||
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
|
||||
crate::genesis_config_presets::preset_names()
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::EthereumRuntimeRPCApi<Block> for Runtime {
|
||||
fn chain_id() -> u64 {
|
||||
<Runtime as pallet_evm::Config>::ChainId::get()
|
||||
}
|
||||
|
||||
fn account_basic(address: H160) -> EVMAccount {
|
||||
let (account, _) = pallet_evm::Pallet::<Runtime>::account_basic(&address);
|
||||
account
|
||||
}
|
||||
|
||||
fn gas_price() -> U256 {
|
||||
let (gas_price, _) = <Runtime as pallet_evm::Config>::FeeCalculator::min_gas_price();
|
||||
gas_price
|
||||
}
|
||||
|
||||
fn account_code_at(address: H160) -> Vec<u8> {
|
||||
pallet_evm::AccountCodes::<Runtime>::get(address)
|
||||
}
|
||||
|
||||
fn author() -> H160 {
|
||||
<pallet_evm::Pallet<Runtime>>::find_author()
|
||||
}
|
||||
|
||||
fn storage_at(address: H160, index: U256) -> H256 {
|
||||
let tmp = index.to_big_endian();
|
||||
pallet_evm::AccountStorages::<Runtime>::get(address, H256::from_slice(&tmp[..]))
|
||||
}
|
||||
|
||||
fn call(
|
||||
from: H160,
|
||||
to: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
// Estimated encoded transaction size must be based on the heaviest transaction
|
||||
// type (EIP1559Transaction) to be compatible with all transaction types.
|
||||
let mut estimated_transaction_len = data.len() +
|
||||
// pallet ethereum index: 1
|
||||
// transact call index: 1
|
||||
// Transaction enum variant: 1
|
||||
// chain_id 8 bytes
|
||||
// nonce: 32
|
||||
// max_priority_fee_per_gas: 32
|
||||
// max_fee_per_gas: 32
|
||||
// gas_limit: 32
|
||||
// action: 21 (enum varianrt + call address)
|
||||
// value: 32
|
||||
// access_list: 1 (empty vec size)
|
||||
// 65 bytes signature
|
||||
258;
|
||||
|
||||
if access_list.is_some() {
|
||||
estimated_transaction_len += access_list.encoded_size();
|
||||
}
|
||||
|
||||
let gas_limit = gas_limit.min(u64::MAX.into()).low_u64();
|
||||
let without_base_extrinsic_weight = true;
|
||||
|
||||
let (weight_limit, proof_size_base_cost) =
|
||||
match <Runtime as pallet_evm::Config>::GasWeightMapping::gas_to_weight(
|
||||
gas_limit,
|
||||
without_base_extrinsic_weight
|
||||
) {
|
||||
weight_limit if weight_limit.proof_size() > 0 => {
|
||||
(Some(weight_limit), Some(estimated_transaction_len as u64))
|
||||
}
|
||||
_ => (None, None),
|
||||
};
|
||||
|
||||
<Runtime as pallet_evm::Config>::Runner::call(
|
||||
from,
|
||||
to,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn create(
|
||||
from: H160,
|
||||
data: Vec<u8>,
|
||||
value: U256,
|
||||
gas_limit: U256,
|
||||
max_fee_per_gas: Option<U256>,
|
||||
max_priority_fee_per_gas: Option<U256>,
|
||||
nonce: Option<U256>,
|
||||
estimate: bool,
|
||||
access_list: Option<Vec<(H160, Vec<H256>)>>,
|
||||
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
|
||||
let config = if estimate {
|
||||
let mut config = <Runtime as pallet_evm::Config>::config().clone();
|
||||
config.estimate = true;
|
||||
Some(config)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let is_transactional = false;
|
||||
let validate = true;
|
||||
|
||||
let gas_limit = if gas_limit > U256::from(u64::MAX) {
|
||||
u64::MAX
|
||||
} else {
|
||||
gas_limit.low_u64()
|
||||
};
|
||||
|
||||
let (weight_limit, proof_size_base_cost) = (None, None);
|
||||
|
||||
#[allow(clippy::or_fun_call)]
|
||||
<Runtime as pallet_evm::Config>::Runner::create(
|
||||
from,
|
||||
data,
|
||||
value,
|
||||
gas_limit,
|
||||
max_fee_per_gas,
|
||||
max_priority_fee_per_gas,
|
||||
nonce,
|
||||
access_list.unwrap_or_default(),
|
||||
is_transactional,
|
||||
validate,
|
||||
weight_limit,
|
||||
proof_size_base_cost,
|
||||
config.as_ref().unwrap_or(<Runtime as pallet_evm::Config>::config()),
|
||||
).map_err(|err| err.error.into())
|
||||
}
|
||||
|
||||
fn current_transaction_statuses() -> Option<Vec<TransactionStatus>> {
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_block() -> Option<pallet_ethereum::Block> {
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_receipts() -> Option<Vec<pallet_ethereum::Receipt>> {
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get()
|
||||
}
|
||||
|
||||
fn current_all() -> (
|
||||
Option<pallet_ethereum::Block>,
|
||||
Option<Vec<pallet_ethereum::Receipt>>,
|
||||
Option<Vec<TransactionStatus>>,
|
||||
) {
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentReceipts::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn extrinsic_filter(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> Vec<EthereumTransaction> {
|
||||
xts.into_iter().filter_map(|xt| match xt.0.function {
|
||||
RuntimeCall::Ethereum(transact { transaction }) => Some(transaction),
|
||||
_ => None
|
||||
}).collect::<Vec<EthereumTransaction>>()
|
||||
}
|
||||
|
||||
fn elasticity() -> Option<Permill> {
|
||||
None
|
||||
}
|
||||
|
||||
fn gas_limit_multiplier_support() {}
|
||||
|
||||
fn pending_block(
|
||||
xts: Vec<<Block as BlockT>::Extrinsic>,
|
||||
) -> (Option<pallet_ethereum::Block>, Option<Vec<TransactionStatus>>) {
|
||||
for ext in xts.into_iter() {
|
||||
let _ = Executive::apply_extrinsic(ext);
|
||||
}
|
||||
|
||||
Ethereum::on_finalize(System::block_number() + 1);
|
||||
|
||||
(
|
||||
pallet_ethereum::CurrentBlock::<Runtime>::get(),
|
||||
pallet_ethereum::CurrentTransactionStatuses::<Runtime>::get()
|
||||
)
|
||||
}
|
||||
|
||||
fn initialize_pending_block(header: &<Block as BlockT>::Header) {
|
||||
Executive::initialize_block(header);
|
||||
}
|
||||
}
|
||||
|
||||
impl fp_rpc::ConvertTransactionRuntimeApi<Block> for Runtime {
|
||||
fn convert_transaction(transaction: EthereumTransaction) -> <Block as BlockT>::Extrinsic {
|
||||
UncheckedExtrinsic::new_bare(
|
||||
pallet_ethereum::Call::<Runtime>::transact { transaction }.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3
test/.papi/descriptors/.gitignore
vendored
Normal file
3
test/.papi/descriptors/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
*
|
||||
!.gitignore
|
||||
!package.json
|
||||
24
test/.papi/descriptors/package.json
Normal file
24
test/.papi/descriptors/package.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"version": "0.1.0-autogenerated.8978936922143107161",
|
||||
"name": "@polkadot-api/descriptors",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"module": "./dist/index.mjs",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"browser": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"peerDependencies": {
|
||||
"polkadot-api": ">=1.9.11"
|
||||
}
|
||||
}
|
||||
BIN
test/.papi/metadata/datahaven.scale
Normal file
BIN
test/.papi/metadata/datahaven.scale
Normal file
Binary file not shown.
9
test/.papi/polkadot-api.json
Normal file
9
test/.papi/polkadot-api.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"version": 0,
|
||||
"descriptorPath": ".papi/descriptors",
|
||||
"entries": {
|
||||
"datahaven": {
|
||||
"metadata": ".papi/metadata/datahaven.scale"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,12 @@
|
|||
|
||||
## QuickStart
|
||||
|
||||
Run: `bun start:e2e:minimal`
|
||||
Run:
|
||||
|
||||
```bash
|
||||
bun i
|
||||
bun cli
|
||||
```
|
||||
|
||||
## Manual Deployment
|
||||
|
||||
|
|
@ -26,7 +31,7 @@ Follow these steps to set up and interact with your test environment:
|
|||
1. **Deploy a minimal test environment**
|
||||
|
||||
```bash
|
||||
bun start:e2e:minimal
|
||||
bun cli
|
||||
```
|
||||
|
||||
This script will:
|
||||
|
|
@ -74,14 +79,16 @@ You can also access the backend via REST API, documented here: [http://127.0.0.1
|
|||
|
||||
### E2E Tests
|
||||
|
||||
> [!TIP]
|
||||
> Remember to run the network with `bun start:e2e:minimal` before running the tests.
|
||||
> 🧙♂️ TIP
|
||||
>
|
||||
> Remember to run the network with `bun cli` before running the tests.
|
||||
|
||||
```bash
|
||||
bun test:e2e
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> ℹ️ NOTE
|
||||
>
|
||||
> You can increase the logging level by setting `LOG_LEVEL=debug` before running the tests.
|
||||
|
||||
### Wagmi Bindings Generation
|
||||
|
|
@ -100,7 +107,7 @@ This command generates TypeScript bindings for interacting with the deployed sma
|
|||
|
||||
#### Script halts unexpectedly
|
||||
|
||||
When running `start:e2e:minimal` the script appears to halt after the following:
|
||||
When running `bun cli` the script appears to halt after the following:
|
||||
|
||||
```shell
|
||||
## Setting up 1 EVM.
|
||||
|
|
@ -130,7 +137,7 @@ Try running `forge clean` to clear any spurious build artefacts, and running for
|
|||
If you look at the browser console, if you see the following:
|
||||
|
||||
```browser
|
||||
Content-Security-Policy: The page’s settings blocked the loading of a resource (connect-src) at http://127.0.0.1:3000/node-api/proxy/api/v2/stats because it violates the following directive: “connect-src ' ...
|
||||
Content-Security-Policy: The page's settings blocked the loading of a resource (connect-src) at http://127.0.0.1:3000/node-api/proxy/api/v2/stats because it violates the following directive: "connect-src ' ...
|
||||
```
|
||||
|
||||
this is a result of CORS and CSP errors due to running this as a local docker network.
|
||||
|
|
@ -153,6 +160,25 @@ I have found that ipV6 on Arch Linux does not play very nicely with Kurtosis net
|
|||
|
||||
If using Docker Desktop, make sure settings have permissive networking enabled.
|
||||
|
||||
### Polkadot-API types don't match expected runtime types
|
||||
|
||||
If you've made changes to the runtime types, you need to re-generate the TS types for the Polkadot-API. Don't worry, this is fully automated.
|
||||
|
||||
From the `./test` directory run the following command:
|
||||
|
||||
```bash
|
||||
bun generate:types
|
||||
```
|
||||
|
||||
This script will:
|
||||
|
||||
1. Compile the runtime using `cargo build --release` in the `../operator` directory.
|
||||
2. Re-generate the Polkadot-API types using the newly built WASM binary.
|
||||
|
||||
> ℹ️ NOTE
|
||||
>
|
||||
> The script uses the `--release` flag by default, meaning it uses the WASM binary from `./operator/target/release`. If you need to use a different build target, you may need to adjust the script or run the steps manually.
|
||||
|
||||
## Further Information
|
||||
|
||||
- [Kurtosis](https://docs.kurtosis.com/): Used for launching a full Ethereum network
|
||||
|
|
|
|||
400
test/bun.lock
400
test/bun.lock
|
|
@ -8,6 +8,9 @@
|
|||
"@commander-js/extra-typings": "^13.1.0",
|
||||
"@dotenvx/dotenvx": "^1.41.0",
|
||||
"@inquirer/prompts": "^7.5.0",
|
||||
"@noble/curves": "^1.9.0",
|
||||
"@noble/hashes": "^1.8.0",
|
||||
"@polkadot-api/descriptors": "file:.papi/descriptors",
|
||||
"@types/dockerode": "^3.3.38",
|
||||
"@types/node": "^22.14.1",
|
||||
"@wagmi/cli": "^2.3.0",
|
||||
|
|
@ -20,6 +23,7 @@
|
|||
"ora": "^8.2.0",
|
||||
"pino": "^9.6.0",
|
||||
"pino-pretty": "^13.0.0",
|
||||
"polkadot-api": "^1.10.2",
|
||||
"tiny-invariant": "^1.3.3",
|
||||
"viem": "^2.28.0",
|
||||
"wagmi": "^2.15.0",
|
||||
|
|
@ -47,6 +51,10 @@
|
|||
"packages": {
|
||||
"@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.0", "", {}, "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="],
|
||||
|
||||
"@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="],
|
||||
|
||||
"@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.27.1", "", {}, "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow=="],
|
||||
|
||||
"@babel/runtime": ["@babel/runtime@7.27.1", "", {}, "sha512-1x3D2xEk2fRo3PAhwQwu5UubzgiVWSXTBfWpVd2Mx2AzRqJuDJCsgaDVZ7HB5iGzDW1Hl1sWN2mFyKjmR9uAog=="],
|
||||
|
||||
"@balena/dockerignore": ["@balena/dockerignore@1.0.2", "", {}, "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q=="],
|
||||
|
|
@ -111,8 +119,12 @@
|
|||
|
||||
"@esbuild/linux-x64": ["@esbuild/linux-x64@0.19.12", "", { "os": "linux", "cpu": "x64" }, "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg=="],
|
||||
|
||||
"@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.25.4", "", { "os": "none", "cpu": "arm64" }, "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ=="],
|
||||
|
||||
"@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.19.12", "", { "os": "none", "cpu": "x64" }, "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA=="],
|
||||
|
||||
"@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.25.4", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A=="],
|
||||
|
||||
"@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.19.12", "", { "os": "openbsd", "cpu": "x64" }, "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw=="],
|
||||
|
||||
"@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.19.12", "", { "os": "sunos", "cpu": "x64" }, "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA=="],
|
||||
|
|
@ -163,6 +175,18 @@
|
|||
|
||||
"@inquirer/type": ["@inquirer/type@3.0.6", "", { "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-/mKVCtVpyBu3IDarv0G+59KC4stsD5mDsGpYh+GKs1NZT88Jh52+cuoA1AtLk2Q0r/quNl+1cSUyLRHBFeD0XA=="],
|
||||
|
||||
"@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="],
|
||||
|
||||
"@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="],
|
||||
|
||||
"@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="],
|
||||
|
||||
"@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="],
|
||||
|
||||
"@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="],
|
||||
|
||||
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="],
|
||||
|
||||
"@js-sdsl/ordered-map": ["@js-sdsl/ordered-map@4.4.2", "", {}, "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw=="],
|
||||
|
||||
"@lit-labs/ssr-dom-shim": ["@lit-labs/ssr-dom-shim@1.3.0", "", {}, "sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ=="],
|
||||
|
|
@ -197,9 +221,9 @@
|
|||
|
||||
"@noble/ciphers": ["@noble/ciphers@1.2.1", "", {}, "sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA=="],
|
||||
|
||||
"@noble/curves": ["@noble/curves@1.8.2", "", { "dependencies": { "@noble/hashes": "1.7.2" } }, "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g=="],
|
||||
"@noble/curves": ["@noble/curves@1.9.0", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-7YDlXiNMdO1YZeH6t/kvopHHbIZzlxrCV9WLqCY6QhcXOoXiNCMDqJIglZ9Yjx5+w7Dz30TITFrlTjnRg7sKEg=="],
|
||||
|
||||
"@noble/hashes": ["@noble/hashes@1.7.2", "", {}, "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ=="],
|
||||
"@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
||||
|
||||
"@octokit/app": ["@octokit/app@15.1.6", "", { "dependencies": { "@octokit/auth-app": "^7.2.1", "@octokit/auth-unauthenticated": "^6.1.3", "@octokit/core": "^6.1.5", "@octokit/oauth-app": "^7.1.6", "@octokit/plugin-paginate-rest": "^12.0.0", "@octokit/types": "^14.0.0", "@octokit/webhooks": "^13.6.1" } }, "sha512-WELCamoCJo9SN0lf3SWZccf68CF0sBNPQuLYmZ/n87p5qvBJDe9aBtr5dHkh7T9nxWZ608pizwsUbypSzZAiUw=="],
|
||||
|
||||
|
|
@ -253,6 +277,54 @@
|
|||
|
||||
"@paulmillr/qr": ["@paulmillr/qr@0.2.1", "", {}, "sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ=="],
|
||||
|
||||
"@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="],
|
||||
|
||||
"@polkadot-api/cli": ["@polkadot-api/cli@0.11.13", "", { "dependencies": { "@commander-js/extra-typings": "^13.1.0", "@polkadot-api/codegen": "0.14.0", "@polkadot-api/ink-contracts": "0.3.0", "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/known-chains": "0.7.4", "@polkadot-api/metadata-compatibility": "0.2.1", "@polkadot-api/observable-client": "0.9.1", "@polkadot-api/polkadot-sdk-compat": "2.3.2", "@polkadot-api/sm-provider": "0.1.7", "@polkadot-api/smoldot": "0.3.8", "@polkadot-api/substrate-bindings": "0.12.0", "@polkadot-api/substrate-client": "0.3.0", "@polkadot-api/utils": "0.1.2", "@polkadot-api/wasm-executor": "^0.1.2", "@polkadot-api/ws-provider": "0.4.0", "@types/node": "^22.14.1", "commander": "^13.1.0", "execa": "^9.5.2", "fs.promises.exists": "^1.1.4", "ora": "^8.2.0", "read-pkg": "^9.0.1", "rxjs": "^7.8.2", "tsc-prog": "^2.3.0", "tsup": "^8.4.0", "typescript": "^5.8.3", "write-package": "^7.1.0" }, "bin": { "papi": "dist/main.js", "polkadot-api": "dist/main.js" } }, "sha512-ZIU3HrG7zlXCdjYOawjkRe7E94fODjWCXtyyFkclhwVlCHIUYcuc5OrP9jwo95pwhwRysmhdJ4lBEAm2Z1ry2w=="],
|
||||
|
||||
"@polkadot-api/codegen": ["@polkadot-api/codegen@0.14.0", "", { "dependencies": { "@polkadot-api/ink-contracts": "0.3.0", "@polkadot-api/metadata-builders": "0.11.0", "@polkadot-api/metadata-compatibility": "0.2.1", "@polkadot-api/substrate-bindings": "0.12.0", "@polkadot-api/utils": "0.1.2" } }, "sha512-X9wSdkp4Adfy0SD22QbY1zMIt47TmdeSwbluxQjiHlhqTAxGz/WD3nBCOl7An0DnQlCvstcXdtsHfBIKSm19xA=="],
|
||||
|
||||
"@polkadot-api/descriptors": ["@polkadot-api/descriptors@file:.papi/descriptors", { "peerDependencies": { "polkadot-api": ">=1.9.11" } }],
|
||||
|
||||
"@polkadot-api/ink-contracts": ["@polkadot-api/ink-contracts@0.3.0", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.11.0", "@polkadot-api/substrate-bindings": "0.12.0", "@polkadot-api/utils": "0.1.2" } }, "sha512-OjFeOIAE1DGzBjnDXExg7DuBbjnz/xgiN1WuKpmF3CC6TqIW55Ay6rhLah4/i1yMKvFmj4VfyqSwhF78JLsk5A=="],
|
||||
|
||||
"@polkadot-api/json-rpc-provider": ["@polkadot-api/json-rpc-provider@0.0.4", "", {}, "sha512-9cDijLIxzHOBuq6yHqpqjJ9jBmXrctjc1OFqU+tQrS96adQze3mTIH6DTgfb/0LMrqxzxffz1HQGrIlEH00WrA=="],
|
||||
|
||||
"@polkadot-api/json-rpc-provider-proxy": ["@polkadot-api/json-rpc-provider-proxy@0.2.4", "", {}, "sha512-nuGoY9QpBAiRU7xmXN3nugFvPcnSu3IxTLm1OWcNTGlZ1LW5bvdQHz3JLk56+Jlyb3GJ971hqdg2DJsMXkKCOg=="],
|
||||
|
||||
"@polkadot-api/known-chains": ["@polkadot-api/known-chains@0.7.4", "", {}, "sha512-Vpwfk+XA+ZVTzPxakgWzb5VTHRrYyWKiWgAf5mY1VsNbRXyUUuhzxCFS4OGLyuo3uu3xQ4DuZXR20VB7ZR8KuA=="],
|
||||
|
||||
"@polkadot-api/logs-provider": ["@polkadot-api/logs-provider@0.0.6", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4" } }, "sha512-4WgHlvy+xee1ADaaVf6+MlK/+jGMtsMgAzvbQOJZnP4PfQuagoTqaeayk8HYKxXGphogLlPbD06tANxcb+nvAg=="],
|
||||
|
||||
"@polkadot-api/metadata-builders": ["@polkadot-api/metadata-builders@0.11.0", "", { "dependencies": { "@polkadot-api/substrate-bindings": "0.12.0", "@polkadot-api/utils": "0.1.2" } }, "sha512-OoKF/mViUJMEk4DUOauHBuGLGa0tKi5sIiPfWTsXdVczjmb6+JumqWBhS0JU/KGJkK2VuKTCsqeZMJxZtuSgMQ=="],
|
||||
|
||||
"@polkadot-api/metadata-compatibility": ["@polkadot-api/metadata-compatibility@0.2.1", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.11.0", "@polkadot-api/substrate-bindings": "0.12.0" } }, "sha512-OGgMoS0JMKBqTnNoh8wCwWjJQcdMD8bG7fEXGDUaQaSp4qklsEqqSuEJh6ZhzdEFIZT2gFe+JaOIIEmOgIrkKA=="],
|
||||
|
||||
"@polkadot-api/observable-client": ["@polkadot-api/observable-client@0.9.1", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.11.0", "@polkadot-api/substrate-bindings": "0.12.0", "@polkadot-api/utils": "0.1.2" }, "peerDependencies": { "@polkadot-api/substrate-client": "0.3.0", "rxjs": ">=7.8.0" } }, "sha512-XPZUx8h0xrZTWWeNwk+074OK9jHF4P6e5iwHN9T2Q37cquls/+7DNKKIhbKFpoQeLrNGa2viAC6/aio8Au1JFQ=="],
|
||||
|
||||
"@polkadot-api/pjs-signer": ["@polkadot-api/pjs-signer@0.6.6", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.11.0", "@polkadot-api/polkadot-signer": "0.1.6", "@polkadot-api/signers-common": "0.1.7", "@polkadot-api/substrate-bindings": "0.12.0", "@polkadot-api/utils": "0.1.2" } }, "sha512-xlETsRLsrH/DcRh2pD9j9Go8uVR8rUFffTpF4zGzA4eCxyE7rqJO6td6N7/KuEMmLRrl/VddbxQ1ttXY9U0N6w=="],
|
||||
|
||||
"@polkadot-api/polkadot-sdk-compat": ["@polkadot-api/polkadot-sdk-compat@2.3.2", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4" } }, "sha512-rLCveP3a6Xd0r218yRqVY34lJ8bXVmE12cArbU4JFp9p8e8Jbb6xdqOdu7bQtjlZUsahhcmfIHYQSXKziST7PA=="],
|
||||
|
||||
"@polkadot-api/polkadot-signer": ["@polkadot-api/polkadot-signer@0.1.6", "", {}, "sha512-X7ghAa4r7doETtjAPTb50IpfGtrBmy3BJM5WCfNKa1saK04VFY9w+vDn+hwEcM4p0PcDHt66Ts74hzvHq54d9A=="],
|
||||
|
||||
"@polkadot-api/signer": ["@polkadot-api/signer@0.1.16", "", { "dependencies": { "@noble/hashes": "^1.8.0", "@polkadot-api/polkadot-signer": "0.1.6", "@polkadot-api/signers-common": "0.1.7", "@polkadot-api/substrate-bindings": "0.12.0", "@polkadot-api/utils": "0.1.2" } }, "sha512-xF48AKpzUEtswkzeV8Tn09B4Nmgg/TXPl2BSZkepnCTZuNynpAdyuEnjdFnv683RO3UHmwRD/prqfzInsZyrZw=="],
|
||||
|
||||
"@polkadot-api/signers-common": ["@polkadot-api/signers-common@0.1.7", "", { "dependencies": { "@polkadot-api/metadata-builders": "0.11.0", "@polkadot-api/polkadot-signer": "0.1.6", "@polkadot-api/substrate-bindings": "0.12.0", "@polkadot-api/utils": "0.1.2" } }, "sha512-dZSffjs/JjDmdInVp3Is55A2Vf67hUY0I7zTq7jSwPyOgSrHn//6o9PLKbCq1EI0pqFHzWPN5i+dzI0hy00SSw=="],
|
||||
|
||||
"@polkadot-api/sm-provider": ["@polkadot-api/sm-provider@0.1.7", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/json-rpc-provider-proxy": "0.2.4" }, "peerDependencies": { "@polkadot-api/smoldot": ">=0.3" } }, "sha512-BhNKVeIFZdawpPVadXszLl8IP4EDjcLHe/GchfRRFkvoNFuwS2nNv/npYIqCviXV+dd2R8VnEELxwScsf380Og=="],
|
||||
|
||||
"@polkadot-api/smoldot": ["@polkadot-api/smoldot@0.3.8", "", { "dependencies": { "@types/node": "^22.9.0", "smoldot": "2.0.34" } }, "sha512-dbJSMRFtELDW+rZIWRwKE/K8oy7+gYaGl+DvaOjARoBW2n80rJ7RAMOCCu+b5h2zgl3elftFBwMNAuAWgHT/Zg=="],
|
||||
|
||||
"@polkadot-api/substrate-bindings": ["@polkadot-api/substrate-bindings@0.12.0", "", { "dependencies": { "@noble/hashes": "^1.8.0", "@polkadot-api/utils": "0.1.2", "@scure/base": "^1.2.5", "scale-ts": "^1.6.1" } }, "sha512-cIjDeJRHW6g3z+/55UzpoG4LG1N0HbT4x3NvZsQkYg4eoio9Sw7Pw2aZZX86pWemxc7vQbNw7WSz2Gz+ckdX6Q=="],
|
||||
|
||||
"@polkadot-api/substrate-client": ["@polkadot-api/substrate-client@0.3.0", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/utils": "0.1.2" } }, "sha512-0hEvQLKH2zhaFzE8DPkWehvJilec8u2O2wbIEUStm0OJ8jIFtJ40MFjXQfB01dXBWUz1KaVBqS6xd3sZA90Dpw=="],
|
||||
|
||||
"@polkadot-api/utils": ["@polkadot-api/utils@0.1.2", "", {}, "sha512-yhs5k2a8N1SBJcz7EthZoazzLQUkZxbf+0271Xzu42C5AEM9K9uFLbsB+ojzHEM72O5X8lPtSwGKNmS7WQyDyg=="],
|
||||
|
||||
"@polkadot-api/wasm-executor": ["@polkadot-api/wasm-executor@0.1.2", "", {}, "sha512-a5wGenltB3EFPdf72u8ewi6HsUg2qubUAf3ekJprZf24lTK3+w8a/GUF/y6r08LJF35MALZ32SAtLqtVTIOGnQ=="],
|
||||
|
||||
"@polkadot-api/ws-provider": ["@polkadot-api/ws-provider@0.4.0", "", { "dependencies": { "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/json-rpc-provider-proxy": "0.2.4", "ws": "^8.18.1" } }, "sha512-ZurjUHHAlQ1Ux8HiZz7mtkg1qjq6LmqxcHljcZxne0U7foCZrXdWHsohwlV8kUQUir5kXuDsNvdZN/MFCUMaVw=="],
|
||||
|
||||
"@protobufjs/aspromise": ["@protobufjs/aspromise@1.1.2", "", {}, "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="],
|
||||
|
||||
"@protobufjs/base64": ["@protobufjs/base64@1.1.2", "", {}, "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="],
|
||||
|
|
@ -289,6 +361,48 @@
|
|||
|
||||
"@reown/appkit-wallet": ["@reown/appkit-wallet@1.7.3", "", { "dependencies": { "@reown/appkit-common": "1.7.3", "@reown/appkit-polyfills": "1.7.3", "@walletconnect/logger": "2.1.2", "zod": "3.22.4" } }, "sha512-D0pExd0QUE71ursQPp3pq/0iFrz2oz87tOyFifrPANvH5X0RQCYn/34/kXr+BFVQzNFfCBDlYP+CniNA/S0KiQ=="],
|
||||
|
||||
"@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.40.2", "", { "os": "android", "cpu": "arm" }, "sha512-JkdNEq+DFxZfUwxvB58tHMHBHVgX23ew41g1OQinthJ+ryhdRk67O31S7sYw8u2lTjHUPFxwar07BBt1KHp/hg=="],
|
||||
|
||||
"@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.40.2", "", { "os": "android", "cpu": "arm64" }, "sha512-13unNoZ8NzUmnndhPTkWPWbX3vtHodYmy+I9kuLxN+F+l+x3LdVF7UCu8TWVMt1POHLh6oDHhnOA04n8oJZhBw=="],
|
||||
|
||||
"@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.40.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Gzf1Hn2Aoe8VZzevHostPX23U7N5+4D36WJNHK88NZHCJr7aVMG4fadqkIf72eqVPGjGc0HJHNuUaUcxiR+N/w=="],
|
||||
|
||||
"@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.40.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-47N4hxa01a4x6XnJoskMKTS8XZ0CZMd8YTbINbi+w03A2w4j1RTlnGHOz/P0+Bg1LaVL6ufZyNprSg+fW5nYQQ=="],
|
||||
|
||||
"@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.40.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-8t6aL4MD+rXSHHZUR1z19+9OFJ2rl1wGKvckN47XFRVO+QL/dUSpKA2SLRo4vMg7ELA8pzGpC+W9OEd1Z/ZqoQ=="],
|
||||
|
||||
"@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.40.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-C+AyHBzfpsOEYRFjztcYUFsH4S7UsE9cDtHCtma5BK8+ydOZYgMmWg1d/4KBytQspJCld8ZIujFMAdKG1xyr4Q=="],
|
||||
|
||||
"@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.40.2", "", { "os": "linux", "cpu": "arm" }, "sha512-de6TFZYIvJwRNjmW3+gaXiZ2DaWL5D5yGmSYzkdzjBDS3W+B9JQ48oZEsmMvemqjtAFzE16DIBLqd6IQQRuG9Q=="],
|
||||
|
||||
"@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.40.2", "", { "os": "linux", "cpu": "arm" }, "sha512-urjaEZubdIkacKc930hUDOfQPysezKla/O9qV+O89enqsqUmQm8Xj8O/vh0gHg4LYfv7Y7UsE3QjzLQzDYN1qg=="],
|
||||
|
||||
"@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.40.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-KlE8IC0HFOC33taNt1zR8qNlBYHj31qGT1UqWqtvR/+NuCVhfufAq9fxO8BMFC22Wu0rxOwGVWxtCMvZVLmhQg=="],
|
||||
|
||||
"@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.40.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-j8CgxvfM0kbnhu4XgjnCWJQyyBOeBI1Zq91Z850aUddUmPeQvuAy6OiMdPS46gNFgy8gN1xkYyLgwLYZG3rBOg=="],
|
||||
|
||||
"@rollup/rollup-linux-loongarch64-gnu": ["@rollup/rollup-linux-loongarch64-gnu@4.40.2", "", { "os": "linux", "cpu": "none" }, "sha512-Ybc/1qUampKuRF4tQXc7G7QY9YRyeVSykfK36Y5Qc5dmrIxwFhrOzqaVTNoZygqZ1ZieSWTibfFhQ5qK8jpWxw=="],
|
||||
|
||||
"@rollup/rollup-linux-powerpc64le-gnu": ["@rollup/rollup-linux-powerpc64le-gnu@4.40.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-3FCIrnrt03CCsZqSYAOW/k9n625pjpuMzVfeI+ZBUSDT3MVIFDSPfSUgIl9FqUftxcUXInvFah79hE1c9abD+Q=="],
|
||||
|
||||
"@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.40.2", "", { "os": "linux", "cpu": "none" }, "sha512-QNU7BFHEvHMp2ESSY3SozIkBPaPBDTsfVNGx3Xhv+TdvWXFGOSH2NJvhD1zKAT6AyuuErJgbdvaJhYVhVqrWTg=="],
|
||||
|
||||
"@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.40.2", "", { "os": "linux", "cpu": "none" }, "sha512-5W6vNYkhgfh7URiXTO1E9a0cy4fSgfE4+Hl5agb/U1sa0kjOLMLC1wObxwKxecE17j0URxuTrYZZME4/VH57Hg=="],
|
||||
|
||||
"@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.40.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-B7LKIz+0+p348JoAL4X/YxGx9zOx3sR+o6Hj15Y3aaApNfAshK8+mWZEf759DXfRLeL2vg5LYJBB7DdcleYCoQ=="],
|
||||
|
||||
"@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.40.2", "", { "os": "linux", "cpu": "x64" }, "sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng=="],
|
||||
|
||||
"@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.40.2", "", { "os": "linux", "cpu": "x64" }, "sha512-tD46wKHd+KJvsmije4bUskNuvWKFcTOIM9tZ/RrmIvcXnbi0YK/cKS9FzFtAm7Oxi2EhV5N2OpfFB348vSQRXA=="],
|
||||
|
||||
"@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.40.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-Bjv/HG8RRWLNkXwQQemdsWw4Mg+IJ29LK+bJPW2SCzPKOUaMmPEppQlu/Fqk1d7+DX3V7JbFdbkh/NMmurT6Pg=="],
|
||||
|
||||
"@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.40.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-dt1llVSGEsGKvzeIO76HToiYPNPYPkmjhMHhP00T9S4rDern8P2ZWvWAQUEJ+R1UdMWJ/42i/QqJ2WV765GZcA=="],
|
||||
|
||||
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.40.2", "", { "os": "win32", "cpu": "x64" }, "sha512-bwspbWB04XJpeElvsp+DCylKfF4trJDa2Y9Go8O6A7YLX2LIKGcNK/CYImJN6ZP4DcuOHB4Utl3iCbnR62DudA=="],
|
||||
|
||||
"@rx-state/core": ["@rx-state/core@0.1.4", "", { "peerDependencies": { "rxjs": ">=7" } }, "sha512-Z+3hjU2xh1HisLxt+W5hlYX/eGSDaXXP+ns82gq/PLZpkXLu0uwcNUh9RLY3Clq4zT+hSsA3vcpIGt6+UAb8rQ=="],
|
||||
|
||||
"@safe-global/safe-apps-provider": ["@safe-global/safe-apps-provider@0.18.6", "", { "dependencies": { "@safe-global/safe-apps-sdk": "^9.1.0", "events": "^3.3.0" } }, "sha512-4LhMmjPWlIO8TTDC2AwLk44XKXaK6hfBTWyljDm0HQ6TWlOEijVWNrt2s3OCVMSxlXAcEzYfqyu1daHZooTC2Q=="],
|
||||
|
||||
"@safe-global/safe-apps-sdk": ["@safe-global/safe-apps-sdk@9.1.0", "", { "dependencies": { "@safe-global/safe-gateway-typescript-sdk": "^3.5.3", "viem": "^2.1.1" } }, "sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q=="],
|
||||
|
|
@ -301,6 +415,10 @@
|
|||
|
||||
"@scure/bip39": ["@scure/bip39@1.5.4", "", { "dependencies": { "@noble/hashes": "~1.7.1", "@scure/base": "~1.2.4" } }, "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA=="],
|
||||
|
||||
"@sec-ant/readable-stream": ["@sec-ant/readable-stream@0.4.1", "", {}, "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="],
|
||||
|
||||
"@sindresorhus/merge-streams": ["@sindresorhus/merge-streams@4.0.0", "", {}, "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ=="],
|
||||
|
||||
"@socket.io/component-emitter": ["@socket.io/component-emitter@3.1.2", "", {}, "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA=="],
|
||||
|
||||
"@tanstack/query-core": ["@tanstack/query-core@5.74.9", "", {}, "sha512-qmjXpWyigDw4SfqdSBy24FzRvpBPXlaSbl92N77lcrL+yvVQLQkf0T6bQNbTxl9IEB/SvVFhhVZoIlQvFnNuuw=="],
|
||||
|
|
@ -317,10 +435,14 @@
|
|||
|
||||
"@types/dockerode": ["@types/dockerode@3.3.38", "", { "dependencies": { "@types/docker-modem": "*", "@types/node": "*", "@types/ssh2": "*" } }, "sha512-nnrcfUe2iR+RyOuz0B4bZgQwD9djQa9ADEjp7OAgBs10pYT0KSCtplJjcmBDJz0qaReX5T7GbE5i4VplvzUHvA=="],
|
||||
|
||||
"@types/estree": ["@types/estree@1.0.7", "", {}, "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ=="],
|
||||
|
||||
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
||||
|
||||
"@types/node": ["@types/node@22.15.3", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw=="],
|
||||
|
||||
"@types/normalize-package-data": ["@types/normalize-package-data@2.4.4", "", {}, "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA=="],
|
||||
|
||||
"@types/ssh2": ["@types/ssh2@1.15.5", "", { "dependencies": { "@types/node": "^18.11.18" } }, "sha512-N1ASjp/nXH3ovBHddRJpli4ozpk6UdDYIX4RJWFa9L1YKnzdhTlVmiGHm4DZnj/jLbqZpes4aeR30EFGQtvhQQ=="],
|
||||
|
||||
"@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="],
|
||||
|
|
@ -383,6 +505,8 @@
|
|||
|
||||
"ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
|
||||
|
||||
"any-promise": ["any-promise@1.3.0", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="],
|
||||
|
||||
"anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="],
|
||||
|
||||
"asn1": ["asn1@0.2.6", "", { "dependencies": { "safer-buffer": "~2.1.0" } }, "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ=="],
|
||||
|
|
@ -393,6 +517,8 @@
|
|||
|
||||
"available-typed-arrays": ["available-typed-arrays@1.0.7", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="],
|
||||
|
||||
"balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
|
||||
|
||||
"base-x": ["base-x@5.0.1", "", {}, "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg=="],
|
||||
|
||||
"base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
|
||||
|
|
@ -411,6 +537,8 @@
|
|||
|
||||
"bowser": ["bowser@2.11.0", "", {}, "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA=="],
|
||||
|
||||
"brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
|
||||
|
||||
"bs58": ["bs58@6.0.0", "", { "dependencies": { "base-x": "^5.0.0" } }, "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw=="],
|
||||
|
||||
"buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="],
|
||||
|
|
@ -463,6 +591,8 @@
|
|||
|
||||
"commander": ["commander@13.1.0", "", {}, "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw=="],
|
||||
|
||||
"consola": ["consola@3.4.2", "", {}, "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA=="],
|
||||
|
||||
"cookie-es": ["cookie-es@1.2.2", "", {}, "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg=="],
|
||||
|
||||
"core-util-is": ["core-util-is@1.0.3", "", {}, "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="],
|
||||
|
|
@ -491,6 +621,8 @@
|
|||
|
||||
"dedent": ["dedent@0.7.0", "", {}, "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA=="],
|
||||
|
||||
"deepmerge-ts": ["deepmerge-ts@7.1.5", "", {}, "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw=="],
|
||||
|
||||
"define-data-property": ["define-data-property@1.1.4", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="],
|
||||
|
||||
"defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="],
|
||||
|
|
@ -501,6 +633,8 @@
|
|||
|
||||
"detect-browser": ["detect-browser@5.3.0", "", {}, "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w=="],
|
||||
|
||||
"detect-indent": ["detect-indent@7.0.1", "", {}, "sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g=="],
|
||||
|
||||
"dijkstrajs": ["dijkstrajs@1.0.3", "", {}, "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="],
|
||||
|
||||
"docker-modem": ["docker-modem@5.0.6", "", { "dependencies": { "debug": "^4.1.1", "readable-stream": "^3.5.0", "split-ca": "^1.0.1", "ssh2": "^1.15.0" } }, "sha512-ens7BiayssQz/uAxGzH8zGXCtiV24rRWXdjNha5V4zSOcxmAZsfGVm/PPFbwQdqEkDnhG+SyR9E3zSHUbOKXBQ=="],
|
||||
|
|
@ -515,6 +649,8 @@
|
|||
|
||||
"duplexify": ["duplexify@4.1.3", "", { "dependencies": { "end-of-stream": "^1.4.1", "inherits": "^2.0.3", "readable-stream": "^3.1.1", "stream-shift": "^1.0.2" } }, "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA=="],
|
||||
|
||||
"eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="],
|
||||
|
||||
"eciesjs": ["eciesjs@0.4.14", "", { "dependencies": { "@ecies/ciphers": "^0.2.2", "@noble/ciphers": "^1.0.0", "@noble/curves": "^1.6.0", "@noble/hashes": "^1.5.0" } }, "sha512-eJAgf9pdv214Hn98FlUzclRMYWF7WfoLlkS9nWMTm1qcCwn6Ad4EGD9lr9HXMBfSrZhYQujRE+p0adPRkctC6A=="],
|
||||
|
||||
"emoji-regex": ["emoji-regex@10.4.0", "", {}, "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw=="],
|
||||
|
|
@ -573,14 +709,22 @@
|
|||
|
||||
"fdir": ["fdir@6.4.4", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg=="],
|
||||
|
||||
"figures": ["figures@6.1.0", "", { "dependencies": { "is-unicode-supported": "^2.0.0" } }, "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg=="],
|
||||
|
||||
"filter-obj": ["filter-obj@1.1.0", "", {}, "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ=="],
|
||||
|
||||
"find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="],
|
||||
|
||||
"for-each": ["for-each@0.3.5", "", { "dependencies": { "is-callable": "^1.2.7" } }, "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg=="],
|
||||
|
||||
"foreground-child": ["foreground-child@3.3.1", "", { "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" } }, "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw=="],
|
||||
|
||||
"fs-constants": ["fs-constants@1.0.0", "", {}, "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="],
|
||||
|
||||
"fs.promises.exists": ["fs.promises.exists@1.1.4", "", {}, "sha512-lJzUGWbZn8vhGWBedA+RYjB/BeJ+3458ljUfmplqhIeb6ewzTFWNPCR1HCiYCkXV9zxcHz9zXkJzMsEgDLzh3Q=="],
|
||||
|
||||
"fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
|
||||
|
||||
"function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="],
|
||||
|
||||
"get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="],
|
||||
|
|
@ -593,6 +737,8 @@
|
|||
|
||||
"get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="],
|
||||
|
||||
"glob": ["glob@10.4.5", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg=="],
|
||||
|
||||
"gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],
|
||||
|
||||
"h3": ["h3@1.15.3", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.4", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.0", "radix3": "^1.1.2", "ufo": "^1.6.1", "uncrypto": "^0.1.3" } }, "sha512-z6GknHqyX0h9aQaTx22VZDf6QyZn+0Nh+Ym8O/u0SGSkyF5cuTJYKlc8MkzW3Nzf9LE1ivcpmYC3FUGpywhuUQ=="],
|
||||
|
|
@ -607,6 +753,8 @@
|
|||
|
||||
"help-me": ["help-me@5.0.0", "", {}, "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg=="],
|
||||
|
||||
"hosted-git-info": ["hosted-git-info@7.0.2", "", { "dependencies": { "lru-cache": "^10.0.1" } }, "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w=="],
|
||||
|
||||
"human-signals": ["human-signals@2.1.0", "", {}, "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="],
|
||||
|
||||
"iconv-lite": ["iconv-lite@0.4.24", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3" } }, "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA=="],
|
||||
|
|
@ -617,6 +765,10 @@
|
|||
|
||||
"ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],
|
||||
|
||||
"imurmurhash": ["imurmurhash@0.1.4", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="],
|
||||
|
||||
"index-to-position": ["index-to-position@1.1.0", "", {}, "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg=="],
|
||||
|
||||
"inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
|
||||
|
||||
"iron-webcrypto": ["iron-webcrypto@1.2.1", "", {}, "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg=="],
|
||||
|
|
@ -631,6 +783,8 @@
|
|||
|
||||
"is-interactive": ["is-interactive@2.0.0", "", {}, "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ=="],
|
||||
|
||||
"is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="],
|
||||
|
||||
"is-regex": ["is-regex@1.2.1", "", { "dependencies": { "call-bound": "^1.0.2", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g=="],
|
||||
|
||||
"is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="],
|
||||
|
|
@ -645,8 +799,12 @@
|
|||
|
||||
"isows": ["isows@1.0.6", "", { "peerDependencies": { "ws": "*" } }, "sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw=="],
|
||||
|
||||
"jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="],
|
||||
|
||||
"joycon": ["joycon@3.1.1", "", {}, "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw=="],
|
||||
|
||||
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
|
||||
|
||||
"json-rpc-engine": ["json-rpc-engine@6.1.0", "", { "dependencies": { "@metamask/safe-event-emitter": "^2.0.0", "eth-rpc-errors": "^4.0.2" } }, "sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ=="],
|
||||
|
||||
"json-rpc-random-id": ["json-rpc-random-id@1.0.1", "", {}, "sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA=="],
|
||||
|
|
@ -655,6 +813,10 @@
|
|||
|
||||
"keyvaluestorage-interface": ["keyvaluestorage-interface@1.0.0", "", {}, "sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g=="],
|
||||
|
||||
"lilconfig": ["lilconfig@3.1.3", "", {}, "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw=="],
|
||||
|
||||
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
|
||||
|
||||
"lit": ["lit@3.1.0", "", { "dependencies": { "@lit/reactive-element": "^2.0.0", "lit-element": "^4.0.0", "lit-html": "^3.1.0" } }, "sha512-rzo/hmUqX8zmOdamDAeydfjsGXbbdtAFqMhmocnh2j9aDYqbu0fjXygjCa0T99Od9VQ/2itwaGrjZz/ZELVl7w=="],
|
||||
|
||||
"lit-element": ["lit-element@4.2.0", "", { "dependencies": { "@lit-labs/ssr-dom-shim": "^1.2.0", "@lit/reactive-element": "^2.1.0", "lit-html": "^3.3.0" } }, "sha512-MGrXJVAI5x+Bfth/pU9Kst1iWID6GHDLEzFEnyULB/sFiRLgkd8NPK/PeeXxktA3T6EIIaq8U3KcbTU5XFcP2Q=="],
|
||||
|
|
@ -667,6 +829,8 @@
|
|||
|
||||
"lodash.camelcase": ["lodash.camelcase@4.3.0", "", {}, "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="],
|
||||
|
||||
"lodash.sortby": ["lodash.sortby@4.7.0", "", {}, "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA=="],
|
||||
|
||||
"log-symbols": ["log-symbols@6.0.0", "", { "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" } }, "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw=="],
|
||||
|
||||
"long": ["long@5.3.2", "", {}, "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="],
|
||||
|
|
@ -683,8 +847,12 @@
|
|||
|
||||
"mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="],
|
||||
|
||||
"minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
||||
|
||||
"minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
|
||||
|
||||
"minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="],
|
||||
|
||||
"mipd": ["mipd@0.0.7", "", { "peerDependencies": { "typescript": ">=5.0.4" }, "optionalPeers": ["typescript"] }, "sha512-aAPZPNDQ3uMTdKbuO2YmAw2TxLHO0moa4YKAyETM/DTj5FloZo+a+8tU+iv4GmW+sOxKLSRwcSFuczk+Cpt6fg=="],
|
||||
|
||||
"mkdirp-classic": ["mkdirp-classic@0.5.3", "", {}, "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="],
|
||||
|
|
@ -695,6 +863,8 @@
|
|||
|
||||
"mute-stream": ["mute-stream@2.0.0", "", {}, "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA=="],
|
||||
|
||||
"mz": ["mz@2.7.0", "", { "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q=="],
|
||||
|
||||
"nan": ["nan@2.22.2", "", {}, "sha512-DANghxFkS1plDdRsX0X9pm0Z6SJNN6gBdtXfanwoZ8hooC5gosGFSBGRYHUVPz1asKA/kMRqDRdHrluZ61SpBQ=="],
|
||||
|
||||
"nanospinner": ["nanospinner@1.2.2", "", { "dependencies": { "picocolors": "^1.1.1" } }, "sha512-Zt/AmG6qRU3e+WnzGGLuMCEAO/dAu45stNbHY223tUxldaDAeE+FxSPsd9Q+j+paejmm0ZbrNVs5Sraqy3dRxA=="],
|
||||
|
|
@ -709,12 +879,16 @@
|
|||
|
||||
"node-mock-http": ["node-mock-http@1.0.0", "", {}, "sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ=="],
|
||||
|
||||
"normalize-package-data": ["normalize-package-data@6.0.2", "", { "dependencies": { "hosted-git-info": "^7.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" } }, "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g=="],
|
||||
|
||||
"normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="],
|
||||
|
||||
"npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="],
|
||||
|
||||
"obj-multiplex": ["obj-multiplex@1.0.0", "", { "dependencies": { "end-of-stream": "^1.4.0", "once": "^1.4.0", "readable-stream": "^2.3.3" } }, "sha512-0GNJAOsHoBHeNTvl5Vt6IWnpUEcc3uSRxzBri7EDyIcMgYvnY2JL2qdeV5zTMjWQX5OHcD5amcW2HFfDh0gjIA=="],
|
||||
|
||||
"object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],
|
||||
|
||||
"object-treeify": ["object-treeify@1.1.33", "", {}, "sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A=="],
|
||||
|
||||
"octokit": ["octokit@4.1.3", "", { "dependencies": { "@octokit/app": "^15.1.6", "@octokit/core": "^6.1.5", "@octokit/oauth-app": "^7.1.6", "@octokit/plugin-paginate-graphql": "^5.2.4", "@octokit/plugin-paginate-rest": "^12.0.0", "@octokit/plugin-rest-endpoint-methods": "^14.0.0", "@octokit/plugin-retry": "^7.2.1", "@octokit/plugin-throttling": "^10.0.0", "@octokit/request-error": "^6.1.8", "@octokit/types": "^14.0.0" } }, "sha512-PP+EL8h4xPCE9NBo6jXq6I2/EiTXsn1cg9F0IZehHBv/qhuQpyGMFElEB17miWKciuT6vRHiFFiG9+FoXOmg6A=="],
|
||||
|
|
@ -739,10 +913,18 @@
|
|||
|
||||
"p-try": ["p-try@2.2.0", "", {}, "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="],
|
||||
|
||||
"package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="],
|
||||
|
||||
"parse-json": ["parse-json@8.3.0", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "index-to-position": "^1.1.0", "type-fest": "^4.39.1" } }, "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ=="],
|
||||
|
||||
"parse-ms": ["parse-ms@4.0.0", "", {}, "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw=="],
|
||||
|
||||
"path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="],
|
||||
|
||||
"path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
|
||||
|
||||
"path-scurry": ["path-scurry@1.11.1", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="],
|
||||
|
||||
"pathe": ["pathe@1.1.2", "", {}, "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ=="],
|
||||
|
||||
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
|
||||
|
|
@ -759,16 +941,24 @@
|
|||
|
||||
"pino-std-serializers": ["pino-std-serializers@7.0.0", "", {}, "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA=="],
|
||||
|
||||
"pirates": ["pirates@4.0.7", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="],
|
||||
|
||||
"pngjs": ["pngjs@5.0.0", "", {}, "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw=="],
|
||||
|
||||
"polkadot-api": ["polkadot-api@1.10.2", "", { "dependencies": { "@polkadot-api/cli": "0.11.13", "@polkadot-api/ink-contracts": "0.3.0", "@polkadot-api/json-rpc-provider": "0.0.4", "@polkadot-api/known-chains": "0.7.4", "@polkadot-api/logs-provider": "0.0.6", "@polkadot-api/metadata-builders": "0.11.0", "@polkadot-api/metadata-compatibility": "0.2.1", "@polkadot-api/observable-client": "0.9.1", "@polkadot-api/pjs-signer": "0.6.6", "@polkadot-api/polkadot-sdk-compat": "2.3.2", "@polkadot-api/polkadot-signer": "0.1.6", "@polkadot-api/signer": "0.1.16", "@polkadot-api/sm-provider": "0.1.7", "@polkadot-api/smoldot": "0.3.8", "@polkadot-api/substrate-bindings": "0.12.0", "@polkadot-api/substrate-client": "0.3.0", "@polkadot-api/utils": "0.1.2", "@polkadot-api/ws-provider": "0.4.0", "@rx-state/core": "^0.1.4" }, "peerDependencies": { "rxjs": ">=7.8.0" }, "bin": { "papi": "bin/cli.mjs", "polkadot-api": "bin/cli.mjs" } }, "sha512-WkKPBzCzMi/IBmIqdJDiYBckWiGBzr9o/lqITB+xfLXsiyrofCrmWO0gtLouDdAt2ToGqQJon8UcK8UhUAYYTQ=="],
|
||||
|
||||
"pony-cause": ["pony-cause@2.1.11", "", {}, "sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg=="],
|
||||
|
||||
"possible-typed-array-names": ["possible-typed-array-names@1.1.0", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="],
|
||||
|
||||
"postcss-load-config": ["postcss-load-config@6.0.1", "", { "dependencies": { "lilconfig": "^3.1.1" }, "peerDependencies": { "jiti": ">=1.21.0", "postcss": ">=8.0.9", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["jiti", "postcss", "tsx", "yaml"] }, "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g=="],
|
||||
|
||||
"preact": ["preact@10.26.5", "", {}, "sha512-fmpDkgfGU6JYux9teDWLhj9mKN55tyepwYbxHgQuIxbWQzgFg5vk7Mrrtfx7xRxq798ynkY4DDDxZr235Kk+4w=="],
|
||||
|
||||
"prettier": ["prettier@3.5.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw=="],
|
||||
|
||||
"pretty-ms": ["pretty-ms@9.2.0", "", { "dependencies": { "parse-ms": "^4.0.0" } }, "sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg=="],
|
||||
|
||||
"process-nextick-args": ["process-nextick-args@2.0.1", "", {}, "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="],
|
||||
|
||||
"process-warning": ["process-warning@4.0.1", "", {}, "sha512-3c2LzQ3rY9d0hc1emcsHhfT9Jwz0cChib/QN89oME2R451w5fy3f0afAhERFZAwrbDU43wk12d0ORBpDVME50Q=="],
|
||||
|
|
@ -779,6 +969,8 @@
|
|||
|
||||
"pump": ["pump@3.0.2", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw=="],
|
||||
|
||||
"punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
|
||||
|
||||
"qrcode": ["qrcode@1.5.3", "", { "dependencies": { "dijkstrajs": "^1.0.1", "encode-utf8": "^1.0.3", "pngjs": "^5.0.0", "yargs": "^15.3.1" }, "bin": { "qrcode": "bin/qrcode" } }, "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg=="],
|
||||
|
||||
"query-string": ["query-string@7.1.3", "", { "dependencies": { "decode-uri-component": "^0.2.2", "filter-obj": "^1.1.0", "split-on-first": "^1.0.0", "strict-uri-encode": "^2.0.0" } }, "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg=="],
|
||||
|
|
@ -789,6 +981,8 @@
|
|||
|
||||
"react": ["react@19.1.0", "", {}, "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg=="],
|
||||
|
||||
"read-pkg": ["read-pkg@9.0.1", "", { "dependencies": { "@types/normalize-package-data": "^2.4.3", "normalize-package-data": "^6.0.0", "parse-json": "^8.0.0", "type-fest": "^4.6.0", "unicorn-magic": "^0.1.0" } }, "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA=="],
|
||||
|
||||
"readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
||||
|
||||
"readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="],
|
||||
|
|
@ -799,8 +993,14 @@
|
|||
|
||||
"require-main-filename": ["require-main-filename@2.0.0", "", {}, "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="],
|
||||
|
||||
"resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="],
|
||||
|
||||
"restore-cursor": ["restore-cursor@5.1.0", "", { "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" } }, "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA=="],
|
||||
|
||||
"rollup": ["rollup@4.40.2", "", { "dependencies": { "@types/estree": "1.0.7" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.40.2", "@rollup/rollup-android-arm64": "4.40.2", "@rollup/rollup-darwin-arm64": "4.40.2", "@rollup/rollup-darwin-x64": "4.40.2", "@rollup/rollup-freebsd-arm64": "4.40.2", "@rollup/rollup-freebsd-x64": "4.40.2", "@rollup/rollup-linux-arm-gnueabihf": "4.40.2", "@rollup/rollup-linux-arm-musleabihf": "4.40.2", "@rollup/rollup-linux-arm64-gnu": "4.40.2", "@rollup/rollup-linux-arm64-musl": "4.40.2", "@rollup/rollup-linux-loongarch64-gnu": "4.40.2", "@rollup/rollup-linux-powerpc64le-gnu": "4.40.2", "@rollup/rollup-linux-riscv64-gnu": "4.40.2", "@rollup/rollup-linux-riscv64-musl": "4.40.2", "@rollup/rollup-linux-s390x-gnu": "4.40.2", "@rollup/rollup-linux-x64-gnu": "4.40.2", "@rollup/rollup-linux-x64-musl": "4.40.2", "@rollup/rollup-win32-arm64-msvc": "4.40.2", "@rollup/rollup-win32-ia32-msvc": "4.40.2", "@rollup/rollup-win32-x64-msvc": "4.40.2", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-tfUOg6DTP4rhQ3VjOO6B4wyrJnGOX85requAXvqYTHsOgb2TFJdZ3aWpT8W2kPoypSGP7dZUyzxJ9ee4buM5Fg=="],
|
||||
|
||||
"rxjs": ["rxjs@7.8.2", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA=="],
|
||||
|
||||
"safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||
|
||||
"safe-regex-test": ["safe-regex-test@1.1.0", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-regex": "^1.2.1" } }, "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw=="],
|
||||
|
|
@ -809,6 +1009,8 @@
|
|||
|
||||
"safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
|
||||
|
||||
"scale-ts": ["scale-ts@1.6.1", "", {}, "sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g=="],
|
||||
|
||||
"secure-json-parse": ["secure-json-parse@2.7.0", "", {}, "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw=="],
|
||||
|
||||
"semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="],
|
||||
|
|
@ -825,12 +1027,26 @@
|
|||
|
||||
"signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
|
||||
|
||||
"smoldot": ["smoldot@2.0.34", "", { "dependencies": { "ws": "^8.8.1" } }, "sha512-mw9tCbGEhEp0koMqLL0jBEixVY1MIN/xI3pE6ZY1TuOPU+LnYy8FloODVyzkvzQPaBYrETXJdRlmA/+k6g3gow=="],
|
||||
|
||||
"socket.io-client": ["socket.io-client@4.8.1", "", { "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.2", "engine.io-client": "~6.6.1", "socket.io-parser": "~4.2.4" } }, "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ=="],
|
||||
|
||||
"socket.io-parser": ["socket.io-parser@4.2.4", "", { "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" } }, "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew=="],
|
||||
|
||||
"sonic-boom": ["sonic-boom@4.2.0", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww=="],
|
||||
|
||||
"sort-keys": ["sort-keys@5.1.0", "", { "dependencies": { "is-plain-obj": "^4.0.0" } }, "sha512-aSbHV0DaBcr7u0PVHXzM6NbZNAtrr9sF6+Qfs9UUVG7Ll3jQ6hHi8F/xqIIcn2rvIVbr0v/2zyjSdwSV47AgLQ=="],
|
||||
|
||||
"source-map": ["source-map@0.8.0-beta.0", "", { "dependencies": { "whatwg-url": "^7.0.0" } }, "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA=="],
|
||||
|
||||
"spdx-correct": ["spdx-correct@3.2.0", "", { "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA=="],
|
||||
|
||||
"spdx-exceptions": ["spdx-exceptions@2.5.0", "", {}, "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w=="],
|
||||
|
||||
"spdx-expression-parse": ["spdx-expression-parse@3.0.1", "", { "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q=="],
|
||||
|
||||
"spdx-license-ids": ["spdx-license-ids@3.0.21", "", {}, "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg=="],
|
||||
|
||||
"split-ca": ["split-ca@1.0.1", "", {}, "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ=="],
|
||||
|
||||
"split-on-first": ["split-on-first@1.1.0", "", {}, "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="],
|
||||
|
|
@ -847,32 +1063,54 @@
|
|||
|
||||
"string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
|
||||
|
||||
"string-width-cjs": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
||||
|
||||
"string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="],
|
||||
|
||||
"strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
||||
|
||||
"strip-ansi-cjs": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||
|
||||
"strip-final-newline": ["strip-final-newline@2.0.0", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="],
|
||||
|
||||
"strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="],
|
||||
|
||||
"sucrase": ["sucrase@3.35.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", "glob": "^10.3.10", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", "ts-interface-checker": "^0.1.9" }, "bin": { "sucrase": "bin/sucrase", "sucrase-node": "bin/sucrase-node" } }, "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA=="],
|
||||
|
||||
"superstruct": ["superstruct@1.0.4", "", {}, "sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ=="],
|
||||
|
||||
"tar-fs": ["tar-fs@2.1.2", "", { "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^2.1.4" } }, "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA=="],
|
||||
|
||||
"tar-stream": ["tar-stream@2.2.0", "", { "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" } }, "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ=="],
|
||||
|
||||
"thenify": ["thenify@3.3.1", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="],
|
||||
|
||||
"thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="],
|
||||
|
||||
"thread-stream": ["thread-stream@3.1.0", "", { "dependencies": { "real-require": "^0.2.0" } }, "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A=="],
|
||||
|
||||
"tiny-invariant": ["tiny-invariant@1.3.3", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="],
|
||||
|
||||
"tinyexec": ["tinyexec@0.3.2", "", {}, "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA=="],
|
||||
|
||||
"tinyglobby": ["tinyglobby@0.2.13", "", { "dependencies": { "fdir": "^6.4.4", "picomatch": "^4.0.2" } }, "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw=="],
|
||||
|
||||
"tmp": ["tmp@0.0.33", "", { "dependencies": { "os-tmpdir": "~1.0.2" } }, "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw=="],
|
||||
|
||||
"toad-cache": ["toad-cache@3.7.0", "", {}, "sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw=="],
|
||||
|
||||
"tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
||||
"tr46": ["tr46@1.0.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA=="],
|
||||
|
||||
"tree-kill": ["tree-kill@1.2.2", "", { "bin": { "tree-kill": "cli.js" } }, "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="],
|
||||
|
||||
"ts-interface-checker": ["ts-interface-checker@0.1.13", "", {}, "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="],
|
||||
|
||||
"tsc-prog": ["tsc-prog@2.3.0", "", { "peerDependencies": { "typescript": ">=4" } }, "sha512-ycET2d75EgcX7y8EmG4KiZkLAwUzbY4xRhA6NU0uVbHkY4ZjrAAuzTMxXI85kOwATqPnBI5C/7y7rlpY0xdqHA=="],
|
||||
|
||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"tsup": ["tsup@8.4.0", "", { "dependencies": { "bundle-require": "^5.1.0", "cac": "^6.7.14", "chokidar": "^4.0.3", "consola": "^3.4.0", "debug": "^4.4.0", "esbuild": "^0.25.0", "joycon": "^3.1.1", "picocolors": "^1.1.1", "postcss-load-config": "^6.0.1", "resolve-from": "^5.0.0", "rollup": "^4.34.8", "source-map": "0.8.0-beta.0", "sucrase": "^3.35.0", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.11", "tree-kill": "^1.2.2" }, "peerDependencies": { "@microsoft/api-extractor": "^7.36.0", "@swc/core": "^1", "postcss": "^8.4.12", "typescript": ">=4.5.0" }, "optionalPeers": ["@microsoft/api-extractor", "@swc/core", "postcss", "typescript"], "bin": { "tsup": "dist/cli-default.js", "tsup-node": "dist/cli-node.js" } }, "sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ=="],
|
||||
|
||||
"tweetnacl": ["tweetnacl@0.14.5", "", {}, "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA=="],
|
||||
|
||||
"type-fest": ["type-fest@0.21.3", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="],
|
||||
|
|
@ -887,6 +1125,8 @@
|
|||
|
||||
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
||||
|
||||
"unicorn-magic": ["unicorn-magic@0.1.0", "", {}, "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ=="],
|
||||
|
||||
"universal-github-app-jwt": ["universal-github-app-jwt@2.2.2", "", {}, "sha512-dcmbeSrOdTnsjGjUfAlqNDJrhxXizjAz94ija9Qw8YkZ1uu0d+GoZzyH+Jb9tIIqvGsadUfwg+22k5aDqqwzbw=="],
|
||||
|
||||
"universal-user-agent": ["universal-user-agent@7.0.2", "", {}, "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q=="],
|
||||
|
|
@ -903,6 +1143,8 @@
|
|||
|
||||
"uuid": ["uuid@10.0.0", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ=="],
|
||||
|
||||
"validate-npm-package-license": ["validate-npm-package-license@3.0.4", "", { "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew=="],
|
||||
|
||||
"valtio": ["valtio@1.13.2", "", { "dependencies": { "derive-valtio": "0.1.0", "proxy-compare": "2.6.0", "use-sync-external-store": "1.2.0" }, "peerDependencies": { "@types/react": ">=16.8", "react": ">=16.8" }, "optionalPeers": ["@types/react", "react"] }, "sha512-Qik0o+DSy741TmkqmRfjq+0xpZBXi/Y6+fXZLn0xNF1z/waFMbE3rkivv5Zcf9RrMUp6zswf2J7sbh2KBlba5A=="],
|
||||
|
||||
"viem": ["viem@2.28.1", "", { "dependencies": { "@noble/curves": "1.8.2", "@noble/hashes": "1.7.2", "@scure/bip32": "1.6.2", "@scure/bip39": "1.5.4", "abitype": "1.0.8", "isows": "1.0.6", "ox": "0.6.9", "ws": "8.18.1" }, "peerDependencies": { "typescript": ">=5.0.4" }, "optionalPeers": ["typescript"] }, "sha512-7eqGfxAPlMW9u9aE3SMEFPzNYqqU7uFLKUQyd/GwccyW4OAdq7VqJkPIpdULUePN9m3XmfBunA9mswYFp9sUuQ=="],
|
||||
|
|
@ -911,9 +1153,9 @@
|
|||
|
||||
"webextension-polyfill": ["webextension-polyfill@0.10.0", "", {}, "sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g=="],
|
||||
|
||||
"webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
||||
"webidl-conversions": ["webidl-conversions@4.0.2", "", {}, "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg=="],
|
||||
|
||||
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||
"whatwg-url": ["whatwg-url@7.1.0", "", { "dependencies": { "lodash.sortby": "^4.7.0", "tr46": "^1.0.1", "webidl-conversions": "^4.0.2" } }, "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg=="],
|
||||
|
||||
"which": ["which@4.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg=="],
|
||||
|
||||
|
|
@ -923,8 +1165,16 @@
|
|||
|
||||
"wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="],
|
||||
|
||||
"wrap-ansi-cjs": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
|
||||
|
||||
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
||||
|
||||
"write-file-atomic": ["write-file-atomic@5.0.1", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" } }, "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw=="],
|
||||
|
||||
"write-json-file": ["write-json-file@6.0.0", "", { "dependencies": { "detect-indent": "^7.0.1", "is-plain-obj": "^4.1.0", "sort-keys": "^5.0.0", "write-file-atomic": "^5.0.1" } }, "sha512-MNHcU3f9WxnNyR6MxsYSj64Jz0+dwIpisWKWq9gqLj/GwmA9INg3BZ3vt70/HB3GEwrnDQWr4RPrywnhNzmUFA=="],
|
||||
|
||||
"write-package": ["write-package@7.1.0", "", { "dependencies": { "deepmerge-ts": "^7.1.0", "read-pkg": "^9.0.1", "sort-keys": "^5.0.0", "type-fest": "^4.23.0", "write-json-file": "^6.0.0" } }, "sha512-DqUx8GI3r9BFWwU2DPKddL1E7xWfbFED82mLVhGXKlFEPe8IkBftzO7WfNwHtk7oGDHDeuH/o8VMpzzfMwmLUA=="],
|
||||
|
||||
"ws": ["ws@8.18.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w=="],
|
||||
|
||||
"xmlhttprequest-ssl": ["xmlhttprequest-ssl@2.1.2", "", {}, "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ=="],
|
||||
|
|
@ -939,18 +1189,22 @@
|
|||
|
||||
"yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
|
||||
|
||||
"yoctocolors": ["yoctocolors@2.1.1", "", {}, "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ=="],
|
||||
|
||||
"yoctocolors-cjs": ["yoctocolors-cjs@2.1.2", "", {}, "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA=="],
|
||||
|
||||
"zod": ["zod@3.24.3", "", {}, "sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg=="],
|
||||
|
||||
"zustand": ["zustand@5.0.0", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ=="],
|
||||
|
||||
"@coinbase/wallet-sdk/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
||||
|
||||
"@dotenvx/dotenvx/commander": ["commander@11.1.0", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="],
|
||||
|
||||
"@inquirer/core/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
|
||||
|
||||
"@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
|
||||
|
||||
"@isaacs/cliui/wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="],
|
||||
|
||||
"@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine": ["@metamask/json-rpc-engine@7.3.3", "", { "dependencies": { "@metamask/rpc-errors": "^6.2.1", "@metamask/safe-event-emitter": "^3.0.0", "@metamask/utils": "^8.3.0" } }, "sha512-dwZPq8wx9yV3IX2caLi9q9xZBw2XeIoYqdyihDDDpuHVCEiqadJLwqM3zy+uwf6F1QYQ65A8aOMQg1Uw7LMLNg=="],
|
||||
|
||||
"@metamask/eth-json-rpc-provider/@metamask/utils": ["@metamask/utils@5.0.2", "", { "dependencies": { "@ethereumjs/tx": "^4.1.2", "@types/debug": "^4.1.7", "debug": "^4.3.4", "semver": "^7.3.8", "superstruct": "^1.0.3" } }, "sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g=="],
|
||||
|
|
@ -961,10 +1215,10 @@
|
|||
|
||||
"@metamask/sdk-communication-layer/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
|
||||
"@metamask/utils/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
||||
|
||||
"@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="],
|
||||
|
||||
"@polkadot-api/cli/execa": ["execa@9.5.3", "", { "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "cross-spawn": "^7.0.3", "figures": "^6.1.0", "get-stream": "^9.0.0", "human-signals": "^8.0.0", "is-plain-obj": "^4.1.0", "is-stream": "^4.0.1", "npm-run-path": "^6.0.0", "pretty-ms": "^9.0.0", "signal-exit": "^4.1.0", "strip-final-newline": "^4.0.0", "yoctocolors": "^2.0.0" } }, "sha512-QFNnTvU3UjgWFy8Ef9iDHvIdcgZ344ebkwYx4/KLbR+CKQA4xBaHzv+iRpp86QfMHP8faFQLh8iOc57215y4Rg=="],
|
||||
|
||||
"@reown/appkit/@walletconnect/types": ["@walletconnect/types@2.19.2", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "events": "3.3.0" } }, "sha512-/LZWhkVCUN+fcTgQUxArxhn2R8DF+LSd/6Wh9FnpjeK/Sdupx1EPS8okWG6WPAqq2f404PRoNAfQytQ82Xdl3g=="],
|
||||
|
||||
"@reown/appkit/@walletconnect/universal-provider": ["@walletconnect/universal-provider@2.19.2", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/jsonrpc-http-connection": "1.0.8", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/sign-client": "2.19.2", "@walletconnect/types": "2.19.2", "@walletconnect/utils": "2.19.2", "es-toolkit": "1.33.0", "events": "3.3.0" } }, "sha512-LkKg+EjcSUpPUhhvRANgkjPL38wJPIWumAYD8OK/g4OFuJ4W3lS/XTCKthABQfFqmiNbNbVllmywiyE44KdpQg=="],
|
||||
|
|
@ -975,6 +1229,12 @@
|
|||
|
||||
"@reown/appkit-wallet/zod": ["zod@3.22.4", "", {}, "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg=="],
|
||||
|
||||
"@scure/bip32/@noble/curves": ["@noble/curves@1.8.2", "", { "dependencies": { "@noble/hashes": "1.7.2" } }, "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g=="],
|
||||
|
||||
"@scure/bip32/@noble/hashes": ["@noble/hashes@1.7.2", "", {}, "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ=="],
|
||||
|
||||
"@scure/bip39/@noble/hashes": ["@noble/hashes@1.7.2", "", {}, "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ=="],
|
||||
|
||||
"@types/ssh2/@types/node": ["@types/node@18.19.87", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-OIAAu6ypnVZHmsHCeJ+7CCSub38QNBS9uceMQeg7K5Ur0Jr+wG9wEOEvvMbhp09pxD5czIUy/jND7s7Tb6Nw7A=="],
|
||||
|
||||
"@wagmi/cli/picomatch": ["picomatch@3.0.1", "", {}, "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag=="],
|
||||
|
|
@ -1021,7 +1281,7 @@
|
|||
|
||||
"cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
||||
|
||||
"eciesjs/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
||||
"eciesjs/@noble/curves": ["@noble/curves@1.8.2", "", { "dependencies": { "@noble/hashes": "1.7.2" } }, "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g=="],
|
||||
|
||||
"engine.io-client/debug": ["debug@4.3.7", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ=="],
|
||||
|
||||
|
|
@ -1039,16 +1299,24 @@
|
|||
|
||||
"ethereum-cryptography/@scure/bip39": ["@scure/bip39@1.3.0", "", { "dependencies": { "@noble/hashes": "~1.4.0", "@scure/base": "~1.1.6" } }, "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ=="],
|
||||
|
||||
"foreground-child/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
|
||||
|
||||
"json-rpc-engine/@metamask/safe-event-emitter": ["@metamask/safe-event-emitter@2.0.0", "", {}, "sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q=="],
|
||||
|
||||
"log-symbols/is-unicode-supported": ["is-unicode-supported@1.3.0", "", {}, "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ=="],
|
||||
|
||||
"node-fetch/whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||
|
||||
"obj-multiplex/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
||||
|
||||
"ox/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
||||
"ox/@noble/curves": ["@noble/curves@1.8.2", "", { "dependencies": { "@noble/hashes": "1.7.2" } }, "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g=="],
|
||||
|
||||
"parse-json/type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
|
||||
|
||||
"qrcode/yargs": ["yargs@15.4.1", "", { "dependencies": { "cliui": "^6.0.0", "decamelize": "^1.2.0", "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^18.1.2" } }, "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A=="],
|
||||
|
||||
"read-pkg/type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
|
||||
|
||||
"restore-cursor/onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],
|
||||
|
||||
"restore-cursor/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
|
||||
|
|
@ -1057,22 +1325,62 @@
|
|||
|
||||
"socket.io-parser/debug": ["debug@4.3.7", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ=="],
|
||||
|
||||
"string-width-cjs/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
||||
|
||||
"string-width-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||
|
||||
"strip-ansi-cjs/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||
|
||||
"sucrase/commander": ["commander@4.1.1", "", {}, "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="],
|
||||
|
||||
"tsup/bundle-require": ["bundle-require@5.1.0", "", { "dependencies": { "load-tsconfig": "^0.2.3" }, "peerDependencies": { "esbuild": ">=0.18" } }, "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA=="],
|
||||
|
||||
"tsup/chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="],
|
||||
|
||||
"tsup/esbuild": ["esbuild@0.25.4", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.4", "@esbuild/android-arm": "0.25.4", "@esbuild/android-arm64": "0.25.4", "@esbuild/android-x64": "0.25.4", "@esbuild/darwin-arm64": "0.25.4", "@esbuild/darwin-x64": "0.25.4", "@esbuild/freebsd-arm64": "0.25.4", "@esbuild/freebsd-x64": "0.25.4", "@esbuild/linux-arm": "0.25.4", "@esbuild/linux-arm64": "0.25.4", "@esbuild/linux-ia32": "0.25.4", "@esbuild/linux-loong64": "0.25.4", "@esbuild/linux-mips64el": "0.25.4", "@esbuild/linux-ppc64": "0.25.4", "@esbuild/linux-riscv64": "0.25.4", "@esbuild/linux-s390x": "0.25.4", "@esbuild/linux-x64": "0.25.4", "@esbuild/netbsd-arm64": "0.25.4", "@esbuild/netbsd-x64": "0.25.4", "@esbuild/openbsd-arm64": "0.25.4", "@esbuild/openbsd-x64": "0.25.4", "@esbuild/sunos-x64": "0.25.4", "@esbuild/win32-arm64": "0.25.4", "@esbuild/win32-ia32": "0.25.4", "@esbuild/win32-x64": "0.25.4" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q=="],
|
||||
|
||||
"unstorage/chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="],
|
||||
|
||||
"valtio/use-sync-external-store": ["use-sync-external-store@1.2.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA=="],
|
||||
|
||||
"viem/@noble/curves": ["@noble/curves@1.8.2", "", { "dependencies": { "@noble/hashes": "1.7.2" } }, "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g=="],
|
||||
|
||||
"viem/@noble/hashes": ["@noble/hashes@1.7.2", "", {}, "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ=="],
|
||||
|
||||
"wrap-ansi/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
||||
|
||||
"wrap-ansi/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||
|
||||
"wrap-ansi-cjs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
||||
|
||||
"wrap-ansi-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||
|
||||
"write-file-atomic/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
|
||||
|
||||
"write-package/type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
|
||||
|
||||
"yargs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
||||
|
||||
"@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
|
||||
|
||||
"@isaacs/cliui/wrap-ansi/ansi-styles": ["ansi-styles@6.2.1", "", {}, "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="],
|
||||
|
||||
"@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/utils": ["@metamask/utils@8.5.0", "", { "dependencies": { "@ethereumjs/tx": "^4.2.0", "@metamask/superstruct": "^3.0.0", "@noble/hashes": "^1.3.1", "@scure/base": "^1.1.3", "@types/debug": "^4.1.7", "debug": "^4.3.4", "pony-cause": "^2.1.10", "semver": "^7.5.4", "uuid": "^9.0.1" } }, "sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ=="],
|
||||
|
||||
"@metamask/rpc-errors/@metamask/utils/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
||||
|
||||
"@metamask/rpc-errors/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="],
|
||||
|
||||
"@polkadot-api/cli/execa/get-stream": ["get-stream@9.0.1", "", { "dependencies": { "@sec-ant/readable-stream": "^0.4.1", "is-stream": "^4.0.1" } }, "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA=="],
|
||||
|
||||
"@polkadot-api/cli/execa/human-signals": ["human-signals@8.0.1", "", {}, "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ=="],
|
||||
|
||||
"@polkadot-api/cli/execa/is-stream": ["is-stream@4.0.1", "", {}, "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A=="],
|
||||
|
||||
"@polkadot-api/cli/execa/npm-run-path": ["npm-run-path@6.0.0", "", { "dependencies": { "path-key": "^4.0.0", "unicorn-magic": "^0.3.0" } }, "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA=="],
|
||||
|
||||
"@polkadot-api/cli/execa/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
|
||||
|
||||
"@polkadot-api/cli/execa/strip-final-newline": ["strip-final-newline@4.0.0", "", {}, "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw=="],
|
||||
|
||||
"@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/sign-client": ["@walletconnect/sign-client@2.19.2", "", { "dependencies": { "@walletconnect/core": "2.19.2", "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "2.1.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.19.2", "@walletconnect/utils": "2.19.2", "events": "3.3.0" } }, "sha512-a/K5PRIFPCjfHq5xx3WYKHAAF8Ft2I1LtxloyibqiQOoUtNLfKgFB1r8sdMvXM7/PADNPe4iAw4uSE6PrARrfg=="],
|
||||
|
||||
"@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/types": ["@walletconnect/types@2.19.2", "", { "dependencies": { "@walletconnect/events": "1.0.1", "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "events": "3.3.0" } }, "sha512-/LZWhkVCUN+fcTgQUxArxhn2R8DF+LSd/6Wh9FnpjeK/Sdupx1EPS8okWG6WPAqq2f404PRoNAfQytQ82Xdl3g=="],
|
||||
|
|
@ -1115,14 +1423,22 @@
|
|||
|
||||
"cross-spawn/which/isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
|
||||
|
||||
"eciesjs/@noble/curves/@noble/hashes": ["@noble/hashes@1.7.2", "", {}, "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ=="],
|
||||
|
||||
"ethereum-cryptography/@scure/bip32/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="],
|
||||
|
||||
"ethereum-cryptography/@scure/bip39/@scure/base": ["@scure/base@1.1.9", "", {}, "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg=="],
|
||||
|
||||
"node-fetch/whatwg-url/tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
||||
|
||||
"node-fetch/whatwg-url/webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
||||
|
||||
"obj-multiplex/readable-stream/safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="],
|
||||
|
||||
"obj-multiplex/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
|
||||
|
||||
"ox/@noble/curves/@noble/hashes": ["@noble/hashes@1.7.2", "", {}, "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ=="],
|
||||
|
||||
"qrcode/yargs/cliui": ["cliui@6.0.0", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^6.2.0" } }, "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ=="],
|
||||
|
||||
"qrcode/yargs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
||||
|
|
@ -1131,6 +1447,58 @@
|
|||
|
||||
"qrcode/yargs/yargs-parser": ["yargs-parser@18.1.3", "", { "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ=="],
|
||||
|
||||
"string-width-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.4", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.25.4", "", { "os": "android", "cpu": "arm" }, "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/android-arm64": ["@esbuild/android-arm64@0.25.4", "", { "os": "android", "cpu": "arm64" }, "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/android-x64": ["@esbuild/android-x64@0.25.4", "", { "os": "android", "cpu": "x64" }, "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.25.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.25.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.25.4", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.25.4", "", { "os": "freebsd", "cpu": "x64" }, "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/linux-arm": ["@esbuild/linux-arm@0.25.4", "", { "os": "linux", "cpu": "arm" }, "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.25.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.25.4", "", { "os": "linux", "cpu": "ia32" }, "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.25.4", "", { "os": "linux", "cpu": "none" }, "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.25.4", "", { "os": "linux", "cpu": "none" }, "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.25.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.25.4", "", { "os": "linux", "cpu": "none" }, "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.25.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/linux-x64": ["@esbuild/linux-x64@0.25.4", "", { "os": "linux", "cpu": "x64" }, "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.25.4", "", { "os": "none", "cpu": "x64" }, "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.25.4", "", { "os": "openbsd", "cpu": "x64" }, "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.25.4", "", { "os": "sunos", "cpu": "x64" }, "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.25.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.4", "", { "os": "win32", "cpu": "ia32" }, "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg=="],
|
||||
|
||||
"tsup/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.4", "", { "os": "win32", "cpu": "x64" }, "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ=="],
|
||||
|
||||
"wrap-ansi-cjs/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
||||
|
||||
"wrap-ansi-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||
|
||||
"wrap-ansi/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
||||
|
||||
"wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||
|
|
@ -1139,10 +1507,12 @@
|
|||
|
||||
"yargs/string-width/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||
|
||||
"@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/utils/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
||||
|
||||
"@metamask/eth-json-rpc-provider/@metamask/json-rpc-engine/@metamask/utils/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="],
|
||||
|
||||
"@polkadot-api/cli/execa/npm-run-path/path-key": ["path-key@4.0.0", "", {}, "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ=="],
|
||||
|
||||
"@polkadot-api/cli/execa/npm-run-path/unicorn-magic": ["unicorn-magic@0.3.0", "", {}, "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA=="],
|
||||
|
||||
"@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/sign-client/@walletconnect/core": ["@walletconnect/core@2.19.2", "", { "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", "@walletconnect/logger": "2.1.2", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", "@walletconnect/types": "2.19.2", "@walletconnect/utils": "2.19.2", "@walletconnect/window-getters": "1.0.1", "es-toolkit": "1.33.0", "events": "3.3.0", "uint8arrays": "3.1.0" } }, "sha512-iu0mgLj51AXcKpdNj8+4EdNNBd/mkNjLEhZn6UMc/r7BM9WbmpPMEydA39WeRLbdLO4kbpmq4wTbiskI1rg+HA=="],
|
||||
|
||||
"@reown/appkit-controllers/@walletconnect/universal-provider/@walletconnect/utils/@noble/curves": ["@noble/curves@1.8.1", "", { "dependencies": { "@noble/hashes": "1.7.1" } }, "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ=="],
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
import type { Command } from "@commander-js/extra-typings";
|
||||
import { deployContracts } from "scripts/deploy-contracts";
|
||||
import sendTxn from "scripts/send-txn";
|
||||
import { sendDataHavenTxn, sendEthTxn } from "scripts/send-txn";
|
||||
import invariant from "tiny-invariant";
|
||||
import { ANVIL_FUNDED_ACCOUNTS, getPortFromKurtosis, logger } from "utils";
|
||||
import {
|
||||
ANVIL_FUNDED_ACCOUNTS,
|
||||
SUBSTRATE_FUNDED_ACCOUNTS,
|
||||
getPortFromKurtosis,
|
||||
logger
|
||||
} from "utils";
|
||||
import { checkDependencies } from "./checks";
|
||||
import { launchDataHavenSolochain } from "./datahaven";
|
||||
import { launchKurtosis } from "./kurtosis";
|
||||
|
|
@ -51,13 +56,9 @@ const launchFunction = async (options: LaunchOptions, launchedNetwork: LaunchedN
|
|||
|
||||
await launchKurtosis(options);
|
||||
|
||||
logger.debug(`Using account ${ANVIL_FUNDED_ACCOUNTS[1].publicKey}`);
|
||||
const privateKey = ANVIL_FUNDED_ACCOUNTS[1].privateKey;
|
||||
const rethPublicPort = await getPortFromKurtosis("el-1-reth-lighthouse", "rpc");
|
||||
const networkRpcUrl = `http://127.0.0.1:${rethPublicPort}`;
|
||||
invariant(networkRpcUrl, "❌ Network RPC URL not found");
|
||||
|
||||
await sendTxn(privateKey, networkRpcUrl);
|
||||
const elRpcUrl = `http://127.0.0.1:${rethPublicPort}`;
|
||||
invariant(elRpcUrl, "❌ Network RPC URL not found");
|
||||
|
||||
let blockscoutBackendUrl: string | undefined = undefined;
|
||||
|
||||
|
|
@ -72,13 +73,13 @@ const launchFunction = async (options: LaunchOptions, launchedNetwork: LaunchedN
|
|||
}
|
||||
|
||||
const contractsDeployed = await deployContracts({
|
||||
rpcUrl: networkRpcUrl,
|
||||
rpcUrl: elRpcUrl,
|
||||
verified: options.verified,
|
||||
blockscoutBackendUrl,
|
||||
deployContracts: options.deployContracts
|
||||
});
|
||||
|
||||
await performValidatorOperations(options, networkRpcUrl, contractsDeployed);
|
||||
await performValidatorOperations(options, elRpcUrl, contractsDeployed);
|
||||
|
||||
await launchRelayers(options, launchedNetwork);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,16 +11,17 @@
|
|||
"build:docker:relayer": "bun -e \"import build from './scripts/snowbridge-relayer.ts'; build()\"",
|
||||
"generate:wagmi": "wagmi generate",
|
||||
"generate:snowbridge-cfgs": "bun -e \"import {generateSnowbridgeConfigs} from './scripts/gen-snowbridge-cfgs.ts'; await generateSnowbridgeConfigs()\"",
|
||||
"generate:types": "(cd ../operator && cargo build --release) && bun x papi add --wasm \"../operator/target/release/wbuild/datahaven-stagenet-runtime/datahaven_stagenet_runtime.wasm\" datahaven",
|
||||
"start:e2e:verified": "bun cli --verified --blockscout --deploy-contracts --setup-validators --update-validator-set --fund-validators --slot-time 1",
|
||||
"start:e2e:ci": "bun cli -d --setup-validators --update-validator-set --fund-validators --always-clean --slot-time 2 --datahaven --relayer",
|
||||
"start:e2e:minrelayer": "bun cli --relayer -d --no-setup-validators --no-update-validator-set --no-fund-validators --datahaven",
|
||||
"stop:e2e": "pkill datahaven ; pkill snowbridge-relay ; kurtosis enclave stop datahaven-ethereum && kurtosis clean && kurtosis engine stop && docker container prune -f",
|
||||
"stop:e2e:verified": "bun stop:e2e",
|
||||
"stop:e2e:minimal": "bun stop:e2e",
|
||||
"stop:e2e:quick": "kurtosis enclave stop datahaven-ethereum",
|
||||
"stop:kurtosis-engine": "kurtosis engine stop && docker container prune -f",
|
||||
"test:e2e": "bun test suites/e2e --timeout 30000",
|
||||
"typecheck": "tsc --noEmit"
|
||||
"typecheck": "tsc --noEmit",
|
||||
"postinstall": "papi"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest"
|
||||
|
|
@ -33,6 +34,9 @@
|
|||
"@commander-js/extra-typings": "^13.1.0",
|
||||
"@dotenvx/dotenvx": "^1.41.0",
|
||||
"@inquirer/prompts": "^7.5.0",
|
||||
"@noble/curves": "^1.9.0",
|
||||
"@noble/hashes": "^1.8.0",
|
||||
"@polkadot-api/descriptors": "file:.papi/descriptors",
|
||||
"@types/dockerode": "^3.3.38",
|
||||
"@types/node": "^22.14.1",
|
||||
"@wagmi/cli": "^2.3.0",
|
||||
|
|
@ -45,6 +49,7 @@
|
|||
"ora": "^8.2.0",
|
||||
"pino": "^9.6.0",
|
||||
"pino-pretty": "^13.0.0",
|
||||
"polkadot-api": "^1.10.2",
|
||||
"tiny-invariant": "^1.3.3",
|
||||
"viem": "^2.28.0",
|
||||
"wagmi": "^2.15.0",
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
import { generateRandomAccount, logger, printDivider, printHeader } from "utils";
|
||||
import { generateRandomAccount, getEvmEcdsaSigner, logger, printDivider, printHeader } from "utils";
|
||||
|
||||
import { http, createWalletClient, defineChain, parseEther, publicActions } from "viem";
|
||||
import { privateKeyToAccount } from "viem/accounts";
|
||||
|
||||
export default async function main(privateKey: string, networkRpcUrl: string) {
|
||||
import { datahaven } from "@polkadot-api/descriptors";
|
||||
import { Binary } from "@polkadot-api/substrate-bindings";
|
||||
import { createClient } from "polkadot-api";
|
||||
import { withPolkadotSdkCompat } from "polkadot-api/polkadot-sdk-compat";
|
||||
import { getWsProvider } from "polkadot-api/ws-provider/web";
|
||||
|
||||
export const sendEthTxn = async (privateKey: string, networkRpcUrl: string) => {
|
||||
printHeader("Sending Test ETH Transaction");
|
||||
|
||||
const datahaven = defineChain({
|
||||
const localEth = defineChain({
|
||||
id: 3151908,
|
||||
name: "datahaven",
|
||||
nativeCurrency: {
|
||||
|
|
@ -28,7 +35,7 @@ export default async function main(privateKey: string, networkRpcUrl: string) {
|
|||
logger.debug(`Using account: ${signer.address}`);
|
||||
const client = createWalletClient({
|
||||
account: signer,
|
||||
chain: datahaven,
|
||||
chain: localEth,
|
||||
transport: http(networkRpcUrl)
|
||||
}).extend(publicActions);
|
||||
|
||||
|
|
@ -54,4 +61,29 @@ export default async function main(privateKey: string, networkRpcUrl: string) {
|
|||
|
||||
printDivider();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const sendDataHavenTxn = async (privateKey: string, networkRpcUrl: string) => {
|
||||
printHeader("Sending Test DataHaven Transaction");
|
||||
|
||||
const client = createClient(withPolkadotSdkCompat(getWsProvider(networkRpcUrl)));
|
||||
const dhApi = client.getTypedApi(datahaven);
|
||||
|
||||
const signer = getEvmEcdsaSigner(privateKey);
|
||||
|
||||
const remarkBytes = new TextEncoder().encode("Hello, world!");
|
||||
const tx = dhApi.tx.System.remark_with_event({
|
||||
remark: new Binary(remarkBytes)
|
||||
});
|
||||
|
||||
const txFinalisedPayload = await tx.signAndSubmit(signer);
|
||||
|
||||
logger.info(
|
||||
`Transaction with hash ${txFinalisedPayload.txHash} submitted and finalised in block ${txFinalisedPayload.block.hash}`
|
||||
);
|
||||
|
||||
client.destroy();
|
||||
logger.debug("Destroyed client");
|
||||
|
||||
printDivider();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export * from "./docker";
|
|||
export * from "./input";
|
||||
export * from "./kurtosis";
|
||||
export * from "./logger";
|
||||
export * from "./papi";
|
||||
export * from "./parser";
|
||||
export * from "./rpc";
|
||||
export * from "./shell";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ const logLevel = process.env.LOG_LEVEL || "info";
|
|||
const stream = pinoPretty({
|
||||
colorize: true,
|
||||
// Log to STDERR so it doesn't interfere with CLI output
|
||||
destination: 2
|
||||
destination: 2,
|
||||
sync: true
|
||||
});
|
||||
|
||||
// Custom logger type with success method
|
||||
|
|
|
|||
33
test/utils/papi.ts
Normal file
33
test/utils/papi.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { secp256k1 } from "@noble/curves/secp256k1";
|
||||
import { keccak_256 } from "@noble/hashes/sha3";
|
||||
import { type PolkadotSigner, getPolkadotSigner } from "polkadot-api/signer";
|
||||
|
||||
// A signer for EVM like chains that use AccountId20 as their public address
|
||||
export const getEvmEcdsaSigner = (privateKey: string): PolkadotSigner => {
|
||||
const privateKeyBytes = Buffer.from(
|
||||
privateKey.startsWith("0x") ? privateKey.slice(2) : privateKey,
|
||||
"hex"
|
||||
);
|
||||
const publicAddress = keccak_256(secp256k1.getPublicKey(privateKeyBytes, false).slice(1)).slice(
|
||||
-20
|
||||
);
|
||||
|
||||
return getPolkadotSigner(publicAddress, "Ecdsa", (input) =>
|
||||
signEcdsa(keccak_256, input, privateKeyBytes)
|
||||
);
|
||||
};
|
||||
|
||||
export const signEcdsa = (
|
||||
hasher: (input: Uint8Array) => Uint8Array,
|
||||
value: Uint8Array,
|
||||
priv: Uint8Array
|
||||
) => {
|
||||
const signature = secp256k1.sign(hasher(value), priv);
|
||||
const signedBytes = signature.toCompactRawBytes();
|
||||
|
||||
const result = new Uint8Array(signedBytes.length + 1);
|
||||
result.set(signedBytes);
|
||||
result[signedBytes.length] = signature.recovery;
|
||||
|
||||
return result;
|
||||
};
|
||||
|
|
@ -1,13 +1,5 @@
|
|||
import { ANVIL_FUNDED_ACCOUNTS, CHAIN_ID, getRPCUrl, getWSUrl } from "utils";
|
||||
import {
|
||||
http,
|
||||
type PublicActions,
|
||||
type WalletClient,
|
||||
createPublicClient,
|
||||
createWalletClient,
|
||||
defineChain,
|
||||
publicActions
|
||||
} from "viem";
|
||||
import { http, createWalletClient, defineChain, publicActions } from "viem";
|
||||
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
|
||||
|
||||
export const createChainConfig = async () =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue